Subclassing hidden class
John Smith
JohnSmith at obfs.com
Sun Feb 16 16:11:06 EST 2003
Is there a quick way to subclass that usually use a constructor function to
return objects?
For example,
>>> import numarray
>>> class myarray(numarray.array):
pass
Traceback (most recent call last):
File "<pyshell#36>", line 1, in ?
class myarray(numarray.array):
TypeError: cannot create 'function' instances
I know there is probably a way to subclass numarray.array by tracing the
sorce code. But I wonder if
there is a better way.
Or, is there an easier way to create a wrapper class without define all the
methods? Thanks
More information about the Python-list
mailing list