constructor chaining?

Mark Nenadov mnenadov at stclairc.on.ca
Tue Jul 24 08:03:45 EDT 2001


I am wondering how I can do constructor chaining with Python. 

For example, if I had a base class called "Media" and a child class
called "Book", how would I call the Media's __init__ constructor from
within the Book's __init_constructor?

In PHP I know you can just refer to the name of the parent's constructor.
In Java I believe you can call "super()". How can I do this in Python?

Thanks in advance.

-- 
~Mark Nenadov (author/editor for http://www.coffeecode.com)



More information about the Python-list mailing list