commit | da0847048aa7f934573fa449cea8643def056aa5 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Wed Mar 27 08:02:28 2019 +0200 |
committer | GitHub <noreply@github.com> | Wed Mar 27 08:02:28 2019 +0200 |
tree | ab70f219c1e98984908b04a175ced3a155df7036 | |
parent | 384b81d923addd52125e94470b11d2574ca266a9 [diff] [blame] |
bpo-36431: Use PEP 448 dict unpacking for merging two dicts. (GH-12553)
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 9a3d399..df2ff06 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py
@@ -426,8 +426,7 @@ self.unredirected_hdrs.pop(header_name, None) def header_items(self): - hdrs = self.unredirected_hdrs.copy() - hdrs.update(self.headers) + hdrs = {**self.unredirected_hdrs, **self.headers} return list(hdrs.items()) class OpenerDirector: