[Python-Dev] A cute new way to get an infinite loop

Jeremy Hylton jhylton at gmail.com
Thu Sep 23 15:01:17 CEST 2004


On Thu, 23 Sep 2004 04:26:58 -0400, Tim Peters <tim.peters at gmail.com> wrote:
> >>> x = [1]
> >>> x.extend(-y for y in x)

It is perhaps surprising that something lazy can work so hard.

Jeremy


More information about the Python-Dev mailing list