[New-bugs-announce] [issue10088] pdb can't re-set variables

Giampaolo Rodola' report at bugs.python.org
Wed Oct 13 18:01:24 CEST 2010


New submission from Giampaolo Rodola' <g.rodola at gmail.com>:

Not sure if this is on purpose but I've lost quite some time to debug this problem.

--- code ---

def foo():
    bar = 1
    import pdb; pdb.set_trace()   
foo()


--- pdb session ---

(Pdb) dir()
['__return__', 'bar', 'pdb']
(Pdb) bar
1
(Pdb) bar = 2
(Pdb) bar
1
(Pdb) 


If this is on purpose (pdb just CAN'T do it) then I would expect it to display an error of some kind when I enter "bar = 2", say: "*** NameError: 'foo' is a reserved name".

----------
messages: 118534
nosy: giampaolo.rodola
priority: normal
severity: normal
status: open
title: pdb can't re-set variables

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10088>
_______________________________________


More information about the New-bugs-announce mailing list