Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5024118

Browse filesBrowse files
Sync with CPython 3.10 (#252)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 4c76e7a commit 5024118
Copy full SHA for 5024118

File tree

Expand file treeCollapse file tree

8 files changed

+626
-616
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+626
-616
lines changed

‎c-api/exceptions.po

Copy file name to clipboardExpand all lines: c-api/exceptions.po
+250-249Lines changed: 250 additions & 249 deletions
Large diffs are not rendered by default.

‎c-api/typeobj.po

Copy file name to clipboardExpand all lines: c-api/typeobj.po
+56-56Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.10\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2021-11-23 00:09+0000\n"
10+
"POT-Creation-Date: 2022-02-24 00:12+0000\n"
1111
"PO-Revision-Date: 2018-05-23 14:33+0000\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -1145,11 +1145,10 @@ msgstr ""
11451145
#: ../../c-api/typeobj.rst:478
11461146
msgid ""
11471147
"The type object structure extends the :c:type:`PyVarObject` structure. The :"
1148-
"attr:`ob_size` field is used for dynamic types (created by :func:"
1149-
"`type_new`, usually called from a class statement). Note that :c:data:"
1150-
"`PyType_Type` (the metatype) initializes :c:member:`~PyTypeObject."
1151-
"tp_itemsize`, which means that its instances (i.e. type objects) *must* have "
1152-
"the :attr:`ob_size` field."
1148+
"attr:`ob_size` field is used for dynamic types (created by :func:`type_new`, "
1149+
"usually called from a class statement). Note that :c:data:`PyType_Type` (the "
1150+
"metatype) initializes :c:member:`~PyTypeObject.tp_itemsize`, which means "
1151+
"that its instances (i.e. type objects) *must* have the :attr:`ob_size` field."
11531152
msgstr ""
11541153

11551154
#: ../../c-api/typeobj.rst:487
@@ -1192,7 +1191,7 @@ msgstr ""
11921191
#: ../../c-api/typeobj.rst:1910 ../../c-api/typeobj.rst:1921
11931192
#: ../../c-api/typeobj.rst:1931 ../../c-api/typeobj.rst:1940
11941193
#: ../../c-api/typeobj.rst:1950 ../../c-api/typeobj.rst:1964
1195-
#: ../../c-api/typeobj.rst:2002 ../../c-api/typeobj.rst:2019
1194+
#: ../../c-api/typeobj.rst:2013 ../../c-api/typeobj.rst:2030
11961195
msgid "**Inheritance:**"
11971196
msgstr ""
11981197

@@ -1226,7 +1225,7 @@ msgstr ""
12261225
#: ../../c-api/typeobj.rst:934 ../../c-api/typeobj.rst:1533
12271226
#: ../../c-api/typeobj.rst:1556 ../../c-api/typeobj.rst:1674
12281227
#: ../../c-api/typeobj.rst:1692 ../../c-api/typeobj.rst:1783
1229-
#: ../../c-api/typeobj.rst:1895 ../../c-api/typeobj.rst:2004
1228+
#: ../../c-api/typeobj.rst:1895 ../../c-api/typeobj.rst:2015
12301229
msgid "This field is inherited by subtypes."
12311230
msgstr ""
12321231

@@ -2879,39 +2878,39 @@ msgid ""
28792878
"also set the :const:`Py_TPFLAGS_HAVE_FINALIZE` flags bit."
28802879
msgstr ""
28812880

2882-
#: ../../c-api/typeobj.rst:2008
2881+
#: ../../c-api/typeobj.rst:2002
2882+
msgid ""
2883+
"Also, note that, in a garbage collected Python, :c:member:`~PyTypeObject."
2884+
"tp_dealloc` may be called from any Python thread, not just the thread which "
2885+
"created the object (if the object becomes part of a refcount cycle, that "
2886+
"cycle might be collected by a garbage collection on any thread). This is "
2887+
"not a problem for Python API calls, since the thread on which tp_dealloc is "
2888+
"called will own the Global Interpreter Lock (GIL). However, if the object "
2889+
"being destroyed in turn destroys objects from some other C or C++ library, "
2890+
"care should be taken to ensure that destroying those objects on the thread "
2891+
"which called tp_dealloc will not violate any assumptions of the library."
2892+
msgstr ""
2893+
2894+
#: ../../c-api/typeobj.rst:2019
28832895
msgid "\"Safe object finalization\" (:pep:`442`)"
28842896
msgstr ""
28852897

2886-
#: ../../c-api/typeobj.rst:2013
2898+
#: ../../c-api/typeobj.rst:2024
28872899
msgid ""
28882900
"Vectorcall function to use for calls of this type object. In other words, it "
28892901
"is used to implement :ref:`vectorcall <vectorcall>` for ``type.__call__``. "
28902902
"If ``tp_vectorcall`` is ``NULL``, the default call implementation using :"
28912903
"attr:`__new__` and :attr:`__init__` is used."
28922904
msgstr ""
28932905

2894-
#: ../../c-api/typeobj.rst:2021
2906+
#: ../../c-api/typeobj.rst:2032
28952907
msgid "This field is never inherited."
28962908
msgstr ""
28972909

2898-
#: ../../c-api/typeobj.rst:2023
2910+
#: ../../c-api/typeobj.rst:2034
28992911
msgid "(the field exists since 3.8 but it's only used since 3.9)"
29002912
msgstr ""
29012913

2902-
#: ../../c-api/typeobj.rst:2026
2903-
msgid ""
2904-
"Also, note that, in a garbage collected Python, :c:member:`~PyTypeObject."
2905-
"tp_dealloc` may be called from any Python thread, not just the thread which "
2906-
"created the object (if the object becomes part of a refcount cycle, that "
2907-
"cycle might be collected by a garbage collection on any thread). This is "
2908-
"not a problem for Python API calls, since the thread on which tp_dealloc is "
2909-
"called will own the Global Interpreter Lock (GIL). However, if the object "
2910-
"being destroyed in turn destroys objects from some other C or C++ library, "
2911-
"care should be taken to ensure that destroying those objects on the thread "
2912-
"which called tp_dealloc will not violate any assumptions of the library."
2913-
msgstr ""
2914-
29152914
#: ../../c-api/typeobj.rst:2040
29162915
msgid "Static Types"
29172916
msgstr ""
@@ -3137,7 +3136,7 @@ msgstr ""
31373136

31383137
#: ../../c-api/typeobj.rst:2324 ../../c-api/typeobj.rst:2373
31393138
#: ../../c-api/typeobj.rst:2427 ../../c-api/typeobj.rst:2438
3140-
#: ../../c-api/typeobj.rst:2449 ../../c-api/typeobj.rst:2458
3139+
#: ../../c-api/typeobj.rst:2450 ../../c-api/typeobj.rst:2459
31413140
msgid "The signature of this function is::"
31423141
msgstr ""
31433142

@@ -3278,31 +3277,32 @@ msgstr ""
32783277

32793278
#: ../../c-api/typeobj.rst:2442
32803279
msgid ""
3281-
"Must return an :term:`awaitable` object. See :meth:`__anext__` for details."
3280+
"Must return an :term:`asynchronous iterator` object. See :meth:`__anext__` "
3281+
"for details."
32823282
msgstr ""
32833283

3284-
#: ../../c-api/typeobj.rst:2444
3284+
#: ../../c-api/typeobj.rst:2445
32853285
msgid ""
32863286
"This slot may be set to ``NULL`` if an object does not implement "
32873287
"asynchronous iteration protocol."
32883288
msgstr ""
32893289

3290-
#: ../../c-api/typeobj.rst:2453
3290+
#: ../../c-api/typeobj.rst:2454
32913291
msgid ""
32923292
"Must return an :term:`awaitable` object. See :meth:`__anext__` for details. "
32933293
"This slot may be set to ``NULL``."
32943294
msgstr ""
32953295

3296-
#: ../../c-api/typeobj.rst:2462
3296+
#: ../../c-api/typeobj.rst:2463
32973297
msgid ""
32983298
"See :c:func:`PyIter_Send` for details. This slot may be set to ``NULL``."
32993299
msgstr ""
33003300

3301-
#: ../../c-api/typeobj.rst:2471
3301+
#: ../../c-api/typeobj.rst:2472
33023302
msgid "Slot Type typedefs"
33033303
msgstr ""
33043304

3305-
#: ../../c-api/typeobj.rst:2475
3305+
#: ../../c-api/typeobj.rst:2476
33063306
msgid ""
33073307
"The purpose of this function is to separate memory allocation from memory "
33083308
"initialization. It should return a pointer to a block of memory of adequate "
@@ -3316,114 +3316,114 @@ msgid ""
33163316
"member:`~PyTypeObject.tp_basicsize`."
33173317
msgstr ""
33183318

3319-
#: ../../c-api/typeobj.rst:2485
3319+
#: ../../c-api/typeobj.rst:2486
33203320
msgid ""
33213321
"This function should not do any other instance initialization, not even to "
33223322
"allocate additional memory; that should be done by :c:member:`~PyTypeObject."
33233323
"tp_new`."
33243324
msgstr ""
33253325

3326-
#: ../../c-api/typeobj.rst:2492
3326+
#: ../../c-api/typeobj.rst:2493
33273327
msgid "See :c:member:`~PyTypeObject.tp_free`."
33283328
msgstr "請見 :c:member:`~PyTypeObject.tp_free`\\ 。"
33293329

3330-
#: ../../c-api/typeobj.rst:2496
3330+
#: ../../c-api/typeobj.rst:2497
33313331
msgid "See :c:member:`~PyTypeObject.tp_new`."
33323332
msgstr "請見 :c:member:`~PyTypeObject.tp_new`\\ 。"
33333333

3334-
#: ../../c-api/typeobj.rst:2500
3334+
#: ../../c-api/typeobj.rst:2501
33353335
msgid "See :c:member:`~PyTypeObject.tp_init`."
33363336
msgstr "請見 :c:member:`~PyTypeObject.tp_init`\\ 。"
33373337

3338-
#: ../../c-api/typeobj.rst:2504
3338+
#: ../../c-api/typeobj.rst:2505
33393339
msgid "See :c:member:`~PyTypeObject.tp_repr`."
33403340
msgstr "請見 :c:member:`~PyTypeObject.tp_repr`\\ 。"
33413341

3342-
#: ../../c-api/typeobj.rst:2508 ../../c-api/typeobj.rst:2517
3342+
#: ../../c-api/typeobj.rst:2509 ../../c-api/typeobj.rst:2518
33433343
msgid "Return the value of the named attribute for the object."
33443344
msgstr ""
33453345

3346-
#: ../../c-api/typeobj.rst:2512 ../../c-api/typeobj.rst:2523
3346+
#: ../../c-api/typeobj.rst:2513 ../../c-api/typeobj.rst:2524
33473347
msgid ""
33483348
"Set the value of the named attribute for the object. The value argument is "
33493349
"set to ``NULL`` to delete the attribute."
33503350
msgstr ""
33513351

3352-
#: ../../c-api/typeobj.rst:2519
3352+
#: ../../c-api/typeobj.rst:2520
33533353
msgid "See :c:member:`~PyTypeObject.tp_getattro`."
33543354
msgstr "請見 :c:member:`~PyTypeObject.tp_getattro`\\ 。"
33553355

3356-
#: ../../c-api/typeobj.rst:2526
3356+
#: ../../c-api/typeobj.rst:2527
33573357
msgid "See :c:member:`~PyTypeObject.tp_setattro`."
33583358
msgstr "請見 :c:member:`~PyTypeObject.tp_setattro`\\ 。"
33593359

3360-
#: ../../c-api/typeobj.rst:2530
3360+
#: ../../c-api/typeobj.rst:2531
33613361
msgid "See :c:member:`~PyTypeObject.tp_descrget`."
33623362
msgstr "請見 :c:member:`~PyTypeObject.tp_descrget`\\ 。"
33633363

3364-
#: ../../c-api/typeobj.rst:2534
3364+
#: ../../c-api/typeobj.rst:2535
33653365
msgid "See :c:member:`~PyTypeObject.tp_descrset`."
33663366
msgstr "請見 :c:member:`~PyTypeObject.tp_descrset`\\ 。"
33673367

3368-
#: ../../c-api/typeobj.rst:2538
3368+
#: ../../c-api/typeobj.rst:2539
33693369
msgid "See :c:member:`~PyTypeObject.tp_hash`."
33703370
msgstr "請見 :c:member:`~PyTypeObject.tp_hash`\\ 。"
33713371

3372-
#: ../../c-api/typeobj.rst:2542
3372+
#: ../../c-api/typeobj.rst:2543
33733373
msgid "See :c:member:`~PyTypeObject.tp_richcompare`."
33743374
msgstr "請見 :c:member:`~PyTypeObject.tp_richcompare`\\ 。"
33753375

3376-
#: ../../c-api/typeobj.rst:2546
3376+
#: ../../c-api/typeobj.rst:2547
33773377
msgid "See :c:member:`~PyTypeObject.tp_iter`."
33783378
msgstr "請見 :c:member:`~PyTypeObject.tp_iter`\\ 。"
33793379

3380-
#: ../../c-api/typeobj.rst:2550
3380+
#: ../../c-api/typeobj.rst:2551
33813381
msgid "See :c:member:`~PyTypeObject.tp_iternext`."
33823382
msgstr "請見 :c:member:`~PyTypeObject.tp_iternext`\\ 。"
33833383

3384-
#: ../../c-api/typeobj.rst:2564
3384+
#: ../../c-api/typeobj.rst:2565
33853385
msgid "See :c:member:`~PyAsyncMethods.am_send`."
33863386
msgstr "請見 :c:member:`~PyAsyncMethods.am_send`\\ 。"
33873387

3388-
#: ../../c-api/typeobj.rst:2580
3388+
#: ../../c-api/typeobj.rst:2581
33893389
msgid "Examples"
33903390
msgstr "範例"
33913391

3392-
#: ../../c-api/typeobj.rst:2582
3392+
#: ../../c-api/typeobj.rst:2583
33933393
msgid ""
33943394
"The following are simple examples of Python type definitions. They include "
33953395
"common usage you may encounter. Some demonstrate tricky corner cases. For "
33963396
"more examples, practical info, and a tutorial, see :ref:`defining-new-types` "
33973397
"and :ref:`new-types-topics`."
33983398
msgstr ""
33993399

3400-
#: ../../c-api/typeobj.rst:2587
3400+
#: ../../c-api/typeobj.rst:2588
34013401
msgid "A basic :ref:`static type <static-types>`::"
34023402
msgstr ""
34033403

3404-
#: ../../c-api/typeobj.rst:2604
3404+
#: ../../c-api/typeobj.rst:2605
34053405
msgid ""
34063406
"You may also find older code (especially in the CPython code base) with a "
34073407
"more verbose initializer::"
34083408
msgstr ""
34093409

3410-
#: ../../c-api/typeobj.rst:2648
3410+
#: ../../c-api/typeobj.rst:2649
34113411
msgid "A type that supports weakrefs, instance dicts, and hashing::"
34123412
msgstr ""
34133413

3414-
#: ../../c-api/typeobj.rst:2675
3414+
#: ../../c-api/typeobj.rst:2676
34153415
msgid ""
34163416
"A str subclass that cannot be subclassed and cannot be called to create "
34173417
"instances (e.g. uses a separate factory func) using :c:data:"
34183418
"`Py_TPFLAGS_DISALLOW_INSTANTIATION` flag::"
34193419
msgstr ""
34203420

3421-
#: ../../c-api/typeobj.rst:2694
3421+
#: ../../c-api/typeobj.rst:2695
34223422
msgid ""
34233423
"The simplest :ref:`static type <static-types>` with fixed-length instances::"
34243424
msgstr ""
34253425

3426-
#: ../../c-api/typeobj.rst:2705
3426+
#: ../../c-api/typeobj.rst:2706
34273427
msgid ""
34283428
"The simplest :ref:`static type <static-types>` with variable-length "
34293429
"instances::"

‎c-api/unicode.po

Copy file name to clipboardExpand all lines: c-api/unicode.po
+11-5Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version: Python 3.10\n"
1111
"Report-Msgid-Bugs-To: \n"
12-
"POT-Creation-Date: 2021-10-26 16:47+0000\n"
12+
"POT-Creation-Date: 2022-02-24 00:12+0000\n"
1313
"PO-Revision-Date: 2018-05-23 14:08+0000\n"
1414
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1515
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -1208,7 +1208,7 @@ msgstr ""
12081208

12091209
#: ../../c-api/unicode.rst:1011
12101210
msgid ""
1211-
"The codecs all use a similar interface. Only deviation from the following "
1211+
"The codecs all use a similar interface. Only deviations from the following "
12121212
"generic ones are documented for simplicity."
12131213
msgstr ""
12141214

@@ -1359,7 +1359,7 @@ msgid ""
13591359
"``-1`` or ``1``, any byte order mark is copied to the output."
13601360
msgstr ""
13611361

1362-
#: ../../c-api/unicode.rst:1154 ../../c-api/unicode.rst:1228
1362+
#: ../../c-api/unicode.rst:1154
13631363
msgid ""
13641364
"After completion, *\\*byteorder* is set to the current byte order at the end "
13651365
"of input data."
@@ -1438,6 +1438,12 @@ msgid ""
14381438
"result in either a ``\\ufeff`` or a ``\\ufffe`` character)."
14391439
msgstr ""
14401440

1441+
#: ../../c-api/unicode.rst:1228
1442+
msgid ""
1443+
"After completion, ``*byteorder`` is set to the current byte order at the end "
1444+
"of input data."
1445+
msgstr ""
1446+
14411447
#: ../../c-api/unicode.rst:1239
14421448
msgid ""
14431449
"If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF16`. If "
@@ -1660,7 +1666,7 @@ msgstr ""
16601666
msgid ""
16611667
"This codec is special in that it can be used to implement many different "
16621668
"codecs (and this is in fact what was done to obtain most of the standard "
1663-
"codecs included in the :mod:`encodings` package). The codec uses mapping to "
1669+
"codecs included in the :mod:`encodings` package). The codec uses mappings to "
16641670
"encode and decode characters. The mapping objects provided must support "
16651671
"the :meth:`__getitem__` mapping interface; dictionaries and sequences work "
16661672
"well."
@@ -1848,7 +1854,7 @@ msgstr ""
18481854
#: ../../c-api/unicode.rst:1607
18491855
msgid ""
18501856
"Split a Unicode string at line breaks, returning a list of Unicode strings. "
1851-
"CRLF is considered to be one line break. If *keepend* is ``0``, the Line "
1857+
"CRLF is considered to be one line break. If *keepend* is ``0``, the line "
18521858
"break characters are not included in the resulting strings."
18531859
msgstr ""
18541860

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.