7
7
msgstr ""
8
8
"Project-Id-Version : Python 3.13\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
- "POT-Creation-Date : 2024 -09-23 07:52+0800 \n "
10
+ "POT-Creation-Date : 2025 -09-01 21:59+0000 \n "
11
11
"PO-Revision-Date : 2018-05-23 16:14+0000\n "
12
12
"
Last-Translator :
Adrian Liaw <[email protected] >\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -26,8 +26,8 @@ msgstr ":mod:`!unicodedata` --- Unicode 資料庫"
26
26
msgid ""
27
27
"This module provides access to the Unicode Character Database (UCD) which "
28
28
"defines character properties for all Unicode characters. The data contained "
29
- "in this database is compiled from the `UCD version 15.1.0 <https://"
30
- "www. unicode.org/Public/15.1.0/ucd>`_."
29
+ "in this database is compiled from the `UCD version 15.1.0 <https://www. "
30
+ "unicode.org/Public/15.1.0/ucd>`_."
31
31
msgstr ""
32
32
33
33
#: ../../library/unicodedata.rst:23
@@ -37,84 +37,177 @@ msgid ""
37
37
"tr44/>`_. It defines the following functions:"
38
38
msgstr ""
39
39
40
- #: ../../library/unicodedata.rst:31
40
+ #: ../../library/unicodedata.rst:30
41
+ msgid ""
42
+ "The :ref:`unicode-howto` for more information about Unicode and how to use "
43
+ "this module."
44
+ msgstr ""
45
+
46
+ #: ../../library/unicodedata.rst:36
41
47
msgid ""
42
48
"Look up character by name. If a character with the given name is found, "
43
- "return the corresponding character. If not found, :exc:`KeyError` is raised."
49
+ "return the corresponding character. If not found, :exc:`KeyError` is "
50
+ "raised. For example::"
51
+ msgstr ""
52
+
53
+ #: ../../library/unicodedata.rst:40
54
+ msgid ""
55
+ ">>> unicodedata.lookup('LEFT CURLY BRACKET')\n"
56
+ "'{'"
57
+ msgstr ""
58
+
59
+ #: ../../library/unicodedata.rst:43
60
+ msgid ""
61
+ "The characters returned by this function are the same as those produced by "
62
+ "``\\ N`` escape sequence in string literals. For example::"
63
+ msgstr ""
64
+
65
+ #: ../../library/unicodedata.rst:46
66
+ msgid ""
67
+ ">>> unicodedata.lookup('MIDDLE DOT') == '\\ N{MIDDLE DOT}'\n"
68
+ "True"
44
69
msgstr ""
45
70
46
- #: ../../library/unicodedata.rst:34
71
+ #: ../../library/unicodedata.rst:49
47
72
msgid "Support for name aliases [#]_ and named sequences [#]_ has been added."
48
73
msgstr ""
49
74
50
- #: ../../library/unicodedata.rst:40
75
+ #: ../../library/unicodedata.rst:55
51
76
msgid ""
52
77
"Returns the name assigned to the character *chr* as a string. If no name is "
53
78
"defined, *default* is returned, or, if not given, :exc:`ValueError` is "
54
- "raised."
79
+ "raised. For example::"
80
+ msgstr ""
81
+
82
+ #: ../../library/unicodedata.rst:59
83
+ msgid ""
84
+ ">>> unicodedata.name('½')\n"
85
+ "'VULGAR FRACTION ONE HALF'\n"
86
+ ">>> unicodedata.name('\\ uFFFF', 'fallback')\n"
87
+ "'fallback'"
55
88
msgstr ""
56
89
57
- #: ../../library/unicodedata.rst:47
90
+ #: ../../library/unicodedata.rst:67
58
91
msgid ""
59
92
"Returns the decimal value assigned to the character *chr* as integer. If no "
60
- "such value is defined, *default* is returned, or, if not "
61
- "given, :exc:`ValueError` is raised."
93
+ "such value is defined, *default* is returned, or, if not given, :exc:"
94
+ "`ValueError` is raised. For example::"
95
+ msgstr ""
96
+
97
+ #: ../../library/unicodedata.rst:71
98
+ msgid ""
99
+ ">>> unicodedata.decimal('\\ N{ARABIC-INDIC DIGIT NINE}')\n"
100
+ "9\n"
101
+ ">>> unicodedata.decimal('\\ N{SUPERSCRIPT NINE}', -1)\n"
102
+ "-1"
62
103
msgstr ""
63
104
64
- #: ../../library/unicodedata.rst:54
105
+ #: ../../library/unicodedata.rst:79
65
106
msgid ""
66
107
"Returns the digit value assigned to the character *chr* as integer. If no "
67
- "such value is defined, *default* is returned, or, if not "
68
- "given, :exc:`ValueError` is raised."
108
+ "such value is defined, *default* is returned, or, if not given, :exc:"
109
+ "`ValueError` is raised::"
110
+ msgstr ""
111
+
112
+ #: ../../library/unicodedata.rst:83
113
+ msgid ""
114
+ ">>> unicodedata.digit('\\ N{SUPERSCRIPT NINE}')\n"
115
+ "9"
69
116
msgstr ""
70
117
71
- #: ../../library/unicodedata.rst:61
118
+ #: ../../library/unicodedata.rst:89
72
119
msgid ""
73
120
"Returns the numeric value assigned to the character *chr* as float. If no "
74
- "such value is defined, *default* is returned, or, if not "
75
- "given, :exc:`ValueError` is raised."
121
+ "such value is defined, *default* is returned, or, if not given, :exc:"
122
+ "`ValueError` is raised::"
123
+ msgstr ""
124
+
125
+ #: ../../library/unicodedata.rst:93
126
+ msgid ""
127
+ ">>> unicodedata.numeric('½')\n"
128
+ "0.5"
76
129
msgstr ""
77
130
78
- #: ../../library/unicodedata.rst:68
79
- msgid "Returns the general category assigned to the character *chr* as string."
131
+ #: ../../library/unicodedata.rst:99
132
+ msgid ""
133
+ "Returns the general category assigned to the character *chr* as string. "
134
+ "General category names consist of two letters. See the `General Category "
135
+ "Values section of the Unicode Character Database documentation <https://www."
136
+ "unicode.org/reports/tr44/tr44-30.html#General_Category_Values>`_ for a list "
137
+ "of category codes. For example::"
80
138
msgstr ""
81
139
82
- #: ../../library/unicodedata.rst:74
140
+ #: ../../library/unicodedata.rst:105
141
+ msgid ""
142
+ ">>> unicodedata.category('A') # 'L'etter, 'u'ppercase\n"
143
+ "'Lu'"
144
+ msgstr ""
145
+
146
+ #: ../../library/unicodedata.rst:111
83
147
msgid ""
84
148
"Returns the bidirectional class assigned to the character *chr* as string. "
85
- "If no such value is defined, an empty string is returned."
149
+ "If no such value is defined, an empty string is returned. See the "
150
+ "`Bidirectional Class Values section of the Unicode Character Database "
151
+ "<https://www.unicode.org/reports/tr44/tr44-30.html#Bidi_Class_Values>`_ "
152
+ "documentation for a list of bidirectional codes. For example::"
86
153
msgstr ""
87
154
88
- #: ../../library/unicodedata.rst:80
155
+ #: ../../library/unicodedata.rst:117
156
+ msgid ""
157
+ ">>> unicodedata.bidirectional('\\ N{ARABIC-INDIC DIGIT SEVEN}') # 'A'rabic, "
158
+ "'N'umber\n"
159
+ "'AN'"
160
+ msgstr ""
161
+
162
+ #: ../../library/unicodedata.rst:123
89
163
msgid ""
90
164
"Returns the canonical combining class assigned to the character *chr* as "
91
- "integer. Returns ``0`` if no combining class is defined."
165
+ "integer. Returns ``0`` if no combining class is defined. See the `Canonical "
166
+ "Combining Class Values section of the Unicode Character Database <www."
167
+ "unicode.org/reports/tr44/tr44-30.html#Canonical_Combining_Class_Values>`_ "
168
+ "for more information."
92
169
msgstr ""
93
170
94
- #: ../../library/unicodedata.rst:86
95
- msgid "Returns the east asian width assigned to the character *chr* as string."
171
+ #: ../../library/unicodedata.rst:132
172
+ msgid ""
173
+ "Returns the east asian width assigned to the character *chr* as string. For "
174
+ "a list of widths and or more information, see the `Unicode Standard Annex "
175
+ "#11 <https://www.unicode.org/reports/tr11/tr11-41.html>`_."
96
176
msgstr ""
97
177
98
- #: ../../library/unicodedata.rst:92
178
+ #: ../../library/unicodedata.rst:139
99
179
msgid ""
100
180
"Returns the mirrored property assigned to the character *chr* as integer. "
101
181
"Returns ``1`` if the character has been identified as a \" mirrored\" "
102
- "character in bidirectional text, ``0`` otherwise."
182
+ "character in bidirectional text, ``0`` otherwise. For example:: "
103
183
msgstr ""
104
184
105
- #: ../../library/unicodedata.rst:99
185
+ #: ../../library/unicodedata.rst:143
186
+ msgid ""
187
+ ">>> unicodedata.mirrored('>')\n"
188
+ "1"
189
+ msgstr ""
190
+
191
+ #: ../../library/unicodedata.rst:149
106
192
msgid ""
107
193
"Returns the character decomposition mapping assigned to the character *chr* "
108
- "as string. An empty string is returned in case no such mapping is defined."
194
+ "as string. An empty string is returned in case no such mapping is defined. "
195
+ "For example::"
196
+ msgstr ""
197
+
198
+ #: ../../library/unicodedata.rst:153
199
+ msgid ""
200
+ ">>> unicodedata.decomposition('Ã')\n"
201
+ "'0041 0303'"
109
202
msgstr ""
110
203
111
- #: ../../library/unicodedata.rst:106
204
+ #: ../../library/unicodedata.rst:159
112
205
msgid ""
113
206
"Return the normal form *form* for the Unicode string *unistr*. Valid values "
114
207
"for *form* are 'NFC', 'NFKC', 'NFD', and 'NFKD'."
115
208
msgstr ""
116
209
117
- #: ../../library/unicodedata.rst:109
210
+ #: ../../library/unicodedata.rst:162
118
211
msgid ""
119
212
"The Unicode standard defines various normalization forms of a Unicode "
120
213
"string, based on the definition of canonical equivalence and compatibility "
@@ -124,7 +217,7 @@ msgid ""
124
217
"(COMBINING CEDILLA)."
125
218
msgstr ""
126
219
127
- #: ../../library/unicodedata.rst:115
220
+ #: ../../library/unicodedata.rst:168
128
221
msgid ""
129
222
"For each character, there are two normal forms: normal form C and normal "
130
223
"form D. Normal form D (NFD) is also known as canonical decomposition, and "
@@ -133,65 +226,61 @@ msgid ""
133
226
"characters again."
134
227
msgstr ""
135
228
136
- #: ../../library/unicodedata.rst:120
229
+ #: ../../library/unicodedata.rst:173
137
230
msgid ""
138
231
"In addition to these two forms, there are two additional normal forms based "
139
232
"on compatibility equivalence. In Unicode, certain characters are supported "
140
233
"which normally would be unified with other characters. For example, U+2160 "
141
234
"(ROMAN NUMERAL ONE) is really the same thing as U+0049 (LATIN CAPITAL LETTER "
142
235
"I). However, it is supported in Unicode for compatibility with existing "
143
- "character sets (e.g. gb2312)."
236
+ "character sets (for example, gb2312)."
144
237
msgstr ""
145
238
146
- #: ../../library/unicodedata.rst:127
239
+ #: ../../library/unicodedata.rst:180
147
240
msgid ""
148
- "The normal form KD (NFKD) will apply the compatibility decomposition, i.e. "
149
- "replace all compatibility characters with their equivalents. The normal form "
150
- "KC (NFKC) first applies the compatibility decomposition, followed by the "
151
- "canonical composition."
241
+ "The normal form KD (NFKD) will apply the compatibility decomposition, that "
242
+ "is, replace all compatibility characters with their equivalents. The normal "
243
+ "form KC (NFKC) first applies the compatibility decomposition, followed by "
244
+ "the canonical composition."
152
245
msgstr ""
153
246
154
- #: ../../library/unicodedata.rst:132
247
+ #: ../../library/unicodedata.rst:185
155
248
msgid ""
156
249
"Even if two unicode strings are normalized and look the same to a human "
157
250
"reader, if one has combining characters and the other doesn't, they may not "
158
251
"compare equal."
159
252
msgstr ""
160
253
161
- #: ../../library/unicodedata.rst:138
254
+ #: ../../library/unicodedata.rst:192
162
255
msgid ""
163
256
"Return whether the Unicode string *unistr* is in the normal form *form*. "
164
257
"Valid values for *form* are 'NFC', 'NFKC', 'NFD', and 'NFKD'."
165
258
msgstr ""
166
259
167
- #: ../../library/unicodedata.rst:144
260
+ #: ../../library/unicodedata.rst:198
168
261
msgid "In addition, the module exposes the following constant:"
169
262
msgstr ""
170
263
171
- #: ../../library/unicodedata.rst:148
264
+ #: ../../library/unicodedata.rst:202
172
265
msgid "The version of the Unicode database used in this module."
173
266
msgstr ""
174
267
175
- #: ../../library/unicodedata.rst:153
268
+ #: ../../library/unicodedata.rst:207
176
269
msgid ""
177
270
"This is an object that has the same methods as the entire module, but uses "
178
271
"the Unicode database version 3.2 instead, for applications that require this "
179
272
"specific version of the Unicode database (such as IDNA)."
180
273
msgstr ""
181
274
182
- #: ../../library/unicodedata.rst:157
183
- msgid "Examples:"
184
- msgstr "範例:"
185
-
186
- #: ../../library/unicodedata.rst:177
275
+ #: ../../library/unicodedata.rst:213
187
276
msgid "Footnotes"
188
277
msgstr "註解"
189
278
190
- #: ../../library/unicodedata.rst:178
279
+ #: ../../library/unicodedata.rst:214
191
280
msgid "https://www.unicode.org/Public/15.1.0/ucd/NameAliases.txt"
192
281
msgstr "https://www.unicode.org/Public/15.1.0/ucd/NameAliases.txt"
193
282
194
- #: ../../library/unicodedata.rst:180
283
+ #: ../../library/unicodedata.rst:216
195
284
msgid "https://www.unicode.org/Public/15.1.0/ucd/NamedSequences.txt"
196
285
msgstr "https://www.unicode.org/Public/15.1.0/ucd/NamedSequences.txt"
197
286
@@ -206,3 +295,6 @@ msgstr "character(字元)"
206
295
#: ../../library/unicodedata.rst:11
207
296
msgid "database"
208
297
msgstr "database(資料庫)"
298
+
299
+ #~ msgid "Examples:"
300
+ #~ msgstr "範例:"
0 commit comments