File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -415,6 +415,9 @@ msgid ""
415415"an actual type substituted (explicitly or implicitly) for the type variable "
416416"must be a subclass of the boundary type, see :pep:`484`."
417417msgstr ""
418+ "通过 ``covariant=True`` 或 ``contravariant=True`` 可以把类型变量标记为协变量或逆变量。详见 "
419+ ":pep:`484`。默认情况下,类型变量是不变量。类型变量还可以用 ``bound=<type>`` "
420+ "指定上限。这里的意思是,(显式或隐式地)取代类型变量的实际类型必须是限定类型的子类,详见 :pep:`484`。"
418421
419422#: ../../library/typing.rst:440
420423msgid "Abstract base class for generic types."
@@ -1057,13 +1060,13 @@ msgstr ""
10571060msgid ""
10581061"``AnyStr`` is a type variable defined as ``AnyStr = TypeVar('AnyStr', str, "
10591062"bytes)``."
1060- msgstr ""
1063+ msgstr "``AnyStr`` 类型变量的定义为 ``AnyStr = TypeVar('AnyStr', str, bytes)``。 "
10611064
10621065#: ../../library/typing.rst:1118
10631066msgid ""
10641067"It is meant to be used for functions that may accept any kind of string "
10651068"without allowing different kinds of strings to mix. For example::"
1066- msgstr ""
1069+ msgstr "这里指的是,它可以接受任意同类字符串,但不支持混用不同类别的字符串。例如: "
10671070
10681071#: ../../library/typing.rst:1130
10691072msgid ""
You can’t perform that action at this time.
0 commit comments