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 = height self.label = label def clear(cls): while len(cls) > 0: del cls[0] return clear = classmethod(clear) #> d = Data(2,2) #> d.clear() TypeError: len() of unsized object off course it was working with : [...] def clear(self): while len(self) > 0: del self[0] return So, I guess you can't use "cls" as a replacement for "self". So, what do I have to use ??? -- http://mail.python.org/mailman/listinfo/python-list