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
b955ddbd
Commit
b955ddbd
authored
Oct 21, 2003
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dead to the string module
parent
75ee481d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
15 deletions
+10
-15
lib/python/Shared/DC/ZRDB/Results.py
lib/python/Shared/DC/ZRDB/Results.py
+10
-15
No files found.
lib/python/Shared/DC/ZRDB/Results.py
View file @
b955ddbd
...
...
@@ -11,8 +11,6 @@
#
##############################################################################
import
ExtensionClass
import
string
from
string
import
strip
,
lower
,
upper
,
join
from
Acquisition
import
Implicit
from
Record
import
Record
...
...
@@ -45,15 +43,15 @@ class Results:
i
=
0
for
item
in
items
:
name
=
item
[
'name'
]
name
=
strip
(
name
)
name
=
name
.
strip
(
)
if
not
name
:
raise
ValueError
,
'Empty column name, %s'
%
name
if
schema
.
has_key
(
name
):
raise
ValueError
,
'Duplicate column name, %s'
%
name
schema
[
name
]
=
i
n
=
lower
(
name
)
n
=
name
.
lower
(
)
if
n
!=
name
:
aliases
.
append
((
n
,
SQLAlias
(
name
)))
n
=
upper
(
name
)
n
=
name
.
upper
(
)
if
n
!=
name
:
aliases
.
append
((
n
,
SQLAlias
(
name
)))
dd
[
name
]
=
item
names
.
append
(
name
)
...
...
@@ -127,10 +125,9 @@ class Results:
nstrings
=
[]
items
=
self
.
__items__
indexes
=
range
(
len
(
items
))
join
=
string
.
join
for
i
in
indexes
:
item
=
items
[
i
]
t
=
lower
(
item
[
'type'
]
)
t
=
item
[
'type'
].
lower
(
)
if
t
==
's'
or
t
==
't'
:
t
==
't'
strings
.
append
(
i
)
...
...
@@ -139,23 +136,21 @@ class Results:
else
:
r
.
append
(
t
)
r
=
[
join
(
self
.
_names
,
'
\
t
'
),
join
(
r
,
'
\
t
'
)]
r
=
[
'
\
t
'
.
join
(
self
.
_names
),
'
\
t
'
.
join
(
r
)]
append
=
r
.
append
find
=
string
.
find
split
=
string
.
split
row
=
[
''
]
*
len
(
items
)
tostr
=
str
for
d
in
self
.
_data
:
for
i
in
strings
:
v
=
tostr
(
d
[
i
])
if
v
:
if
find
(
v
,
'
\
\
'
)
>
0
:
v
=
join
(
split
(
v
,
'
\
\
'
),
'
\
\
\
\
'
)
if
find
(
v
,
'
\
t
'
)
>
0
:
v
=
join
(
split
(
v
,
'
\
t
'
),
'
\
\
t'
)
if
find
(
v
,
'
\
n
'
)
>
0
:
v
=
join
(
split
(
v
,
'
\
n
'
),
'
\
\
n'
)
if
v
.
find
(
'
\
\
'
)
>
0
:
v
=
'
\
\
\
\
'
.
join
(
v
.
split
(
'
\
\
'
)
)
if
v
.
find
(
'
\
t
'
)
>
0
:
v
=
'
\
\
t'
.
join
(
v
.
split
(
'
\
t
'
)
)
if
v
.
find
(
'
\
n
'
)
>
0
:
v
=
'
\
\
n'
.
join
(
v
.
split
(
'
\
n
'
)
)
row
[
i
]
=
v
for
i
in
nstrings
:
row
[
i
]
=
tostr
(
d
[
i
])
append
(
join
(
row
,
'
\
t
'
))
append
(
'
\
t
'
.
join
(
row
))
append
(
''
)
return
join
(
r
,
'
\
n
'
)
return
'
\
n
'
.
join
(
r
)
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