Commit 53ed6944 authored by Guido van Rossum's avatar Guido van Rossum

- Unshare namespaceDict only when we're actually storing into it.

- Lose redundant semicolon.
parent 951f4ca4
......@@ -131,9 +131,9 @@ class METALCompiler(DOMVisitor):
self.namespaceDict = self.namespaceStack.pop()
def newNS(self, prefix, namespaceURI):
if self.namespaceDict.get(prefix) != namespaceURI:
if self.namespaceDict is self.namespaceStack[-1]:
self.namespaceDict = self.namespaceDict.copy()
if self.namespaceDict.get(prefix) != namespaceURI:
self.namespaceDict[prefix] = namespaceURI
return 1
else:
......@@ -255,7 +255,7 @@ class TALCompiler(METALCompiler):
# Overriding METAL method to add attribute replacements
def getAttributeList(self, node):
attrList = METALCompiler.getAttributeList(self, node);
attrList = METALCompiler.getAttributeList(self, node)
attrDict = getAttributeReplacements(node)
if not attrDict:
return attrList
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment