On 1 fév, 17:50, "jeremito" <[EMAIL PROTECTED]> wrote:
> 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

self ? in __new__ ?

What about with this ?

    def __new__(cls, *args, **kw):
        newobj=object.__new__(cls)
        newobj.foo='bar'
        return newobj

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to