inspect bug

Aaron "Castironpi" Brady castironpi at gmail.com
Wed Oct 8 23:24:20 EDT 2008


Hi all,

Found this bug.  It's in 2.6, too bad.

Python 2.6 (r26:66721, Oct  2 2008, 11:35:03) [MSC v.1500 32 bit
(Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import inspect
>>> type( inspect.getargvalues( inspect.currentframe() ) )
<type 'tuple'>

Docs say:

inspect.getargvalues(frame)
...
Changed in version 2.6: Returns a named tuple ArgInfo(args, varargs,
keywords, locals).

The code defines an ArgInfo type, but doesn't instantiate it in the
return, as shown here:

    return args, varargs, varkw, frame.f_locals



More information about the Python-list mailing list