diff --git a/c-api/call.po b/c-api/call.po index a49337f6e6..8c28f2476c 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -1,41 +1,47 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. # -#, fuzzy +# Translators: +# Matt Wang , 2022 +# msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-06-11 00:15+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2022-06-11 14:46+0800\n" +"PO-Revision-Date: 2022-06-12 14:46+0800\n" +"Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.1\n" #: ../../c-api/call.rst:6 msgid "Call Protocol" -msgstr "" +msgstr "呼叫協定 (Call Protocol)" #: ../../c-api/call.rst:8 msgid "" "CPython supports two different calling protocols: *tp_call* and vectorcall." -msgstr "" +msgstr "CPython 支援兩種不同的呼叫協定:*tp_call* 和 vectorcall(向量呼叫)。" #: ../../c-api/call.rst:12 msgid "The *tp_call* Protocol" -msgstr "" +msgstr "*tp_call* 協定" #: ../../c-api/call.rst:14 msgid "" "Instances of classes that set :c:member:`~PyTypeObject.tp_call` are " "callable. The signature of the slot is::" msgstr "" +"設定 :c:member:`~PyTypeObject.tp_call` 的類別之實例都是可呼叫的。該擴充槽 " +"(slot) 的簽章為:\n" +"\n" +"::" #: ../../c-api/call.rst:19 msgid "" @@ -44,28 +50,37 @@ msgid "" "code. *args* must be non-NULL (use an empty tuple if there are no arguments) " "but *kwargs* may be *NULL* if there are no keyword arguments." msgstr "" +"要達成一個呼叫會使用一個 tuple(元組)表示位置引數、一個 dict 表示關鍵字引" +"數,類似於 Python 程式碼中的 ``callable(*args, **kwargs)``。*args* 必須不為 " +"NULL(如果沒有引數,會使用一個空 tuple),但如果沒有關鍵字引數,*kwargs* 可以" +"是 *NULL*。" #: ../../c-api/call.rst:25 msgid "" "This convention is not only used by *tp_call*: :c:member:`~PyTypeObject." "tp_new` and :c:member:`~PyTypeObject.tp_init` also pass arguments this way." msgstr "" +"這個慣例不僅會被 *tp_call* 使用,:c:member:`~PyTypeObject.tp_new` 和 :c:" +"member:`~PyTypeObject.tp_init` 也這樣傳遞引數。" #: ../../c-api/call.rst:29 msgid "" "To call an object, use :c:func:`PyObject_Call` or another :ref:`call API " "`." msgstr "" +"使用 :c:func:`PyObject_Call` 或其他\\ :ref:`呼叫 API ` 來呼叫一個" +"物件。" #: ../../c-api/call.rst:36 msgid "The Vectorcall Protocol" -msgstr "" +msgstr "Vectorcall 協定" #: ../../c-api/call.rst:40 msgid "" "The vectorcall protocol was introduced in :pep:`590` as an additional " "protocol for making calls more efficient." msgstr "" +"Vectorcall 協定是在 :pep:`590` 被引入的,它是使函式呼叫更加有效率的附加協定。" #: ../../c-api/call.rst:43 msgid "" @@ -78,12 +93,21 @@ msgid "" "achieve this is by setting :c:member:`~PyTypeObject.tp_call` to :c:func:" "`PyVectorcall_Call`. This bears repeating:" msgstr "" +"經驗法則上,如果可呼叫物件有支援,CPython 於內部呼叫中會更傾向使用 " +"vectorcall。然而,這並不是一個硬性規定。此外,有些第三方擴充套件會直接使用 " +"*tp_call*\\ (而不是使用 :c:func:`PyObject_Call`)。因此,一個支援 " +"vectorcall 的類別也必須實作 :c:member:`~PyTypeObject.tp_call`。此外,無論使用" +"哪種協定,可呼叫物件的行為都必須是相同的。要達成這個目的的推薦做法是將 :c:" +"member:`~PyTypeObject.tp_call` 設定為 :c:func:`PyVectorcall_Call`。這值得一再" +"提醒:" #: ../../c-api/call.rst:57 msgid "" "A class supporting vectorcall **must** also implement :c:member:" "`~PyTypeObject.tp_call` with the same semantics." msgstr "" +"一個支援 vectorcall 的類別\\ **必須**\\ 也實作具有相同語義的 :c:member:" +"`~PyTypeObject.tp_call`。" #: ../../c-api/call.rst:60 msgid "" @@ -92,6 +116,9 @@ msgid "" "args tuple and kwargs dict anyway, then there is no point in implementing " "vectorcall." msgstr "" +"如果一個類別的 vectorcall 比 *tp_call* 慢,就不應該實作 vectorcall。例如,如" +"果被呼叫者需要將引數轉換為 args tuple(引數元組)和 kwargs dict(關鍵字引數字" +"典),那麼實作 vectorcall 就沒有意義。" #: ../../c-api/call.rst:65 msgid "" @@ -101,35 +128,40 @@ msgid "" "*vectorcallfunc* appears. This is a pointer to a function with the following " "signature:" msgstr "" +"類別可以透過啟用 :const:`Py_TPFLAGS_HAVE_VECTORCALL` 旗標並將 :c:member:" +"`~PyTypeObject.tp_vectorcall_offset` 設定為物件結構中有出現 *vectorcallfunc* " +"的 offset 來實作 vectorcall 協定。這是一個指向具有以下簽章之函式的指標:" #: ../../c-api/call.rst:73 msgid "*callable* is the object being called." -msgstr "" +msgstr "*callable* 是指被呼叫的物件。" #: ../../c-api/call.rst:75 msgid "" "*args* is a C array consisting of the positional arguments followed by the" -msgstr "" +msgstr "*args* 是一個 C 語言陣列 (array),包含位置引數與後面" #: ../../c-api/call.rst:75 msgid "" "values of the keyword arguments. This can be *NULL* if there are no " "arguments." -msgstr "" +msgstr "關鍵字引數的值。如果沒有引數,這個值可以是 *NULL*。" #: ../../c-api/call.rst:79 msgid "*nargsf* is the number of positional arguments plus possibly the" -msgstr "" +msgstr "*nargsf* 是位置引數的數量加上可能會有的" #: ../../c-api/call.rst:78 msgid "" ":const:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. To get the actual number of " "positional arguments from *nargsf*, use :c:func:`PyVectorcall_NARGS`." msgstr "" +":const:`PY_VECTORCALL_ARGUMENTS_OFFSET` 旗標。如果要從 *nargsf* 獲得實際的位" +"置引數數量,請使用 :c:func:`PyVectorcall_NARGS`。" #: ../../c-api/call.rst:85 msgid "*kwnames* is a tuple containing the names of the keyword arguments;" -msgstr "" +msgstr "*kwnames* 是一個包含所有關鍵字引數名稱的 tuple;" #: ../../c-api/call.rst:82 msgid "" @@ -137,6 +169,9 @@ msgid "" "(instances of ``str`` or a subclass) and they must be unique. If there are " "no keyword arguments, then *kwnames* can instead be *NULL*." msgstr "" +"換句話說,就是 kwargs 字典的鍵。這些名字必須是字串(``str`` 或其子類別的實" +"例),並且它們必須是不重複的。如果沒有關鍵字引數,那麼 *kwnames* 可以用 " +"*NULL* 代替。" #: ../../c-api/call.rst:89 msgid "" @@ -145,12 +180,17 @@ msgid "" "argument 1 (not 0) in the allocated vector. The callee must restore the " "value of ``args[-1]`` before returning." msgstr "" +"如果在 vectorcall 的 *nargsf* 引數中設定了此旗標,則允許被呼叫者臨時更改 " +"``args[-1]`` 的值。換句話說,*args* 指向向量中的引數 1(不是 0)。被呼叫方必" +"須在回傳之前還原 ``args[-1]`` 的值。" #: ../../c-api/call.rst:94 msgid "" "For :c:func:`PyObject_VectorcallMethod`, this flag means instead that " "``args[0]`` may be changed." msgstr "" +"對於 :c:func:`PyObject_VectorcallMethod`,這個旗標的改變意味著可能是 " +"``args[0]`` 被改變。" #: ../../c-api/call.rst:97 msgid "" @@ -159,6 +199,10 @@ msgid "" "allow callables such as bound methods to make their onward calls (which " "include a prepended *self* argument) very efficiently." msgstr "" +"當可以以幾乎無代價的方式(無需佔據額外的記憶體)來達成,那麼會推薦呼叫者使" +"用 :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`。這樣做會讓如 bound method(繫結方" +"法)之類的可呼叫函式非常有效地繼續向前呼叫(這類函式包含一個在首位的 *self* " +"引數)。" #: ../../c-api/call.rst:102 msgid "" @@ -166,6 +210,8 @@ msgid "" "call>` function as with any other callable. :c:func:`PyObject_Vectorcall` " "will usually be most efficient." msgstr "" +"要呼叫一個實作了 vectorcall 的物件,請就像其他可呼叫物件一樣使用\\ :ref:`呼" +"叫 API` 中的函式。:c:func:`PyObject_Vectorcall` 通常是最有效率的。" #: ../../c-api/call.rst:109 msgid "" @@ -178,10 +224,17 @@ msgid "" "was available as ``_PyObject_FastCallDict``. The old names are still defined " "as aliases of the new, non-underscored names." msgstr "" +"在 CPython 3.8 中,vectorcall API 和相關函式暫定以帶開頭底線的名稱提供:" +"``_PyObject_Vectorcall``、``_Py_TPFLAGS_HAVE_VECTORCALL``、" +"``_PyObject_VectorcallMethod``、``_PyVectorcall_Function``、" +"``_PyObject_CallOneArg``、``_PyObject_CallMethodNoArgs``、" +"``_PyObject_CallMethodOneArg``。此外,``PyObject_VectorcallDict`` 也以 " +"``_PyObject_FastCallDict`` 名稱提供。這些舊名稱仍有被定義,做為不帶底線的新名" +"稱的別名。" #: ../../c-api/call.rst:121 msgid "Recursion Control" -msgstr "" +msgstr "遞迴控制" #: ../../c-api/call.rst:123 msgid "" @@ -189,6 +242,9 @@ msgid "" "`: CPython uses :c:func:`Py_EnterRecursiveCall` and :c:func:" "`Py_LeaveRecursiveCall` for calls made using *tp_call*." msgstr "" +"在使用 *tp_call* 時,被呼叫者不必擔心\\ :ref:`遞迴 `:CPython 對於" +"使用 *tp_call* 的呼叫會使用 :c:func:`Py_EnterRecursiveCall` 和 :c:func:" +"`Py_LeaveRecursiveCall`。" #: ../../c-api/call.rst:128 msgid "" @@ -196,22 +252,27 @@ msgid "" "callee should use *Py_EnterRecursiveCall* and *Py_LeaveRecursiveCall* if " "needed." msgstr "" +"為保證效率,這不適用於使用 vectorcall 的呼叫:被呼叫方在需要時應當使用 " +"*Py_EnterRecursiveCall* 和 *Py_LeaveRecursiveCall*。" #: ../../c-api/call.rst:134 msgid "Vectorcall Support API" -msgstr "" +msgstr "Vectorcall 支援 API" #: ../../c-api/call.rst:138 msgid "" "Given a vectorcall *nargsf* argument, return the actual number of arguments. " "Currently equivalent to::" msgstr "" +"給定一個 vectorcall *nargsf* 引數,回傳引數的實際數量。目前等同於:\n" +"\n" +"::" #: ../../c-api/call.rst:144 msgid "" "However, the function ``PyVectorcall_NARGS`` should be used to allow for " "future extensions." -msgstr "" +msgstr "然而,應使用 ``PyVectorcall_NARGS`` 函式以便將來需要擴充。" #: ../../c-api/call.rst:151 msgid "" @@ -220,18 +281,25 @@ msgid "" "Otherwise, return the vectorcall function pointer stored in *op*. This " "function never raises an exception." msgstr "" +"如果 *op* 不支援 vectorcall 協定(因為型別不支援或特定實例不支援),就回傳 " +"*NULL*。否則,回傳儲存在 *op* 中的 vectorcall 函式指標。這個函式不會引發例" +"外。" #: ../../c-api/call.rst:156 msgid "" "This is mostly useful to check whether or not *op* supports vectorcall, " "which can be done by checking ``PyVectorcall_Function(op) != NULL``." msgstr "" +"這大多在檢查 *op* 是否支援 vectorcall 時能派上用場,可以透過檢查 " +"``PyVectorcall_Function(op) != NULL`` 來達成。" #: ../../c-api/call.rst:163 msgid "" "Call *callable*'s :c:type:`vectorcallfunc` with positional and keyword " "arguments given in a tuple and dict, respectively." msgstr "" +"呼叫 *callable* 的 :c:type:`vectorcallfunc`,其位置引數和關鍵字引數分別以 " +"tuple 和 dict 格式給定。" #: ../../c-api/call.rst:166 msgid "" @@ -240,10 +308,13 @@ msgid "" "It does not check the :const:`Py_TPFLAGS_HAVE_VECTORCALL` flag and it does " "not fall back to ``tp_call``." msgstr "" +"這是一個專門函式,其目的是被放入 :c:member:`~PyTypeObject.tp_call` 擴充槽或是" +"用於 ``tp_call`` 的實作。它不會檢查 :const:`Py_TPFLAGS_HAVE_VECTORCALL` 旗標" +"並且它不會退回 (fall back) 使用 ``tp_call``。" #: ../../c-api/call.rst:177 msgid "Object Calling API" -msgstr "" +msgstr "物件呼叫 API" #: ../../c-api/call.rst:179 msgid "" @@ -252,12 +323,15 @@ msgid "" "*tp_call* or vectorcall. In order to do as little conversion as possible, " "pick one that best fits the format of data you have available." msgstr "" +"有多個函式可被用來呼叫 Python 物件。各個函式會將其引數轉換為被呼叫物件所支援" +"的慣用形式 – 可以是 *tp_call* 或 vectorcall。為了儘可能減少轉換的進行,請選擇" +"一個適合你所擁有資料格式的函式。" #: ../../c-api/call.rst:185 msgid "" "The following table summarizes the available functions; please see " "individual documentation for details." -msgstr "" +msgstr "下表總結了可用的函式;請參閱各個說明文件以瞭解詳情。" #: ../../c-api/call.rst:189 msgid "Function" @@ -287,7 +361,7 @@ msgstr "``PyObject *``" #: ../../c-api/call.rst:191 msgid "tuple" -msgstr "" +msgstr "tuple" #: ../../c-api/call.rst:191 ../../c-api/call.rst:213 msgid "dict/``NULL``" @@ -309,7 +383,7 @@ msgstr ":c:func:`PyObject_CallOneArg`" #: ../../c-api/call.rst:195 ../../c-api/call.rst:209 msgid "1 object" -msgstr "" +msgstr "一個物件" #: ../../c-api/call.rst:197 msgid ":c:func:`PyObject_CallObject`" @@ -317,7 +391,7 @@ msgstr ":c:func:`PyObject_CallObject`" #: ../../c-api/call.rst:197 msgid "tuple/``NULL``" -msgstr "" +msgstr "tuple/``NULL``" #: ../../c-api/call.rst:199 msgid ":c:func:`PyObject_CallFunction`" @@ -325,7 +399,7 @@ msgstr ":c:func:`PyObject_CallFunction`" #: ../../c-api/call.rst:199 ../../c-api/call.rst:201 msgid "format" -msgstr "" +msgstr "format" #: ../../c-api/call.rst:201 msgid ":c:func:`PyObject_CallMethod`" @@ -341,7 +415,7 @@ msgstr ":c:func:`PyObject_CallFunctionObjArgs`" #: ../../c-api/call.rst:203 ../../c-api/call.rst:205 msgid "variadic" -msgstr "" +msgstr "可變引數" #: ../../c-api/call.rst:205 msgid ":c:func:`PyObject_CallMethodObjArgs`" @@ -365,7 +439,7 @@ msgstr ":c:func:`PyObject_Vectorcall`" #: ../../c-api/call.rst:211 ../../c-api/call.rst:213 ../../c-api/call.rst:215 msgid "vectorcall" -msgstr "" +msgstr "vectorcall" #: ../../c-api/call.rst:213 msgid ":c:func:`PyObject_VectorcallDict`" @@ -377,19 +451,23 @@ msgstr ":c:func:`PyObject_VectorcallMethod`" #: ../../c-api/call.rst:215 msgid "arg + name" -msgstr "" +msgstr "引數 + 名稱" #: ../../c-api/call.rst:221 msgid "" "Call a callable Python object *callable*, with arguments given by the tuple " "*args*, and named arguments given by the dictionary *kwargs*." msgstr "" +"呼叫一個可呼叫的 Python 物件 *callable*,附帶由 tuple *args* 所給定的引數及由" +"字典 *kwargs* 所給定的關鍵字引數。" #: ../../c-api/call.rst:224 msgid "" "*args* must not be *NULL*; use an empty tuple if no arguments are needed. If " "no named arguments are needed, *kwargs* can be *NULL*." msgstr "" +"*args* 必須不為 *NULL*;如果不需要引數,請使用一個空 tuple。如果不需要關鍵字" +"引數,則 *kwargs* 可以為 *NULL*。" #: ../../c-api/call.rst:227 ../../c-api/call.rst:239 ../../c-api/call.rst:250 #: ../../c-api/call.rst:261 ../../c-api/call.rst:273 ../../c-api/call.rst:293 @@ -398,35 +476,41 @@ msgstr "" msgid "" "Return the result of the call on success, or raise an exception and return " "*NULL* on failure." -msgstr "" +msgstr "成功時回傳結果,或在失敗時引發一個例外並回傳 *NULL*。" #: ../../c-api/call.rst:230 msgid "" "This is the equivalent of the Python expression: ``callable(*args, " "**kwargs)``." -msgstr "" +msgstr "這等價於 Python 運算式 ``callable(*args, **kwargs)``。" #: ../../c-api/call.rst:236 msgid "" "Call a callable Python object *callable* without any arguments. It is the " "most efficient way to call a callable Python object without any argument." msgstr "" +"呼叫一個可呼叫的 Python 物件 *callable* 並不附帶任何引數。這是不帶引數呼叫 " +"Python 可呼叫物件的最有效方式。" #: ../../c-api/call.rst:247 msgid "" "Call a callable Python object *callable* with exactly 1 positional argument " "*arg* and no keyword arguments." msgstr "" +"呼叫一個可呼叫的 Python 物件 *callable* 並附帶正好一個位置引數 *arg* 而沒有關" +"鍵字引數。" #: ../../c-api/call.rst:258 msgid "" "Call a callable Python object *callable*, with arguments given by the tuple " "*args*. If no arguments are needed, then *args* can be *NULL*." msgstr "" +"呼叫一個可呼叫的 Python 物件 *callable*,附帶由 tuple *args* 所給定的引數。如" +"果不需要傳入引數,則 *args* 可以為 *NULL*。" #: ../../c-api/call.rst:264 ../../c-api/call.rst:276 msgid "This is the equivalent of the Python expression: ``callable(*args)``." -msgstr "" +msgstr "這等價於 Python 運算式 ``callable(*args)``。" #: ../../c-api/call.rst:269 msgid "" @@ -435,16 +519,21 @@ msgid "" "style format string. The format can be *NULL*, indicating that no arguments " "are provided." msgstr "" +"呼叫一個可呼叫的 Python 物件 *callable*,附帶數量可變的 C 引數。這些 C 引數使" +"用 :c:func:`Py_BuildValue` 風格的格式字串來描述。格式可以為 *NULL*,表示沒有" +"提供任何引數。" #: ../../c-api/call.rst:278 msgid "" "Note that if you only pass :c:type:`PyObject *` args, :c:func:" "`PyObject_CallFunctionObjArgs` is a faster alternative." msgstr "" +"注意,如果你只傳入 :c:type:`PyObject *` 引數,則 :c:func:" +"`PyObject_CallFunctionObjArgs` 是另一個更快速的選擇。" #: ../../c-api/call.rst:281 msgid "The type of *format* was changed from ``char *``." -msgstr "" +msgstr "這個 *format* 的型別已從 ``char *`` 更改。" #: ../../c-api/call.rst:287 msgid "" @@ -452,26 +541,30 @@ msgid "" "arguments. The C arguments are described by a :c:func:`Py_BuildValue` " "format string that should produce a tuple." msgstr "" +"呼叫 *obj* 物件中名為 *name* 的 method 並附帶數量可變的 C 引數。這些 C 引數" +"由 :c:func:`Py_BuildValue` 格式字串來描述,並應當生成一個 tuple。" #: ../../c-api/call.rst:291 msgid "The format can be *NULL*, indicating that no arguments are provided." -msgstr "" +msgstr "格式可以為 *NULL*,表示沒有提供任何引數。" #: ../../c-api/call.rst:296 msgid "" "This is the equivalent of the Python expression: ``obj.name(arg1, " "arg2, ...)``." -msgstr "" +msgstr "這等價於 Python 運算式 ``obj.name(arg1, arg2, ...)``。" #: ../../c-api/call.rst:299 msgid "" "Note that if you only pass :c:type:`PyObject *` args, :c:func:" "`PyObject_CallMethodObjArgs` is a faster alternative." msgstr "" +"注意,如果你只傳入 :c:type:`PyObject *` 引數,則 :c:func:" +"`PyObject_CallMethodObjArgs` 是另一個更快速的選擇。" #: ../../c-api/call.rst:302 msgid "The types of *name* and *format* were changed from ``char *``." -msgstr "" +msgstr "*name* 和 *format* 的型別已從 ``char *`` 更改。" #: ../../c-api/call.rst:308 msgid "" @@ -479,12 +572,14 @@ msgid "" "`PyObject *` arguments. The arguments are provided as a variable number of " "parameters followed by *NULL*." msgstr "" +"呼叫一個可呼叫的 Python 物件 *callable*,附帶數量可變的 :c:type:`PyObject *` " +"引數。這些引數是以位置在 *NULL* 後面、數量可變的參數來提供。" #: ../../c-api/call.rst:315 msgid "" "This is the equivalent of the Python expression: ``callable(arg1, " "arg2, ...)``." -msgstr "" +msgstr "這等價於 Python 運算式 ``callable(arg1, arg2, ...)``。" #: ../../c-api/call.rst:321 msgid "" @@ -493,12 +588,17 @@ msgid "" "number of :c:type:`PyObject *` arguments. The arguments are provided as a " "variable number of parameters followed by *NULL*." msgstr "" +"呼叫 Python 物件 *obj* 中的一個 method,其中 method 名稱由 *name* 中的 " +"Python 字串物件給定。被呼叫時會附帶數量可變的 :c:type:`PyObject *` 引數。這些" +"引數是以位置在 *NULL* 後面、且數量可變的參數來提供。" #: ../../c-api/call.rst:332 msgid "" "Call a method of the Python object *obj* without arguments, where the name " "of the method is given as a Python string object in *name*." msgstr "" +"不附帶任何引數地呼叫 Python 物件 *obj* 中的一個 method,其中 method 名稱由 " +"*name* 中的 Python 字串物件給定。" #: ../../c-api/call.rst:343 msgid "" @@ -506,6 +606,8 @@ msgid "" "*arg*, where the name of the method is given as a Python string object in " "*name*." msgstr "" +"附帶一個位置引數 *arg* 地呼叫 Python 物件 *obj* 中的一個 method,其中 method " +"名稱由 *name* 中的 Python 字串物件給定。" #: ../../c-api/call.rst:355 msgid "" @@ -513,6 +615,9 @@ msgid "" "c:type:`vectorcallfunc`. If *callable* supports vectorcall_, this directly " "calls the vectorcall function stored in *callable*." msgstr "" +"呼叫一個可呼叫的 Python 物件 *callable*。附帶引數與 :c:type:`vectorcallfunc` " +"的相同。如果 *callable* 支援 vectorcall_,則它會直接呼叫存放在 *callable* 中" +"的 vectorcall 函式。" #: ../../c-api/call.rst:367 msgid "" @@ -520,6 +625,8 @@ msgid "" "vectorcall_ protocol, but with keyword arguments passed as a dictionary " "*kwdict*. The *args* array contains only the positional arguments." msgstr "" +"附帶與在 vectorcall_ 協定中傳入的相同位置引數來呼叫 *callable*,但會加上以字" +"典 *kwdict* 格式傳入的關鍵字引數。*args* 陣列將只包含位置引數。" #: ../../c-api/call.rst:371 msgid "" @@ -528,6 +635,8 @@ msgid "" "already has a dictionary ready to use for the keyword arguments, but not a " "tuple for the positional arguments." msgstr "" +"無論內部使用了哪一種協定,都會需要進行引數的轉換。因此,此函式應該只有在呼叫" +"方已經擁有一個要作為關鍵字引數的字典、但沒有作為位置引數的 tuple 時才被使用。" #: ../../c-api/call.rst:381 msgid "" @@ -540,19 +649,32 @@ msgid "" "temporarily be changed. Keyword arguments can be passed just like in :c:func:" "`PyObject_Vectorcall`." msgstr "" +"使用 vectorcall 呼叫慣例來呼叫一個 method。method 的名稱以 Python 字串 " +"*name* 的格式給定。被呼叫 method 的物件為 *args[0]*,而 *args* 陣列從 " +"*args[1]* 開始的部分則代表呼叫的引數。必須傳入至少一個位置引數。*nargsf* 為包" +"括 *args[0]* 在內的位置引數的數量,如果 ``args[0]`` 的值可能被臨時改變則要再" +"加上 :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`。關鍵字引數可以像在 :c:func:" +"`PyObject_Vectorcall` 中一樣被傳入。" #: ../../c-api/call.rst:390 msgid "" "If the object has the :const:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, this " "will call the unbound method object with the full *args* vector as arguments." msgstr "" +"如果物件具有 :const:`Py_TPFLAGS_METHOD_DESCRIPTOR` 特性,這將以完整的 *args* " +"向量作為引數來呼叫 unbound method(未繫結方法)物件。" #: ../../c-api/call.rst:401 msgid "Call Support API" -msgstr "" +msgstr "呼叫支援 API" #: ../../c-api/call.rst:405 msgid "" "Determine if the object *o* is callable. Return ``1`` if the object is " "callable and ``0`` otherwise. This function always succeeds." msgstr "" +"判定物件 *o* 是否為可呼叫的。如果物件是可呼叫物件則回傳 ``1``,其他情況回傳 " +"``0``。這個函式不會呼叫失敗。" + +#~ msgid "This function is not part of the :ref:`limited API `." +#~ msgstr "這個函式不是 :ref:`limited API ` 的一部分。"