class definition syntax
Ken Starks
straton at lampsacos.demon.co.uk
Fri Aug 29 07:04:20 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?
>
> thanks in advance
> harry
It is a syntax used for 'new type' classes, not so new any more.
If you google that phrase, you get many references.
Here is a tutorial dating back to 2005.
http://www.geocities.com/foetsch/python/new_style_classes.htm
More information about the Python-list
mailing list