Re: new-style classes and len method

2006-04-13 Thread bruno at modulix
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

Re: new-style classes and len method

2006-04-13 Thread bruno at modulix
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

Re: new-style classes and len method

2006-04-13 Thread Thomas Girod
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

Re: new-style classes and len method

2006-04-13 Thread Ben C
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): >

Re: new-style classes and len method

2006-04-13 Thread Paul McGuire
"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

Re: new-style classes and len method

2006-04-13 Thread Thomas Girod
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

new-style classes and len method

2006-04-13 Thread Thomas Girod
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