subclass from a sage vector

I have another question regarding the vector class shipped with sage. I would like
to add some properties to a vector to store some additional information. But I
am not sure which class I should choose as a base class, since there are a lot of
different vector classes:

1 answer

It sounds like the easiest thing to do is to make your class a subclass of the particular type you are talking about. Alternatively, I think you could make a new python "mixin" class that has the attributes that you want and then make a subclass of each vector class that also inherits from your "mixin".