Misleading Python error message
Brian Kelley
bkelley at wi.mit.edu
Wed Nov 19 15:02:10 EST 2003
I accidentally derived a class from a module (types instead of
types.Dicttype)
>>> import types
>>> class f(types): pass
...
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: function takes at most 2 arguments (3 given)
Shouldn't this report something like (TypeError: can't subclass from a
module) It goes to the right line, but I coudn't see where the function
was being called :)
Brian
More information about the Python-list
mailing list