
Why Is Python Growing So Quickly? - lainon
https://stackoverflow.blog/2017/09/14/python-growing-quickly/
======
monkmartinez
> Why Is Python Growing So Quickly?

Really easy to answer: It is stupid fun to program with Python. There are
libraries for everything you can imagine and they are generally very easy to
use. Once you grok the virtual environment thing, writing
apps/programs/scripts is just a matter of creating a new env and installing
the libs you need. Testing ideas with Jupyter notebook is fun, fast and
rewarding. Pycharm is awesome. VSCode with Python just works. You can automate
tons of boring stuff (Thanks Al!)... and the list goes on... and on...

~~~
CJefferson
I have come to the conclusion that part of the reason python is so fun is
because it is slow.

There are so many lovely and easy to use libraries in Python. I took a couple
and tried to be inspired by them to write a C++ library, maybe for addition to
boost.

However, if you are writing C++, people expect your library to be fast and
memory efficient -- you can't go around sticking the entirety of a parsed file
in a std::string. Also, people then start saying your code better interoperate
with their templated classes well, and they want to replace the memory
management entirely, and it goes on...

Of course, the resulting libraries are very fast and very clever, but they
have lost the joy. They also take much longer to write, maintain and use.

~~~
xapata
One of my clients recently replaced a major chunk of their C++ code with
Python and achieved a speedup from multi-hour to sub-millisecond. That's a big
win.

Python encourages readable code, which enables smarter algorithms, which
ultimately swamps all those little memory optimizations. Oh, and
PyPy/Numba/Cython let you get those little optimizations, too.

~~~
Sohcahtoa82
> One of my clients recently replaced a major chunk of their C++ code with
> Python and achieved a speedup from multi-hour to sub-millisecond.

I'd _really_ like to know what they were doing and how they could do it so
wrong that the C++ version took hours while the Python version was faster than
a blink of the eye.

~~~
goatlover
Good question. I did have a situation where looping over a fairly large Pandas
dataframe took 12 minutes, but using the underlying numpy values took only 3
seconds. The looping was required to do complicated row and column operations.

Similarly, naybe the C++ code was using an inefficient data structure for a
large dataset compared to using something like Numpy.

------
thisisit
Mostly because the whole Data Science and ML stuff is catching on. Everyone
and their grandma now wants to do something related to AI, ML etc. The easiest
language for these is? Python. Hence the growth.

Once upon a time it was all about cloud, SaaS and building a webapp. Hence the
growth of JS.

~~~
choxi
The chart makes a pretty compelling case that this is the right answer. The
top trending libraries are pandas, numpy, and matplotlib (both flask and
django are probably trending at the same baseline rate of any top 10 popular
language). These are all libraries heavily used in data science.

We also know that ML and AI are new macro trends in the tech industry.
Python's elegant syntax isn't really evidence for why Python is trending _now_
as opposed to any other time in the last decade.

~~~
bsilvereagle
> These are all libraries heavily used in data science.

These are all libraries heavily used in any technical computing field. The
cost of MATLAB, the simplicity of Jupyter, and the community around Python
have caused Python to slowly be a language used for general technical
computing, not just data science.

------
Derbasti
I don't like how Numpy, Matplotlib and Pandas are portrayed as "Data Science".
There is nothing particular to "Data" in these three packages. All I see is
"Science".

All scientists need numerical simulations or evaluations, plotting, and
statistics. That's what these libraries do. Not "Data Science", but "Science".

The correlation with TensorFlow/Keras suggests Data Science, maybe. But I bet
there is a similar correlation with scikit-learn, Scipy, scikit-image,
basemap, and heck, Matlab, Julia and R--and those each suggest different
scientific endevours.

TL;DR: In my opinion, Python is becoming the language of _Science_ , which
includes, but is not limited to, _Data_ Science.

~~~
cjbillington
I'm still at a loss as to what type of science there is that doesn't have
data.

"Data science" to me seems like a buzzword that has connotations of a field or
industry starting to use science where they previously didn't. Over here in
academia it's just "science", or possibly "data analysis" if you want to
emphasise that that's the part of your project you're working on right now as
opposed to data collection.

~~~
xapata
Theoretical physicists don't always use data. Many scientists sometimes use
case studies instead of systematic data collection.

~~~
cjbillington
Eh. Case studies is still data. And the theoretical physicists that don't use
data are criticised as not really doing science. Most theorists I know (I am
in physics) are heavily data-driven.

------
ralmidani
Python has a reputation for being a good "beginner" or "scripting" language.
Describing it as such is really a disservice.

One of things that makes Python a killer language (apart from its readable
syntax and straightforward programming model) is how it enables you to jump in
at any skill level and be immediately productive, without hampering your
ability to get things done quickly and elegantly as your skills grow.

There are faster, trendier languages out there, but I suspect Python will
still be thriving when many of them have become footnotes.

~~~
blhack
This has been such a frustration of mine when mentoring people through
learning to code.

Python is a great beginner language, but it isn't a language that is only for
beginners.

------
alephnil
Python is what BASIC was in the 1970s and 80s, in a good way.

It enables people that normally would not program to do things that they
otherwise could not be done with traditional software with a GUI, that being
web based, apps or desktop applications.

It is a stepping stone into computing that otherwise would have been
inaccessible for many. Unlike BASIC, the design of the language is good enough
that it can be used in professional applications, and not only being a
stepping stone.

------
alienreborn
because readability is one of the most, if not the most, important quality for
mainstream programming language adoption.

~~~
pyre
But significant whitespace means that I can't write code like this:

    
    
       sub (@) { return map { "@{[ $_[0] . $_ ]}" } @$_ };
    
    

Disclaimer: The majority of the programmers that I have known in real life
that have a significant (and _very_ vocal) dislike of Python's whitespace
requirements have all written code like that above (this is my from-memory
reproduction of actual code that one of them wrote). Python sucks because it's
"restricting" them from being "expressive" with their code.

~~~
AlexCoventry
What does that do?

~~~
falsedan
So let's break it down:

    
    
        sub
    

It's an anonymous sub

    
    
        (@)
    

It has a prototype that says it accepts a list of arguments (this is the
default in perl though).

Prototypes are mostly for giving hints to the compiler on how to unambiguously
parse calls to your function later. For an anonymous sub, it's pointless
because you assign its value to a variable, and then brackets are required
when calling it.

    
    
        return
    

It returns the result of the map (this default in perl is to return the result
of the last expression & everything is an expression though)

    
    
        map
    

same as python map(code, list)

    
    
        { "@{[ <some stuff> ]}" }
    

This is a particular perl goof for interpolating array lookups into a string.
Usually, perl's sigils let variables be interpolated without any issue, but
since we're using $_[0] to use the first element of the @_ array, it's
ambiguous with $_ . '[0]'.

The @{} dereferences the contents of the braces as an array, and [] creates a
new arrayref. The arrayref has one element, and perl's default stringification
of an array (join them all with no separator) means that it… iterpolates the
thing inside the @{[]} into the surrounding string.

This is pointless though, since it's the only thing in the string. The author
might have been trying to give a string context to force stringification of
the thing, but the dot operator already provides that context.

    
    
        $_[0] . $_
    

This is a string of the first element of … hmm. Not of the currently-mapped
element (that's $_). $_[0] refers to the first element of @_. This makes a new
value which is the concatenation of the first element with the current
element.

    
    
        @$_
    

This is a short way of writing @{ $_ }: dereference the arrayref that's stored
in $_. But $_ is not set anywhere, so I assume this is a typo of @_

I would have written this as:

    
    
        my $prefixer = sub { my($prefix , @rest) = @_; return map { $prefix.$_ } @_ };
    

And it would work like this:

    
    
        say $prefixer->('Hi_', 1, 'str', 7);
        > 'Hi_Hi_Hi_1Hi_strHi_7'
    

The 'best' way to write it would have been:

    
    
        sub { $_[0].join($_[0], @_) }

~~~
falsedan
The python equivalent is

    
    
        lambda *lst: ''.join([str(lst[0]), str(lst[0]).join([str(_) for _ in lst])])
    

Which is uh… begging for an initial line of "lst = map(str, lst)"

~~~
RodgerTheGreat
If I follow correctly, the equivalent in K would be

    
    
        {,/(*t),/:t:$x}
    

Flatten (,/) the first element of the list (*t) joined with each element of
the list (a,/:b), where t is the input x cast to a list of strings (t:$x).
Curly braces make the expression an anonymous function, and since no argument
names are specified explicitly the name x is the single input argument.

------
Animats
_based on Stack Overflow question visits_

Is Python use really growing? Or is this a Stack Overflow thing? I thought it
was being displaced by Javascript Everywhere.

Python had a 5-year setback from the Python 3 transition, but we're now mostly
past that.

~~~
fish_fan
Well, most devs I know would rather use python for server-side and scripting,
but you're not wrong. Python never found a way to do cross platform UI as well
as react native; it's on every browser; you don't have to unlearn brace
syntax.

That said; the idea of something like numpy in javascript is years off and
laughable.

------
microDude
Really simple answer...

University undergraduate classes in a variety of courses use it as their
default language, so it is a bunch of students trying to complete their
homework assignments.

------
rdiddly
OK Stackoverflow, that's enough charticles about this language or that, and
which one's growing and which one gets used by whom at what time of day and in
relation to which other query etc. It's like they didn't expect the attention
they got for these, and now they're addicted to it. Nothing against Python...
because if anything my underlying point might be that language doesn't
ultimately matter that much.

But besides, there still remains the same question as always: Doesn't the
posing of Stackoverflow questions tend to reflect more who's _starting_ to use
a language, than the sum total of who uses it per se? (Since presumably
questions taper off with time.) If you're measuring growth or adoption, as in
this case, sure, it might seem like a reasonable approximation, but it doesn't
tell you anything about long-term use (by people who become experts and stop
visiting Stackoverflow) or about attrition (people who quit using it and move
on to something else). Thus any trend Stackoverflow can see, probably
overemphasizes short-term phenomena. Which is great if you're doing
algorithmic trading on the stock market and make your money by responding to
the market's every short-term boom & bust (and other investors' overconfidence
& diaper-crappings respectively), but not so great if you're choosing a
language to which you'll devote months of study.

------
russellbeattie
Python is a great language, despite its quirks. Imagine how popular Python
would be if it had decent basic documentation and a single active version? The
confusion caused by Python 3 caused at least a decade of slow adoption and the
docs, well, that's pretty much a lost cause. (Compare
[https://docs.python.org/3/library/os.path.html](https://docs.python.org/3/library/os.path.html)
to [https://nodejs.org/api/path.html](https://nodejs.org/api/path.html) \- the
latter has a nice summary at the beginning, an index of methods at the top of
the page listing everything below, method inputs and return values are noted
for each method clearly, concise non-interactive terminal examples that you
can copy/paste for each method is given, the exact version the method was
added, a collapsed history of changes and any error types thrown. My only
assumption is that the Python maintainers must have a side deal with O'Reilly
to keep the docs in the worst format ever as a source of continued revenue for
both.)

~~~
mjw1007
I'd say that, over the last twenty years, Python's docs have gone from
excellent to good to middling to excellent to good to middling (dropping as
the language expanded and the generally expected standard went up, and
improving when they did one major revamp).

So I agree that another revamp would be good now, but I historically the docs
have been a plus as much as they've been a minus, relative to Python's
alternatives.

~~~
dom0
Much plain reference data is missing from the docs (like return types). Its
neat to describe a function, but if you don't hand out the API, then the docs
are not all that useful.

------
bdcravens
Many have listed out the technical reasons, but I think there's a cultural
aspect: I think many people are turned off by the community of languages like
Ruby. Sometimes you just want a great tool, not unicorns and kittens.

~~~
swat535
What exactly are you talking about here?

Are you referring to Github, Shopify, Basecamp and many other functional
businesses scaled and built on the shoulders of ruby "unicorns" and "kittens"
?

Having worked with both languages, I can confirm that they simply have
different view points with tradeoffs, and that in itself is a matter of
personal opinion.

But claiming one community does not build great tools because you view them as
"kittens" is ridiculous.

Also please do not generalize things like "most people" prefer X.

[EDIT] I sincerely hope this comment does not come off as rude. I am just
trying to understand OP's point of view

~~~
newen
I think he means those intro to ruby tutorials where they make ruby (and
programming in general) sound all magical, where it's so easy to program and
programming is just unicorns and kittens or whatever. It becomes tiring and
dumb after a while.

~~~
newen
Add in ducks and geese and a whole slew of other animals and I end up
wondering if I'm programming in a zoo with ruby lol.

------
jackschultz
The most interesting part of the post is the conclusion where the author says
that he's a data scientist who uses R and doesn't feel the need to switch to
Python!

He also has very good thoughts, and very important for beginners to know,
about how there isn't a single right way to learn programming.

> In any case, data science is an exciting and growing field, and there’s
> plenty of room for multiple languages to thrive. My main conclusion is to
> encourage developers early in their career to consider building skills in
> data science. We’ve seen here that it’s among the fastest-growing components
> of the software development ecosystem, and one that’s become relevant across
> many industries.

~~~
make3
How it that interesting? Statisticians and economists everywhere use R instead
of Python

~~~
jackschultz
The fact that the author wrote a sizable post about how big Python is and is
growing, but then says he's more of an R type of person instead of Python.
Obviously that's interesting to see when authors aren't giant fans of what
they're trying to promote.

------
davesque
My simple answer to this, apart from the arguments laid down in the article,
is that the Python core devs (and community) have found a unique balance
between sobriety and adventurousness. I think this explains why the language
was adopted by data scientists and ML researchers. My complaints with other
languages usually center around them being too preoccupied with theoretical or
academic concerns (e.g. Haskell) _or_ being too loose in adopting new features
or opaque syntax (e.g. Javascript).

Also, Python is probably the most concise and easy-to-read imperative language
that has gained wide acceptance.

------
rurban
Besides the obvious answer: pseudocode alike, also don't forget: worse is
better.

Of all major languages is by far the slowest, hardest to extend and by now
easily surpassed PHP and JavaScript with its number of design quirks.

------
Will_Do
I don't think SO questions is the best way to gauge the popularity of a
language and especially not a package.

I big reason why Pandas is so popular is because its API is so complicated. I
probably have 10x more experience using Pandas than Django. And yet, when I'm
doing something in Pandas I'm visiting the documentation far more often than
Django. Let's compare the top level APIs:

>>> import pandas as pd

>>> len(dir(pd))

177

>>> import django

>>> len(dir(django))

11

Also, I find the data manipulation Pandas provides is far inferior to the R
Hadleyverse and is one of the few things that R does better than Python.

~~~
dom0
Django has a very deep package tree, there are tons of stuff in there — a lot
of things you wouldn't expect.

~~~
yen223
Django admin could fill a section by itself.

------
deepnotderp
Because programming in Python is great for productivity, has lots of useful
libraries, is rather bearable/enjoyable depending on your view point and for
90% of people/companies you don't need the speed of anything more than PyPy or
Cython because, believe me, you're not at Facebook or Google scale, and even
those companies often use Python (Google most famously).

Btw, for those of you who dislike the dynamic typing (e.g. myself) of Python,
check out Cython, it's really heaven.

------
aaronchall
I'm a Python answerer on Stack Overflow, I teach Python at NYU, and whaddaya
know, I write Python for my day job.

Why is it growing so quickly? I speculate:

Lots of people want to learn to program - and Python is easy to learn and
teach.

I think it blows other languages out of the water. I'm going to compare it to
its closest competitor, Ruby. Ruby is also open-source, high level, popular
relative to other languages (which means you can probably get help if you need
it), it has lots of libraries (meaning you can do a lot with it), ok
tutorials, and a decent package manager. On the downside, Ruby is also a very
large language, which makes it much harder to learn to mastery.

I think Python blows Ruby out of the water in terms of how easy Python is to
learn relative to Ruby.

I don't encourage people to learn Ruby. I spent a long time (months) trying to
learn it. I still don't tell people I know it.

I used to think that Ruby's syntax is twice as much to learn - now I think it
might be even more than that.

Ruby's YACC file is ~918 lines long[0], while Python's grammar file is 149
lines long.

    
    
        ~$ wc cpython/Grammar/Grammar 
         149  879 6472 cpython/Grammar/Grammar
    

Even if 1/2 of Ruby's grammar output is whitespace, that's more than twice as
much grammar to learn as Python's grammar[1].

I could compare Python to other languages, but I don't think they come close
to matching the upsides of Python.

I still want to learn other languages, like Haskell, lisps, and C, to a level
of mastery - but since I can be so productive so fast with Python, the other
goals are something I work on in my spare time without a bunch of urgency.

[0]
[https://stackoverflow.com/a/16629318/541136](https://stackoverflow.com/a/16629318/541136)

[1]
[https://docs.python.org/3/reference/grammar.html](https://docs.python.org/3/reference/grammar.html)

PS I can see that this comparison to Ruby isn't popular due to the downvoting
- but nobody is contradicting my point.

~~~
cbanks
_Cough_. Python's _cpython /Grammar/Grammar_ uses a compact EBNF notation.
Converted to yacc it is about 850 lines long.

------
csense
Now that powerful machines are commonplace, the biggest limiting factor of
software creation is developer productivity.

Python's so popular because it maximizes developer productivity.

------
igravious
I say all the following as an avowed Rubyist

1) Computational Linguistics libraries

2) Machine Learning libraries

3) Still one of the blessed languages internal to Google? and BFDL was
employed for a while there

4) Jupyter Notebooks

5) Coder Dojo approved language

I used to think that all dynamic languages (Ruby/Python/Javascript/Perl/…)
were of a par but I have to admit that Python has an awful lot of mindshare
and it's beginning to exhibit strong network effects.

~~~
aphextron
>I used to think that all dynamic languages (Ruby/Python/Javascript/Perl/…)
were of a par but I have to admit that Python has an awful lot of mindshare
and it's beginning to exhibit strong network effects.

Ruby is a wonderful language with a really unfortunate standard
implementation. It's easily 5 times slower than Node at practically anything,
which is sad because Ruby is infinitely better than Javascript. I really think
this is what it comes down to and why Rails has been dying off.

~~~
igravious
All that beautiful meta-programming flexibility has come at a price. The
research projects sponsored by the likes of IBM and Oracle to give Ruby a much
needed speed boost are very slow in the offing – it feels like V8 was
developed overnight in comparison. Aesthetically I think Ruby beats
Python/Javascript/Perl but unfortunately that's not enough to move the needle
on the dial.

It'll be interesting to see whether Python or Ruby or Ruby get to WebAssembly
first – I'm correct in saying that none has of yet, yes?

~~~
goatlover
Common Lisp found a way to be performant. Is Ruby really that much harder to
optimize than other dynamic languages? JS had the advantage that there was
strong incentive to make it fast in the browser, and V8 had Lars Bak working
on it.

~~~
igravious
Apologies to everyone for turning this into a Ruby thing on a Python topic.

You can check out the Oracle Labs code and progress of Graal/TruffleRuby here:
[https://github.com/graalvm/truffleruby](https://github.com/graalvm/truffleruby)

Relevant page:
[https://labs.oracle.com/pls/apex/f?p=labs:49:::::P49_PROJECT...](https://labs.oracle.com/pls/apex/f?p=labs:49:::::P49_PROJECT_ID:130)

And IBM's Ruby+OMR code and progress is here: [https://github.com/rubyomr-
preview/ruby](https://github.com/rubyomr-preview/ruby)

Relevant post: [https://developer.ibm.com/open/2017/03/01/ruby-omr-jit-
compi...](https://developer.ibm.com/open/2017/03/01/ruby-omr-jit-compiler-
whats-next/)

Can Matz somehow in the nicest possible way kidnap Lars Bak and pay him in
gummy bears or something?

------
baldfat
I have mostly left Python and moved to R, Racket and Lua for my needs. It is
hard to see how Python won't stay the predominant first language for decades
to come just due to momentum and the good reputation.

My first language was Basic and my second language was C64 Assembly and
Pascal. I would have killed for Python as a kid.

------
acomjean
It's the libraries I think. that's why I started using it. I don't think it's
particularly different syntactically from most other languages. The built in
data types are nice, though why they insist on using different names from
other languages (lists, dictionaries ...)

Better editors help too.

~~~
redblacktree
I may be biased, but I much prefer "dictionary" to "hash table" and "list" to
"array." They provide much better metaphors to real-life things, instead of
requiring people to learn and use additional jargon.

------
INTPenis
It's dead simple and people complain about speed but I use it for massive
distributed backends handling hundreds of messages each second and scaling
without problem.

And this was way back when twisted was the only asynchronous game in town. So
I'm not surprised it's growing.

------
sinemetu11
How do people create and manage internal python packages that work together as
an ensemble? I've found the packaging system with setup.py dependency_links to
be pretty cumbersome and not well supported. How do people version these
internal packages and manage them? Running your own pypi seems nontrivial and
using github eggs/releases isn't very functional either.

My experience with python has been positive but I don't understand how people
who want to create separate libraries for specific functionality tie these
codebases together without using deprecated features or containerizing
everything.

~~~
IanCal
Gemfury provide a service which might be useful.

If you need to keep things on premise, is running your own pypi particularly
hard? I've never tried so maybe there's a bunch of hidden complexity but there
are some packages to run one and even a docker image:
[https://hub.docker.com/r/codekoala/pypi/builds/bwe6cdn4swgyi...](https://hub.docker.com/r/codekoala/pypi/builds/bwe6cdn4swgyiruoolkpqp/)

------
dasil003
The obvious answer to me is the slow trickle down of people from universities
as CS programs have migrated from Java/Scheme to Python. This also overlaps
with Stack Overflow usage, so I think that explains a lot.

------
h4l0
Python has been continuously becoming the entry point of computer programming.
I think the language reached that goal and now people who started with python
are contributing in different fields.

Personally I met with python thanks to course assignments. It helped me to
finish my projects way faster than any other language. I loved its simplicity
and now even in my complex projects, I tend to solve my problems in "python
way".

Also modularity, almost non-existent boiler-plate code, etc kind of things
attract data scientists without computer science background.

------
blunte
#1 - it comes installed on most Linux and on Mac (even though different
versions can be a bit of a pain sometimes)

#2 - it's dead simple to do things; the syntax is, to me at least, about as
direct and uncomplicated as you can get (and without being overly wordy!)

#3 - so many handy libraries... it's good for full projects, and it's great
for integrating and gluing things together

I wouldn't call programming in Python fun, per se, but I do call "getting
things done quickly and easily" fun.

------
outworlder
It's not only because of data science of machine learning. Big, high profile
projects are being done in Python (eg. Openstack).

I am at a big company, and it seems most new projects are being done in
Python. No one asks why, it is just accepted.

Now the question is why. I have no explanation, other than maybe that's
because universities have been teaching python more often, and it happens to
be practical.

I just wish everyone were using Python 3.

------
gallerdude
As someone introduced to Python and C two semesters ago, I'm not surprised at
all. If I want to be really nerdy and crank some performance, I write C. If I
want to test ideas, write to a text file, or basically anything else, I use
Python. Python just makes it all super easy and nice. I _respect_ the
performance gains of C, but ease of use will always win.

------
binthere
I've started to use python a lot for 3d scripting on Blender and Maya. On
Blender this is the only option.

------
mountaineer
Python has been in the top 3 of hiring posts within "Who is hiring" threads
for at least 4 years now[1] so interesting to see other datasets noting
Python's popularity as well.

1\. [https://hntrends.com](https://hntrends.com)

------
cleandreams
Why is Python So Aggravating?

That's a question that bugs me. I can't believe the level of obviousness of
the things that are wrong. That is because we write complex code. Things like
direct access to data members (which is 'pythonic'!) are cruel blows to
software productivity for complex code. Ugh, Ugh, let me count the ways: No
compiler to check the code. The other day I dumped 800 extra lines into a file
as a typo. Many, many duplicate functions. Of our whole test suite, how many
tests failed? One!!! Ugh. This is not even to mention the topics of
Black.Holes.In.Your.Code because you can't tell what types the functions
receive. I really think python is driven by non-programmers who consume rather
than produce complex code and the teachers who teach these people. I believe
the problems will increase over time. Does anyone know the story of Hack at
Facebook? I heard the lead developer give a talk once. Be afraid.

~~~
wyldfire
Keep in mind that there's python development practices which might be adequate
to solve your problems.

> Things like direct access to data members

I think you're complaining about (lack-of-) encapsulation. Between methods,
functions, and properties, there's ample opportunity for encapsulation. The
convention is for internal-use-only members to be prefixed with an underscore.

> No compiler to check the code.

In fact there are many static checkers. pylint, pyflakes, etc.

> This is not even to mention the topics of Black.Holes.In.Your.Code because
> you can't tell what types the functions receive.

In fact, you can use type hints [1] to do this.

> The other day I dumped 800 extra lines into a file as a typo. Many, many
> duplicate functions. Of our whole test suite, how many tests failed? One!!!
> Ugh.

This isn't quite explicit enough for me to understand. You unintentionally
redefined a function multiple times in the same file, and your test suite
caught the error. You think that instead Python should've refused to
execute/import this module w/redefined functions? Hmm, I suppose it's a very
uncommon need to redefine functions but it's not uncommon to assign a function
to a file-scope name. Also keep in mind that both pylint and pyflakes detect
this mistake.

[1]
[https://docs.python.org/3/library/typing.html](https://docs.python.org/3/library/typing.html)

~~~
dom0
> I'm not sure that you've taken the time to understand python development
> practices.

I think this tone is misplaced here.

~~~
wyldfire
I think you are inferring more tone than was intended but I will edit it
because it could be considered rude.

------
ben_jones
Because it's easy for people to learn with no prior knowledge in programming.
It's taught in many intro classes now and as time goes on the simple fact will
cause the language to be used more in production environments as well.

------
beamatronic
Easy package management. If Java made it just as easy to add packages, and run
in an interpreted mode, it might have had similar success. Actually years ago
there was something called "jython"

------
deckar01
Is stack overflow traffic a good indicator of library growth? It seems like
libraries with really good documentation would require fewer stack overflow
questions regardless of their popularity.

------
maxerickson
Related discussion of the previous post:
[https://news.ycombinator.com/item?id=15186025](https://news.ycombinator.com/item?id=15186025)

------
luord
Heh, most of the questions I've answered are in the Flask and/or Vue tags; not
surprised to see them related and I'm happy that python's popularity keeps on
growing.

------
tw1010
The really interesting question though is how big of an influence meta-posts
like this one has on the growth of one programming language over another. How
would you model that?

~~~
mark-r
Have you ever known someone to pick a language based on a blog post?

~~~
tw1010
Javascript programmers base a lot of their choice of framework on where the
hypetrain is heading, which blog posts can have a lot of influence over.

------
AlexCoventry
TL;DR, machine learning.

~~~
goatlover
ML plus Pandas, Matplotlib, SciPy, Jupyter Notebooks, etc.

------
alunchbox
the colleges and programming intro courses for my university are starting off
with python now. When I went to uni it was a language called processing which
is a simple version of Java. College started out with JavaScript moving into
.Net. Some my teacher I kept in contact with moved over the courses to python
which might also be a factor in python popularity. Not to mention High schools
programming classes also starting with python or js instead of QBasic.

------
njharman
It sucks less than the alternatives.

------
darkmagnus
The community is very welcoming, in my experience.

------
ihaveajob
This just about sums it up for me:
[https://xkcd.com/353/](https://xkcd.com/353/)

------
vgy7ujm
It's beyond my comprehension... it's so .. ugly .. and dead .. and unexciting
... zzzzzzz

