Re: class definition syntax

2008-08-29 Thread Bruno Desthuilliers
harryos a écrit : hi i have seen some class definitions like class MyClass(object): def __init__(self): what does the object keyword It's not a keyword. inside the braces in MyClass() mean? Answer is here: http://docs.python.org/tut/node11.html#SECTION00115000

Re: class definition syntax

2008-08-29 Thread Ken Starks
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 a

Re: class definition syntax

2008-08-29 Thread Wojtek Walczak
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 poin

Re: class definition syntax

2008-08-29 Thread Diez B. Roggisch
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 h

class definition syntax

2008-08-29 Thread harryos
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 -- http://mail.python.org/mailman/listinfo/python-list