On Wed, Jun 5, 2013 at 5:29 PM, Markus Unterwaditzer
<mar...@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   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to