3 ms·
I understand why you would feel this way but I disagree. The meme of being pythonic has the benefit of most libraries being understandable. It is always very o
by dec0dedab0de 9y ago
I understand why you would feel this way but I disagree. The meme of being pythonic has the benefit of most libraries being understandable. It is always very obvious when python code has been written by someone who specializes in another language, and it is usually painful to read their code.
- brudgers 9y agoLike I said, the usual use of the 'Pythonic' idiom within the Python community is prefixed by "un" and used pejoratively. One aspect of the perniciousness of 'Pythonic' is that it promotes the tribalist ideal of specializing in languages. For someone optimizing for readable libraries, Smalltalk is probably a better option.
- empthought 9y agoYour comments are making me bristle a little bit, but to be honest the book being referenced by the blog post makes me bristle more. "You may use the “harmful” examples as templates to search for in your own code. When you find code like that, replace it with the idiomatic version." This is a really dumb idea, especially when paired with the incorrect implementations that the book author encourages and the blog poster critiques. Incorrect code is never idiomatic, full stop.
- brudgers 9y agoIncorrect code is incorrect code. Correct code is useful in and of itself. Idiomatic code isn't.
- emidln 9y agoSo if I have this right, things like Django's Class Based Views and sqlalchemy are Understandable. I'll take functional-style python over Understandable python any day of the week.
- dec0dedab0de 9y agoI love Django's classed based views, though I could see how they would be annoying if you aren't steeped in Python's multiple inheritance. Granted, If it weren't for Pycharm's command+click to open up where an object was defined I don't think I would like them quite as much. But being able to quickly walk the inheritance path, and finding simple clear code in small chunks is very nice.
- empthought 9y agoYes, they're both very understandable. Sorry about your mental blocks.
- akvadrako 9y agoI would say those two examples are not very Pythonic because they are overly abstracted.