[Python-3000] Updated and simplified PEP 3141: A Type Hierarchy for Numbers (original) (raw)
Collin Winter collinw at gmail.com
Thu May 17 20:24:14 CEST 2007
- Previous message: [Python-3000] Updated and simplified PEP 3141: A Type Hierarchy for Numbers
- Next message: [Python-3000] Updated and simplified PEP 3141: A Type Hierarchy for Numbers
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 5/17/07, Guido van Rossum <guido at python.org> wrote:
On 5/17/07, Collin Winter <collinw at gmail.com> wrote: > ABCs can define concrete methods. These concrete methods provide > functionality that the child classes do not themselves provide.
You seem to be misreading my intention here. ABCs serve two purposes: they are interface specifications, and they provide "default" or "mix-in" implementations of some of the methods they specify. The pseudo-inheritance enabled by the register() call uses only the specification part, and requires that the registered class implement all the specified methods itself. In order to benefit from the "mix-in" side of the ABC, you must subclass it directly.
I think I'm getting confused between the PEP and what you've said at one of the various whiteboard sessions.
- Previous message: [Python-3000] Updated and simplified PEP 3141: A Type Hierarchy for Numbers
- Next message: [Python-3000] Updated and simplified PEP 3141: A Type Hierarchy for Numbers
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]