Nick Coghlan wrote:

> The use case is being able to block the inheritance of special methods 
> that object provides default implementations for (like '__hash__'), such 
> that a hasattr() check (or a check for a type slot being 0) for those 
> special methods will actually fail.

Maybe descriptors could be given a __has__ slot that got
called by hasattr() if present. Then a descriptor could
be created that would have this effect, and your

>   class Unhashable(object):
>       __hash__ = Undefined

spelling could be used.

--
Greg

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to