Is it correct this way to inherit from a list?

Chris Angelico rosuav at gmail.com
Sat Mar 2 22:18:59 EST 2013


On Sun, Mar 3, 2013 at 1:30 PM, gialloporpora <gialloporpora at gmail.com> wrote:
> Risposta al messaggio di Rick Johnson :
>
>
>> What are you trying to achieve exactly?
>
>
>
> I would like to implement a class (vector) to works with vectors, for
> example using scalar multiplication:
> a*v = [a*v1, a*vn]
> and a dual class for dual vector (the only method that I'll change is the
> __str__ method to print it as colun.

Have you looked at NumPy? I haven't used it myself, but I understand
it's good for this sort of thing.

ChrisA



More information about the Python-list mailing list