On Mon, Aug 5, 2013 at 1:34 AM, Helmut Jarausch
wrote:
> Hi,
>
> I'd like to subclass array.array and implement operators like __iadd__
> How can this be accomplished.
>
> I'tried
>
> from array import array
>
> class Vec(array) :
> def __new__(cls,Vinit) :
> return array.__new__(cls,'d',Vin
Hi,
I'd like to subclass array.array and implement operators like __iadd__
How can this be accomplished.
I'tried
from array import array
class Vec(array) :
def __new__(cls,Vinit) :
return array.__new__(cls,'d',Vinit)
def __init__(self,*args) :
self.N = len(self)
def __str__(self