class definition syntax

Wojtek Walczak gminick at bzt.bzt
Fri Aug 29 12:04:42 CEST 2008


On Fri, 29 Aug 2008 02:50:57 -0700 (PDT), harryos wrote:

> class MyClass(object):
>     def __init__(self):
>        ....
>
> what does the object keyword inside the braces in MyClass() mean?
> Has it got any significance?

It's inheritance. MyClass class inherits from object class.
Check out point 9.5 in the tutorial.

-- 
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/



More information about the Python-list mailing list