Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
2a1e926d
Kaydet (Commit)
2a1e926d
authored
Eyl 30, 2011
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix ResourceWarnings in makeunicodedata.py.
üst
034f6cf1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
makeunicodedata.py
Tools/unicode/makeunicodedata.py
+14
-7
No files found.
Tools/unicode/makeunicodedata.py
Dosyayı görüntüle @
2a1e926d
...
...
@@ -816,8 +816,8 @@ class UnicodeData:
expand
=
1
,
cjk_check
=
True
):
self
.
changed
=
[]
file
=
open_data
(
UNICODE_DATA
,
version
)
table
=
[
None
]
*
0x110000
with
open_data
(
UNICODE_DATA
,
version
)
as
file
:
while
1
:
s
=
file
.
readline
()
if
not
s
:
...
...
@@ -855,8 +855,8 @@ class UnicodeData:
self
.
table
=
table
self
.
chars
=
list
(
range
(
0x110000
))
# unicode 3.2
file
=
open_data
(
COMPOSITION_EXCLUSIONS
,
version
)
self
.
exclusions
=
{}
with
open_data
(
COMPOSITION_EXCLUSIONS
,
version
)
as
file
:
for
s
in
file
:
s
=
s
.
strip
()
if
not
s
:
...
...
@@ -867,7 +867,8 @@ class UnicodeData:
self
.
exclusions
[
char
]
=
1
widths
=
[
None
]
*
0x110000
for
s
in
open_data
(
EASTASIAN_WIDTH
,
version
):
with
open_data
(
EASTASIAN_WIDTH
,
version
)
as
file
:
for
s
in
file
:
s
=
s
.
strip
()
if
not
s
:
continue
...
...
@@ -881,6 +882,7 @@ class UnicodeData:
chars
=
[
int
(
s
[
0
],
16
)]
for
char
in
chars
:
widths
[
char
]
=
s
[
1
]
for
i
in
range
(
0
,
0x110000
):
if
table
[
i
]
is
not
None
:
table
[
i
]
.
append
(
widths
[
i
])
...
...
@@ -888,7 +890,9 @@ class UnicodeData:
for
i
in
range
(
0
,
0x110000
):
if
table
[
i
]
is
not
None
:
table
[
i
]
.
append
(
set
())
for
s
in
open_data
(
DERIVED_CORE_PROPERTIES
,
version
):
with
open_data
(
DERIVED_CORE_PROPERTIES
,
version
)
as
file
:
for
s
in
file
:
s
=
s
.
split
(
'#'
,
1
)[
0
]
.
strip
()
if
not
s
:
continue
...
...
@@ -907,7 +911,8 @@ class UnicodeData:
# apply to unassigned code points; ignore them
table
[
char
][
-
1
]
.
add
(
p
)
for
s
in
open_data
(
LINE_BREAK
,
version
):
with
open_data
(
LINE_BREAK
,
version
)
as
file
:
for
s
in
file
:
s
=
s
.
partition
(
'#'
)[
0
]
s
=
[
i
.
strip
()
for
i
in
s
.
split
(
';'
)]
if
len
(
s
)
<
2
or
s
[
1
]
not
in
MANDATORY_LINE_BREAKS
:
...
...
@@ -928,7 +933,8 @@ class UnicodeData:
# for older versions, and no delta records will be created.
quickchecks
=
[
0
]
*
0x110000
qc_order
=
'NFD_QC NFKD_QC NFC_QC NFKC_QC'
.
split
()
for
s
in
open_data
(
DERIVEDNORMALIZATION_PROPS
,
version
):
with
open_data
(
DERIVEDNORMALIZATION_PROPS
,
version
)
as
file
:
for
s
in
file
:
if
'#'
in
s
:
s
=
s
[:
s
.
index
(
'#'
)]
s
=
[
i
.
strip
()
for
i
in
s
.
split
(
';'
)]
...
...
@@ -948,7 +954,8 @@ class UnicodeData:
if
table
[
i
]
is
not
None
:
table
[
i
]
.
append
(
quickchecks
[
i
])
zip
=
zipfile
.
ZipFile
(
open_data
(
UNIHAN
,
version
))
with
open_data
(
UNIHAN
,
version
)
as
file
:
zip
=
zipfile
.
ZipFile
(
file
)
if
version
==
'3.2.0'
:
data
=
zip
.
open
(
'Unihan-3.2.0.txt'
)
.
read
()
else
:
...
...
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