@@ -13,7 +13,7 @@ msgid ""
1313msgstr ""
1414"Project-Id-Version : Python 3.14\n "
1515"Report-Msgid-Bugs-To : \n "
16- "POT-Creation-Date : 2026-05-05 15:48 +0000\n "
16+ "POT-Creation-Date : 2026-05-07 16:02 +0000\n "
1717"PO-Revision-Date : 2025-09-16 00:00+0000\n "
1818"Last-Translator : Freesand Leo <yuqinju@163.com>, 2026\n "
1919"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -2811,6 +2811,10 @@ msgid ""
28112811"Python's built-in types, for example, ``isinstance(obj, str)`` or "
28122812"``isinstance(obj, (int, float, complex))``."
28132813msgstr ""
2814+ "使用内置函数 :func:`isinstance(obj, cls) <isinstance>`。 "
2815+ "你可以检测对象是否属于多个类中的某一个的实例,只要提供一个元组而非单个类即可,如 ``isinstance(obj, (class1, class2, "
2816+ "...))``,还可以检测对象是否属于 Python 的某个内置类型,如 ``isinstance(obj, str)`` 或 "
2817+ "``isinstance(obj, (int, float, complex))``。"
28142818
28152819#: ../../faq/programming.rst:1515
28162820msgid ""
@@ -2820,6 +2824,9 @@ msgid ""
28202824"To test for \" true inheritance\" , scan the :term:`method resolution order` "
28212825"(MRO) of the class:"
28222826msgstr ""
2827+ "请注意 :func:`isinstance` 还会检测派生自 :term:`abstract base class` 的虚继承。 "
2828+ "因此,对于已注册的类检测将返回 ``True`` 即使没有直接或间接从它继承。 要检测“真正的继承”,应扫描类的 :term:`method "
2829+ "resolution order` (MRO)。"
28232830
28242831#: ../../faq/programming.rst:1521
28252832msgid ""
0 commit comments