[Tutor] Break, multiple loops

Ivan Van Laningham ivanlan@callware.com
Sat, 27 Nov 1999 08:29:13 -0700


Hi All--

Emile van Sebille wrote:
> 
> Neil,
> 
> I'm not sure if this is a 'clean' way to do it, but it is clear...
> 
> try:
>     while 1:
>         while 2:
>             dostuff()
>             raise "Exitting..."
> except "Exitting...":
>     pass
> 

Looks damn clean to me.  Much nicer than a flag, I think, and
exceptionally readable.  I like it.

<now-i'll-have-to-steal-it>-ly y'rs,
Ivan
----------------------------------------------
Ivan Van Laningham
Callware Technologies, Inc.
ivanlan@callware.com
ivanlan@home.com
http://www.pauahtun.org
See also: 
http://www.foretec.com/python/workshops/1998-11/proceedings.html
Army Signal Corps:  Cu Chi, Class of '70
Author:  Teach Yourself Python in 24 Hours
----------------------------------------------