"Weird" Indentation? (Or: is there a for...else construct?)
Andreas Waldenburger
geekmail at usenot.de
Sat Feb 7 09:34:59 EST 2009
On Sun, 08 Feb 2009 01:28:00 +1100 Steven D'Aprano
<steve at pearwood.info> wrote:
> Andreas Waldenburger wrote:
>
> > It seems that there is a for...else construct. Replacing the inner
> > if with pass seems to confirm this. The else clause is still
> > executed.
>
> Yes, there is a for...else construct.
>
That's something. In 6+ years of Python programming I've never seen or
heard of this thing. This might be useful, apparently.
> [snip]
>
> > What's broken here: Python or my brain?
>
> Perhaps we should not answer that question.
>
I did phrase that rather provocatively, didn't I?
Well thanks. I'll try to learn less noisily in the future. :)
/W
--
My real email address is constructed by swapping the domain with the
recipient (local part).
More information about the Python-list
mailing list