[Python-Dev] Re: A cute new way to get an infinite loop (original) (raw)
David Goodger goodger at python.org
Thu Sep 23 18:32:38 CEST 2004
- Previous message: [Python-Dev] A cute new way to get an infinite loop
- Next message: [Python-Dev] Re: A cute new way to get an infinite loop
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Tim Peters]
>>> x = [1] >>> x.extend(-y for y in x)
Not quite infinite, since eventually it will raise a MemoryError. So "while 1:" still rules that roost. ;-)
-- David Goodger <http://python.net/~goodger>
- Previous message: [Python-Dev] A cute new way to get an infinite loop
- Next message: [Python-Dev] Re: A cute new way to get an infinite loop
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]