This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kteague
Recipients doerwalter, kteague, ncoghlan, paul.moore, ryan.freckleton
Date 2009-03-02.09:39:08
SpamBayes Score 8.38602e-11
Marked as misclassified No
Message-id <1235986752.93.0.989322587594.issue5135@psf.upfronthosting.co.za>
In-reply-to
Content
The problem with generic functions supporting ABCs is it's a bug with
the way ABCs work and not a problem with the generic function
implementation. The register() method of an ABC only fakes out
isinstance checks, it doesn't actually make the abstract base class a
base class of the class. It doesn't make any sense for a class to say it
is an instance of an ABC, but not have that ABC in it's MRO. It's not a
base class if it's not in the MRO!

The documentation for lack of ABC support should read something like:

+ Note that generic functions do not work with classes which have
+ been declared as an abstract base class using the
+ abc.ABCMeta.register() method because this method doesn't make
+ that abstract base class a base class of the class - it only fakes
+ out instance checks.

Perhaps a bug should be opened for the abc.ABCMeta.register() method.

However, I'd say that just because virtual abstract base classes are
wonky doesn't mean that a solid generic function implementation
shouldn't be added to standard library.
History
Date User Action Args
2009-03-02 09:39:13kteaguesetrecipients: + kteague, doerwalter, paul.moore, ncoghlan, ryan.freckleton
2009-03-02 09:39:12kteaguesetmessageid: <1235986752.93.0.989322587594.issue5135@psf.upfronthosting.co.za>
2009-03-02 09:39:10kteaguelinkissue5135 messages
2009-03-02 09:39:09kteaguecreate