I don’t enjoy coding Python. I think its:
- Syntax is awkward. The strife between tabs and spaces is real, and sometimes annoying too, if you’re making quick edits without using a sophisticated code editor.
- Lambda functions are limited to a single line. Let’s be real—naming things is hard, and I wouldn’t want to name every multi-line anonymous function some awkward name.
- API is inconsistent.
len(v)is a function (procedural), butv.append()is a method (object-oriented). And, more interestingly,len(v)callsv.__len__()under the hood.- One argument could be raised that it’s procedural to distinguish its polymorphic nature, but that argument is inevitably weak, because duck typing—a method often pursued—could be used (e.g.
v.length) to determine its length. - Another argument could be raised that it enforces a certain protocol of determining length, but that argument is also weak, because the protocol could just be defined differently.
- Features like namedtuples are somewhat