This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: pdb can't re-set variables
Type: Stage:
Components: Versions: Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: giampaolo.rodola, mark.dickinson
Priority: normal Keywords:

Created on 2010-10-13 16:01 by giampaolo.rodola, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg118534 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2010-10-13 16:01
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".
msg118535 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-10-13 16:13
What versions of Python does this apply to?  Is this a duplicate of issue 5215?
msg118545 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2010-10-13 16:50
It seems it's a duplicate of issue 5215 and I was using Python 2.6.
msg114103 states that the fix wasn't ported to 2.6 so I'm closing this out as invalid.
History
Date User Action Args
2022-04-11 14:57:07adminsetgithub: 54297
2010-10-13 16:50:33giampaolo.rodolasetstatus: open -> closed
resolution: not a bug
messages: + msg118545

versions: + Python 2.6
2010-10-13 16:13:48mark.dickinsonsetnosy: + mark.dickinson
messages: + msg118535
2010-10-13 16:01:22giampaolo.rodolacreate