Is it correct this way to inherit from a list?

gialloporpora gialloporpora at
Sun Mar 3 03:33:18 CET 2013

Risposta al messaggio di Ian Kelly :

> I retract that.  On further testing, it is actually the __init__
> method that initializes the list contents, not the __new__ method.  So
> this is all you need:
> class Vector(list):
>      def __init__(self, *args):
>          super(Vector, self).__init__(args)

Thanks, it works :-), it is simpler of my implementation, thank again.

*gialloporpora: Il nuovo album degli Atoms for Peace (con Thom Yorke dei 
radiohead) disponibile live: Un po' troppo 
elettronico per me * -
Sto ascoltando: *Pink Floyd – Us and Them * -

More information about the Python-list mailing list