gialloporpora wrote: > I would like to inherit from the list native class. > really I expected that was possible to use native list method without > redefining them, for example the __repr__ method. > > I don't know if i have made something wrong, this is my code (I obmit > customized methods that I have added): > > from os.path import exists > > class vector(list):
> def __getitem__(self, key): > return self._list[key] [and many more] > Is it correct or it exists another way to inherit from list class? Have you considered subclassing collections.MutableSequence instead? You cannot instantiate that class until you have overridden all its abstract methods. -- http://mail.python.org/mailman/listinfo/python-list