Comparisons and sorting of a numeric class....

Marko Rauhamaa marko at
Tue Jan 13 12:00:14 CET 2015

Terry Reedy <tjreedy at>:

> On 1/13/2015 1:13 AM, Chris Angelico wrote:
>>>>> def f(): sys.setrecursionlimit(sys.getrecursionlimit()+1) or f()
>> ...
>>>>> f()
>> Segmentation fault
>> But otherwise, yes. You shouldn't be able to segfault Python with
>> Python code.
> I would have expected an out-of-memory error. If there is not already
> a crash issue on the tracker for this, you could add one.

Linux grants memory it doesn't have. The truth comes out as a
segmentation fault. Call it modern banking.

The code above, though, shouldn't consume memory since it is a simple
tail-recursive loop.


More information about the Python-list mailing list