summaryrefslogtreecommitdiffstats
path: root/Lib/xml/dom/expatbuilder.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2012-02-19 19:55:05 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2012-02-19 19:55:05 (GMT)
commit7b77188e89182e0cf00d42f5556f972a739d6beb (patch)
tree7a1afd31b81475eab8531907c76cc460e5516611 /Lib/xml/dom/expatbuilder.py
parent14aa280de23ecb6c31ffbde4a12c1a0a6f5493e0 (diff)
downloadcpython-7b77188e89182e0cf00d42f5556f972a739d6beb.zip
cpython-7b77188e89182e0cf00d42f5556f972a739d6beb.tar.gz
cpython-7b77188e89182e0cf00d42f5556f972a739d6beb.tar.bz2
Create _attr/_attrNS lazily.
Diffstat (limited to 'Lib/xml/dom/expatbuilder.py')
-rw-r--r--Lib/xml/dom/expatbuilder.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/xml/dom/expatbuilder.py b/Lib/xml/dom/expatbuilder.py
index b4b28e4..ff9c1f1 100644
--- a/Lib/xml/dom/expatbuilder.py
+++ b/Lib/xml/dom/expatbuilder.py
@@ -760,6 +760,7 @@ class Namespaces:
del self._ns_ordered_prefixes[:]
if attributes:
+ node._ensure_attributes()
_attrs = node._attrs
_attrsNS = node._attrsNS
for i in range(0, len(attributes), 2):