[New-bugs-announce] [issue2786] Names in traceback should have class names, if they're methods
Matthias Urlichs
report at bugs.python.org
Wed May 7 22:25:58 CEST 2008
New submission from Matthias Urlichs <smurf at smurf.noris.de>:
Consider this simple error:
>>> class foo(object):
... def __init__(self,bar):
... pass
...
>>> foo()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() takes exactly 2 positional arguments (1 given)
>>>
The problem is that if that "foo" call is through a variable (or
anything else that obscures which class I'm actually calling) there's no
good way to figure this from the traceback.
The last line should read
TypeError: foo.__init__() takes exactly 2 positional arguments (1 given)
or similar.
----------
messages: 66373
nosy: smurfix
severity: normal
status: open
title: Names in traceback should have class names, if they're methods
type: behavior
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2786>
__________________________________
More information about the New-bugs-announce
mailing list