# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2025, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # Rafael Fontenelle , 2025 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-07-25 16:03+0000\n" "PO-Revision-Date: 2025-07-18 19:57+0000\n" "Last-Translator: Rafael Fontenelle , 2025\n" "Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: zh_CN\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../../c-api/method.rst:6 msgid "Instance Method Objects" msgstr "实例方法对象" #: ../../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` 的包装器,也是将 :c:type:`PyCFunction` 与类对象绑定的新方法。 " "它取代了以前的调用 ``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 实例方法类型。 它并不对 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`) 则返回真值。 形参必须不为 " "``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 "宏版本的 :c:func:`PyInstanceMethod_Function`,略去了错误检测。" #: ../../c-api/method.rst:48 msgid "Method Objects" msgstr "方法对象" #: ../../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 "方法是绑定的函数对象。 方法总是会被绑定到一个用户自定义类的实例。 未绑定方法(绑定到一个类的方法)已不再可用。" #: ../../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`) 则返回真值。 形参必须不为 ``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 模块)"