Python is used mainly for scripting, for specific jobs or because you learnt python and that's the only thing you know.
Or for the thousands of sites running on Django or Flask servers. Or for scientific research using numpy, Theano, etc. It is a really popular language for a lot of fields, and roughly on a par with C++ these days. It's just a shame that it's a poor match for larger pieces of software and for software requiring high performance of tasks that aren't trivially parallisable.
I could argue to same for JS.
I don't think you understand completly what's "scripting" means.
Scripts may vary in sizes and a whole Django site is built from scripts.
It's really popular among programmers which don't focus too much on development, but need it as scripting tool. Like mathematicians, researchers, engineers, etc...
As a developer I don't tend to focus on the frameworks the language supports, because almost every framework has ports to other languages.
I'm focusing on the built in support and the need of the language.
If I work with a certian framework which supports python better, I'd work with python.
But I won't choose it to built a real time application because I know C++ and I know it's a better tool for the job.
Python is easy and you'd learn the bascis of scripting, but not development.
Yeah, nobody uses Python classes, inheritance, lists, sets, and dictionaries. Nobody understands the generators and iterators, which are a nice and powerful LINQ-like addition for processing data. And really nobody has a clue what to do with decorators.
Python is an easy language to get into, but it does have all the stuff for the big-boys, so you can leanr about all those things in an easy to work environment.
Nobody is building huge systems with python. and when I say HUGE. I mean HUGE.
Hello, I am nobody then. I have written Python code that had over 10K lines, which in C/C++ is 30 to 60 that amount. So how many 300-600K line programs of C have you written?
At that scale, Python code is written an order of magnitude faster, since the amount of time you think about a line of code is roughly the same, but in C/C++ you have to write a lot more lines of code.
Or for the thousands of sites running on Django or Flask servers. Or for scientific research using numpy, Theano, etc. It is a really popular language for a lot of fields, and roughly on a par with C++ these days. It's just a shame that it's a poor match for larger pieces of software and for software requiring high performance of tasks that aren't trivially parallisable.
Cython looks very interesting in this respect. You type Python, and it compiles & runs. You add C-ish declarations, and it runs faster, upto the speed of C apparently.
I haven't yet played with it, but can't wait for a chance to do so :)
Development has more than code construction, language support and managing your IDE.
It's a whole process that people tend to miss, and with python it's not always the case.
The tool may be used great by the hands of good programmers. However, it's really easy to abuse the language and write bad code. Which beginners tend to do.
-----
Modern C++ is different than the plain C + OOP code that everyone remembers from their first lessons.
So productivity argument is really redundent here, you could get stuck with python as easily as with other language.
C++ has many frameworks, with boost, std and C++ 17 the capabilities are greater than people know.
And these are just basic tools.
-------------
10K lines is a moderate program. I meant HUGE systems.
Try having millions of lines across hundreds of projects.
------------
It may seem that i'm just a python hater, I'm not.
I just think people missuse the language and its tools.
They pick it because of the "python disease" and not because they really though through what are their needs.