Re: goto
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: goto

From: Peter Hansen <peter@engcorp.com>
Date: Wed Jul 20 2005 - 14:30:04 CEST

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
Received on Thu Sep 29 17:02:22 2005