by SkipperCat · 5y ago · 0 comments
Probably the whole concept of idiomatic Python is that there shouldn't be different styles of Python to which you graduate according to skill or experience, but rather that the simple, readable way of writing things should be done by everyone, always, from novices to experts. Code-golfing with dense weirdness would be "anti-Pythonic" but this ternary expression would be readable even for if someone who's never seen Python would read it as pseudocode in some theoretical CS paper.
When I started learning ruby a bunch of the changes flew over my head, but it is also an excellent entry point to look further into best practices, and concrete examples of how my code could be better.
The condition is of course the tool being itself extremely good, otherwise it's just everyday hell (looking at you, phpstan...)
If you think expecting people to achieve Python mastery is unreasonable, wait until I tell you about language called C++.
I would never demand this for someone writing a Python app or module that out team would use as a normal import, just the stuff we actively manage.