@@ -1019,9 +1019,7 @@ msgstr "使用 :func:`!dataclass` 参数 ``repr=False`` 来使用标准的 :func
10191019msgid ""
10201020"Only the dataclass fields are shown in the value area, not the dataclass' "
10211021"name."
1022- msgstr ""
1023- "只有数据类字段会被显示在值区域中,而不会显示数据类的名称。Only the dataclass fields are shown in the "
1024- "value area, not the dataclass' name."
1022+ msgstr "只有数据类字段会被显示在值区域中,数据类名称不会被显示。"
10251023
10261024#: ../../howto/enum.rst:512
10271025msgid "Pickling"
@@ -1062,6 +1060,8 @@ msgid ""
10621060":meth:`~object.__reduce_ex__` in the enumeration class. The default method "
10631061"is by-value, but enums with complicated values may want to use by-name::"
10641062msgstr ""
1063+ "通过在枚举类中定义 :meth:`~object.__reduce_ex__`,可以修改枚举成员的 pickled/unpicled "
1064+ "方式。默认方法是根据值进行的,但具有复杂值的枚举可能需要根据名称进行::"
10651065
10661066#: ../../howto/enum.rst:534
10671067msgid ""
@@ -1125,6 +1125,9 @@ msgid ""
11251125"class derived from :class:`Enum` is returned. In other words, the above "
11261126"assignment to :class:`!Animal` is equivalent to::"
11271127msgstr ""
1128+ "第二个参数是枚举成员名称的 *来源*。它可以是以空白分隔的名称字符串、名称序列、包含键/值对的 2 "
1129+ "元组序列或名称到值的映射(如字典)。后两个选项可为枚举指定任意值;其他选项则自动指定从 1 开始的递增整数(使用 ``start`` "
1130+ "参数可指定不同的起始值)。返回值是一个从 :class:`Enum` 派生的新类。也就是说,上述对 :class:`!Animal` 的赋值相当于:"
11281131
11291132#: ../../howto/enum.rst:569
11301133msgid ""
@@ -1181,6 +1184,8 @@ msgid ""
11811184"able to find the class. For example, if the class was made available in "
11821185"class SomeData in the global scope::"
11831186msgstr ""
1187+ "在某些情况下,新的 pickle 版本 4 协议还需要 :attr:`~type.__qualname__` 在 pickle 能够找到类的位置。 "
1188+ "例如,如果该类是在全局作用域内的 SomeData 类中可见::"
11841189
11851190#: ../../howto/enum.rst:599
11861191msgid ""
0 commit comments