summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-03-27 06:02:28 (GMT)
committerGitHub <noreply@github.com>2019-03-27 06:02:28 (GMT)
commitda0847048aa7f934573fa449cea8643def056aa5 (patch)
treeab70f219c1e98984908b04a175ced3a155df7036 /Lib/pdb.py
parent384b81d923addd52125e94470b11d2574ca266a9 (diff)
downloadcpython-da0847048aa7f934573fa449cea8643def056aa5.zip
cpython-da0847048aa7f934573fa449cea8643def056aa5.tar.gz
cpython-da0847048aa7f934573fa449cea8643def056aa5.tar.bz2
bpo-36431: Use PEP 448 dict unpacking for merging two dicts. (GH-12553)
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index bf3219a..f5d33c2 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -491,8 +491,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
# Collect globals and locals. It is usually not really sensible to also
# complete builtins, and they clutter the namespace quite heavily, so we
# leave them out.
- ns = self.curframe.f_globals.copy()
- ns.update(self.curframe_locals)
+ ns = {**self.curframe.f_globals, **self.curframe_locals}
if '.' in text:
# Walk an attribute chain up to the last part, similar to what
# rlcompleter does. This will bail if any of the parts are not
@@ -1377,8 +1376,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
Start an interactive interpreter whose global namespace
contains all the (global and local) names found in the current scope.
"""
- ns = self.curframe.f_globals.copy()
- ns.update(self.curframe_locals)
+ ns = {**self.curframe.f_globals, **self.curframe_locals}
code.interact("*interactive*", local=ns)
def do_alias(self, arg):