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 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com