Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8b8b2600
Commit
8b8b2600
authored
Jun 29, 2010
by
Matthias Klose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tools/unicode/mkstringprep.py: Don't use string exceptions,
partial backport from r78982.
parent
1b939643
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Tools/unicode/mkstringprep.py
Tools/unicode/mkstringprep.py
+3
-3
No files found.
Tools/unicode/mkstringprep.py
View file @
8b8b2600
import
re
,
unicodedata
,
sys
if
sys
.
maxunicode
==
65535
:
raise
RuntimeError
,
"need UCS-4 Python"
raise
RuntimeError
(
"need UCS-4 Python"
)
def
gen_category
(
cats
):
for
i
in
range
(
0
,
0x110000
):
...
...
@@ -63,14 +63,14 @@ for l in data:
if
m
:
if
m
.
group
(
1
)
==
"Start"
:
if
curname
:
raise
"Double Start"
,(
curname
,
l
)
raise
RuntimeError
(
"Double Start"
,
(
curname
,
l
)
)
curname
=
m
.
group
(
2
)
table
=
{}
tables
.
append
((
curname
,
table
))
continue
else
:
if
not
curname
:
raise
"End without start"
,
l
raise
RuntimeError
(
"End without start"
,
l
)
curname
=
None
continue
if
not
curname
:
...
...
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