class definition syntax
Diez B. Roggisch
deets at nospam.web.de
Fri Aug 29 05:54:22 EDT 2008
harryos wrote:
> hi
> i have seen some class definitions like
>
> class MyClass(object):
> def __init__(self):
> ....
>
> what does the object keyword inside the braces in MyClass() mean?
> Has it got any significance?
It indicates a so-called new-style-class. The new style classes have been
available since python2.2:
http://docs.python.org/ref/node33.html
Diez
More information about the Python-list
mailing list