[issue5215] change value of local variable in debug
mproeller
report at bugs.python.org
Thu Feb 12 09:33:30 CET 2009
mproeller <mproeller at googlemail.com> added the comment:
This is the pdb session at the tracepoint in line 4 in the function func
()
So I did the following first:
> c:\test.py(5)func()
-> a = b + 2
(Pdb) p b
13
(Pdb) !b=5
(Pdb) p b
13
(Pdb) n
> c:\test.py(6)func()
-> print a
(Pdb) n
15
I tried to change the value of b but it didn't work, as the
print a statement printed 15, but it should have printed 7
because I set b to 5!!
Then I did the same again:
> c:\test.py(5)func()
-> a = b + 2
(Pdb) p b
13
(Pdb) !b = 5
(Pdb) n
> c:\test.py(6)func()
-> print a
(Pdb) n
7
Note that I changed the value of b to 5 and than didn't print the value
of b and it seems to work as the print statement printed 7.
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5215>
_______________________________________
More information about the Python-bugs-list
mailing list