Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
cb719fa0
Commit
cb719fa0
authored
6 years ago
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sort-test.py Python 3 compatible
Python 2 is still supported.
parent
3d59da9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/test/locale/sort-test.py
src/test/locale/sort-test.py
+3
-3
No files found.
src/test/locale/sort-test.py
View file @
cb719fa0
...
...
@@ -3,7 +3,7 @@
import
sys
,
string
,
locale
locale
.
setlocale
(
locale
.
LC_ALL
,
""
)
if
len
(
sys
.
argv
)
<>
2
:
if
len
(
sys
.
argv
)
!=
2
:
sys
.
stderr
.
write
(
"Usage: sort.py filename
\n
"
)
sys
.
exit
(
1
)
...
...
@@ -14,5 +14,5 @@ infile.close()
for
i
in
range
(
0
,
len
(
list
)):
list
[
i
]
=
list
[
i
][:
-
1
]
# chop!
list
.
sort
(
locale
.
strcoll
)
print
string
.
join
(
list
,
'
\n
'
)
list
.
sort
(
key
=
locale
.
strxfrm
)
print
(
'
\n
'
.
join
(
list
)
)
This diff is collapsed.
Click to expand it.
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