@@ -34,7 +34,7 @@ msgid ""
34
34
msgstr ""
35
35
"Project-Id-Version : Python 3.13\n "
36
36
"Report-Msgid-Bugs-To : \n "
37
- "POT-Creation-Date : 2025-03-21 14:18+0000\n "
37
+ "POT-Creation-Date : 2025-03-28 14:18+0000\n "
38
38
"PO-Revision-Date : 2021-06-28 01:19+0000\n "
39
39
"Last-Translator : Freesand Leo <yuqinju@163.com>, 2025\n "
40
40
"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -1440,6 +1440,10 @@ msgid ""
1440
1440
"derived). So if a loader can load from a cached module but otherwise does "
1441
1441
"not load from a file, that atypical scenario may be appropriate."
1442
1442
msgstr ""
1443
+ "请注意 :attr:`!__cached__` 即使在未设置 :attr:`!__file__` 时也可能会被设置。 不过,那样的场景是非典型的。 "
1444
+ "最终,:term:`loader` 会是 :term:`finder` (from which :attr:`!__file__` 和 "
1445
+ ":attr:`!__cached__` 也是自它派生的) 所提供的模块规格的使用方。 "
1446
+ "因此如果一个加载器可以从缓存加载模块但是不能从文件加载,那样的非典型场景就是适当的。"
1443
1447
1444
1448
#: ../../reference/datamodel.rst:1061
1445
1449
msgid ""
@@ -1502,6 +1506,8 @@ msgid ""
1502
1506
" listed here, :attr:`!__dict__` cannot be accessed as a global variable from"
1503
1507
" within a module; it can only be accessed as an attribute on module objects."
1504
1508
msgstr ""
1509
+ "以字典对象表示的模块命名空间。 在此处列出的属性中它很特别,:attr:`!__dict__` "
1510
+ "不能从模块内部作为全局变量来访问;它只能作为模块对象上的属性来访问。"
1505
1511
1506
1512
#: ../../reference/datamodel.rst:1103
1507
1513
msgid ""
@@ -1628,25 +1634,30 @@ msgid ""
1628
1634
" attribute may not exist for some classes. Use "
1629
1635
":func:`inspect.get_annotations` to retrieve class annotations safely."
1630
1636
msgstr ""
1637
+ "当存在元类时直接访问类对象的 :attr:`!__annotations__` 属性可能产生不正确的结果。 此外,对于某些类该属性可能不存在。 请使用 "
1638
+ ":func:`inspect.get_annotations` 来安全地提取类标注。"
1631
1639
1632
1640
#: ../../reference/datamodel.rst:1213
1633
1641
msgid ""
1634
1642
"A :class:`tuple` containing the :ref:`type parameters <type-params>` of a "
1635
1643
":ref:`generic class <generic-classes>`."
1636
1644
msgstr ""
1645
+ "一个包含 :ref:`泛型类 <generic-classes>` 的 :ref:`类型形参 <type-params>` 的 "
1646
+ ":class:`tuple`。"
1637
1647
1638
1648
#: ../../reference/datamodel.rst:1219
1639
1649
msgid ""
1640
1650
"A :class:`tuple` containing names of attributes of this class which are "
1641
1651
"assigned through ``self.X`` from any function in its body."
1642
- msgstr ""
1652
+ msgstr "一个包含由通过 ``self.X`` 赋值为该类语句体中任何函数的类属性名称组成的 :class:`tuple`。 "
1643
1653
1644
1654
#: ../../reference/datamodel.rst:1225
1645
1655
msgid ""
1646
1656
"The line number of the first line of the class definition, including "
1647
1657
"decorators. Setting the :attr:`__module__` attribute removes the "
1648
1658
":attr:`!__firstlineno__` item from the type's dictionary."
1649
1659
msgstr ""
1660
+ "类定义的第一行的行号。 设置 :attr:`__module__` 属性将从类型的字典中移除 :attr:`!__firstlineno__` 条目。"
1650
1661
1651
1662
#: ../../reference/datamodel.rst:1233
1652
1663
msgid ""
@@ -2767,6 +2778,9 @@ msgid ""
2767
2778
"method may generate these results directly, but may also return "
2768
2779
":data:`NotImplemented`."
2769
2780
msgstr ""
2781
+ "在默认情况下,:class:`object` 类提供与 :ref:`expressions-value-comparisons` "
2782
+ "一致的实现:相等比较是根据对象标识号,而顺序比较会引发 :exc:`TypeError`。 每个默认方法都可能直接生成这样的结果,但也可能返回 "
2783
+ ":data:`NotImplemented`。"
2770
2784
2771
2785
#: ../../reference/datamodel.rst:2096
2772
2786
msgid ""
@@ -2864,6 +2878,9 @@ msgid ""
2864
2878
"appropriate value such that ``x == y`` implies both that ``x is y`` and "
2865
2879
"``hash(x) == hash(y)``."
2866
2880
msgstr ""
2881
+ "用户自定义的类默认带有 :meth:`__eq__` 和 :meth:`__hash__` 方法(继承自 :class:`object` "
2882
+ "类);因为它们的存在,所有对象(自己除外)相互比较必定不相等并且 ``x.__hash__()`` 将返回一个恰当的值以使得 ``x == y`` "
2883
+ "同时意味着 ``x is y`` 且 ``hash(x) == hash(y)``。"
2867
2884
2868
2885
#: ../../reference/datamodel.rst:2155
2869
2886
msgid ""
0 commit comments