Why I Like Python Nov 27 2013 9:26 pm
I’ve been doing a lot more with Python in the last 6 months (both at work and at home), so I’d kind of like to write a nice, light, brief thing about how I’m feeling about Python.
Python is clean
Python is cleaner than a Jim Gaffigan stand-up special. I write much less code! This is the biggest asset to the language. The syntax is shorter.
- Forces consistent indenting (you be consistent regardless of language. If you aren’t, I hate you)
- The stdlib has a lot of functions that do great things in one line.
- No curly braces (which admittedly I miss, for some reason sometimes).
- No semi-colons (they are technically allowed in some contexts but it’s generally discouraged to use them)
- Short keywords (
(string) variable, etc.)
- Not statically typed (that saves some typing before declaring every variable)
I can do more with less code and I can be much more productive.
Python is snappy
I’ll let you Google for benchmarks, find the one that best reinforces your view, and email me about why I’m wrong. Python is a very snappy language.
The eco-system is thriving
There are a lot of very nice, stable modules available on PyPI and they’re just a
pip install away.
virtualenv is nice
Many languages used for web development out there have a way of isolating executing environments and app dependencies. Ruby has RVM, but that’s terrible.
CLI development is like writing a CLI app in C
It’s real easy to write a command line utility. C easy. It’s great.
The docs make many a reference to Monty Python
I always get a giggle reading the docs.
The PEPs provide a lot of consistency within the Python community. APIs defined by the PEPs are adopted and adhered to, meaning a lot of modules are drop-in replacements for other modules that support the same API. e.g. the DB-API is well adhered to, so any application adhering to the DB-API will pretty much automatically support the major DB backends. Very, very cool and helpful.