DEV Community

Discussion on: Why all this hate about Python?

Collapse
 
adamloving profile image
Adam Loving • Edited

For me, clarity over cleverness is the primary feature of a programming language. I favor object oriented languages because OO matches how I think about the world (and with Python OO is a crude afterthought).

More reasons I find python confusing and inelegant:

  1. The syntax for lambdas in python is very clunky. Only a comma indicates where the block ends, and it has to fit on one line.

  2. A class name is sometimes required as a function parameter in order to call a base class.

  3. Python users often abbreviate unnecessarily, making it hard to know exactly what modules you’re including

  4. There are some magic built in global functions, like len() which should be member functions of the relevant classes.

  5. Standard libraries are also inconsistent in their naming conventions, like unittest which uses setUp instead of set_up

  6. Decorators like @staticmethod are used to retrofit common language features.

  7. A python dictionary (a very common data structure) has odd initialization semantics.

Here are code examples of the reasons why I hate python.