Now I use python when it's the best tool for the job, where the "job" is a part of a project. My projects usually involve a combination of three languages: python, javascript (node and/or frontend), and bash scripting. The bulk of the code is node, but for scripts I use a combination of bash and python.
I use bash scripts for anything that involves piping data between processes, simple file I/O, backup scripts, etc. I prototype almost every script in bash. When it gets too complicated, or requires parsing a lot of data, I switch to Python (sometimes I even inline the Python in bash with heredocs).
In my experience, bash is usually the best tool for the job if the "job" involves invoking lots of shell commands and piping their outputs somewhere. Using Python to call shell commands is of course possible, but I find it to be much less readable than bash for that specific use case.
Nothing beats Python for parsing and manipulating data, which is why it can be so powerful when combined with bash. Here [1] is an example bash script I wrote in ~30 minutes that uses inline Python. It deploys schema from a JSON file to parse-server. Bash handles the raw IO of reading files, network requests, etc, but inline Python does the simple manipulation of the JSON files.
[0] I haven't worked much with python3 or async/await... but that looks promising (hah) for increased throughput. I've even seen some benchmarks inline with node.
[1] https://gist.github.com/milesrichardson/b30acef8827c53aae088...
P.S.: I'm sure you can make big multi-team projects in Python with the right discipline and tooling, but that's just not the spot it occupies in my language-toolkit.
I don't think it's really even playing favorites when it's a competitive language with a very diverse collection of good libraries across applications and domains.
I have to wonder if Go and Swift would've just been Python if Guido had put more attention on the Python VM (and been willing to make some compromises to accommodate improvements).
Now Python is stuck playing catch up. Discussion around removing the GIL is finally beginning to be taken seriously instead of considered hypothetical, optional type annotations are being added, etc., but it may be too little too late.
2. "ML is the future" is vague and meaningless. ML is certainly not the future for many things, and it's certainly being misapplied on many other things in the cargo-cult belief that ML must be used everywhere.
Nowadays there are sophisticated tools like Orange3 and Jupyter (not to mention Beaker Notebook) that make it easy to share code within teams of scientists. None of this is going away and even R users are discovering that it is easier to use R for the stats part of the problem and integrate with Python for everything else. R used to have the best presentation graphics but now Python has caught up with improved Matplotlib and Bokeh. Also some people prefer to use d3.js in the browser moving from just presenting their data to enable exploration of it.
In the ML/DS area, CPUs will never be fast enought with Go. You need to exploit the GPU which Python has good support for, or move to distributed computing which Python also does well.
No other language will dislodge Python. Instead we are making integration more prominent and using multiple languages working together. Beaker Notebook is particularly good at this and is driving Jupyter in that direction too.
there is no reason that english has to be the language that is spoken when foreigners interact with each other. but somehow, it is. and it doesnt really change.
Recent C++ with lambda and auto is much improved but still not nearly as productive as Python.
Likewise lambda has really made Java better, but lack of type inference really makes it clunky to write.
I really want a statically typed Python. But because I don't have it, I choose Python for the syntax over c++/Java even for performance critical code.
Can golang fill this role?
Python also has optional type support since 3.5: https://docs.python.org/3/library/typing.html
What do you base that assertion on? :)
You need to give type annotations a shot! https://www.python.org/dev/peps/pep-0484/#abstract
pip install mypy
mypy script.pyI don't use it for web programming. If I had my choice, I'd still use an integrated system like rails or Django, and bring in javascript sparingly, but unfortunately, that's not my choice, so I end up using a lot of Javascript.
I kinda just stumbled into it as the logical way to move forward once the shell scripts I started out with became too complex, but I've fallen in love with it. I'm sure it will be my go-to language for a lot of coding tasks in the future.
Years ago I would have done all of this with Perl 5. I started using Python because so many people were talking about it. What really got me using it was that a programmer told me he thought Python pip libraries were as good as Perl CPAN libraries. He was right, although in some instances one particular library can be superior to the other's equivalent.
Don't roll your own monitoring solution, but tie Python scripts into Nagios, etc..
Why should a sysadmin use Nagios at all?
I don't care about the language nor its ecosystem the slightest. If I need a dynamic language I stick to Perl or Chicken Scheme.