Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
53ed6944
Commit
53ed6944
authored
Feb 08, 2001
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Unshare namespaceDict only when we're actually storing into it.
- Lose redundant semicolon.
parent
951f4ca4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/python/TAL/TALCompiler.py
lib/python/TAL/TALCompiler.py
+3
-3
No files found.
lib/python/TAL/TALCompiler.py
View file @
53ed6944
...
@@ -131,9 +131,9 @@ class METALCompiler(DOMVisitor):
...
@@ -131,9 +131,9 @@ class METALCompiler(DOMVisitor):
self
.
namespaceDict
=
self
.
namespaceStack
.
pop
()
self
.
namespaceDict
=
self
.
namespaceStack
.
pop
()
def
newNS
(
self
,
prefix
,
namespaceURI
):
def
newNS
(
self
,
prefix
,
namespaceURI
):
if
self
.
namespaceDict
is
self
.
namespaceStack
[
-
1
]:
self
.
namespaceDict
=
self
.
namespaceDict
.
copy
()
if
self
.
namespaceDict
.
get
(
prefix
)
!=
namespaceURI
:
if
self
.
namespaceDict
.
get
(
prefix
)
!=
namespaceURI
:
if
self
.
namespaceDict
is
self
.
namespaceStack
[
-
1
]:
self
.
namespaceDict
=
self
.
namespaceDict
.
copy
()
self
.
namespaceDict
[
prefix
]
=
namespaceURI
self
.
namespaceDict
[
prefix
]
=
namespaceURI
return
1
return
1
else
:
else
:
...
@@ -255,7 +255,7 @@ class TALCompiler(METALCompiler):
...
@@ -255,7 +255,7 @@ class TALCompiler(METALCompiler):
# Overriding METAL method to add attribute replacements
# Overriding METAL method to add attribute replacements
def
getAttributeList
(
self
,
node
):
def
getAttributeList
(
self
,
node
):
attrList
=
METALCompiler
.
getAttributeList
(
self
,
node
)
;
attrList
=
METALCompiler
.
getAttributeList
(
self
,
node
)
attrDict
=
getAttributeReplacements
(
node
)
attrDict
=
getAttributeReplacements
(
node
)
if
not
attrDict
:
if
not
attrDict
:
return
attrList
return
attrList
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment