summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index e507a9b..0f791d7 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -392,9 +392,12 @@ class Pdb(bdb.Bdb, cmd.Cmd):
self.tb_lineno[tb.tb_frame] = lineno
tb = tb.tb_next
self.curframe = self.stack[self.curindex][0]
- # The f_locals dictionary is updated from the actual frame
- # locals whenever the .f_locals accessor is called, so we
- # cache it here to ensure that modifications are not overwritten.
+ # The f_locals dictionary used to be updated from the actual frame
+ # locals whenever the .f_locals accessor was called, so it was
+ # cached here to ensure that modifications were not overwritten. While
+ # the caching is no longer required now that f_locals is a direct proxy
+ # on optimized frames, it's also harmless, so the code structure has
+ # been left unchanged.
self.curframe_locals = self.curframe.f_locals
self.set_convenience_variable(self.curframe, '_frame', self.curframe)