J
Jacek Generowicz
The Numeric docs state that "Subclassing Numeric arrays is not
possible due to a limitation of Python."
What is this limitation? My first guess is that it is the unsbclassability
of built-in types, which was addressed by the introduction of
new-style classes ... and, indeed, Numeric.ArrayType.__bases__ lists
object, so it looks like a new style class and therefore it seems to
me that it should be subclassable. Yet, if I try to subclass it, I get
told that it is not an acceptable base type.
Now, there is also a UserArray module in the Numeric distribution,
which, supposedly provides a subclassable analogue of the Numeric
arrays. But attempts to subclass it give an identical error message.
So, what am I missing ?
possible due to a limitation of Python."
What is this limitation? My first guess is that it is the unsbclassability
of built-in types, which was addressed by the introduction of
new-style classes ... and, indeed, Numeric.ArrayType.__bases__ lists
object, so it looks like a new style class and therefore it seems to
me that it should be subclassable. Yet, if I try to subclass it, I get
told that it is not an acceptable base type.
Now, there is also a UserArray module in the Numeric distribution,
which, supposedly provides a subclassable analogue of the Numeric
arrays. But attempts to subclass it give an identical error message.
So, what am I missing ?