Python indentation

Peter Hansen peter at engcorp.com
Fri Jul 9 14:21:52 EDT 2004


Paramjit Oberoi wrote:

>>>Yes, and I would also be interested in an other proposal
>>>that went something like:
>>>
>>>
>>>while condition1:
>>>  code1
>>>and while condition2:
>>>  code2
>>>and while condition3:
>>>  code3
> 
> Andrew Koenig proposed this in the following email:
> 
> http://groups.google.com/groups?q=g:thl470833922d&dq=&hl=en&lr=&ie=UTF-8&selm=yu99isspv9mm.fsf%40europa.research.att.com
> 
> If link doesn't work - it was a post dated 2003-05-05 with the subject
> "Re: PEP 315: Enhanced While Loop".  There was a fairly long thread about
> it back then.

Andrew's interpretation doesn't fit mine.  I look at
the above and wonder why the code2 block doesn't
continue to execute until condition2 fails, and then
the code3 block loops repeatedly until condition3
fails...

-Peter



More information about the Python-list mailing list