[ python-Bugs-1583276 ] Different behavior when stepping through code w/ pdb

SourceForge.net noreply at sourceforge.net
Mon Oct 30 17:41:11 CET 2006


Bugs item #1583276, was opened at 2006-10-23 17:54
Message generated for change (Comment added) made by josiahcarlson
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.

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

Comment By: Josiah Carlson (josiahcarlson)
Date: 2006-10-30 08:41

Message:
Logged In: YES 
user_id=341410

Sorry!  What I meant to say is that this seems to be a
duplicate of http://python.org/sf/1569356 .

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

Comment By: John Ehresman (jpe)
Date: 2006-10-30 08:15

Message:
Logged In: YES 
user_id=22785

I'm a bit confused -- http://python.org/sf/1583276 seems to
resolve to this bug.

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

Comment By: Josiah Carlson (josiahcarlson)
Date: 2006-10-26 23:23

Message:
Logged In: YES 
user_id=341410

This seems to be a duplicate of http://python.org/sf/1583276 .

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

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