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
0cefd1ee
Commit
0cefd1ee
authored
May 11, 2001
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix SafeMapping
parent
55506c2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
lib/python/Products/PageTemplates/TALES.py
lib/python/Products/PageTemplates/TALES.py
+11
-15
No files found.
lib/python/Products/PageTemplates/TALES.py
View file @
0cefd1ee
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
An implementation of a generic TALES engine
An implementation of a generic TALES engine
"""
"""
__version__
=
'$Revision: 1.1
0
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
1
$'
[
11
:
-
2
]
import
re
,
sys
,
ZTUtils
import
re
,
sys
,
ZTUtils
from
MultiMapping
import
MultiMapping
from
MultiMapping
import
MultiMapping
...
@@ -140,21 +140,17 @@ class SafeMapping(MultiMapping):
...
@@ -140,21 +140,17 @@ class SafeMapping(MultiMapping):
able to read any value.
able to read any value.
'''
'''
__allow_access_to_unprotected_subobjects__
=
1
__allow_access_to_unprotected_subobjects__
=
1
def
__init__
(
self
,
*
dicts
):
push
=
pop
=
None
self
.
_mm
=
apply
(
MultiMapping
,
dicts
)
def
_push
(
self
,
ob
):
def
__getitem__
(
self
,
index
):
MultiMapping
.
push
(
self
,
ob
)
return
self
.
_mm
[
index
]
def
_pop
(
self
,
*
args
):
def
__len__
(
self
):
if
args
:
return
len
(
self
.
_mm
)
return
apply
(
MultiMapping
.
pop
,
(
self
,)
+
args
)
def
_push
(
self
,
arg
):
else
:
self
.
_mm
.
push
(
arg
)
return
MultiMapping
.
pop
(
self
)
def
_pop
(
self
):
return
self
.
_mm
.
pop
()
def
has_key
(
self
,
key
):
return
self
.
_mm
.
has_key
(
key
)
def
has_get
(
self
,
key
):
def
has_get
(
self
,
key
):
v
=
self
.
_mm
.
get
(
key
,
self
)
v
=
self
.
get
(
key
,
_marker
)
if
v
is
self
:
if
v
is
_marker
:
return
0
,
None
return
0
,
None
else
:
else
:
return
1
,
v
return
1
,
v
...
...
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