[issue2235] __eq__ / __hash__ check doesn't take inheritance into account

Guido van Rossum report at bugs.python.org
Fri Jun 27 20:05:11 CEST 2008


Guido van Rossum <guido at python.org> added the comment:

Thanks for giving this some time. I think that backwards compatibility
should be a higher priority than being able to issue -3 warnings -- if
the warnings can't be generated, too bad, we'll just have to document
it. (I don't think that checking things at class scope is an easy task
in 2to3, though I may be underestimating it.)

So, concluding, insofar as the proposal is to revert 2.6 to the 2.5
semantics where it comes to __eq__ and __hash__, I'm okay with that if
there's no other way to maintain backwards compatibility, even though my
preference would be to still flag this when -3 is specified.  (There may
be similar backwards compatibility issues caused by stricted arg
checking in __new__ and __init__ -- the same remarks apply there.)

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


More information about the Python-bugs-list mailing list