define loop statement?
Nigel Rowe
see at signature.invalid
Sat Feb 18 19:08:39 EST 2006
Felipe Almeida Lessa wrote:
> Em Sáb, 2006-02-18 às 20:04 +0000, Jeffrey Schwab escreveu:
>> if __name__ == '__main__':
>> loop = Loop(10)
>> while loop:
>> print "OK"
>
> Maybe:
>
> while Loop(10)():
> print "OK"
>
> Looks rather ugly but requires one less line ;-).
>
Doesn't work. You get a NEW Loop(10) instance on each pass through the
'while'. This is just an expensive way to make an endless loop.
--
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) swiftdsl (stop) com (stop) au
More information about the Python-list
mailing list