summaryrefslogtreecommitdiffstats
path: root/Lib/xml/sax
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/xml/sax
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/xml/sax')
-rw-r--r--Lib/xml/sax/saxutils.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/xml/sax/saxutils.py b/Lib/xml/sax/saxutils.py
index a69c7f7..b4fc2da 100644
--- a/Lib/xml/sax/saxutils.py
+++ b/Lib/xml/sax/saxutils.py
@@ -56,8 +56,7 @@ def quoteattr(data, entities={}):
the optional entities parameter. The keys and values must all be
strings; each key will be replaced with its corresponding value.
"""
- entities = entities.copy()
- entities.update({'\n': '&#10;', '\r': '&#13;', '\t':'&#9;'})
+ entities = {**entities, '\n': '&#10;', '\r': '&#13;', '\t':'&#9;'}
data = escape(data, entities)
if '"' in data:
if "'" in data: