[issue44605] functools.total_ordering doesn't work with metaclasses
Raymond Hettinger
report at bugs.python.org
Fri Aug 6 00:21:08 EDT 2021
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
> If the preference is to not support this use-case ,,,
I don't really have a preference. Was just letting you know the pros and cons. I'll put together a PR with the "type(self).__lt__(self, other)" substitutions. Let me know if that is the outcome you want.
> Wait, is the suggestion here that @total_ordering
> is not suitable for production?
It works fine, but as noted in the docs, the indirect code isn't as good as just writing-out the methods by hand.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44605>
_______________________________________
More information about the Python-bugs-list
mailing list