Hopefully at this point,
I've convinced you that Python is a successful programming language.
But what makes it so successful?
To answer that, we'll have to take a look at the history of Python.
Any history of Python starts with this man, Guido van Rossum,
creator of Python in x,
benevolent dictator for life.
The team back in 1994 released Python 1,
which stuck around for a couple of years before it was superseded by Python 2.
Python 2 was around for a very long time,
only winding down at the start of 2020.
But Python 3, is the present and future of the language.
Released in 2008, it's only been picking up steam as Python 2 has been wilting.
At this point, only python 3.6 or more is currently supported,
but we'll be using Python 3.9 in this course,
the most recent version that was released just a few weeks ago.
Along the way, lots of other tools popped up that extended the reach of Python and
helped to make it such a successful programming language
tools like numpy, SciPy or matplotlib.
However, in my opinion, something much more
important ran through all of these versions of
Python that characterize the language and
that have helped shape it into successful language it is today.
That is its philosophy.
Python's philosophy is actually hidden in an Easter eggs.
If you go to a Python interpreter,
where you can execute Python code and you type 'Import
this' meaning import the essence of this,
import Python itself, import whatever it means to be Python,
you get back an Easter egg,
a piece of literature written by Tim Peters called the Zen of Python.
It's so important, I'm going to read you, the whole thing.
It starts, "Beautiful is better than ugly,
explicit is better than implicit,
simple is better than complex,
but complex is better than complicated.
Flat is better than nested,
sparse is better than dense, and readability counts."
So far we see that these aren't formal specifications for how a language is designed.
It doesn't say we need braces or we don't need braces.
We need this sort of naming scheme,
or we need that sort of naming scheme.
Rather, these are statements about aesthetics, about beauty,
about design principles that might guide a language's evolution.
In recognition that code is read more often than it is written, Python says, "Hey,
readability really counts in the code we write and in
the language we use," the Zen of Python continues,
"Special cases aren't special enough to break the rules,
although practicality beats purity.
Errors should never pass silently unless explicitly silenced.
In the face of ambiguity,
refuse the temptation to guess.
There should be one and preferably only one obvious way to do it.
Although that way may not be obvious at first unless you're Dutch,"
a joking reference to the fact that van Rossum and other creators were Dutch.
Then Zen of Python finishes,
"Now is better than never,
although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain,
it may be a good idea," and lastly,
"Namespaces are one honking great idea,
they're so great, let's do more of those."
We've seen that emphasis on practicality,
a focus on doing things you can do now,
but differing perfection and a focus on human readability,
all of these hint at Pythons high-level approach.
If I had to summarize all this in a single line,
I would say that programmers are more important than programs.
This is the summary of the Zen of Python.
I'll say it again for the people in the back,
programmers are more important than programs
in the eyes of Python. This wasn't always a given.
There was a time when computers and
their programs were much more expensive than the lab technicians.
Programming languages, design patterns,
and culture evolved around the idea that the program is the most important thing.
File size, explicit performance complexity
and certainly there're still programs for which those things are important.
Programs that handle sensitive information,
programs that run billions of times a second.
These are programs where the program itself is extremely important.
The most vital part,
far more than any programmer cost,
efficiency or even morale.
But Python takes an alternate view.
Python says, "You know what?
We're going to assert that programmers are more important than programs."
Python's not the first language to say this.
In fact many new high-level languages took this tack.
But Python was one of the first to codify
these principles in a statement of philosophy and as a result,
the idea that programmers and humans from the center of
Python programming has guided
the language and shifted its evolution to make it such a successful language.
Really, if you believe that programmers,
you, the person watching this,
are more important than the hunk of material on which you're watching this,
then Python is probably a good language for you.