Thomas Girod wrote:
> It's alright I found where my mistake came from. I was misunderstanding
> the meaning of "classmethod", thinking of it as an instance method.
Given that 'instance methods' being most of the time attributes of the
class object, such a confusion is not so surprising !-)
--
br
Thomas Girod wrote:
> Or maybe I'm mixing up what we call a "classmethod" with what we could
> call an "instance method" ?
>
That's what I was about to point out !-)
> class Data(list):
> __slots__ = ["width", "height", "label"]
>
> def __init__(self,width,height,label=None):
> l
It's alright I found where my mistake came from. I was misunderstanding
the meaning of "classmethod", thinking of it as an instance method.
--
http://mail.python.org/mailman/listinfo/python-list
On 2006-04-13, Thomas Girod <[EMAIL PROTECTED]> wrote:
> Hi there.
>
> I'm trying to use new-style classes, but there is something i'm
> obviously missing
>
> here it is :
>
> class Data(list):
> __slots__ = ["width", "height", "label"]
>
> def __init__(self,width,height,label=None):
>
"Thomas Girod" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi there.
>
> I'm trying to use new-style classes, but there is something i'm
> obviously missing
>
> here it is :
>
> class Data(list):
> __slots__ = ["width", "height", "label"]
>
> def __init__(self,width,height
Or maybe I'm mixing up what we call a "classmethod" with what we could
call an "instance method" ?
--
http://mail.python.org/mailman/listinfo/python-list
Hi there.
I'm trying to use new-style classes, but there is something i'm
obviously missing
here it is :
class Data(list):
__slots__ = ["width", "height", "label"]
def __init__(self,width,height,label=None):
list.__init__(self)
self.width = width
self.height = he