New submission from Matthias Urlichs <[EMAIL PROTECTED]>:

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 <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2786>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to