Łukasz, Congratulations! I've accepted PEP 443. I've already marked it as Accepted in the repo. I've also applied some very minor edits in order to make the text flow a little better in a few places. I think this is a great PEP -- it's simple, doesn't overreach, and you've managed the bikeshedding admirably. Thank you for your great contribution to Python! -- --Guido van Rossum (python.org/~guido)
On 5 June 2013 02:32, Guido van Rossum <guido@python.org> wrote:
Łukasz,
Congratulations! I've accepted PEP 443. I've already marked it as Accepted in the repo. I've also applied some very minor edits in order to make the text flow a little better in a few places. I think this is a great PEP -- it's simple, doesn't overreach, and you've managed the bikeshedding admirably. Thank you for your great contribution to Python!
Excellent news! Congratulations. Paul
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. -- Markus (from phone) Guido van Rossum <guido@python.org> wrote:
Łukasz,
Congratulations! I've accepted PEP 443. I've already marked it as Accepted in the repo. I've also applied some very minor edits in order to make the text flow a little better in a few places. I think this is a great PEP -- it's simple, doesn't overreach, and you've managed the bikeshedding admirably. Thank you for your great contribution to Python!
-- --Guido van Rossum (python.org/~guido) _______________________________________________ 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/markus%40unterwaditzer.net
On Wed, Jun 5, 2013 at 5:29 PM, Markus Unterwaditzer <markus@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@gmail.com | Brisbane, Australia
On 5 cze 2013, at 09:29, Markus Unterwaditzer <markus@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.
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." As Nick noted, the reason the description is so brief is that this works just like calling methods. -- Best regards, Łukasz Langa WWW: http://lukasz.langa.pl/ Twitter: @llanga IRC: ambv on #python-dev
participants (6)
-
Ethan Furman
-
Guido van Rossum
-
Markus Unterwaditzer
-
Nick Coghlan
-
Paul Moore
-
Łukasz Langa