[docs] [issue22052] Comparison operators called in reverse order for subclasses with no override.

Martin Panter report at bugs.python.org
Wed Sep 23 04:40:03 CEST 2015

Martin Panter added the comment:

Does anyone know enough about Python 2 to propose a fix? I don’t know enough about object classes versus “instance” classes, and potential interference of the __cmp__() method. In Python 2 the order seems to depend on the class type:

(<__main__.A instance at 0x7f730d37f5f0>, <__main__.B instance at 0x7f730d37f518>)
(<__main__.B object at 0x7f730d37dc10>, <__main__.A object at 0x7f730d37d110>)

Or perhaps we should just close this now and forget about Python 2 ;)

stage:  -> needs patch
versions:  -Python 3.4, Python 3.5

Python tracker <report at bugs.python.org>

More information about the docs mailing list