[Python-3000] ABC PEP isinstance issue Was: PEP 31XX: A Type Hierarchy for Numbers (and other algebraic entities) (original) (raw)
Jean-Paul Calderone exarkun at divmod.com
Thu Apr 26 00:40:25 CEST 2007
- Previous message: [Python-3000] ABC PEP isinstance issue Was: PEP 31XX: A Type Hierarchy for Numbers (and other algebraic entities)
- Next message: [Python-3000] ABC PEP isinstance issue Was: PEP 31XX: A Type Hierarchy for Numbers (and other algebraic entities)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 25 Apr 2007 18:10:23 -0400, Jim Jewett <jimjjewett at gmail.com> wrote:
The current ABC proposal is to use isinstance as the test; Jeffrey Yaskin's numbers PEP highlighted the weakness there with a concrete example.
If you need to an abstraction less powerful than an existing ABC, you're out of luck; you can't just assert that the existing class is already sufficient, nor can you expect everyone else to use multiple annotations.
I'm sure everyone is already aware of the behavior of the classImplements and directlyProvides functions available in zope.interface, which exactly satisfy this use-case in the interface world.
Jean-Paul
- Previous message: [Python-3000] ABC PEP isinstance issue Was: PEP 31XX: A Type Hierarchy for Numbers (and other algebraic entities)
- Next message: [Python-3000] ABC PEP isinstance issue Was: PEP 31XX: A Type Hierarchy for Numbers (and other algebraic entities)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]