Superclass initialization
Ole Streicher
ole-usenet-spam at gmx.net
Fri Apr 24 10:44:22 EDT 2009
Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:
> Perhaps you should post the full trace back instead of just the final
> line.
No Problem, although I dont see the information increase there:
In [318]: class da(ndarray):
.....: def __init__(self, mydata):
.....: ndarray.__init__(self, 0)
.....: self.mydata = mydata
.....:
In [319]: da(range(100))
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/m3d/src/python/<ipython console> in <module>()
ValueError: sequence too large; must be smaller than 32
The same happens if I put the class definition into a file: the
traceback does *not* point to a code line in that source file but to
the input line. Again, full trace:
In [320]: import da
In [321]: da.da(range(100))
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/m3d/src/python/<ipython console> in <module>()
ValueError: sequence too large; must be smaller than 32
(using python instead of ipython also does not give more details).
Best regards
Ole
More information about the Python-list
mailing list