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
5d5311ef
Commit
5d5311ef
authored
Nov 19, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added _ prefix to push and pop methods to make them private
parent
69b6187e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
23 deletions
+33
-23
lib/python/DocumentTemplate/DT_In.py
lib/python/DocumentTemplate/DT_In.py
+7
-4
lib/python/DocumentTemplate/DT_String.py
lib/python/DocumentTemplate/DT_String.py
+3
-3
lib/python/DocumentTemplate/DT_Util.py
lib/python/DocumentTemplate/DT_Util.py
+5
-4
lib/python/DocumentTemplate/cDocumentTemplate.c
lib/python/DocumentTemplate/cDocumentTemplate.c
+9
-6
lib/python/DocumentTemplate/pDocumentTemplate.py
lib/python/DocumentTemplate/pDocumentTemplate.py
+9
-6
No files found.
lib/python/DocumentTemplate/DT_In.py
View file @
5d5311ef
...
...
@@ -230,7 +230,7 @@
of the module 'Missing', if present.
'''
#'
__rcs_id__
=
'$Id: DT_In.py,v 1.1
1 1997/11/12 23:25:5
6 jim Exp $'
__rcs_id__
=
'$Id: DT_In.py,v 1.1
2 1997/11/19 15:42:4
6 jim Exp $'
############################################################################
# Copyright
...
...
@@ -284,7 +284,7 @@ __rcs_id__='$Id: DT_In.py,v 1.11 1997/11/12 23:25:56 jim Exp $'
# (540) 371-6909
#
############################################################################
__version__
=
'$Revision: 1.1
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
2
$'
[
11
:
-
2
]
from
DT_Util
import
*
from
string
import
find
,
atoi
,
join
...
...
@@ -397,7 +397,7 @@ class In:
kw['
sequence
-
step
-
end
']=end
kw['
sequence
-
step
-
orphan
']=orphan
try:
md.push(vars)
md.
_
push(vars)
if previous:
if first > 0:
pstart,pend,psize=opt(None,first+overlap,
...
...
@@ -463,7 +463,7 @@ class In:
result.append(section(client,md))
result=join(result, '')
finally:
md.pop(1)
md.
_
pop(1)
return result
...
...
@@ -791,6 +791,9 @@ class sequence_variables:
############################################################################
# $Log: DT_In.py,v $
# Revision 1.12 1997/11/19 15:42:46 jim
# added _ prefix to push and pop methods to make them private
#
# Revision 1.11 1997/11/12 23:25:56 jim
# Fixed bug in expr handling.
#
...
...
lib/python/DocumentTemplate/DT_String.py
View file @
5d5311ef
...
...
@@ -329,13 +329,13 @@ class String:
if pushed is not None:
# We were passed a TemplateDict, so we must be a sub-template
md=mapping
push=md.push
push=md.
_
push
if globals:
push(self.globals)
pushed=pushed+1
else:
md=TemplateDict()
push=md.push
push=md.
_
push
shared_globals=self.shared_globals
if shared_globals: push(shared_globals)
if globals: push(globals)
...
...
@@ -367,7 +367,7 @@ class String:
try:
return render_blocks(self,md)
finally:
if pushed: md.pop(pushed) # Get rid of circular reference!
if pushed: md.
_
pop(pushed) # Get rid of circular reference!
md.level=level # Restore previous level
validate=None
...
...
lib/python/DocumentTemplate/DT_Util.py
View file @
5d5311ef
'''$Id: DT_Util.py,v 1.1
6 1997/11/19 15:33:32
jim Exp $'''
'''$Id: DT_Util.py,v 1.1
7 1997/11/19 15:42:47
jim Exp $'''
############################################################################
# Copyright
...
...
@@ -52,7 +52,7 @@
# (540) 371-6909
#
############################################################################
__version__
=
'$Revision: 1.1
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
7
$'
[
11
:
-
2
]
import
sys
,
regex
,
string
,
types
,
math
,
os
from
string
import
rfind
,
strip
,
joinfields
,
atoi
,
lower
,
upper
,
capitalize
...
...
@@ -285,10 +285,11 @@ def parse_params(text,
try: from cDocumentTemplate import InstanceDict, TemplateDict, render_blocks
except: from pDocumentTemplate import InstanceDict, TemplateDict, render_blocks
# TemplateDict.pop.__roles__=TemplateDict.push.__roles__=()
############################################################################
# $Log: DT_Util.py,v $
# Revision 1.17 1997/11/19 15:42:47 jim
# added _ prefix to push and pop methods to make them private
#
# Revision 1.16 1997/11/19 15:33:32 jim
# Updated parse_params so that you can define an attribute that, if
# used, must have a value. This is done by specifying None as a default
...
...
lib/python/DocumentTemplate/cDocumentTemplate.c
View file @
5d5311ef
...
...
@@ -10,7 +10,7 @@
static
char
cDocumentTemplate_module_documentation
[]
=
""
"
\n
$Id: cDocumentTemplate.c,v 1.
7 1997/11/07 18:51
:47 jim Exp $"
"
\n
$Id: cDocumentTemplate.c,v 1.
8 1997/11/19 15:42
:47 jim Exp $"
;
#include "ExtensionClass.h"
...
...
@@ -341,10 +341,10 @@ MM_has_key(MM *self, PyObject *args)
static
struct
PyMethodDef
MM_methods
[]
=
{
{
"__init__"
,
(
PyCFunction
)
MM__init__
,
0
,
"__init__() -- Create a new empty multi-mapping"
},
{
"push"
,
(
PyCFunction
)
MM_push
,
0
,
"push(mapping_object) -- Add a data source"
},
{
"pop"
,
(
PyCFunction
)
MM_pop
,
0
,
"pop() -- Remove and return the last data source added"
},
{
"
_
push"
,
(
PyCFunction
)
MM_push
,
0
,
"
_
push(mapping_object) -- Add a data source"
},
{
"
_
pop"
,
(
PyCFunction
)
MM_pop
,
0
,
"
_
pop() -- Remove and return the last data source added"
},
{
"getitem"
,
(
PyCFunction
)
MM_get
,
METH_VARARGS
,
"getitem(key[,call]) -- Get a value
\n\n
"
"Normally, callable objects that can be called without arguments are
\n
"
...
...
@@ -529,7 +529,7 @@ void
initcDocumentTemplate
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
7
$"
;
char
*
rev
=
"$Revision: 1.
8
$"
;
UNLESS
(
py_isDocTemp
=
PyString_FromString
(
"isDocTemp"
))
return
;
UNLESS
(
py_blocks
=
PyString_FromString
(
"blocks"
))
return
;
...
...
@@ -561,6 +561,9 @@ initcDocumentTemplate()
Revision Log:
$Log: cDocumentTemplate.c,v $
Revision 1.8 1997/11/19 15:42:47 jim
added _ prefix to push and pop methods to make them private
Revision 1.7 1997/11/07 18:51:47 jim
Fixed bug in new call logic.
...
...
lib/python/DocumentTemplate/pDocumentTemplate.py
View file @
5d5311ef
...
...
@@ -58,8 +58,8 @@
__doc__
=
'''Python implementations of document template some features
$Id: pDocumentTemplate.py,v 1.
6 1997/11/11 18:39:29
jim Exp $'''
__version__
=
'$Revision: 1.
6
$'
[
11
:
-
2
]
$Id: pDocumentTemplate.py,v 1.
7 1997/11/19 15:42:48
jim Exp $'''
__version__
=
'$Revision: 1.
7
$'
[
11
:
-
2
]
import
regex
,
string
...
...
@@ -140,13 +140,13 @@ class TemplateDict:
level
=
0
def
pop
(
self
,
n
):
return
self
.
dicts
.
pop
(
n
)
def
push
(
self
,
d
):
return
self
.
dicts
.
push
(
d
)
def
_
pop
(
self
,
n
):
return
self
.
dicts
.
pop
(
n
)
def
_
push
(
self
,
d
):
return
self
.
dicts
.
push
(
d
)
def
__init__
(
self
):
m
=
self
.
dicts
=
MultiMapping
()
self
.
pop
=
m
.
pop
self
.
push
=
m
.
push
self
.
_
pop
=
m
.
pop
self
.
_
push
=
m
.
push
try
:
self
.
keys
=
m
.
keys
except
:
pass
...
...
@@ -177,6 +177,9 @@ def render_blocks(self, md):
##############################################################################
#
# $Log: pDocumentTemplate.py,v $
# Revision 1.7 1997/11/19 15:42:48 jim
# added _ prefix to push and pop methods to make them private
#
# Revision 1.6 1997/11/11 18:39:29 jim
# Added a little compatibility with cDocumentTemplate.
#
...
...
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