[Python-Dev] Re: A cute new way to get an infinite loop (original) (raw)
Terry Reedy tjreedy at udel.edu
Fri Sep 24 02:31:04 CEST 2004
- Previous message: [Python-Dev] Re: 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" <tim.peters at gmail.com> wrote in message news:1f7befae040923012645bc07f8 at mail.gmail.com...
x = [1] x.extend(-y for y in x)
Very similar to this old way (2.2 and I presume before):
l=[1] for i in l: l.append(i) ... Traceback (most recent call last): File "", line 1, in ? KeyboardInterrupt len(l) 1623613
but admittedly a bit more baroque ;-)
So, are things like this a programming bug, interpreter bug, or language definition bug? or just a 'gotcha'?
Terry J. Reedy
- Previous message: [Python-Dev] Re: 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 ]