how to add class attributes in __new__

jeremito jeremit0 at gmail.com
Thu Feb 1 11:50:13 EST 2007


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?
Thanks,
Jeremy




More information about the Python-list mailing list