Guido van Rossum <[EMAIL PROTECTED]> added the comment:
There are tons of ways to violate Liskov in Python. Liskov is not always
the right rule.
NotImplemented is not appropriate -- it is only used as a magic return
value from binary functions.
--
resolution: -> rejected
status: open -
Raymond Hettinger <[EMAIL PROTECTED]> added the comment:
I don't think we should build in explicit support for bad designs that
violate the Liskov substitution principle. Are there any valid use
cases for wanting non-hashable subclasses of hashable classes?
If for some reason, this feature sur
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
This is precisely under discussion in issue2235:
if a base class is hashable, a derived class may set __hash__ to None,
and disallow hashing.
--
nosy: +amaury.forgeotdarc
___
Python tracker <
New submission from Raymond Hettinger <[EMAIL PROTECTED]>:
In the Hashable ABC, there is a peculiar code fragment:
if "__hash__" in B.__dict__:
if B.__dict__["__hash__"]:
return True
break
When would the innermost i