88msgstr ""
99"Project-Id-Version : Python 3.7\n "
1010"Report-Msgid-Bugs-To : \n "
11- "POT-Creation-Date : 2018-06-30 05:56 +0900\n "
11+ "POT-Creation-Date : 2018-08-06 08:47 +0900\n "
1212"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
1313"
Last-Translator :
ww song <[email protected] >, 2018\n "
1414"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -910,44 +910,50 @@ msgstr ""
910910#: ../../library/typing.rst:991
911911msgid ""
912912"Note that this is not the same concept as an optional argument, which is one"
913- " that has a default. An optional argument with a default needn't use the "
914- "``Optional`` qualifier on its type annotation (although it is inferred if "
915- "the default is ``None``). A mandatory argument may still have an "
916- "``Optional`` type if an explicit value of ``None`` is allowed."
913+ " that has a default. An optional argument with a default does not require "
914+ "the ``Optional`` qualifier on its type annotation just because it is "
915+ "optional. For example::"
917916msgstr ""
918917
919- #: ../../library/typing.rst:1000
918+ #: ../../library/typing.rst:999
919+ msgid ""
920+ "On the other hand, if an explicit value of ``None`` is allowed, the use of "
921+ "``Optional`` is appropriate, whether the argument is optional or not. For "
922+ "example::"
923+ msgstr ""
924+
925+ #: ../../library/typing.rst:1008
920926msgid ""
921927"Tuple type; ``Tuple[X, Y]`` is the type of a tuple of two items with the "
922928"first item of type X and the second of type Y."
923929msgstr ""
924930
925- #: ../../library/typing.rst:1003
931+ #: ../../library/typing.rst:1011
926932msgid ""
927933"Example: ``Tuple[T1, T2]`` is a tuple of two elements corresponding to type "
928934"variables T1 and T2. ``Tuple[int, float, str]`` is a tuple of an int, a "
929935"float and a string."
930936msgstr ""
931937
932- #: ../../library/typing.rst:1007
938+ #: ../../library/typing.rst:1015
933939msgid ""
934940"To specify a variable-length tuple of homogeneous type, use literal "
935941"ellipsis, e.g. ``Tuple[int, ...]``. A plain :data:`Tuple` is equivalent to "
936942"``Tuple[Any, ...]``, and in turn to :class:`tuple`."
937943msgstr ""
938944
939- #: ../../library/typing.rst:1013
945+ #: ../../library/typing.rst:1021
940946msgid "Callable type; ``Callable[[int], str]`` is a function of (int) -> str."
941947msgstr ""
942948
943- #: ../../library/typing.rst:1015
949+ #: ../../library/typing.rst:1023
944950msgid ""
945951"The subscription syntax must always be used with exactly two values: the "
946952"argument list and the return type. The argument list must be a list of "
947953"types or an ellipsis; the return type must be a single type."
948954msgstr ""
949955
950- #: ../../library/typing.rst:1020
956+ #: ../../library/typing.rst:1028
951957msgid ""
952958"There is no syntax to indicate optional or keyword arguments; such function "
953959"types are rarely used as callback types. ``Callable[..., ReturnType]`` "
@@ -957,48 +963,48 @@ msgid ""
957963":class:`collections.abc.Callable`."
958964msgstr ""
959965
960- #: ../../library/typing.rst:1030
966+ #: ../../library/typing.rst:1038
961967msgid "Special type construct to mark class variables."
962968msgstr ""
963969
964- #: ../../library/typing.rst:1032
970+ #: ../../library/typing.rst:1040
965971msgid ""
966972"As introduced in :pep:`526`, a variable annotation wrapped in ClassVar "
967973"indicates that a given attribute is intended to be used as a class variable "
968974"and should not be set on instances of that class. Usage::"
969975msgstr ""
970976
971- #: ../../library/typing.rst:1040
977+ #: ../../library/typing.rst:1048
972978msgid ":data:`ClassVar` accepts only types and cannot be further subscribed."
973979msgstr ""
974980
975- #: ../../library/typing.rst:1042
981+ #: ../../library/typing.rst:1050
976982msgid ""
977983":data:`ClassVar` is not a class itself, and should not be used with "
978984":func:`isinstance` or :func:`issubclass`. :data:`ClassVar` does not change "
979985"Python runtime behavior, but it can be used by third-party type checkers. "
980986"For example, a type checker might flag the following code as an error::"
981987msgstr ""
982988
983- #: ../../library/typing.rst:1056
989+ #: ../../library/typing.rst:1064
984990msgid ""
985991"``AnyStr`` is a type variable defined as ``AnyStr = TypeVar('AnyStr', str, "
986992"bytes)``."
987993msgstr ""
988994
989- #: ../../library/typing.rst:1059
995+ #: ../../library/typing.rst:1067
990996msgid ""
991997"It is meant to be used for functions that may accept any kind of string "
992998"without allowing different kinds of strings to mix. For example::"
993999msgstr ""
9941000
995- #: ../../library/typing.rst:1071
1001+ #: ../../library/typing.rst:1079
9961002msgid ""
9971003"A special constant that is assumed to be ``True`` by 3rd party static type "
9981004"checkers. It is ``False`` at runtime. Usage::"
9991005msgstr ""
10001006
1001- #: ../../library/typing.rst:1080
1007+ #: ../../library/typing.rst:1088
10021008msgid ""
10031009"Note that the first type annotation must be enclosed in quotes, making it a "
10041010"\" forward reference\" , to hide the ``expensive_mod`` reference from the "
0 commit comments