@@ -2228,6 +2228,8 @@ msgid ""
22282228"the attribute was accessed through, or ``None`` when the attribute is "
22292229"accessed through the *owner*."
22302230msgstr ""
2231+ "调用此方法以获取所有者类的属性(类属性访问)或该类的实例的属性(实例属性访问)。 可选的 *owner* 参数是所有者类而 *instance* "
2232+ "是被用来访问属性的实例,如果通过 *owner* 来访问属性则返回 ``None``。"
22312233
22322234#: ../../reference/datamodel.rst:1629
22332235msgid ""
@@ -2244,6 +2246,9 @@ msgid ""
22442246"implementation always passes in both arguments whether they are required or "
22452247"not."
22462248msgstr ""
2249+ ":PEP:`252` 指明 :meth:`__get__` 为带有一至二个参数的可调用对象。 Python "
2250+ "自身内置的描述器支持此规格定义;但是,某些第三方工具可能要求必须带两个参数。 Python 自身的 :meth:`__getattribute__` "
2251+ "实现总是会传入两个参数,无论它们是否被要求提供。"
22472252
22482253#: ../../reference/datamodel.rst:1641
22492254msgid ""
@@ -2257,6 +2262,8 @@ msgid ""
22572262"descriptor to a \" data descriptor\" . See :ref:`descriptor-invocation` for "
22582263"more details."
22592264msgstr ""
2265+ "请注意,添加 :meth:`__set__` 或 :meth:`__delete__` 会将描述器变成“数据描述器”。 更多细节请参阅 :ref"
2266+ ":`descriptor-invocation`。"
22602267
22612268#: ../../reference/datamodel.rst:1650
22622269msgid ""
@@ -2780,6 +2787,9 @@ msgid ""
27802787"initialised correctly. Failing to do so will result in a :exc:`RuntimeError`"
27812788" in Python 3.8."
27822789msgstr ""
2790+ "在 CPython 3.6 及之后的版本中,``__class__`` 单元会作为类命名空间中的cell is passed to the "
2791+ "metaclass as a ``__classcell__`` 条目被传给元类。 如果存在,它必须被向上传播给 ``type.__new__`` "
2792+ "调用,以便能正确地初始化该类。 如果不这样做,在 Python 3.8 中将引发 :exc:`RuntimeError`。"
27832793
27842794#: ../../reference/datamodel.rst:1990
27852795msgid ""
@@ -3292,6 +3302,8 @@ msgid ""
32923302"defined then corresponding built-in functions :func:`int`, :func:`float` and"
32933303" :func:`complex` fall back to :meth:`__index__`."
32943304msgstr ""
3305+ "如果未定义 :meth:`__int__`, :meth:`__float__` 和 :meth:`__complex__` 则相应的内置函数 "
3306+ ":func:`int`, :func:`float` 和 :func:`complex` 将回退为 :meth:`__index__`。"
32953307
32963308#: ../../reference/datamodel.rst:2422
32973309msgid ""
0 commit comments