[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: do...until wisdom found...
From:       Toby Dickenson <tdickenson () devmail ! geminidataloggers ! co ! uk>
Date:       2001-04-18 9:21:00
[Download RAW message or body]

Dennis Baker <drbaker@softhome.net> wrote:

>On Tue, 17 Apr 2001 18:37:46 GMT "Fredrik Lundh" <fredrik@pythonware.com> wrote:
>
>) Dennis Baker wrote
>) > )         while 1:
>) > )             set up for this cycle
>) > )             if c: break
>) > )             whatever needs to be done


>I suppose this is a product of my Structured Programming coursework,  I simply
>avoid constructs like this.  I was taught that loops and functions should have 
>one entry point and one exit point.

But it does have one entry point and one exit point! Count 'em:

while 1:                        <--- one entry point
    set up for this cycle
    if c: break                 <--- one exit point
    whatever needs to be done



Toby Dickenson
tdickenson@geminidataloggers.com
-- 
http://mail.python.org/mailman/listinfo/python-list

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic