[ python-Bugs-1583276 ] Different behavior when stepping through code w/ pdb
SourceForge.net
noreply at sourceforge.net
Tue Oct 24 02:54:27 CEST 2006
Bugs item #1583276, was opened at 2006-10-24 00:54
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1583276&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: John Ehresman (jpe)
Assigned to: Nobody/Anonymous (nobody)
Summary: Different behavior when stepping through code w/ pdb
Initial Comment:
The attached test case will raise a NameError when
executed in pdb by stepping though the code. The issue
is the EnumType name, which is both a local variable in
the Enum function which is used in the lambda and the
name of an attribute on the EnumValue class. Since it
is a local variable used in a lambda, it's a freevar.
What apparently happens is on line 5 the property()
result is stored in frame->f_locals['EnumType'] but it
is deleted the next time FastToLocals is invoked prior
to calling back into the debugger. This happens when
the freevars values are merged into the locals dictionary.
The example is a stripped down version of code in
turbogears.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1583276&group_id=5470
More information about the Python-bugs-list
mailing list