mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
bpo-36431: Use PEP 448 dict unpacking for merging two dicts. (GH-12553)
This commit is contained in:
parent
384b81d923
commit
da0847048a
6 changed files with 14 additions and 29 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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue