in Projects, Programming, Technology

Why I hate Python

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.

  1. 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.
  2. Object oriented features feel like an afterthought. 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 module 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 unites which uses setUp instead of set_up
  6. Again with the OO after thoughts. Why must self be passed to every instance method?
  7. Similarly, decorators like @staticmethod are used to retrofit common language features.
  8. A python dictionary (a very common data structure) has odd initialization semantics. Here are some code examples.

Write a Comment


  1. More functions like len() and less throwback object orientation. We see the same problem but the solution is not more balkanization, it is embracing functional consistency.

  2. Python has a very distinct “different for the sake of being different” vibe.

    I love the True and False (capitalized). Let’s switch VanR.’s brake and accelerator to illustrate the use of standards.
    I don’t know what VanR. was on but it apparently scrambled his language-center and made him think like Yoda. The Farce is strong in this one.

    As a block-statement is a very important construction in programming languages. I wouldn’t want to risk it depending on the whitespace-management of a text-editor.

    Unfortunately this flavour-of-the-day-language stuck around for too long because for some reason google adopted it.

    Referring to Monty Python in the name is not a compliment to the Monty Python team. There is nothing remotely funny about the language.
    Luckily I too have garbage collection.