Skip to content

Commit 814237b

Browse files
committed
PythonDebugger: aliases polute the local variable namespace (this is not the best solution, but better than nothing)
1 parent 2817d4a commit 814237b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

PythonDebugger/PythonDebugger.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ wxString PythonDebugger::AssembleAliasCommands()
166166
wxString commands;
167167
//NB: \001 is the separator character used when parsing in OnTimer
168168
//Print variables associated with a child
169-
commands+=_T("alias pm for x in sorted(%1.__dict__): print '%s\\001%s\\001'%(x,type(%1.__dict__[x])),str(%1.__dict__[x])[:1200],'\\001',\n");
169+
commands+=_T("alias pm for __x in sorted(%1.__dict__): print '%s\\001%s\\001'%(__x,type(%1.__dict__[__x])),str(%1.__dict__[__x])[:1200],'\\001',\n");
170170
//Print all local variables
171-
commands+=_T("alias pl for x in sorted(locals()): print '%s\\001%s\\001'%(x,type(locals()[x])),str(locals()[x])[:1200],'\\001',\n");
171+
commands+=_T("alias pl for __x in sorted(locals()): print '%s\\001%s\\001'%(__x,type(locals()[__x])),str(locals()[__x])[:1200],'\\001',\n");
172172
//Print variable name, type and value
173173
commands+=_T("alias ps print '%1\\001',;print str(type(%1))+'\\001',;print str(%1)[:1200]\n");
174174
//Print comment

0 commit comments

Comments
 (0)