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

noreply@sourceforge.net noreply@sourceforge.net
Mon, 18 Dec 2000 22:39:09 -0800


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

Project: Python
Category: Python Interpreter Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: prescod
Assigned to : jhylton
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).


Follow-Ups:

Date: 2000-Dec-18 22:39
By: gvanrossum

Comment:
Jeremy, I was wondering if you could have a look at this -- you may be able to make some changes in the function calling code since you are working on that anyway...

-------------------------------------------------------

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