<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 5 cze 2013, at 09:29, Markus Unterwaditzer <<a href="mailto:markus@unterwaditzer.net">markus@unterwaditzer.net</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">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.<br><br>E.g if<br><br>    issubclass(Apple, Fruit)<br><br>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.<br></blockquote><div><br></div><div>Yes, this is the supported behaviour. The PEP briefly explains that "Where there is no registered implementation for a specific type, its
method resolution order is used to find a more generic implementation."</div><div><br></div><div>As Nick noted, the reason the description is so brief is that this works just like calling methods.</div><div><br></div></div><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">-- <br>Best regards,<br>Ɓukasz Langa<br><br>WWW: <a href="http://lukasz.langa.pl/">http://lukasz.langa.pl/</a><br>Twitter: @llanga<br>IRC: ambv on #python-dev</div>
</div>
<br></body></html>