goto

Peter Hansen peter at engcorp.com
Wed Jul 20 08:30:04 EDT 2005


Sybren Stuvel wrote:
> Mike Meyer enlightened us with:
> 
>>>I dislike gotos because it is too easy to inadvertently create
>>>infinite loops. <10 WINK; 20 GOTO 10>
>>
>>And it's impossible without them? <while True: pass>
> 
> 
> I thought the same thing, but then I read it again and thought about
> the "inadvertently". As soon as you see a "while True", you _know_
> it's going to loop forever. 

Unless it doesn't, of course:

while True:
     break



More information about the Python-list mailing list