how to add class attributes in __new__
Bruno Desthuilliers
bdesth.quelquechose at free.quelquepart.fr
Thu Feb 1 14:48:40 EST 2007
jeremito a écrit :
> I am subclassing the array class and have __new__ to initialize and
> create my class. In that class I create not only do I create an array
> object, but I also create some other data in __new__ I want to have
> access to outside of __new__. I tried
>
> self.mydata = mydata
>
> but that didn't work.
>
> Can someone point me in the right direction?
http://www.python.org/download/releases/2.2.3/descrintro/#__new__
More information about the Python-list
mailing list