[New-bugs-announce] [issue10042] total_ordering stack overflow

Francesco Ricciardi report at bugs.python.org
Thu Oct 7 10:26:52 CEST 2010

New submission from Francesco Ricciardi <francesco.ricciardi at hp.com>:

Tested with version 3.2a2. Not tested on version 2.7.

The current implementation of functools.total_ordering generates a stack overflow because it implements the new comparison functions with inline operator, which the Python interpreter might reverse if "other" does not implement them. Reversing the comparison makes the interpreter call again the lambda function for comparison generating a stack overflow.

Run the attached test file for an example of this behavior.

components: Library (Lib)
files: test_total_ordering.py
messages: 118096
nosy: francescor
priority: normal
severity: normal
status: open
title: total_ordering stack overflow
type: crash
versions: Python 3.2
Added file: http://bugs.python.org/file19144/test_total_ordering.py

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list