do...until wisdom found...
Toby Dickenson
tdickenson at devmail.geminidataloggers.co.uk
Wed Apr 18 05:21:00 EDT 2001
Dennis Baker <drbaker at softhome.net> wrote:
>On Tue, 17 Apr 2001 18:37:46 GMT "Fredrik Lundh" <fredrik at 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 at geminidataloggers.com
More information about the Python-list
mailing list