Prasanna
- All
- Personal
- Sports
- Sun
- Tech
- Useful Code
Tuesday Apr 17, 2007
Python: Method overriding, How?
I have read Mark Pilgrim's Dive into Python several times, but this explanation on method overriding by Guido still puzzles me.Guido, the original author of Python, explains method overriding this way: "Derived classes may override methods of their base classes. Because methods have no special privileges when calling other methods of the same object, a method of a base class that calls another method defined in the same base class, may in fact end up calling a method of a derived class that overrides it. (For C++ programmers: all methods in Python are effectively virtual.)" If that doesn't make sense to you (it confuses the hell out of me), feel free to ignore it. I just thought I'd pass it along.
Although I can interpret the statement, I still want to know HOW?
Posted at 03:36PM Apr 17, 2007 by prasanna in Tech | Comments[6]


Posted by Sridhar Ratna on April 17, 2007 at 05:08 PM IST #
I agree every class has an associated dict, but I am not quite clear with the derived class which overrides it.
Posted by Prasanna Seshadri on April 17, 2007 at 06:18 PM IST #
Posted by Sridhar Ratna on April 17, 2007 at 06:20 PM IST #
Posted by Nico on April 18, 2007 at 12:52 AM IST #
Posted by Faisal on April 18, 2007 at 12:54 AM IST #
Posted by Prasanna Seshadri on April 18, 2007 at 07:10 PM IST #