[Python-Dev] PEP 443 Accepted

Nick Coghlan ncoghlan at gmail.com
Wed Jun 5 09:47:35 CEST 2013


On Wed, Jun 5, 2013 at 5:29 PM, Markus Unterwaditzer
<markus at unterwaditzer.net> wrote:
> As somebody who missed the discussion about it and right now took a quick look at the PEP, i ask myself how subclasses are handled, as i don't see anything about it in the PEP, just support for ABCs.
>
> E.g if
>
>     issubclass(Apple, Fruit)
>
> And i call a function which has registered an implementation for the Fruits type with an object of type Apple, is this implementation used? I assume so, but as said, i don't see it mentioned anywhere.

That's covered by walking the MRO the same way method dispatch does
it, so it didn't really get discussed much (the question never came
up). The ABC handling is described explicitly as the generic dispatch
implementation that the PEP was based on didn't handle them, and
because it required a fair bit more thought than just walking the MRO.

Cheers,
Nick.

--
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list