3 ms·
I’m annoyed with Python’s ternary operator
- leephillips 13y agoHe's annoyed that all languages do not have the same syntax, which creates a hardship on his memory.
- hedonist 13y agoWell, the way Norvig explains it in his IAQ[1], in the context of the "missing" ++x and x++, operators, there's a certain design philosophy in Python that seeks to separate statements and expressions. Since the ternary op represents a near perfect conflation of statement/expression syntax, it represents a near perfect violation of this philosophy also, and hence should be considered strongly anti-Pythonic. [1] http://norvig.com/python-iaq.html http://norvig.com/python-iaq.html