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
297e42ce
Commit
297e42ce
authored
Jun 21, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed stupid bug in batch processing that became effective in Python 1.5.2.
parent
ad7f1e56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
lib/python/DocumentTemplate/DT_In.py
lib/python/DocumentTemplate/DT_In.py
+6
-6
lib/python/DocumentTemplate/DT_InSV.py
lib/python/DocumentTemplate/DT_InSV.py
+5
-4
No files found.
lib/python/DocumentTemplate/DT_In.py
View file @
297e42ce
...
@@ -381,8 +381,8 @@
...
@@ -381,8 +381,8 @@
'''
#'
'''
#'
__rcs_id__
=
'$Id: DT_In.py,v 1.3
6 1999/06/14 14:04:33 brian
Exp $'
__rcs_id__
=
'$Id: DT_In.py,v 1.3
7 1999/06/21 21:29:42 jim
Exp $'
__version__
=
'$Revision: 1.3
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
7
$'
[
11
:
-
2
]
from
DT_Util
import
ParseError
,
parse_params
,
name_param
,
str
from
DT_Util
import
ParseError
,
parse_params
,
name_param
,
str
from
DT_Util
import
render_blocks
,
InstanceDict
,
ValidationError
from
DT_Util
import
render_blocks
,
InstanceDict
,
ValidationError
...
@@ -531,7 +531,7 @@ class InClass:
...
@@ -531,7 +531,7 @@ class InClass:
try
:
try
:
if
previous
:
if
previous
:
if
first
>
0
:
if
first
>
0
:
pstart
,
pend
,
psize
=
opt
(
None
,
first
+
overlap
,
pstart
,
pend
,
psize
=
opt
(
0
,
first
+
overlap
,
sz
,
orphan
,
sequence
)
sz
,
orphan
,
sequence
)
kw
[
'previous-sequence'
]
=
1
kw
[
'previous-sequence'
]
=
1
kw
[
'previous-sequence-start-index'
]
=
pstart
-
1
kw
[
'previous-sequence-start-index'
]
=
pstart
-
1
...
@@ -547,7 +547,7 @@ class InClass:
...
@@ -547,7 +547,7 @@ class InClass:
# there are more items, without actually
# there are more items, without actually
# computing a length:
# computing a length:
sequence
[
end
]
sequence
[
end
]
pstart
,
pend
,
psize
=
opt
(
end
+
1
-
overlap
,
None
,
pstart
,
pend
,
psize
=
opt
(
end
+
1
-
overlap
,
0
,
sz
,
orphan
,
sequence
)
sz
,
orphan
,
sequence
)
kw
[
'next-sequence'
]
=
1
kw
[
'next-sequence'
]
=
1
kw
[
'next-sequence-start-index'
]
=
pstart
-
1
kw
[
'next-sequence-start-index'
]
=
pstart
-
1
...
@@ -563,7 +563,7 @@ class InClass:
...
@@ -563,7 +563,7 @@ class InClass:
validate
=
md
.
validate
validate
=
md
.
validate
for
index
in
range
(
first
,
end
):
for
index
in
range
(
first
,
end
):
if
index
==
first
and
index
>
0
:
if
index
==
first
and
index
>
0
:
pstart
,
pend
,
psize
=
opt
(
None
,
index
+
overlap
,
pstart
,
pend
,
psize
=
opt
(
0
,
index
+
overlap
,
sz
,
orphan
,
sequence
)
sz
,
orphan
,
sequence
)
kw
[
'previous-sequence'
]
=
1
kw
[
'previous-sequence'
]
=
1
kw
[
'previous-sequence-start-index'
]
=
pstart
-
1
kw
[
'previous-sequence-start-index'
]
=
pstart
-
1
...
@@ -577,7 +577,7 @@ class InClass:
...
@@ -577,7 +577,7 @@ class InClass:
# test whether there are more items,
# test whether there are more items,
# without actually computing a length:
# without actually computing a length:
sequence
[
end
]
sequence
[
end
]
pstart
,
pend
,
psize
=
opt
(
end
+
1
-
overlap
,
None
,
pstart
,
pend
,
psize
=
opt
(
end
+
1
-
overlap
,
0
,
sz
,
orphan
,
sequence
)
sz
,
orphan
,
sequence
)
kw
[
'previous-sequence'
]
=
0
kw
[
'previous-sequence'
]
=
0
kw
[
'next-sequence'
]
=
1
kw
[
'next-sequence'
]
=
1
...
...
lib/python/DocumentTemplate/DT_InSV.py
View file @
297e42ce
...
@@ -85,8 +85,8 @@
...
@@ -85,8 +85,8 @@
__doc__
=
'''Sequence variables support
__doc__
=
'''Sequence variables support
$Id: DT_InSV.py,v 1.1
0 1999/03/10 00:15:07 kl
m Exp $'''
$Id: DT_InSV.py,v 1.1
1 1999/06/21 21:29:53 ji
m Exp $'''
__version__
=
'$Revision: 1.1
0
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
1
$'
[
11
:
-
2
]
from
string
import
lower
,
rfind
from
string
import
lower
,
rfind
from
math
import
sqrt
from
math
import
sqrt
...
@@ -317,7 +317,7 @@ class sequence_variables:
...
@@ -317,7 +317,7 @@ class sequence_variables:
except
:
AttributeError
,
'next-batches'
except
:
AttributeError
,
'next-batches'
r
=
[]
r
=
[]
while
end
<
l
:
while
end
<
l
:
start
,
end
,
spam
=
opt
(
end
+
1
-
overlap
,
None
,
sz
,
orphan
,
sequence
)
start
,
end
,
spam
=
opt
(
end
+
1
-
overlap
,
0
,
sz
,
orphan
,
sequence
)
v
=
sequence_variables
(
self
.
items
,
v
=
sequence_variables
(
self
.
items
,
self
.
query_string
,
self
.
start_name_re
)
self
.
query_string
,
self
.
start_name_re
)
d
=
v
.
data
d
=
v
.
data
...
@@ -344,7 +344,7 @@ class sequence_variables:
...
@@ -344,7 +344,7 @@ class sequence_variables:
except
:
AttributeError
,
'previous-batches'
except
:
AttributeError
,
'previous-batches'
r
=
[]
r
=
[]
while
start
>
1
:
while
start
>
1
:
start
,
end
,
spam
=
opt
(
None
,
start
-
1
+
overlap
,
sz
,
orphan
,
sequence
)
start
,
end
,
spam
=
opt
(
0
,
start
-
1
+
overlap
,
sz
,
orphan
,
sequence
)
v
=
sequence_variables
(
self
.
items
,
v
=
sequence_variables
(
self
.
items
,
self
.
query_string
,
self
.
start_name_re
)
self
.
query_string
,
self
.
start_name_re
)
d
=
v
.
data
d
=
v
.
data
...
@@ -405,6 +405,7 @@ def opt(start,end,size,orphan,sequence):
...
@@ -405,6 +405,7 @@ def opt(start,end,size,orphan,sequence):
if
start
>
0
and
end
>
0
and
end
>=
start
:
if
start
>
0
and
end
>
0
and
end
>=
start
:
size
=
end
+
1
-
start
size
=
end
+
1
-
start
else
:
size
=
7
else
:
size
=
7
if
start
>
0
:
if
start
>
0
:
try
:
sequence
[
start
-
1
]
try
:
sequence
[
start
-
1
]
...
...
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