[issue10042] functools.total_ordering fails to handle NotImplemented correctly

Raymond Hettinger report at bugs.python.org
Mon Sep 30 08:05:09 CEST 2013


Raymond Hettinger added the comment:

One other thought:  The OrderedEnum example should not use the total ordering decorator.  

To the extent that the docs are trying to teach how to use Enum, they should focus on that task and not make a side-trip into the world of class decorators.   And to the extent that the docs are trying to show an example of production code, it would be better for speed and ease of tracing through a debugger to just define all four ordering comparisons.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10042>
_______________________________________


More information about the Python-bugs-list mailing list