forked from AFPy/python-docs-fr
make merge
This commit is contained in:
parent
d3b1ef8d30
commit
f2ab89f533
|
@ -8,4 +8,4 @@ install:
|
|||
- pospell --version
|
||||
script:
|
||||
- pospell -p dict -l fr_FR **/*.po
|
||||
- make CPYTHON_CLONE=/tmp/cpython/ COMMIT=0e0cc553ab
|
||||
- make CPYTHON_CLONE=/tmp/cpython/ COMMIT=902196d867
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -5,7 +5,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Python 3.6\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-12-17 21:38+0100\n"
|
||||
"POT-Creation-Date: 2019-01-05 00:27+0100\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
||||
|
@ -325,7 +325,7 @@ msgstr ""
|
|||
msgid "Type variable."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:404 ../Doc/library/typing.rst:811
|
||||
#: ../Doc/library/typing.rst:404 ../Doc/library/typing.rst:820
|
||||
msgid "Usage::"
|
||||
msgstr "Utilisation ::"
|
||||
|
||||
|
@ -475,194 +475,205 @@ msgid "A generic version of :class:`collections.abc.MutableSet`."
|
|||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:570
|
||||
msgid "A generic version of :class:`collections.abc.Mapping`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:574
|
||||
msgid "A generic version of :class:`collections.abc.MutableMapping`."
|
||||
msgid ""
|
||||
"A generic version of :class:`collections.abc.Mapping`. This type can be used "
|
||||
"as follows::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:578
|
||||
msgid "A generic version of :class:`collections.abc.Sequence`."
|
||||
msgid "A generic version of :class:`collections.abc.MutableMapping`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:582
|
||||
msgid "A generic version of :class:`collections.abc.MutableSequence`."
|
||||
msgid "A generic version of :class:`collections.abc.Sequence`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:586
|
||||
msgid "A generic version of :class:`collections.abc.MutableSequence`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:590
|
||||
msgid "A generic version of :class:`collections.abc.ByteString`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:588
|
||||
#: ../Doc/library/typing.rst:592
|
||||
msgid ""
|
||||
"This type represents the types :class:`bytes`, :class:`bytearray`, and :"
|
||||
"class:`memoryview`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:591
|
||||
#: ../Doc/library/typing.rst:595
|
||||
msgid ""
|
||||
"As a shorthand for this type, :class:`bytes` can be used to annotate "
|
||||
"arguments of any of the types mentioned above."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:596
|
||||
#: ../Doc/library/typing.rst:600
|
||||
msgid "A generic version of :class:`collections.deque`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:602
|
||||
#: ../Doc/library/typing.rst:606
|
||||
msgid ""
|
||||
"Generic version of :class:`list`. Useful for annotating return types. To "
|
||||
"annotate arguments it is preferred to use abstract collection types such as :"
|
||||
"class:`Mapping`, :class:`Sequence`, or :class:`AbstractSet`."
|
||||
"annotate arguments it is preferred to use an abstract collection type such "
|
||||
"as :class:`Sequence` or :class:`Iterable`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:607
|
||||
#: ../Doc/library/typing.rst:611
|
||||
msgid "This type may be used as follows::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:619
|
||||
msgid "A generic version of :class:`builtins.set <set>`."
|
||||
#: ../Doc/library/typing.rst:623
|
||||
msgid ""
|
||||
"A generic version of :class:`builtins.set <set>`. Useful for annotating "
|
||||
"return types. To annotate arguments it is preferred to use an abstract "
|
||||
"collection type such as :class:`AbstractSet`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:623
|
||||
#: ../Doc/library/typing.rst:629
|
||||
msgid "A generic version of :class:`builtins.frozenset <frozenset>`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:627
|
||||
#: ../Doc/library/typing.rst:633
|
||||
msgid "A generic version of :class:`collections.abc.MappingView`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:631
|
||||
#: ../Doc/library/typing.rst:637
|
||||
msgid "A generic version of :class:`collections.abc.KeysView`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:635
|
||||
#: ../Doc/library/typing.rst:641
|
||||
msgid "A generic version of :class:`collections.abc.ItemsView`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:639
|
||||
#: ../Doc/library/typing.rst:645
|
||||
msgid "A generic version of :class:`collections.abc.ValuesView`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:643
|
||||
#: ../Doc/library/typing.rst:649
|
||||
msgid "A generic version of :class:`collections.abc.Awaitable`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:647
|
||||
#: ../Doc/library/typing.rst:653
|
||||
msgid ""
|
||||
"A generic version of :class:`collections.abc.Coroutine`. The variance and "
|
||||
"order of type variables correspond to those of :class:`Generator`, for "
|
||||
"example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:660
|
||||
#: ../Doc/library/typing.rst:666
|
||||
msgid "A generic version of :class:`collections.abc.AsyncIterable`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:664
|
||||
#: ../Doc/library/typing.rst:670
|
||||
msgid "A generic version of :class:`collections.abc.AsyncIterator`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:668
|
||||
#: ../Doc/library/typing.rst:674
|
||||
msgid "A generic version of :class:`contextlib.AbstractContextManager`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:674
|
||||
#: ../Doc/library/typing.rst:680
|
||||
msgid "A generic version of :class:`contextlib.AbstractAsyncContextManager`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:680
|
||||
#: ../Doc/library/typing.rst:686
|
||||
msgid ""
|
||||
"A generic version of :class:`dict`. The usage of this type is as follows::"
|
||||
"A generic version of :class:`dict`. Useful for annotating return types. To "
|
||||
"annotate arguments it is preferred to use an abstract collection type such "
|
||||
"as :class:`Mapping`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:688
|
||||
#: ../Doc/library/typing.rst:690
|
||||
msgid "This type can be used as follows::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:697
|
||||
msgid "A generic version of :class:`collections.defaultdict`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:694
|
||||
#: ../Doc/library/typing.rst:703
|
||||
msgid "A generic version of :class:`collections.OrderedDict`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:700
|
||||
#: ../Doc/library/typing.rst:709
|
||||
msgid "A generic version of :class:`collections.Counter`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:706
|
||||
#: ../Doc/library/typing.rst:715
|
||||
msgid "A generic version of :class:`collections.ChainMap`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:712
|
||||
#: ../Doc/library/typing.rst:721
|
||||
msgid ""
|
||||
"A generator can be annotated by the generic type ``Generator[YieldType, "
|
||||
"SendType, ReturnType]``. For example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:721
|
||||
#: ../Doc/library/typing.rst:730
|
||||
msgid ""
|
||||
"Note that unlike many other generics in the typing module, the ``SendType`` "
|
||||
"of :class:`Generator` behaves contravariantly, not covariantly or "
|
||||
"invariantly."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:725
|
||||
#: ../Doc/library/typing.rst:734
|
||||
msgid ""
|
||||
"If your generator will only yield values, set the ``SendType`` and "
|
||||
"``ReturnType`` to ``None``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:733
|
||||
#: ../Doc/library/typing.rst:742
|
||||
msgid ""
|
||||
"Alternatively, annotate your generator as having a return type of either "
|
||||
"``Iterable[YieldType]`` or ``Iterator[YieldType]``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:743
|
||||
#: ../Doc/library/typing.rst:752
|
||||
msgid ""
|
||||
"An async generator can be annotated by the generic type "
|
||||
"``AsyncGenerator[YieldType, SendType]``. For example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:752
|
||||
#: ../Doc/library/typing.rst:761
|
||||
msgid ""
|
||||
"Unlike normal generators, async generators cannot return a value, so there "
|
||||
"is no ``ReturnType`` type parameter. As with :class:`Generator`, the "
|
||||
"``SendType`` behaves contravariantly."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:756
|
||||
#: ../Doc/library/typing.rst:765
|
||||
msgid ""
|
||||
"If your generator will only yield values, set the ``SendType`` to ``None``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:764
|
||||
#: ../Doc/library/typing.rst:773
|
||||
msgid ""
|
||||
"Alternatively, annotate your generator as having a return type of either "
|
||||
"``AsyncIterable[YieldType]`` or ``AsyncIterator[YieldType]``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:776
|
||||
#: ../Doc/library/typing.rst:785
|
||||
msgid ""
|
||||
"``Text`` is an alias for ``str``. It is provided to supply a forward "
|
||||
"compatible path for Python 2 code: in Python 2, ``Text`` is an alias for "
|
||||
"``unicode``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:780
|
||||
#: ../Doc/library/typing.rst:789
|
||||
msgid ""
|
||||
"Use ``Text`` to indicate that a value must contain a unicode string in a "
|
||||
"manner that is compatible with both Python 2 and Python 3::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:792
|
||||
#: ../Doc/library/typing.rst:801
|
||||
msgid ""
|
||||
"Generic type ``IO[AnyStr]`` and its subclasses ``TextIO(IO[str])`` and "
|
||||
"``BinaryIO(IO[bytes])`` represent the types of I/O streams such as returned "
|
||||
"by :func:`open`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:800
|
||||
#: ../Doc/library/typing.rst:809
|
||||
msgid ""
|
||||
"These type aliases correspond to the return types from :func:`re.compile` "
|
||||
"and :func:`re.match`. These types (and the corresponding functions) are "
|
||||
|
@ -670,25 +681,25 @@ msgid ""
|
|||
"``Pattern[bytes]``, ``Match[str]``, or ``Match[bytes]``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:809
|
||||
#: ../Doc/library/typing.rst:818
|
||||
msgid "Typed version of namedtuple."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:817
|
||||
#: ../Doc/library/typing.rst:826
|
||||
msgid "This is equivalent to::"
|
||||
msgstr "C’est équivalent à ::"
|
||||
|
||||
#: ../Doc/library/typing.rst:821
|
||||
#: ../Doc/library/typing.rst:830
|
||||
msgid ""
|
||||
"To give a field a default value, you can assign to it in the class body::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:830
|
||||
#: ../Doc/library/typing.rst:839
|
||||
msgid ""
|
||||
"Fields with a default value must come after any fields without a default."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:832
|
||||
#: ../Doc/library/typing.rst:841
|
||||
msgid ""
|
||||
"The resulting class has two extra attributes: ``_field_types``, giving a "
|
||||
"dict mapping field names to types, and ``_field_defaults``, a dict mapping "
|
||||
|
@ -696,47 +707,47 @@ msgid ""
|
|||
"attribute, which is part of the namedtuple API.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:837
|
||||
#: ../Doc/library/typing.rst:846
|
||||
msgid "``NamedTuple`` subclasses can also have docstrings and methods::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:847
|
||||
#: ../Doc/library/typing.rst:856
|
||||
msgid "Backward-compatible usage::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:851
|
||||
#: ../Doc/library/typing.rst:860
|
||||
msgid "Added support for :pep:`526` variable annotation syntax."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:854
|
||||
#: ../Doc/library/typing.rst:863
|
||||
msgid "Added support for default values, methods, and docstrings."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:859
|
||||
#: ../Doc/library/typing.rst:868
|
||||
msgid ""
|
||||
"A helper function to indicate a distinct types to a typechecker, see :ref:"
|
||||
"`distinct`. At runtime it returns a function that returns its argument. "
|
||||
"Usage::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:870
|
||||
#: ../Doc/library/typing.rst:879
|
||||
msgid "Cast a value to a type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:872
|
||||
#: ../Doc/library/typing.rst:881
|
||||
msgid ""
|
||||
"This returns the value unchanged. To the type checker this signals that the "
|
||||
"return value has the designated type, but at runtime we intentionally don't "
|
||||
"check anything (we want this to be as fast as possible)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:879
|
||||
#: ../Doc/library/typing.rst:888
|
||||
msgid ""
|
||||
"Return a dictionary containing type hints for a function, method, module or "
|
||||
"class object."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:882
|
||||
#: ../Doc/library/typing.rst:891
|
||||
msgid ""
|
||||
"This is often the same as ``obj.__annotations__``. In addition, forward "
|
||||
"references encoded as string literals are handled by evaluating them in "
|
||||
|
@ -746,7 +757,7 @@ msgid ""
|
|||
"merging all the ``__annotations__`` along ``C.__mro__`` in reverse order."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:892
|
||||
#: ../Doc/library/typing.rst:901
|
||||
msgid ""
|
||||
"The ``@overload`` decorator allows describing functions and methods that "
|
||||
"support multiple different combinations of argument types. A series of "
|
||||
|
@ -761,104 +772,104 @@ msgid ""
|
|||
"variable::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:916
|
||||
#: ../Doc/library/typing.rst:925
|
||||
msgid "See :pep:`484` for details and comparison with other typing semantics."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:920
|
||||
#: ../Doc/library/typing.rst:929
|
||||
msgid "Decorator to indicate that annotations are not type hints."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:922
|
||||
#: ../Doc/library/typing.rst:931
|
||||
msgid ""
|
||||
"This works as class or function :term:`decorator`. With a class, it applies "
|
||||
"recursively to all methods defined in that class (but not to methods defined "
|
||||
"in its superclasses or subclasses)."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:926
|
||||
#: ../Doc/library/typing.rst:935
|
||||
msgid "This mutates the function(s) in place."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:930
|
||||
#: ../Doc/library/typing.rst:939
|
||||
msgid "Decorator to give another decorator the :func:`no_type_check` effect."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:932
|
||||
#: ../Doc/library/typing.rst:941
|
||||
msgid ""
|
||||
"This wraps the decorator with something that wraps the decorated function "
|
||||
"in :func:`no_type_check`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:937
|
||||
#: ../Doc/library/typing.rst:946
|
||||
msgid "Special type indicating an unconstrained type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:939
|
||||
#: ../Doc/library/typing.rst:948
|
||||
msgid "Every type is compatible with :data:`Any`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:940
|
||||
#: ../Doc/library/typing.rst:949
|
||||
msgid ":data:`Any` is compatible with every type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:944
|
||||
#: ../Doc/library/typing.rst:953
|
||||
msgid "Special type indicating that a function never returns. For example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:956
|
||||
#: ../Doc/library/typing.rst:965
|
||||
msgid "Union type; ``Union[X, Y]`` means either X or Y."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:958
|
||||
#: ../Doc/library/typing.rst:967
|
||||
msgid "To define a union, use e.g. ``Union[int, str]``. Details:"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:960
|
||||
#: ../Doc/library/typing.rst:969
|
||||
msgid "The arguments must be types and there must be at least one."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:962
|
||||
#: ../Doc/library/typing.rst:971
|
||||
msgid "Unions of unions are flattened, e.g.::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:966
|
||||
#: ../Doc/library/typing.rst:975
|
||||
msgid "Unions of a single argument vanish, e.g.::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:970
|
||||
#: ../Doc/library/typing.rst:979
|
||||
msgid "Redundant arguments are skipped, e.g.::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:974
|
||||
#: ../Doc/library/typing.rst:983
|
||||
msgid "When comparing unions, the argument order is ignored, e.g.::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:978
|
||||
#: ../Doc/library/typing.rst:987
|
||||
msgid "You cannot subclass or instantiate a union."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:980
|
||||
#: ../Doc/library/typing.rst:989
|
||||
msgid "You cannot write ``Union[X][Y]``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:982
|
||||
#: ../Doc/library/typing.rst:991
|
||||
msgid "You can use ``Optional[X]`` as a shorthand for ``Union[X, None]``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:984
|
||||
#: ../Doc/library/typing.rst:993
|
||||
msgid "Don't remove explicit subclasses from unions at runtime."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:989
|
||||
#: ../Doc/library/typing.rst:998
|
||||
msgid "Optional type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:991
|
||||
#: ../Doc/library/typing.rst:1000
|
||||
msgid "``Optional[X]`` is equivalent to ``Union[X, None]``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:993
|
||||
#: ../Doc/library/typing.rst:1002
|
||||
msgid ""
|
||||
"Note that this is not the same concept as an optional argument, which is one "
|
||||
"that has a default. An optional argument with a default does not require "
|
||||
|
@ -866,45 +877,45 @@ msgid ""
|
|||
"optional. For example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1001
|
||||
#: ../Doc/library/typing.rst:1010
|
||||
msgid ""
|
||||
"On the other hand, if an explicit value of ``None`` is allowed, the use of "
|
||||
"``Optional`` is appropriate, whether the argument is optional or not. For "
|
||||
"example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1010
|
||||
#: ../Doc/library/typing.rst:1019
|
||||
msgid ""
|
||||
"Tuple type; ``Tuple[X, Y]`` is the type of a tuple of two items with the "
|
||||
"first item of type X and the second of type Y."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1013
|
||||
#: ../Doc/library/typing.rst:1022
|
||||
msgid ""
|
||||
"Example: ``Tuple[T1, T2]`` is a tuple of two elements corresponding to type "
|
||||
"variables T1 and T2. ``Tuple[int, float, str]`` is a tuple of an int, a "
|
||||
"float and a string."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1017
|
||||
#: ../Doc/library/typing.rst:1026
|
||||
msgid ""
|
||||
"To specify a variable-length tuple of homogeneous type, use literal "
|
||||
"ellipsis, e.g. ``Tuple[int, ...]``. A plain :data:`Tuple` is equivalent to "
|
||||
"``Tuple[Any, ...]``, and in turn to :class:`tuple`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1023
|
||||
#: ../Doc/library/typing.rst:1032
|
||||
msgid "Callable type; ``Callable[[int], str]`` is a function of (int) -> str."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1025
|
||||
#: ../Doc/library/typing.rst:1034
|
||||
msgid ""
|
||||
"The subscription syntax must always be used with exactly two values: the "
|
||||
"argument list and the return type. The argument list must be a list of "
|
||||
"types or an ellipsis; the return type must be a single type."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1030
|
||||
#: ../Doc/library/typing.rst:1039
|
||||
msgid ""
|
||||
"There is no syntax to indicate optional or keyword arguments; such function "
|
||||
"types are rarely used as callback types. ``Callable[..., ReturnType]`` "
|
||||
|
@ -914,22 +925,22 @@ msgid ""
|
|||
"Callable`."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1040
|
||||
#: ../Doc/library/typing.rst:1049
|
||||
msgid "Special type construct to mark class variables."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1042
|
||||
#: ../Doc/library/typing.rst:1051
|
||||
msgid ""
|
||||
"As introduced in :pep:`526`, a variable annotation wrapped in ClassVar "
|
||||
"indicates that a given attribute is intended to be used as a class variable "
|
||||
"and should not be set on instances of that class. Usage::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1050
|
||||
#: ../Doc/library/typing.rst:1059
|
||||
msgid ":data:`ClassVar` accepts only types and cannot be further subscribed."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1052
|
||||
#: ../Doc/library/typing.rst:1061
|
||||
msgid ""
|
||||
":data:`ClassVar` is not a class itself, and should not be used with :func:"
|
||||
"`isinstance` or :func:`issubclass`. :data:`ClassVar` does not change Python "
|
||||
|
@ -937,25 +948,25 @@ msgid ""
|
|||
"example, a type checker might flag the following code as an error::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1066
|
||||
#: ../Doc/library/typing.rst:1075
|
||||
msgid ""
|
||||
"``AnyStr`` is a type variable defined as ``AnyStr = TypeVar('AnyStr', str, "
|
||||
"bytes)``."
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1069
|
||||
#: ../Doc/library/typing.rst:1078
|
||||
msgid ""
|
||||
"It is meant to be used for functions that may accept any kind of string "
|
||||
"without allowing different kinds of strings to mix. For example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1081
|
||||
#: ../Doc/library/typing.rst:1090
|
||||
msgid ""
|
||||
"A special constant that is assumed to be ``True`` by 3rd party static type "
|
||||
"checkers. It is ``False`` at runtime. Usage::"
|
||||
msgstr ""
|
||||
|
||||
#: ../Doc/library/typing.rst:1090
|
||||
#: ../Doc/library/typing.rst:1099
|
||||
msgid ""
|
||||
"Note that the first type annotation must be enclosed in quotes, making it a "
|
||||
"\"forward reference\", to hide the ``expensive_mod`` reference from the "
|
||||
|
|
Loading…
Reference in New Issue
Block a user