Overloading __init__ & Function overloading

Michael Hoffman cam.ac.uk at mh391.invalid
Fri Sep 30 10:15:27 EDT 2005


Larry Bates wrote:

> class myclass(baseclass):
>     def __init__(self, arg):
>         #
>         # This method gets called when I instantiate this class.
>         # If I want to call the baseclass.__init__ method I must
>         # do it myself.
>         #
>         baseclass.__init__(arg)

This is an example of polymorphism generally, not overloading.
-- 
Michael Hoffman



More information about the Python-list mailing list