Message83009
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. |
|
Date |
User |
Action |
Args |
2009-03-02 09:39:13 | kteague | set | recipients:
+ kteague, doerwalter, paul.moore, ncoghlan, ryan.freckleton |
2009-03-02 09:39:12 | kteague | set | messageid: <1235986752.93.0.989322587594.issue5135@psf.upfronthosting.co.za> |
2009-03-02 09:39:10 | kteague | link | issue5135 messages |
2009-03-02 09:39:09 | kteague | create | |
|