[Python-bugs-list] [Bug #121930] Parameter mismatch exception tracebacks could be more helpfu

noreply@sourceforge.net noreply@sourceforge.net
Tue, 7 Nov 2000 18:16:02 -0800


Bug #121930, was updated on 2000-Nov-07 18:14
Here is a current snapshot of the bug.

Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Parameter mismatch exception tracebacks could be more helpfu

Details: Here's an example of the problem:

def foo(a,b,c,d,e,f,g,h,i,j): pass
a=foo
#10,00 lines of code
#10,00 lines of code
...
j=a
# 10,000 lines of code
def bar(): j()
bar()
 
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "<stdin>", line 1, in bar
TypeError: not enough arguments; expected 10, got 0
 
Notice that there is *no indication* of the real source-location of the
thing that I attempted to call (foo). As soon as there is a layer or two
of indirection between function pointers and the code that calls them,
it can get really confusing to try and figure out what code is being
called. When the callee is Python it would be nice if there were some
indication in the error message or traceback of the thing's real name
and real source location.

Guido says:

> This could be fixed with special purpose code for this exception
> (probably by setting up a dummy frame and using that).


For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=121930&group_id=5470