Skip to content

Commit 247892f

Browse files
pydoc-zh-tw[bot]github-actions[bot]mattwang44
authored
Sync with CPython 3.11 (#381)
* sync with cpython 4cf41693 * sync with cpython 5a8ed019 * sync with cpython 88a1e6db * sync with cpython 34679913 * sync with cpython faf8068d * sync with cpython 5e498072 * sync with cpython c2c970fc * fix(faq/general): resolve fuzzy entry * fix(library/array): resolve fuzzy * sync with cpython bfac5d98 * sync with cpython 898de13f * sync with cpython 7cbcfbe2 * fix(library/array): fix fuzzy entries * fix(tutorial/venv): fix fuzzy entry * fix(library/asyncio-stream): fix fuzzy entries --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
1 parent c65ddfc commit 247892f

16 files changed

+1253
-1115
lines changed

c-api/code.po

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.11\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2022-10-15 20:43+0000\n"
10+
"POT-Creation-Date: 2023-02-05 00:18+0000\n"
1111
"PO-Revision-Date: 2015-12-09 17:51+0000\n"
1212
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -105,36 +105,36 @@ msgstr ""
105105
msgid "Returns ``1`` if the function succeeds and 0 otherwise."
106106
msgstr ""
107107

108-
#: ../../c-api/code.rst:82
108+
#: ../../c-api/code.rst:84
109109
msgid ""
110110
"Equivalent to the Python code ``getattr(co, 'co_code')``. Returns a strong "
111111
"reference to a :c:type:`PyBytesObject` representing the bytecode in a code "
112112
"object. On error, ``NULL`` is returned and an exception is raised."
113113
msgstr ""
114114

115-
#: ../../c-api/code.rst:87
115+
#: ../../c-api/code.rst:89
116116
msgid ""
117117
"This ``PyBytesObject`` may be created on-demand by the interpreter and does "
118118
"not necessarily represent the bytecode actually executed by CPython. The "
119119
"primary use case for this function is debuggers and profilers."
120120
msgstr ""
121121

122-
#: ../../c-api/code.rst:95
122+
#: ../../c-api/code.rst:97
123123
msgid ""
124124
"Equivalent to the Python code ``getattr(co, 'co_varnames')``. Returns a new "
125125
"reference to a :c:type:`PyTupleObject` containing the names of the local "
126126
"variables. On error, ``NULL`` is returned and an exception is raised."
127127
msgstr ""
128128

129-
#: ../../c-api/code.rst:104
129+
#: ../../c-api/code.rst:106
130130
msgid ""
131131
"Equivalent to the Python code ``getattr(co, 'co_cellvars')``. Returns a new "
132132
"reference to a :c:type:`PyTupleObject` containing the names of the local "
133133
"variables that are referenced by nested functions. On error, ``NULL`` is "
134134
"returned and an exception is raised."
135135
msgstr ""
136136

137-
#: ../../c-api/code.rst:113
137+
#: ../../c-api/code.rst:115
138138
msgid ""
139139
"Equivalent to the Python code ``getattr(co, 'co_freevars')``. Returns a new "
140140
"reference to a :c:type:`PyTupleObject` containing the names of the free "

c-api/long.po

+45-38
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.11\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2022-10-06 00:23+0000\n"
11+
"POT-Creation-Date: 2023-01-25 00:17+0000\n"
1212
"PO-Revision-Date: 2018-05-23 14:06+0000\n"
1313
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -118,210 +118,217 @@ msgid ""
118118
"are no digits, :exc:`ValueError` will be raised."
119119
msgstr ""
120120

121-
#: ../../c-api/long.rst:99
121+
#: ../../c-api/long.rst:96
122+
msgid ""
123+
"Python methods :meth:`int.to_bytes` and :meth:`int.from_bytes` to convert a :"
124+
"c:type:`PyLongObject` to/from an array of bytes in base ``256``. You can "
125+
"call those from C using :c:func:`PyObject_CallMethod`."
126+
msgstr ""
127+
128+
#: ../../c-api/long.rst:103
122129
msgid ""
123130
"Convert a sequence of Unicode digits in the string *u* to a Python integer "
124131
"value."
125132
msgstr ""
126133

127-
#: ../../c-api/long.rst:107
134+
#: ../../c-api/long.rst:111
128135
msgid ""
129136
"Create a Python integer from the pointer *p*. The pointer value can be "
130137
"retrieved from the resulting value using :c:func:`PyLong_AsVoidPtr`."
131138
msgstr ""
132139

133-
#: ../../c-api/long.rst:118 ../../c-api/long.rst:136
140+
#: ../../c-api/long.rst:122 ../../c-api/long.rst:140
134141
msgid ""
135142
"Return a C :c:expr:`long` representation of *obj*. If *obj* is not an "
136143
"instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method "
137144
"(if present) to convert it to a :c:type:`PyLongObject`."
138145
msgstr ""
139146

140-
#: ../../c-api/long.rst:122
147+
#: ../../c-api/long.rst:126
141148
msgid ""
142149
"Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:"
143150
"expr:`long`."
144151
msgstr ""
145152

146-
#: ../../c-api/long.rst:125 ../../c-api/long.rst:145 ../../c-api/long.rst:166
147-
#: ../../c-api/long.rst:186 ../../c-api/long.rst:209
153+
#: ../../c-api/long.rst:129 ../../c-api/long.rst:149 ../../c-api/long.rst:170
154+
#: ../../c-api/long.rst:190 ../../c-api/long.rst:213
148155
msgid "Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate."
149156
msgstr ""
150157

151-
#: ../../c-api/long.rst:127 ../../c-api/long.rst:147 ../../c-api/long.rst:168
152-
#: ../../c-api/long.rst:190 ../../c-api/long.rst:274 ../../c-api/long.rst:294
158+
#: ../../c-api/long.rst:131 ../../c-api/long.rst:151 ../../c-api/long.rst:172
159+
#: ../../c-api/long.rst:194 ../../c-api/long.rst:278 ../../c-api/long.rst:298
153160
msgid "Use :meth:`__index__` if available."
154161
msgstr ""
155162

156-
#: ../../c-api/long.rst:130 ../../c-api/long.rst:150 ../../c-api/long.rst:171
157-
#: ../../c-api/long.rst:193 ../../c-api/long.rst:277 ../../c-api/long.rst:297
163+
#: ../../c-api/long.rst:134 ../../c-api/long.rst:154 ../../c-api/long.rst:175
164+
#: ../../c-api/long.rst:197 ../../c-api/long.rst:281 ../../c-api/long.rst:301
158165
msgid "This function will no longer use :meth:`__int__`."
159166
msgstr ""
160167

161-
#: ../../c-api/long.rst:140
168+
#: ../../c-api/long.rst:144
162169
msgid ""
163170
"If the value of *obj* is greater than :const:`LONG_MAX` or less than :const:"
164171
"`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return "
165172
"``-1``; otherwise, set *\\*overflow* to ``0``. If any other exception "
166173
"occurs set *\\*overflow* to ``0`` and return ``-1`` as usual."
167174
msgstr ""
168175

169-
#: ../../c-api/long.rst:159 ../../c-api/long.rst:177
176+
#: ../../c-api/long.rst:163 ../../c-api/long.rst:181
170177
msgid ""
171178
"Return a C :c:expr:`long long` representation of *obj*. If *obj* is not an "
172179
"instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method "
173180
"(if present) to convert it to a :c:type:`PyLongObject`."
174181
msgstr ""
175182

176-
#: ../../c-api/long.rst:163
183+
#: ../../c-api/long.rst:167
177184
msgid ""
178185
"Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:"
179186
"expr:`long long`."
180187
msgstr ""
181188

182-
#: ../../c-api/long.rst:181
189+
#: ../../c-api/long.rst:185
183190
msgid ""
184191
"If the value of *obj* is greater than :const:`LLONG_MAX` or less than :const:"
185192
"`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return "
186193
"``-1``; otherwise, set *\\*overflow* to ``0``. If any other exception "
187194
"occurs set *\\*overflow* to ``0`` and return ``-1`` as usual."
188195
msgstr ""
189196

190-
#: ../../c-api/long.rst:203
197+
#: ../../c-api/long.rst:207
191198
msgid ""
192199
"Return a C :c:type:`Py_ssize_t` representation of *pylong*. *pylong* must "
193200
"be an instance of :c:type:`PyLongObject`."
194201
msgstr ""
195202

196-
#: ../../c-api/long.rst:206
203+
#: ../../c-api/long.rst:210
197204
msgid ""
198205
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
199206
"type:`Py_ssize_t`."
200207
msgstr ""
201208

202-
#: ../../c-api/long.rst:218
209+
#: ../../c-api/long.rst:222
203210
msgid ""
204211
"Return a C :c:expr:`unsigned long` representation of *pylong*. *pylong* "
205212
"must be an instance of :c:type:`PyLongObject`."
206213
msgstr ""
207214

208-
#: ../../c-api/long.rst:221
215+
#: ../../c-api/long.rst:225
209216
msgid ""
210217
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
211218
"expr:`unsigned long`."
212219
msgstr ""
213220

214-
#: ../../c-api/long.rst:224
221+
#: ../../c-api/long.rst:228
215222
msgid ""
216223
"Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to "
217224
"disambiguate."
218225
msgstr ""
219226

220-
#: ../../c-api/long.rst:234
227+
#: ../../c-api/long.rst:238
221228
msgid ""
222229
"Return a C :c:type:`size_t` representation of *pylong*. *pylong* must be an "
223230
"instance of :c:type:`PyLongObject`."
224231
msgstr ""
225232

226-
#: ../../c-api/long.rst:237
233+
#: ../../c-api/long.rst:241
227234
msgid ""
228235
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
229236
"type:`size_t`."
230237
msgstr ""
231238

232-
#: ../../c-api/long.rst:240
239+
#: ../../c-api/long.rst:244
233240
msgid ""
234241
"Returns ``(size_t)-1`` on error. Use :c:func:`PyErr_Occurred` to "
235242
"disambiguate."
236243
msgstr ""
237244

238-
#: ../../c-api/long.rst:249
245+
#: ../../c-api/long.rst:253
239246
msgid ""
240247
"Return a C :c:expr:`unsigned long long` representation of *pylong*. "
241248
"*pylong* must be an instance of :c:type:`PyLongObject`."
242249
msgstr ""
243250

244-
#: ../../c-api/long.rst:252
251+
#: ../../c-api/long.rst:256
245252
msgid ""
246253
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for an :"
247254
"c:expr:`unsigned long long`."
248255
msgstr ""
249256

250-
#: ../../c-api/long.rst:255
257+
#: ../../c-api/long.rst:259
251258
msgid ""
252259
"Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` to "
253260
"disambiguate."
254261
msgstr ""
255262

256-
#: ../../c-api/long.rst:258
263+
#: ../../c-api/long.rst:262
257264
msgid ""
258265
"A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`."
259266
msgstr ""
260267

261-
#: ../../c-api/long.rst:264
268+
#: ../../c-api/long.rst:268
262269
msgid ""
263270
"Return a C :c:expr:`unsigned long` representation of *obj*. If *obj* is not "
264271
"an instance of :c:type:`PyLongObject`, first call its :meth:`__index__` "
265272
"method (if present) to convert it to a :c:type:`PyLongObject`."
266273
msgstr ""
267274

268-
#: ../../c-api/long.rst:268
275+
#: ../../c-api/long.rst:272
269276
msgid ""
270277
"If the value of *obj* is out of range for an :c:expr:`unsigned long`, return "
271278
"the reduction of that value modulo ``ULONG_MAX + 1``."
272279
msgstr ""
273280

274-
#: ../../c-api/long.rst:271
281+
#: ../../c-api/long.rst:275
275282
msgid ""
276283
"Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to "
277284
"disambiguate."
278285
msgstr ""
279286

280-
#: ../../c-api/long.rst:283
287+
#: ../../c-api/long.rst:287
281288
msgid ""
282289
"Return a C :c:expr:`unsigned long long` representation of *obj*. If *obj* "
283290
"is not an instance of :c:type:`PyLongObject`, first call its :meth:"
284291
"`__index__` method (if present) to convert it to a :c:type:`PyLongObject`."
285292
msgstr ""
286293

287-
#: ../../c-api/long.rst:288
294+
#: ../../c-api/long.rst:292
288295
msgid ""
289296
"If the value of *obj* is out of range for an :c:expr:`unsigned long long`, "
290297
"return the reduction of that value modulo ``ULLONG_MAX + 1``."
291298
msgstr ""
292299

293-
#: ../../c-api/long.rst:291
300+
#: ../../c-api/long.rst:295
294301
msgid ""
295302
"Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` "
296303
"to disambiguate."
297304
msgstr ""
298305

299-
#: ../../c-api/long.rst:303
306+
#: ../../c-api/long.rst:307
300307
msgid ""
301308
"Return a C :c:expr:`double` representation of *pylong*. *pylong* must be an "
302309
"instance of :c:type:`PyLongObject`."
303310
msgstr ""
304311

305-
#: ../../c-api/long.rst:306
312+
#: ../../c-api/long.rst:310
306313
msgid ""
307314
"Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:"
308315
"expr:`double`."
309316
msgstr ""
310317

311-
#: ../../c-api/long.rst:309
318+
#: ../../c-api/long.rst:313
312319
msgid ""
313320
"Returns ``-1.0`` on error. Use :c:func:`PyErr_Occurred` to disambiguate."
314321
msgstr ""
315322

316-
#: ../../c-api/long.rst:314
323+
#: ../../c-api/long.rst:318
317324
msgid ""
318325
"Convert a Python integer *pylong* to a C :c:expr:`void` pointer. If *pylong* "
319326
"cannot be converted, an :exc:`OverflowError` will be raised. This is only "
320327
"assured to produce a usable :c:expr:`void` pointer for values created with :"
321328
"c:func:`PyLong_FromVoidPtr`."
322329
msgstr ""
323330

324-
#: ../../c-api/long.rst:319
331+
#: ../../c-api/long.rst:323
325332
msgid ""
326333
"Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate."
327334
msgstr ""

faq/general.po

+12-24
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ msgid ""
1010
msgstr ""
1111
"Project-Id-Version: Python 3.11\n"
1212
"Report-Msgid-Bugs-To: \n"
13-
"POT-Creation-Date: 2022-10-15 20:43+0000\n"
13+
"POT-Creation-Date: 2023-02-01 00:19+0000\n"
1414
"PO-Revision-Date: 2022-10-16 06:51+0800\n"
1515
"Last-Translator: Steven Hsu <hsuhaochun@gmail.com>\n"
1616
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -507,9 +507,11 @@ msgstr "也許最好是引用你最喜歡的關於 Python 的書。"
507507

508508
#: ../../faq/general.rst:251
509509
msgid ""
510-
"The very first article about Python was written in 1991 and is now quite "
511-
"outdated."
512-
msgstr "最早討論 Python 的文章是在 1991 年寫的,但現在來看已經過時了。"
510+
"The `very first article <https://ir.cwi.nl/pub/18204>`_ about Python was "
511+
"written in 1991 and is now quite outdated."
512+
msgstr ""
513+
"`最早討論 Python 的文章 <https://ir.cwi.nl/pub/18204>`_\\ 是在 1991 年寫的,"
514+
"但現在來看已經過時了。"
513515

514516
#: ../../faq/general.rst:254
515517
msgid ""
@@ -675,10 +677,10 @@ msgid ""
675677
"administration software in Python. Companies that use Python internally "
676678
"include Google, Yahoo, and Lucasfilm Ltd."
677679
msgstr ""
678-
"備受矚目的 Python 專案包括 `Mailman 郵件討論群管理員 <https://www.list.org>`_"
679-
"\\ 和 `Zope 應用程式伺服器 <https://www.zope.dev>`_。有一些 Linux 發行版,最"
680-
"著名的是 `Red Hat <https://www.redhat.com>`_,已經用 Python 編寫了部分或全部"
681-
"的安裝程式及系統管理軟體。內部使用 Python 的公司包括 Google、Yahoo 和 "
680+
"備受矚目的 Python 專案包括 `Mailman 郵件討論群管理員 <https://www.list."
681+
"org>`_\\ 和 `Zope 應用程式伺服器 <https://www.zope.dev>`_。有一些 Linux 發行"
682+
"版,最著名的是 `Red Hat <https://www.redhat.com>`_,已經用 Python 編寫了部分"
683+
"或全部的安裝程式及系統管理軟體。內部使用 Python 的公司包括 Google、Yahoo 和 "
682684
"Lucasfilm Ltd。"
683685

684686
#: ../../faq/general.rst:346
@@ -805,8 +807,8 @@ msgid ""
805807
"can't remember the methods for a list, they can do something like this::"
806808
msgstr ""
807809
"Python 的互動式直譯器使學生能夠在程式設計時測試語言的功能。他們可以開著一個運"
808-
"行直譯器的視窗,同時在另一個視窗中輸入他們的程式原始碼。如果他們不記得 "
809-
"list(串列)的 method(方法),他們可以像這樣做:\n"
810+
"行直譯器的視窗,同時在另一個視窗中輸入他們的程式原始碼。如果他們不記得 list"
811+
"(串列)的 method(方法),他們可以像這樣做:\n"
810812
"\n"
811813
"::"
812814

@@ -840,17 +842,3 @@ msgid ""
840842
msgstr ""
841843
"如果你想討論 Python 在教育領域中的使用,你可能會有興趣加入 `edu-sig 郵件討論"
842844
"群 <https://www.python.org/community/sigs/current/edu-sig>`_。"
843-
844-
#~ msgid ""
845-
#~ "You must have a Roundup account to report bugs; this makes it possible "
846-
#~ "for us to contact you if we have follow-up questions. It will also "
847-
#~ "enable Roundup to send you updates as we act on your bug. If you had "
848-
#~ "previously used SourceForge to report bugs to Python, you can obtain your "
849-
#~ "Roundup password through Roundup's `password reset procedure <https://"
850-
#~ "bugs.python.org/user?@template=forgotten>`_."
851-
#~ msgstr ""
852-
#~ "你必須擁有一個 Roundup 帳號才能回報錯誤;如果我們有後續的問題,我們才可以"
853-
#~ "與你聯繫。這樣也能讓 Roundup 在我們處理你回報的錯誤時,為你發送最新消息。"
854-
#~ "如果你以前使用過 SourceForge 來向 Python 回報錯誤,則可以透過 Roundup 的"
855-
#~ "\\ `密碼重設過程 <https://bugs.python.org/user?@template=forgotten>`_,取"
856-
#~ "得你的 Roundup 密碼。"

0 commit comments

Comments
 (0)