You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was toying with IPython, and I've observed this bug:
[1]: def foo(a, (x,y,z) = (1,2,3)): print a, x, y, z
...:
[2]: foo(1,2)
ERROR: Internal Python error in the inspect module.
Below is the traceback from this internal error.
Traceback (most recent call last):
File "/var/lib/python-support/python2.5/IPython/ultraTB.py", line 662, in text
locals,formatvalue=var_repr))
File "/usr/lib/python2.5/inspect.py", line 812, in formatargvalues
specs.append(strseq(args[i], convert, join))
File "/usr/lib/python2.5/inspect.py", line 765, in strseq
return join(map(lambda o, c=convert, j=join: strseq(o, c, j), object))
File "/usr/lib/python2.5/inspect.py", line 765, in <lambda>
return join(map(lambda o, c=convert, j=join: strseq(o, c, j), object))
File "/usr/lib/python2.5/inspect.py", line 767, in strseq
return convert(object)
File "/usr/lib/python2.5/inspect.py", line 809, in convert
return formatarg(name) + formatvalue(locals[name])
KeyError: 'x'
IPython's exception reporting continues...
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/harry/<ipython console> in <module>()
/home/harry/<ipython console> in foo(***failed resolving arguments***)
TypeError: 'int' object is not iterable
> <ipython console>(1)foo()
ipdb>
The regular Python interpreter just says:
>>> def foo(a, (x,y,z) = (1,2,3)):
... print a, x, y, z
...
>>> foo(1,2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 1, in foo
TypeError: 'int' object is not iterable
This seems to be related to some IPython-specific functionality, although I have no understanding of its internals... I don't know if this error even matters at all, since there's already another one related to passing wrong arguments to a function - I'm just making sure someone knows that there's badness in that "inspect" module...
The text was updated successfully, but these errors were encountered:
Original Launchpad bug 249548: https://bugs.launchpad.net/ipython/+bug/249548
Reported by: harry666t (harry666t).
The regular Python interpreter just says:
This seems to be related to some IPython-specific functionality, although I have no understanding of its internals... I don't know if this error even matters at all, since there's already another one related to passing wrong arguments to a function - I'm just making sure someone knows that there's badness in that "inspect" module...
The text was updated successfully, but these errors were encountered: