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 @@
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
from
MultiMapping
import
MultiMapping
...
...
@@ -140,21 +140,17 @@ class SafeMapping(MultiMapping):
able to read any value.
'''
__allow_access_to_unprotected_subobjects__
=
1
def
__init__
(
self
,
*
dicts
):
self
.
_mm
=
apply
(
MultiMapping
,
dicts
)
def
__getitem__
(
self
,
index
):
return
self
.
_mm
[
index
]
def
__len__
(
self
):
return
len
(
self
.
_mm
)
def
_push
(
self
,
arg
):
self
.
_mm
.
push
(
arg
)
def
_pop
(
self
):
return
self
.
_mm
.
pop
()
def
has_key
(
self
,
key
):
return
self
.
_mm
.
has_key
(
key
)
push
=
pop
=
None
def
_push
(
self
,
ob
):
MultiMapping
.
push
(
self
,
ob
)
def
_pop
(
self
,
*
args
):
if
args
:
return
apply
(
MultiMapping
.
pop
,
(
self
,)
+
args
)
else
:
return
MultiMapping
.
pop
(
self
)
def
has_get
(
self
,
key
):
v
=
self
.
_mm
.
get
(
key
,
self
)
if
v
is
self
:
v
=
self
.
get
(
key
,
_marker
)
if
v
is
_marker
:
return
0
,
None
else
:
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