"Weird" Indentation? (Or: is there a for...else construct?)
david.birdsong at gmail.com
Sun Feb 8 15:07:08 EST 2009
On Feb 7, 6:34 am, Andreas Waldenburger <geekm... at usenot.de> wrote:
> On Sun, 08 Feb 2009 01:28:00 +1100 Steven D'Aprano
> <st... 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.
yeah, about 4 years for me and i've never noticed this feature.
> > [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. :)
> My real email address is constructed by swapping the domain with the
> recipient (local part).
More information about the Python-list