A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-September/049073.html below:

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

[Python-Dev] A cute new way to get an infinite loop [Python-Dev] A cute new way to get an infinite loopBob Ippolito bob at redivi.com
Sat Sep 25 05:36:10 CEST 2004
On Sep 24, 2004, at 11:33 PM, George Yoshida wrote:

> Tim Peters wrote:
> >>>>x = [1]
> >>>>x.extend(-y for y in x)
>
> It does not always go into an infinite loop. I was bitten by this:
>
>   >>> x = []
>   >>> x.extend(-y for y in x)
>   Segmentation fault

No algorithm that requires infinite memory will run for an infinite 
amount of time on a finite computer.  Of course it should raise an 
exception instead of segfaulting though.. could it be blowing the 
stack?

-bob
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4