A language is meant to be read not just written. A non-expert python programmer who encounters this will be confused.
A language is meant to be read not just written. A non-expert python programmer who encounters this will be confused.
As far as portability is concerned (if you port software by hand a lot, for example), this is indeed an issue; but if you work with people who write python code, you might as well use everything in your toolbox.
This is a language-specific issue that occurs rarely in the wild. Yes, it's part of the language, but it's used rarely enough that it can trip up even experienced Python programmers.
For example, Perl (until more recently) allowed one to change arrays to be 1-indexed, rather than 0-indexed at runtime. Just because it's part of the language doesn't mean that it's a good thing to use it.
And get it after 30 seconds doc reading?
I encountered this situation. I assumed the else belonged to an if, but the indentation rules were somehow being broken. What would you expect me to look up in the docs?