[issue10042] total_ordering stack overflow

2011-04-18 Thread Alexander Boyd
Alexander Boyd added the comment: But it seems pointless to force someone to implement all of the rich comparison methods when they may want to do something as simple as this: class Foo: ... def __lt__(self, other): if not isinstance(other, Foo): return NotImplement

[issue10042] total_ordering stack overflow

2011-04-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm not sure that we really care about handling NotImplemented (practicality beats purity). At some point, if someone writing a class wants complete control over the rich comparison methods, then they're going to have to write those methods. -- a

[issue10042] total_ordering stack overflow

2011-04-18 Thread Alexander Boyd
Alexander Boyd added the comment: This is not fixed. The accepted fix doesn't take NotImplemented into account, with the result that comparing two mutually-incomparable objects whose ordering operations were generated with total_ordering causes a stack overflow instead of the expected "TypeEr

[issue10042] total_ordering stack overflow

2011-03-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 94c158199277 by Éric Araujo in branch '2.7': Fix the total_ordering decorator to handle cross-type comparisons http://hg.python.org/cpython/rev/94c158199277 -- nosy: +python-dev stage: -> committed/rejected status: open -> closed

[issue10042] total_ordering stack overflow

2011-03-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Éric, would you like to apply this to 2.7? -- assignee: rhettinger -> eric.araujo ___ Python tracker ___ ___

[issue10042] total_ordering stack overflow

2011-02-06 Thread Éric Araujo
Éric Araujo added the comment: FWIW, I just tested svnmerging the revision, the patch applied with minor merge conflicts and the test suite passes. -- ___ Python tracker ___ __

[issue10042] total_ordering stack overflow

2011-02-05 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: normal -> low ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue10042] total_ordering stack overflow

2011-02-03 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- type: crash -> behavior versions: -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue10042] total_ordering stack overflow

2011-01-21 Thread Éric Araujo
Changes by Éric Araujo : -- status: closed -> open versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue10042] total_ordering stack overflow

2011-01-21 Thread Lennart Regebro
Lennart Regebro added the comment: This also affects Python 2.7, where it hasn't been fixed. Maybe reopen it? -- nosy: +lregebro ___ Python tracker ___ _

[issue10042] total_ordering stack overflow

2011-01-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the report and patch. Fixed. See r87853. -- ___ Python tracker ___ ___ Python-bugs-

[issue10042] total_ordering stack overflow

2011-01-07 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg125757 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue10042] total_ordering stack overflow

2011-01-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the report and patch. Fixed. rSee 87853. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue10042] total_ordering stack overflow

2010-10-12 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10042] total_ordering stack overflow

2010-10-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks, this is a good idea. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue10042] total_ordering stack overflow

2010-10-07 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue10042] total_ordering stack overflow

2010-10-07 Thread Francesco Ricciardi
Francesco Ricciardi added the comment: Attached there is a solution of the problem, by implementing each comparison only with the class __xx__ and __eq__ operators. Also in the file there is a complete test suite for it. -- Added file: http://bugs.python.org/file19145/new_total_orderi

[issue10042] total_ordering stack overflow

2010-10-07 Thread Francesco Ricciardi
New submission from Francesco Ricciardi : 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