deriving from array.array

Torsten Mohr tmohr at s.netic.de
Tue Jan 26 14:28:26 EST 2010


Hello,

thanks a lot for your hint, it works fine.

>> I get an error for "a = Abc(4, 5)", seems the parameters are
>> forwarded to array's __init__ as they are.
> 
> No, with CPython they're forwarded to __new__.

Not sure if i understand this correctly, if i derive from other
classes (like wxpython widgets) i always call the bases __init__ .

>>  Though i explicitly
>> call __init__() for array.
> 
> That's the constructor inherited from 'object', it takes no args (except
> the self arg).

Is there a way to find out what i need to call?  I haven't found much in
the documentation.  From writing C extensions i knew about the "new" entry
in the PyTypeObject struct but it seems there's more behind it.
In docs.python.org i did not find much, is there an URL where i can read 
more?


Best regards,
Torsten.





More information about the Python-list mailing list