3 ms·
I was specifically looking through these comments for your example. I got bit by this once, and it's certainly... strange (it's also surprising). It's consider
by Zancarius 12y ago
I was specifically looking through these comments for your example.
I got bit by this once, and it's certainly... strange (it's also surprising). It's considered "behavior consistent with the rest of Python" [1] (which I can agree with) even if it makes little sense in terms of immediate readability to someone who hasn't previously encountered it. Fortunately, the workaround is easy, and it is documented.
There's at least a couple of spats on the mailing list regarding this feature that are of interest to the curious or at least those who are interested in the history of such behavior.
[1] http://bugs.python.org/issue13936 http://bugs.python.org/issue13936