Message362070
It does:
```
if '__args__' in frame.f_locals:
args = frame.f_locals['__args__']
else:
args = None
if args:
s += reprlib.repr(args)
else:
s += '()'
```
However that appears to be wrong/unnecessary since the following likely, but
maybe also others:
commit 75bb54c3d8
Author: Guido van Rossum <guido@python.org>
Date: Mon Sep 28 15:33:38 1998 +0000
Don't set a local variable named __args__; this feature no longer
works and Greg Ward just reported a problem it caused...
diff --git a/Lib/bdb.py b/Lib/bdb.py
index 3ca25adbbf..f2cf4caa36 100644
--- a/Lib/bdb.py
+++ b/Lib/bdb.py
@@ -46,7 +46,7 @@ def dispatch_line(self, frame):
return self.trace_dispatch
def dispatch_call(self, frame, arg):
- frame.f_locals['__args__'] = arg
+ # XXX 'arg' is no longer used
if self.botframe is None:
# First call of dispatch since reset()
self.botframe = frame
Code ref: https://github.com/python/cpython/blob/1ed61617a4a6632905ad6a0b440cd2cafb8b6414/Lib/bdb.py#L551-L558.
So it should either get removed, or likely be replaced with actually displaying
the args.
For this the part could be factored out of `do_args` maybe, adjusting it for
handling non-current frames.
Of course somebody might inject/set `__args__` still (I've thought about doing that initially for pdb++, but will rather re-implement/override `format_stack_entry` instead), so support for this could be kept additionally. |
|
Date |
User |
Action |
Args |
2020-02-16 13:41:44 | blueyed | set | recipients:
+ blueyed |
2020-02-16 13:41:44 | blueyed | set | messageid: <1581860504.66.0.826450545942.issue39649@roundup.psfhosted.org> |
2020-02-16 13:41:44 | blueyed | link | issue39649 messages |
2020-02-16 13:41:44 | blueyed | create | |
|