[issue32513] dataclasses: make it easier to use user-supplied special methods

Eric V. Smith report at bugs.python.org
Wed Jan 24 04:12:12 EST 2018


Eric V. Smith <eric at trueblade.com> added the comment:

I'm working on a patch before beta 1. The only issue is whether to raise in the case that order=True and the user specifies one of the 4 ordering dunders. I think raising is okay, especially since order=False is the default: you'd have to go out of your way to cause the exception. I'll mention functools.total_ordering in the exception message.

I do think that the discussion in my long message about __hash__ is correct, although I'm not done thinking it through. I think it's already pretty well tested, but if not I'll make sure there are enough test cases for objects that I think should or shouldn't be hashable that I'll have all of the kinks worked about before beta 1.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32513>
_______________________________________


More information about the Python-bugs-list mailing list