[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


[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>



More information about the Python-Dev mailing list