Python was designed (was Re: Multi-threading in Python vs Java)

rusi rustompmody at gmail.com
Thu Oct 17 08:39:59 EDT 2013


On Thursday, October 17, 2013 12:19:02 PM UTC+5:30, Peter Cacioppi wrote:
> Object oriented programming takes things further, most significantly by introducing the idea that the object reference you are referencing might be a run time dependent sub-class. Even Python, which isn't strongly typed, manages polymorphism by allowing the self argument to a sub-class of the method class.

Yes and the reference I earlier gave was just for that:
http://lwn.net/Articles/444910/

Ironically he describes the whole 'polymorphism-in-C' infrastructure there but does not call it that.
The first line however in the sequel article http://lwn.net/Articles/446317/
does just that. Heres the quote:

--------------------
In the first part of this analysis we looked at how the polymorphic side of object-oriented programming was implemented in the Linux kernel using regular C constructs. In particular we examined method dispatch, looked at the different forms that vtables could take, and the circumstances where separate vtables were eschewed in preference for storing function pointers directly in objects. In this conclusion we will explore a second important aspect of object-oriented programming - inheritance, and in particular data inheritance.
--------------------



More information about the Python-list mailing list