Python is a very inelegant language. Here are some things I dislike.
Python is a very common language, but it feels poorly thought out. For me, clarity over cleverness is the key selling point of a programming language, and I favor object oriented languages because it matches how I think about the world (as described in English).
Here are a few examples of how Python is an inelegant “duck tape” language. For examples, see the Gist below.
- The syntax for lambdas (functions as first class objects) in python is very clunky. Only a comma indicates where the block ends, and it has to fit on one line.
- Object oriented features feel like an afterthought. A class name is sometimes required as a function parameter in order to call a base class.
- Python users often abbreviate unnecessarily, making it hard to know exactly what module you’re including
- There are some magic built in global functions, like
len()which should be member functions of the relevant classes.
- Standard libraries are also inconsistent in their naming conventions, like unites which uses
- Again with the OO after thoughts. Why must self be passed to every instance method?
- Similarly, decorators like
@staticmethodare used to retrofit common language features.
- A python dictionary (a very common data structure) has odd initialization semantics. Here are some code examples.