# Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: # Leon H., 2017 # Matt Wang , 2022 msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-07-24 00:03+0000\n" "PO-Revision-Date: 2022-01-24 22:22+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.0.1\n" #: ../../c-api/method.rst:6 msgid "Instance Method Objects" msgstr "實例方法物件 (Instance Method Objects)" #: ../../c-api/method.rst:10 msgid "" "An instance method is a wrapper for a :c:type:`PyCFunction` and the new way " "to bind a :c:type:`PyCFunction` to a class object. It replaces the former " "call ``PyMethod_New(func, NULL, class)``." msgstr "" "實例方法是 :c:type:`PyCFunction` 的包裝器 (wrapper),也是將 :c:type:" "`PyCFunction` 繫結 (bind) 到類別物件的一種新方式。它替代了原先對 " "``PyMethod_New(func, NULL, class)`` 的呼叫。" #: ../../c-api/method.rst:17 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python instance " "method type. It is not exposed to Python programs." msgstr "" ":c:type:`PyTypeObject` 的實例代表 Python 實例方法型別。它不會公開 (expose) " "給 Python 程式。" #: ../../c-api/method.rst:23 msgid "" "Return true if *o* is an instance method object (has type :c:data:" "`PyInstanceMethod_Type`). The parameter must not be ``NULL``. This function " "always succeeds." msgstr "" "如果 *o* 是一個實例方法物件(型別為 :c:data:`PyInstanceMethod_Type`)則回傳 " "true。參數必須不為 ``NULL``。此函式總是會成功執行。" #: ../../c-api/method.rst:30 msgid "" "Return a new instance method object, with *func* being any callable object. " "*func* is the function that will be called when the instance method is " "called." msgstr "" "回傳一個新的實例方法物件,*func* 為任意可呼叫物件,在實例方法被呼叫時 *func* " "函式也會被呼叫。" #: ../../c-api/method.rst:37 msgid "Return the function object associated with the instance method *im*." msgstr "回傳關聯到實例方法 *im* 的函式物件。" #: ../../c-api/method.rst:42 msgid "" "Macro version of :c:func:`PyInstanceMethod_Function` which avoids error " "checking." msgstr "" "巨集 (macro) 版本的 :c:func:`PyInstanceMethod_Function`,忽略了錯誤檢查。" #: ../../c-api/method.rst:48 msgid "Method Objects" msgstr "方法物件 (Method Objects)" #: ../../c-api/method.rst:52 msgid "" "Methods are bound function objects. Methods are always bound to an instance " "of a user-defined class. Unbound methods (methods bound to a class object) " "are no longer available." msgstr "" "方法為繫結函式 (bound function) 物件。方法總是會被繫結到一個使用者定義類別的" "實例。未繫結方法(繫結到一個類別的方法)已不可用。" #: ../../c-api/method.rst:61 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python method type. " "This is exposed to Python programs as ``types.MethodType``." msgstr "" "這個 :c:type:`PyTypeObject` 實例代表 Python 方法型別。它作為 ``types." "MethodType`` 公開給 Python 程式。" #: ../../c-api/method.rst:67 msgid "" "Return true if *o* is a method object (has type :c:data:`PyMethod_Type`). " "The parameter must not be ``NULL``. This function always succeeds." msgstr "" "如果 *o* 是一個方法物件(型別為 :c:data:`PyMethod_Type`)則回傳 true。參數必" "須不為 ``NULL``。此函式總是會成功執行。" #: ../../c-api/method.rst:73 msgid "" "Return a new method object, with *func* being any callable object and *self* " "the instance the method should be bound. *func* is the function that will be " "called when the method is called. *self* must not be ``NULL``." msgstr "" "回傳一個新的方法物件,*func* 應為任意可呼叫物件,*self* 為該方法應繫結的實" "例。在方法被呼叫時,*func* 函式也會被呼叫。*self* 必須不為 ``NULL``。" #: ../../c-api/method.rst:80 msgid "Return the function object associated with the method *meth*." msgstr "回傳關聯到方法 *meth* 的函式物件。" #: ../../c-api/method.rst:85 msgid "" "Macro version of :c:func:`PyMethod_Function` which avoids error checking." msgstr "巨集版本的 :c:func:`PyMethod_Function`,忽略了錯誤檢查。" #: ../../c-api/method.rst:90 msgid "Return the instance associated with the method *meth*." msgstr "回傳關聯到方法 *meth* 的實例。" #: ../../c-api/method.rst:95 msgid "Macro version of :c:func:`PyMethod_Self` which avoids error checking." msgstr "巨集版本的 :c:func:`PyMethod_Self`,忽略了錯誤檢查。" #: ../../c-api/method.rst:8 ../../c-api/method.rst:50 msgid "object" msgstr "object(物件)" #: ../../c-api/method.rst:8 msgid "instancemethod" msgstr "instancemethod" #: ../../c-api/method.rst:50 msgid "method" msgstr "method(方法)" #: ../../c-api/method.rst:59 msgid "MethodType (in module types)" msgstr "MethodType(types 模組中)"