diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-03-27 06:02:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-27 06:02:28 (GMT) |
commit | da0847048aa7f934573fa449cea8643def056aa5 (patch) | |
tree | ab70f219c1e98984908b04a175ced3a155df7036 /Lib/pdb.py | |
parent | 384b81d923addd52125e94470b11d2574ca266a9 (diff) | |
download | cpython-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-x | Lib/pdb.py | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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): |