8000 Merge pull request #325 from python/cron/sync/3.11 · python/python-docs-zh-tw@7ee65fc · GitHub
[go: up one dir, main page]

Skip to content

Commit 7ee65fc

Browse files
authored
Merge pull request #325 from python/cron/sync/3.11
Sync with CPython 3.11
2 parents 11f8dc6 + f97aa75 commit 7ee65fc
  • < 10000 div id=":Rj9ltddab:" class="PRIVATE_TreeView-item-content prc-TreeView-TreeViewItemContent-f0r0b">weakref.po
  • reference
  • tutorial
  • using
  • whatsnew
  • Some content is hidden

    Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

    231 files changed

    +37539
    -26063
    lines changed

    c-api/apiabiversion.po

    Lines changed: 13 additions & 2 deletions
    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: 2021-10-26 16:47+0000\n"
    11+
    "POT-Creation-Date: 2022-10-15 20:43+0000\n"
    1212
    "PO-Revision-Date: 2022-01-24 22:34+0800\n"
    1313
    "Last-Translator: Matt Wang <mattwang44@gmail.com>\n"
    1414
    "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
    @@ -172,6 +172,17 @@ msgstr ""
    172172
    "因此 ``3.4.1a2`` 代表 hexversion ``0x030401a2``\\\\ ``3.10.0`` 代表 "
    173173
    "hexversion ``0x030a00f0``\\ 。"
    174174

    175-
    #: ../../c-api/apiabiversion.rst:62
    175+
    #: ../../c-api/apiabiversion.rst:61
    176+
    msgid "This version is also available via the symbol :data:`Py_Version`."
    177+
    msgstr ""
    178+
    179+
    #: ../../c-api/apiabiversion.rst:65
    180+
    msgid ""
    181+
    "The Python runtime version number encoded in a single constant integer, with "
    182+
    "the same format as the :c:macro:`PY_VERSION_HEX` macro. This contains the "
    183+
    "Python version used at run time."
    184+
    msgstr ""
    185+
    186+
    #: ../../c-api/apiabiversion.rst:71
    176187
    msgid "All the given macros are defined in :source:`Include/patchlevel.h`."
    177188
    msgstr "所有提到的巨集都定義在 :source:`Include/patchlevel.h`\\ 。"

    c-api/buffer.po

    Lines changed: 15 additions & 5 deletions
    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: 2021-09-13 00:11+0000\n"
    10+
    "POT-Creation-Date: 2022-10-15 20:43+0000\n"
    1111
    "PO-Revision-Date: 2018-05-23 14:30+0000\n"
    1212
    "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
    1313
    "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
    @@ -644,33 +644,43 @@ msgstr ""
    644644

    645645
    #: ../../c-api/buffer.rst:504
    646646
    msgid ""
    647+
    "Copy data from *src* to *dest* buffer. Can convert between C-style and or "
    648+
    "Fortran-style buffers."
    649+
    msgstr ""
    650+
    651+
    #: ../../c-api/buffer.rst:507
    652+
    msgid "``0`` is returned on success, ``-1`` on error."
    653+
    msgstr ""
    654+
    655+
    #: ../../c-api/buffer.rst:511
    656+
    msgid ""
    647657
    "Fill the *strides* array with byte-strides of a :term:`contiguous` (C-style "
    648658
    "if *order* is ``'C'`` or Fortran-style if *order* is ``'F'``) array of the "
    649659
    "given shape with the given number of bytes per element."
    650660
    msgstr ""
    651661

    652-
    #: ../../c-api/buffer.rst:511
    662+
    #: ../../c-api/buffer.rst:518
    653663
    msgid ""
    654664
    "Handle buffer requests for an exporter that wants to expose *buf* of size "
    655665
    "*len* with writability set according to *readonly*. *buf* is interpreted as "
    656666
    "a sequence of unsigned bytes."
    657667
    msgstr ""
    658668

    659-
    #: ../../c-api/buffer.rst:515
    669+
    #: ../../c-api/buffer.rst:522
    660670
    msgid ""
    661671
    "The *flags* argument indicates the request type. This function always fills "
    662672
    "in *view* as specified by flags, unless *buf* has been designated as read-"
    663673
    "only and :c:macro:`PyBUF_WRITABLE` is set in *flags*."
    664674
    msgstr ""
    665675

    666-
    #: ../../c-api/buffer.rst:519
    676+
    #: ../../c-api/buffer.rst:526
    667677
    msgid ""
    668678
    "On success, set ``view->obj`` to a new reference to *exporter* and return 0. "
    669679
    "Otherwise, raise :c:data:`PyExc_BufferError`, set ``view->obj`` to ``NULL`` "
    670680
    "and return ``-1``;"
    671681
    msgstr ""
    672682

    673-
    #: ../../c-api/buffer.rst:523
    683+
    #: ../../c-api/buffer.rst:530
    674684
    msgid ""
    675685
    "If this function is used as part of a :ref:`getbufferproc <buffer-structs>`, "
    676686
    "*exporter* MUST be set to the exporting object and *flags* must be passed "

    c-api/bytearray.po

    Lines changed: 3 additions & 3 deletions
    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-04-03 00:14+0000\n"
    10+
    "POT-Creation-Date: 2022-10-15 20:43+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-"
    @@ -93,9 +93,9 @@ msgid "These macros trade safety for speed and they don't check pointers."
    9393
    msgstr ""
    9494

    9595
    #: ../../c-api/bytearray.rst:80
    96-
    msgid "Macro version of :c:func:`PyByteArray_AsString`."
    96+
    msgid "Similar to :c:func:`PyByteArray_AsString`, but without error checking."
    9797
    msgstr ""
    9898

    9999
    #: ../../c-api/bytearray.rst:85
    100-
    msgid "Macro version of :c:func:`PyByteArray_Size`."
    100+
    msgid "Similar to :c:func:`PyByteArray_Size`, but without error checking."
    101101
    msgstr ""

    c-api/bytes.po

    Lines changed: 3 additions & 3 deletions
    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-05-21 17:35+0000\n"
    10+
    "POT-Creation-Date: 2022-10-15 20:43+0000\n"
    1111
    "PO-Revision-Date: 2018-05-23 14:04+0000\n"
    1212
    "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
    1313
    "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
    @@ -251,7 +251,7 @@ msgid "Return the length of the bytes in bytes object *o*."
    251251
    msgstr ""
    252252

    253253
    #: ../../c-api/bytes.rst:137
    254-
    msgid "Macro form of :c:func:`PyBytes_Size` but without error checking."
    254+
    msgid "Similar to :c:func:`PyBytes_Size`, but without error checking."
    255255
    msgstr ""
    256256

    257257
    #: ../../c-api/bytes.rst:142
    @@ -266,7 +266,7 @@ msgid ""
    266266
    msgstr ""
    267267

    268268
    #: ../../c-api/bytes.rst:154
    269-
    msgid "Macro form of :c:func:`PyBytes_AsString` but without error checking."
    269+
    msgid "Similar to :c:func:`PyBytes_AsString`, but without error checking."
    270270
    msgstr ""
    271271

    272272
    #: ../../c-api/bytes.rst:159

    c-api/capsule.po

    Lines changed: 16 additions & 14 deletions
    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-06 00:23+0000\n"
    10+
    "POT-Creation-Date: 2022-10-15 20:43+0000\n"
    1111
    "PO-Revision-Date: 2018-05-23 14:30+0000\n"
    1212
    "Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
    1313
    "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
    @@ -141,18 +141,20 @@ msgid ""
    141141
    "Import a pointer to a C object from a capsule attribute in a module. The "
    142142
    "*name* parameter should specify the full name to the attribute, as in "
    143143
    "``module.attribute``. The *name* stored in the capsule must match this "
    144-
    "string exactly. If *no_block* is true, import the module without blocking "
    145-
    "(using :c:func:`PyImport_ImportModuleNoBlock`). If *no_block* is false, "
    146-
    "import the module conventionally (using :c:func:`PyImport_ImportModule`)."
    144+
    "string exactly."
    147145
    msgstr ""
    148146

    149-
    #: ../../c-api/capsule.rst:110
    147+
    #: ../../c-api/capsule.rst:108
    150148
    msgid ""
    151149
    "Return the capsule's internal *pointer* on success. On failure, set an "
    152150
    "exception and return ``NULL``."
    153151
    msgstr ""
    154152

    155-
    #: ../../c-api/capsule.rst:116
    153+
    #: ../../c-api/capsule.rst:111
    154+
    msgid "*no_block* has no effect anymore."
    155+
    msgstr ""
    156+
    157+
    #: ../../c-api/capsule.rst:117
    156158
    msgid ""
    157159
    "Determines whether or not *capsule* is a valid capsule. A valid capsule is "
    158160
    "non-``NULL``, passes :c:func:`PyCapsule_CheckExact`, has a non-``NULL`` "
    @@ -161,41 +163,41 @@ msgid ""
    161163
    "compared.)"
    162164
    msgstr ""
    163165

    164-
    #: ../../c-api/capsule.rst:122
    166+
    #: ../../c-api/capsule.rst:123
    165167
    msgid ""
    166168
    "In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls "
    167169
    "to any of the accessors (any function starting with :c:func:`PyCapsule_Get`) "
    168170
    "are guaranteed to succeed."
    169171
    msgstr ""
    170172

    171-
    #: ../../c-api/capsule.rst:126
    173+
    #: ../../c-api/capsule.rst:127
    172174
    msgid ""
    173175
    "Return a nonzero value if the object is valid and matches the name passed "
    174176
    "in. Return ``0`` otherwise. This function will not fail."
    175177
    msgstr ""
    176178

    177-
    #: ../../c-api/capsule.rst:132
    179+
    #: ../../c-api/capsule.rst:133
    178180
    msgid "Set the context pointer inside *capsule* to *context*."
    179181
    msgstr ""
    180182

    181-
    #: ../../c-api/capsule.rst:134 ../../c-api/capsule.rst:141
    182-
    #: ../../c-api/capsule.rst:150 ../../c-api/capsule.rst:158
    183+
    #: ../../c-api/capsule.rst:135 ../../c-api/capsule.rst:142
    184+
    #: ../../c-api/capsule.rst:151 ../../c-api/capsule.rst:159
    183185
    msgid ""
    184186
    "Return ``0`` on success. Return nonzero and set an exception on failure."
    185187
    msgstr ""
    186188

    187-
    #: ../../c-api/capsule.rst:139
    189+
    #: ../../c-api/capsule.rst:140
    188190
    msgid "Set the destructor inside *capsule* to *destructor*."
    189191
    msgstr ""
    190192

    191-
    #: ../../c-api/capsule.rst:146
    193+
    #: ../../c-api/capsule.rst:147
    192194
    msgid ""
    193195
    "Set the name inside *capsule* to *name*. If non-``NULL``, the name must "
    194196
    "outlive the capsule. If the previous *name* stored in the capsule was not "
    195197
    "``NULL``, no attempt is made to free it."
    196198
    msgstr ""
    197199

    198-
    #: ../../c-api/capsule.rst:155
    200+
    #: ../../c-api/capsule.rst:156
    199201
    msgid ""
    200202
    "Set the void pointer inside *capsule* to *pointer*. The pointer may not be "
    201203
    "``NULL``."

    c-api/code.po

    Lines changed: 67 additions & 12 deletions
    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: 2021-10-26 16:47+0000\n"
    10+
    "POT-Creation-Date: 2022-10-15 20:43+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-"
    @@ -55,33 +55,88 @@ msgstr ""
    5555
    msgid ""
    5656
    "Return a new code object. If you need a dummy code object to create a "
    5757
    "frame, use :c:func:`PyCode_NewEmpty` instead. Calling :c:func:`PyCode_New` "
    58-
    "directly can bind you to a precise Python version since the definition of "
    59-
    "the bytecode changes often."
    58+
    "directly will bind you to a precise Python version since the definition of "
    59+
    "the bytecode changes often. The many arguments of this function are inter-"
    60+
    "dependent in complex ways, meaning that subtle changes to values are likely "
    61+
    "to result in incorrect execution or VM crashes. Use this function only with "
    62+
    "extreme care."
    6063
    msgstr ""
    6164

    62-
    #: ../../c-api/code.rst:45
    65+
    #: ../../c-api/code.rst:45 ../../c-api/code.rst:55
    66+
    msgid "Added ``exceptiontable`` parameter."
    67+
    msgstr ""
    68+
    69+
    #: ../../c-api/code.rst:50
    6370
    msgid ""
    6471
    "Similar to :c:func:`PyCode_New`, but with an extra \"posonlyargcount\" for "
    65-
    "positional-only arguments."
    72+
    "positional-only arguments. The same caveats that apply to ``PyCode_New`` "
    73+
    "also apply to this function."
    6674
    msgstr ""
    6775

    68-
    #: ../../c-api/code.rst:51
    76+
    #: ../../c-api/code.rst:60
    6977
    msgid ""
    7078
    "Return a new empty code object with the specified filename, function name, "
    71-
    "and first line number. It is illegal to :func:`exec` or :func:`eval` the "
    72-
    "resulting code object."
    79+
    "and first line number. The resulting code object will raise an ``Exception`` "
    80+
    "if executed."
    7381
    msgstr ""
    7482

    75-
    #: ../../c-api/code.rst:57
    83+
    #: ../../c-api/code.rst:66
    7684
    msgid ""
    7785
    "Return the line number of the instruction that occurs on or before "
    7886
    "``byte_offset`` and ends after it. If you just need the line number of a "
    7987
    "frame, use :c:func:`PyFrame_GetLineNumber` instead."
    8088
    msgstr ""
    8189

    82-
    #: ../../c-api/code.rst:60
    90+
    #: ../../c-api/code.rst:69
    8391
    msgid ""
    8492
    "For efficiently iterating over the line numbers in a code object, use `the "
    85-
    "API described in PEP 626 <https://www.python.org/dev/peps/pep-0626/#out-of-"
    86-
    "process-debuggers-and-profilers>`_."
    93+
    "API described in PEP 626 <https://peps.python.org/pep-0626/#out-of-process-"
    94+
    "debuggers-and-profilers>`_."
    95+
    msgstr ""
    96+
    97+
    #: ../../c-api/code.rst:74
    98+
    msgid ""
    99+
    "Sets the passed ``int`` pointers to the source code line and column numbers "
    100+
    "for the instruction at ``byte_offset``. Sets the value to ``0`` when "
    101+
    "information is not available for any particular element."
    102+
    msgstr ""
    103+
    104+
    #: ../../c-api/code.rst:78
    105+
    msgid "Returns ``1`` if the function succeeds and 0 otherwise."
    106+
    msgstr ""
    107+
    108+
    #: ../../c-api/code.rst:82
    109+
    msgid ""
    110+
    "Equivalent to the Python code ``getattr(co, 'co_code')``. Returns a strong "
    111+
    "reference to a :c:type:`PyBytesObject` representing the bytecode in a code "
    112+
    "object. On error, ``NULL`` is returned and an exception is raised."
    113+
    msgstr ""
    114+
    115+
    #: ../../c-api/code.rst:87
    116+
    msgid ""
    117+
    "This ``PyBytesObject`` may be created on-demand by the interpreter and does "
    118+
    "not necessarily represent the bytecode actually executed by CPython. The "
    119+
    "primary use case for this function is debuggers and profilers."
    120+
    msgstr ""
    121+
    122+
    #: ../../c-api/code.rst:95
    123+
    msgid ""
    124+
    "Equivalent to the Python code ``getattr(co, 'co_varnames')``. Returns a new "
    125+
    "reference to a :c:type:`PyTupleObject` containing the names of the local "
    126+
    "variables. On error, ``NULL`` is returned and an exception is raised."
    127+
    msgstr ""
    128+
    129+
    #: ../../c-api/code.rst:104
    130+
    msgid ""
    131+
    "Equivalent to the Python code ``getattr(co, 'co_cellvars')``. Returns a new "
    132+
    "reference to a :c:type:`PyTupleObject` containing the names of the local "
    133+
    "variables that are referenced by nested functions. On error, ``NULL`` is "
    134+
    "returned and an exception is raised."
    135+
    msgstr ""
    136+
    137+
    #: ../../c-api/code.rst:113
    138+
    msgid ""
    139+
    "Equivalent to the Python code ``getattr(co, 'co_freevars')``. Returns a new "
    140+
    "reference to a :c:type:`PyTupleObject` containing the names of the free "
    141+
    "variables. On error, ``NULL`` is returned and an exception is raised."
    87142
    msgstr ""

    0 commit comments

    Comments
     (0)
    0