1.5.2 for: else:
Tim Peters
tim_one at email.msn.com
Wed Jul 28 22:27:57 EDT 1999
[/F, on the sparkling consistency of for/else, while/else, if/else]
> what else did you expect from Guido?
[Greg Ewing]
> I would have expected Guido to shriek in horror
> and refuse to even consider such a semantically
> ambiguous construct.
>
> It seems quite out of character for both him
> and Python.
Indeed, if for/else hadn't been in Python from the start, anyone suggesting
it would get flamed without mercy! I happen to like it, but it's Guido-like
only in its inscrutablitily at first sight <wink>. The only Pythonism less
Pythonic is that e.g.
4 < "3"
silently returns true.
although-that-would-be-even-less-pythonic-if-it-returned-false-ly y'rs -
tim
More information about the Python-list
mailing list