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
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
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
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
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