Guido van Rossum wrote:
> I've started a PEP on Abstract Base Classes (ABCs), PEP 3119:
>
> http://www.python.org/dev/peps/pep-3119/
>
> While I'm not ready yet to answer tough questions about this compared
> to alternative proposals, I *am* ready for feedback on the various
> open issues sprinkled throughout the current text, especially
> concerning decisions regarding exactly which operations to include in
> the various ABCs, and also regarding the level of detail required in
> the PEP.
>
It's not listed as an open issue, but when looking at the list of ABCs,
I noticed a potential solution to a different problem we have
occasionally wrestled with: the unfortunate side-effects of having a
default __hash__ method defined on object.
If the details of collections.Hashable.__hash__ are declared to be
implementation dependent rather than having it always return 0, then we
can get rid of object.__hash__.
For CPython, collections.Hashable.__hash__ would then just invoke id()
on the object, and other implementations can also do whatever they
currently do for object.__hash__
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com