python-docs-fr/library/typing.po

1008 lines
40 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2016, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-10-30 10:42+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../Doc/library/typing.rst:2
msgid ":mod:`typing` --- Support for type hints"
msgstr ":mod:`typing` — Prise en charge des annotations de type"
#: ../Doc/library/typing.rst:9
msgid "**Source code:** :source:`Lib/typing.py`"
msgstr "**Code source :** :source:`Lib/typing.py`"
#: ../Doc/library/typing.rst:13
msgid ""
"This module supports type hints as specified by :pep:`484`. The most "
"fundamental support consists of the type :data:`Any`, :data:`Union`, :data:"
"`Tuple`, :data:`Callable`, :class:`TypeVar`, and :class:`Generic`. For full "
"specification please see :pep:`484`. For a simplified introduction to type "
"hints see :pep:`483`."
msgstr ""
#: ../Doc/library/typing.rst:20
msgid ""
"The function below takes and returns a string and is annotated as follows::"
msgstr ""
"La fonction ci-dessous prend et renvoie une chaîne de caractères, et est "
"annotée comme suit ::"
#: ../Doc/library/typing.rst:25
msgid ""
"In the function ``greeting``, the argument ``name`` is expected to be of "
"type :class:`str` and the return type :class:`str`. Subtypes are accepted as "
"arguments."
msgstr ""
"La fonction ``greeting`` s'attend à ce que l'argument ``name`` soit de type :"
"class:`str` et le type de retour :class:`str`. Les sous-types sont acceptés "
"comme arguments."
#: ../Doc/library/typing.rst:30
msgid "Type aliases"
msgstr "Alias de type"
#: ../Doc/library/typing.rst:32
msgid ""
"A type alias is defined by assigning the type to the alias. In this example, "
"``Vector`` and ``List[float]`` will be treated as interchangeable synonyms::"
msgstr ""
#: ../Doc/library/typing.rst:44
msgid ""
"Type aliases are useful for simplifying complex type signatures. For "
"example::"
msgstr ""
"Les alias de type sont utiles pour simplifier les signatures complexes. Par "
"exemple ::"
#: ../Doc/library/typing.rst:62
msgid ""
"Note that ``None`` as a type hint is a special case and is replaced by "
"``type(None)``."
msgstr ""
"Notez que ``None`` comme indication de type est un cas particulier et est "
"remplacé par ``type(None)``."
#: ../Doc/library/typing.rst:68
msgid "NewType"
msgstr "*NewType*"
#: ../Doc/library/typing.rst:70
msgid "Use the :func:`NewType` helper function to create distinct types::"
msgstr ""
"Aidez-vous de la fonction :func:`NewType` pour créer des types distincts ::"
#: ../Doc/library/typing.rst:77
msgid ""
"The static type checker will treat the new type as if it were a subclass of "
"the original type. This is useful in helping catch logical errors::"
msgstr ""
"Le vérificateur de type statique traite le nouveau type comme s'il "
"s'agissait d'une sous-classe du type original. C'est utile pour aider à "
"détecter les erreurs logiques ::"
#: ../Doc/library/typing.rst:89
msgid ""
"You may still perform all ``int`` operations on a variable of type "
"``UserId``, but the result will always be of type ``int``. This lets you "
"pass in a ``UserId`` wherever an ``int`` might be expected, but will prevent "
"you from accidentally creating a ``UserId`` in an invalid way::"
msgstr ""
"Vous pouvez toujours effectuer toutes les opérations applicables à un entier "
"(type ``int``) sur une variable de type ``UserId``, mais le résultat sera "
"toujours de type ``int``. Ceci vous permet de passer un ``UserId`` partout "
"où un ``int`` est attendu, mais vous empêche de créer accidentellement un "
"``UserId`` d'une manière invalide ::"
#: ../Doc/library/typing.rst:97
msgid ""
"Note that these checks are enforced only by the static type checker. At "
"runtime the statement ``Derived = NewType('Derived', Base)`` will make "
"``Derived`` a function that immediately returns whatever parameter you pass "
"it. That means the expression ``Derived(some_value)`` does not create a new "
"class or introduce any overhead beyond that of a regular function call."
msgstr ""
#: ../Doc/library/typing.rst:103
msgid ""
"More precisely, the expression ``some_value is Derived(some_value)`` is "
"always true at runtime."
msgstr ""
"Plus précisément, l'expression ``some_value is Derived(some_value)`` est "
"toujours vraie au moment de l'exécution."
#: ../Doc/library/typing.rst:106
msgid ""
"This also means that it is not possible to create a subtype of ``Derived`` "
"since it is an identity function at runtime, not an actual type. Similarly, "
"it is not possible to create another :func:`NewType` based on a ``Derived`` "
"type::"
msgstr ""
#: ../Doc/library/typing.rst:120
msgid "See :pep:`484` for more details."
msgstr "Voir la :pep:`484` pour plus de détails."
#: ../Doc/library/typing.rst:124
msgid ""
"Recall that the use of a type alias declares two types to be *equivalent* to "
"one another. Doing ``Alias = Original`` will make the static type checker "
"treat ``Alias`` as being *exactly equivalent* to ``Original`` in all cases. "
"This is useful when you want to simplify complex type signatures."
msgstr ""
"Rappelons que l'utilisation d'un alias de type déclare que deux types sont "
"*équivalents* l'un à l'autre. Écrire ``Alias = Original`` fait que le "
"vérificateur de type statique traite ``Alias`` comme étant *exactement "
"équivalent* à ``Original`` dans tous les cas. C'est utile lorsque vous "
"voulez simplifier des signatures complexes."
#: ../Doc/library/typing.rst:129
msgid ""
"In contrast, ``NewType`` declares one type to be a *subtype* of another. "
"Doing ``Derived = NewType('Derived', Original)`` will make the static type "
"checker treat ``Derived`` as a *subclass* of ``Original``, which means a "
"value of type ``Original`` cannot be used in places where a value of type "
"``Derived`` is expected. This is useful when you want to prevent logic "
"errors with minimal runtime cost."
msgstr ""
"En revanche, ``NewType`` déclare qu'un type est un *sous-type* d'un autre. "
"Écrire ``Derived = NewType('Derived', Original)`` fait en sorte que le "
"vérificateur de type statique traite ``Derived`` comme une *sous-classe* de "
"``Original``, ce qui signifie qu'une valeur de type ``Original`` ne peut "
"être utilisée dans les endroits où une valeur de type ``Derived`` est "
"prévue. C'est utile lorsque vous voulez éviter les erreurs logiques avec un "
"coût d'exécution minimal."
#: ../Doc/library/typing.rst:137
msgid "Callable"
msgstr "Appelable"
#: ../Doc/library/typing.rst:139
msgid ""
"Frameworks expecting callback functions of specific signatures might be type "
"hinted using ``Callable[[Arg1Type, Arg2Type], ReturnType]``."
msgstr ""
"Les cadriciels (*frameworks* en anglais) qui attendent des fonctions de "
"rappel ayant des signatures spécifiques peuvent être typés en utilisant "
"``Callable[[Arg1Type, Arg2Type], ReturnType]``."
#: ../Doc/library/typing.rst:142
msgid "For example::"
msgstr "Par exemple ::"
#: ../Doc/library/typing.rst:153
msgid ""
"It is possible to declare the return type of a callable without specifying "
"the call signature by substituting a literal ellipsis for the list of "
"arguments in the type hint: ``Callable[..., ReturnType]``."
msgstr ""
"Il est possible de déclarer le type de retour d'un appelable sans spécifier "
"la signature de l'appel en indiquant des points de suspension à la liste des "
"arguments dans l'indice de type : ``Callable[..., ReturnType]``."
#: ../Doc/library/typing.rst:158
msgid "Generics"
msgstr "Génériques"
#: ../Doc/library/typing.rst:160
msgid ""
"Since type information about objects kept in containers cannot be statically "
"inferred in a generic way, abstract base classes have been extended to "
"support subscription to denote expected types for container elements."
msgstr ""
"Comme les informations de type sur les objets conservés dans des conteneurs "
"ne peuvent pas être déduites statiquement de manière générique, les classes "
"de base abstraites ont été étendues pour prendre en charge la sélection "
"(*subscription* en anglais) et indiquer les types attendus pour les éléments "
"de conteneur."
#: ../Doc/library/typing.rst:171
msgid ""
"Generics can be parametrized by using a new factory available in typing "
"called :class:`TypeVar`."
msgstr ""
#: ../Doc/library/typing.rst:185
msgid "User-defined generic types"
msgstr "Types génériques définis par l'utilisateur"
#: ../Doc/library/typing.rst:187
msgid "A user-defined class can be defined as a generic class."
msgstr ""
"Une classe définie par l'utilisateur peut être définie comme une classe "
"générique."
#: ../Doc/library/typing.rst:213
msgid ""
"``Generic[T]`` as a base class defines that the class ``LoggedVar`` takes a "
"single type parameter ``T`` . This also makes ``T`` valid as a type within "
"the class body."
msgstr ""
"``Generic[T]`` en tant que classe de base définit que la classe "
"``LoggedVar`` prend un paramètre de type unique ``T``. Ceci rend également "
"``T`` valide en tant que type dans le corps de la classe."
#: ../Doc/library/typing.rst:217
msgid ""
"The :class:`Generic` base class uses a metaclass that defines :meth:"
"`__getitem__` so that ``LoggedVar[t]`` is valid as a type::"
msgstr ""
#: ../Doc/library/typing.rst:226
msgid ""
"A generic type can have any number of type variables, and type variables may "
"be constrained::"
msgstr ""
"Un type générique peut avoir un nombre quelconque de variables de type et "
"vous pouvez fixer des contraintes sur les variables de type ::"
#: ../Doc/library/typing.rst:238
msgid ""
"Each type variable argument to :class:`Generic` must be distinct. This is "
"thus invalid::"
msgstr ""
"Chaque argument de variable de type :class:`Generic` doit être distinct. "
"Ceci n'est donc pas valable ::"
#: ../Doc/library/typing.rst:249
msgid "You can use multiple inheritance with :class:`Generic`::"
msgstr "Vous pouvez utiliser l'héritage multiple avec :class:`Generic` ::"
#: ../Doc/library/typing.rst:258
msgid ""
"When inheriting from generic classes, some type variables could be fixed::"
msgstr ""
"Lors de l'héritage de classes génériques, certaines variables de type "
"peuvent être corrigées ::"
#: ../Doc/library/typing.rst:267
msgid "In this case ``MyDict`` has a single parameter, ``T``."
msgstr "Dans ce cas, ``MyDict`` a un seul paramètre, ``T``."
#: ../Doc/library/typing.rst:269
msgid ""
"Using a generic class without specifying type parameters assumes :data:`Any` "
"for each position. In the following example, ``MyIterable`` is not generic "
"but implicitly inherits from ``Iterable[Any]``::"
msgstr ""
"L'utilisation d'une classe générique sans spécifier de paramètres de type "
"suppose :data:`Any` pour chaque position. Dans l'exemple suivant, "
"``MyIterable`` n'est pas générique mais hérite implicitement de "
"``Iterable[Any]`` ::"
#: ../Doc/library/typing.rst:277
msgid ""
"The metaclass used by :class:`Generic` is a subclass of :class:`abc."
"ABCMeta`. A generic class can be an ABC by including abstract methods or "
"properties, and generic classes can also have ABCs as base classes without a "
"metaclass conflict. Generic metaclasses are not supported. The outcome of "
"parameterizing generics is cached, and most types in the typing module are "
"hashable and comparable for equality."
msgstr ""
#: ../Doc/library/typing.rst:286
msgid "The :data:`Any` type"
msgstr "Le type :data:`Any`"
#: ../Doc/library/typing.rst:288
msgid ""
"A special kind of type is :data:`Any`. A static type checker will treat "
"every type as being compatible with :data:`Any` and :data:`Any` as being "
"compatible with every type."
msgstr ""
"Un type particulier est :data:`Any`. Un vérificateur de type statique traite "
"chaque type comme étant compatible avec :data:`Any` et :data:`Any` comme "
"étant compatible avec chaque type."
#: ../Doc/library/typing.rst:292
msgid ""
"This means that it is possible to perform any operation or method call on a "
"value of type on :data:`Any` and assign it to any variable::"
msgstr ""
#: ../Doc/library/typing.rst:310
msgid ""
"Notice that no typechecking is performed when assigning a value of type :"
"data:`Any` to a more precise type. For example, the static type checker did "
"not report an error when assigning ``a`` to ``s`` even though ``s`` was "
"declared to be of type :class:`str` and receives an :class:`int` value at "
"runtime!"
msgstr ""
"Notez qu'aucun contrôle de typage n'est effectué lors de l'affectation d'une "
"valeur de type :data:`Any` à un type plus précis. Par exemple, le "
"vérificateur de type statique ne signale pas d'erreur lors de l'affectation "
"de ``a`` à ``s`` même si ``s`` était déclaré être de type :class:`str` et "
"reçoit une valeur :class:`int` au moment de son exécution !"
#: ../Doc/library/typing.rst:316
msgid ""
"Furthermore, all functions without a return type or parameter types will "
"implicitly default to using :data:`Any`::"
msgstr ""
"De plus, toutes les fonctions sans type de retour ni type de paramètre sont "
"considérées comme utilisant :data:`Any` implicitement par défaut ::"
#: ../Doc/library/typing.rst:329
msgid ""
"This behavior allows :data:`Any` to be used as an *escape hatch* when you "
"need to mix dynamically and statically typed code."
msgstr ""
"Ce comportement permet à :data:`Any` d'être utilisé comme succédané lorsque "
"vous avez besoin de mélanger du code typé dynamiquement et statiquement."
#: ../Doc/library/typing.rst:332
msgid ""
"Contrast the behavior of :data:`Any` with the behavior of :class:`object`. "
"Similar to :data:`Any`, every type is a subtype of :class:`object`. However, "
"unlike :data:`Any`, the reverse is not true: :class:`object` is *not* a "
"subtype of every other type."
msgstr ""
"Comparons le comportement de :data:`Any` avec celui de :class:`object`. De "
"la même manière que pour :data:`Any`, chaque type est un sous-type de :class:"
"`object`. Cependant, contrairement à :data:`Any`, l'inverse n'est pas "
"vrai : :class:`object` n'est *pas* un sous-type de chaque autre type."
#: ../Doc/library/typing.rst:337
msgid ""
"That means when the type of a value is :class:`object`, a type checker will "
"reject almost all operations on it, and assigning it to a variable (or using "
"it as a return value) of a more specialized type is a type error. For "
"example::"
msgstr ""
"Cela signifie que lorsque le type d'une valeur est :class:`object`, un "
"vérificateur de type rejette presque toutes les opérations sur celle-ci, et "
"l'affecter à une variable (ou l'utiliser comme une valeur de retour) d'un "
"type plus spécialisé est une erreur de typage. Par exemple ::"
#: ../Doc/library/typing.rst:359
msgid ""
"Use :class:`object` to indicate that a value could be any type in a typesafe "
"manner. Use :data:`Any` to indicate that a value is dynamically typed."
msgstr ""
"Utilisez :class:`object` pour indiquer qu'une valeur peut être de n'importe "
"quel type de manière sûre. Utiliser :data:`Any` pour indiquer qu'une valeur "
"est typée dynamiquement."
#: ../Doc/library/typing.rst:363
msgid "Classes, functions, and decorators"
msgstr ""
#: ../Doc/library/typing.rst:365
msgid "The module defines the following classes, functions and decorators:"
msgstr ""
#: ../Doc/library/typing.rst:369
msgid "Type variable."
msgstr "Variables de type."
#: ../Doc/library/typing.rst:371 ../Doc/library/typing.rst:672
msgid "Usage::"
msgstr "Utilisation ::"
#: ../Doc/library/typing.rst:376
msgid ""
"Type variables exist primarily for the benefit of static type checkers. "
"They serve as the parameters for generic types as well as for generic "
"function definitions. See class Generic for more information on generic "
"types. Generic functions work as follows::"
msgstr ""
#: ../Doc/library/typing.rst:389
msgid ""
"The latter example's signature is essentially the overloading of ``(str, "
"str) -> str`` and ``(bytes, bytes) -> bytes``. Also note that if the "
"arguments are instances of some subclass of :class:`str`, the return type is "
"still plain :class:`str`."
msgstr ""
"La signature de ce dernier exemple est essentiellement la surcharge de "
"``(str, str) -> str`` et ``(bytes, bytes) -> bytes``. Notez également que si "
"les arguments sont des instances d'une sous-classe de la classe :class:"
"`str`, le type de retour est toujours la classe :class:`str`."
#: ../Doc/library/typing.rst:394
msgid ""
"At runtime, ``isinstance(x, T)`` will raise :exc:`TypeError`. In general, :"
"func:`isinstance` and :func:`issubclass` should not be used with types."
msgstr ""
"Au moment de l'exécution, ``isinstance(x, T)`` va lever :exc:`TypeError`. En "
"général, :func:`isinstance` et :func:`issubclass` ne devraient pas être "
"utilisés avec les types."
#: ../Doc/library/typing.rst:397
msgid ""
"Type variables may be marked covariant or contravariant by passing "
"``covariant=True`` or ``contravariant=True``. See :pep:`484` for more "
"details. By default type variables are invariant. Alternatively, a type "
"variable may specify an upper bound using ``bound=<type>``. This means that "
"an actual type substituted (explicitly or implicitly) for the type variable "
"must be a subclass of the boundary type, see :pep:`484`."
msgstr ""
"Les variables de type peuvent être marquées covariantes ou contravariantes "
"en passant ``covariant=True`` ou ``contravariant=True``. Voir la :pep:`484` "
"pour plus de détails. Par défaut, les variables de type sont invariantes. "
"Sinon, une variable de type peut spécifier une limite supérieure en "
"utilisant ``bound=<type>``. Cela signifie qu'un type réel substitué "
"(explicitement ou implicitement) à la variable type doit être une sous-"
"classe du type frontière (*boundary* en anglais), voir la :pep:`484`."
#: ../Doc/library/typing.rst:407
msgid "Abstract base class for generic types."
msgstr "Classe de base abstraite pour les types génériques."
#: ../Doc/library/typing.rst:409
msgid ""
"A generic type is typically declared by inheriting from an instantiation of "
"this class with one or more type variables. For example, a generic mapping "
"type might be defined as::"
msgstr ""
"Un type générique est généralement déclaré en héritant d'une instanciation "
"de cette classe avec une ou plusieurs variables de type. Par exemple, un "
"type de correspondance générique peut être défini comme suit ::"
#: ../Doc/library/typing.rst:418
msgid "This class can then be used as follows::"
msgstr "Cette classe peut alors être utilisée comme suit ::"
#: ../Doc/library/typing.rst:431
msgid ""
"A variable annotated with ``C`` may accept a value of type ``C``. In "
"contrast, a variable annotated with ``Type[C]`` may accept values that are "
"classes themselves -- specifically, it will accept the *class object* of "
"``C``. For example::"
msgstr ""
"Une variable annotée de ``C`` peut accepter une valeur de type ``C``. En "
"revanche, une variable annotée avec ``Type[C]`` peut accepter des valeurs "
"qui sont elles-mêmes des classes — plus précisément, elle accepte l'objet "
"*class* de ``C``. Par exemple ::"
#: ../Doc/library/typing.rst:440
msgid "Note that ``Type[C]`` is covariant::"
msgstr "Notez que ``Type[C]`` est covariant ::"
#: ../Doc/library/typing.rst:452
msgid ""
"The fact that ``Type[C]`` is covariant implies that all subclasses of ``C`` "
"should implement the same constructor signature and class method signatures "
"as ``C``. The type checker should flag violations of this, but should also "
"allow constructor calls in subclasses that match the constructor calls in "
"the indicated base class. How the type checker is required to handle this "
"particular case may change in future revisions of :pep:`484`."
msgstr ""
"Le fait que ``Type[C]`` soit covariant implique que toutes les sous-classes "
"de ``C`` doivent implémenter la même signature de constructeur et les "
"signatures de méthode de classe que ``C``. Le vérificateur de type doit "
"signaler les manquements à cette règle. Il doit également autoriser les "
"appels du constructeur dans les sous-classes qui correspondent aux appels du "
"constructeur dans la classe de base indiquée. La façon dont le vérificateur "
"de type est tenu de traiter ce cas particulier peut changer dans les futures "
"révisions de :pep:`484`."
#: ../Doc/library/typing.rst:460
msgid ""
"The only legal parameters for :class:`Type` are classes, unions of classes, "
"and :data:`Any`. For example::"
msgstr ""
#: ../Doc/library/typing.rst:465
msgid ""
"``Type[Any]`` is equivalent to ``Type`` which in turn is equivalent to "
"``type``, which is the root of Python's metaclass hierarchy."
msgstr ""
"``Type[Any]`` est équivalent à ``Type`` qui à son tour est équivalent à "
"``type``, qui est la racine de la hiérarchie des métaclasses de Python."
#: ../Doc/library/typing.rst:470
msgid "A generic version of :class:`collections.abc.Iterable`."
msgstr "Une version générique de :class:`collections.abc.Iterable`."
#: ../Doc/library/typing.rst:474
msgid "A generic version of :class:`collections.abc.Iterator`."
msgstr "Une version générique de :class:`collections.abc.Iterator`."
#: ../Doc/library/typing.rst:478
msgid "A generic version of :class:`collections.abc.Reversible`."
msgstr "Une version générique de :class:`collections.abc.Reversible`."
#: ../Doc/library/typing.rst:482
msgid "An ABC with one abstract method ``__int__``."
msgstr "Une ABC avec une méthode abstraite ``__int__``."
#: ../Doc/library/typing.rst:486
msgid "An ABC with one abstract method ``__float__``."
msgstr "Une ABC avec une méthode abstraite ``__float__``."
#: ../Doc/library/typing.rst:490
msgid ""
"An ABC with one abstract method ``__abs__`` that is covariant in its return "
"type."
msgstr ""
"Une ABC avec une méthode abstraite ``__abs__`` qui est covariante dans son "
"type de retour."
#: ../Doc/library/typing.rst:495
msgid ""
"An ABC with one abstract method ``__round__`` that is covariant in its "
"return type."
msgstr ""
"Une ABC avec une méthode abstraite ``__round__`` qui est covariante dans son "
"type de retour."
#: ../Doc/library/typing.rst:500
msgid "A generic version of :class:`collections.abc.Container`."
msgstr "Une version générique de :class:`collections.abc.Container`."
#: ../Doc/library/typing.rst:504
msgid "An alias to :class:`collections.abc.Hashable`"
msgstr "Un alias pour :class:`collections.abc.Hashable`"
#: ../Doc/library/typing.rst:508
msgid "An alias to :class:`collections.abc.Sized`"
msgstr "Un alias pour :class:`collections.abc.Sized`"
#: ../Doc/library/typing.rst:512
msgid "A generic version of :class:`collections.abc.Set`."
msgstr "Une version générique de :class:`collections.abc.Set`."
#: ../Doc/library/typing.rst:516
msgid "A generic version of :class:`collections.abc.MutableSet`."
msgstr "Une version générique de :class:`collections.abc.MutableSet`."
#: ../Doc/library/typing.rst:520
msgid "A generic version of :class:`collections.abc.Mapping`."
msgstr ""
#: ../Doc/library/typing.rst:524
msgid "A generic version of :class:`collections.abc.MutableMapping`."
msgstr "Une version générique de :class:`collections.abc.MutableMapping`."
#: ../Doc/library/typing.rst:528
msgid "A generic version of :class:`collections.abc.Sequence`."
msgstr "Une version générique de :class:`collections.abc.Sequence`."
#: ../Doc/library/typing.rst:532
msgid "A generic version of :class:`collections.abc.MutableSequence`."
msgstr "Une version générique de :class:`collections.abc.MutableSequence`."
#: ../Doc/library/typing.rst:536
msgid "A generic version of :class:`collections.abc.ByteString`."
msgstr "Une version générique de :class:`collections.abc.ByteString`."
#: ../Doc/library/typing.rst:538
msgid ""
"This type represents the types :class:`bytes`, :class:`bytearray`, and :"
"class:`memoryview`."
msgstr ""
#: ../Doc/library/typing.rst:541
msgid ""
"As a shorthand for this type, :class:`bytes` can be used to annotate "
"arguments of any of the types mentioned above."
msgstr ""
"Comme abréviation pour ce type, :class:`bytes` peut être utilisé pour "
"annoter des arguments de n'importe quel type mentionné ci-dessus."
#: ../Doc/library/typing.rst:546
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`."
msgstr ""
#: ../Doc/library/typing.rst:551
msgid "This type may be used as follows::"
msgstr "Ce type peut être utilisé comme suit ::"
#: ../Doc/library/typing.rst:563
msgid "A generic version of :class:`builtins.set <set>`."
msgstr ""
#: ../Doc/library/typing.rst:567
msgid "A generic version of :class:`collections.abc.MappingView`."
msgstr "Une version générique de :class:`collections.abc.MappingView`."
#: ../Doc/library/typing.rst:571
msgid "A generic version of :class:`collections.abc.KeysView`."
msgstr "Une version générique de :class:`collections.abc.KeysView`."
#: ../Doc/library/typing.rst:575
msgid "A generic version of :class:`collections.abc.ItemsView`."
msgstr "Une version générique de :class:`collections.abc.ItemsView`."
#: ../Doc/library/typing.rst:579
msgid "A generic version of :class:`collections.abc.ValuesView`."
msgstr "Une version générique de :class:`collections.abc.ValuesView`."
#: ../Doc/library/typing.rst:583
msgid "A generic version of :class:`collections.abc.Awaitable`."
msgstr "Une version générique de :class:`collections.abc.Awaitable`."
#: ../Doc/library/typing.rst:587
msgid "A generic version of :class:`collections.abc.AsyncIterable`."
msgstr "Une version générique de :class:`collections.abc.AsyncIterable`."
#: ../Doc/library/typing.rst:591
msgid "A generic version of :class:`collections.abc.AsyncIterator`."
msgstr "Une version générique de :class:`collections.abc.AsyncIterator`."
#: ../Doc/library/typing.rst:595
msgid ""
"A generic version of :class:`dict`. The usage of this type is as follows::"
msgstr ""
#: ../Doc/library/typing.rst:603
msgid "A generic version of :class:`collections.defaultdict`"
msgstr ""
#: ../Doc/library/typing.rst:607
msgid ""
"A generator can be annotated by the generic type ``Generator[YieldType, "
"SendType, ReturnType]``. For example::"
msgstr ""
"Un générateur peut être annoté par le type générique ``Generator[YieldType, "
"SendType, ReturnType]``. Par exemple ::"
#: ../Doc/library/typing.rst:616
msgid ""
"Note that unlike many other generics in the typing module, the ``SendType`` "
"of :class:`Generator` behaves contravariantly, not covariantly or "
"invariantly."
msgstr ""
"Notez que contrairement à beaucoup d'autres génériques dans le module "
"*typing*, le ``SendType`` de :class:`Generator` se comporte de manière "
"contravariante, pas de manière covariante ou invariante."
#: ../Doc/library/typing.rst:620
msgid ""
"If your generator will only yield values, set the ``SendType`` and "
"``ReturnType`` to ``None``::"
msgstr ""
"Si votre générateur ne donne que des valeurs, réglez les paramètres "
"``SendType`` et ``ReturnType`` sur ``None`` ::"
#: ../Doc/library/typing.rst:628
msgid ""
"Alternatively, annotate your generator as having a return type of either "
"``Iterable[YieldType]`` or ``Iterator[YieldType]``::"
msgstr ""
"Alternativement, annotez votre générateur comme ayant un type de retour soit "
"``Iterable[YieldType]`` ou ``Iterator[YieldType]`` ::"
#: ../Doc/library/typing.rst:638
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 ""
"``Text`` est un alias pour ``str``. Il est fourni pour obtenir une "
"compatibilité ascendante du code Python 2 : en Python 2, ``Text`` est un "
"alias pour ``unicode``."
#: ../Doc/library/typing.rst:642
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 ""
"Utilisez ``Text`` pour indiquer qu'une valeur doit contenir une chaîne "
"Unicode d'une manière compatible avec Python 2 et Python 3 ::"
#: ../Doc/library/typing.rst:650
msgid "Wrapper namespace for I/O stream types."
msgstr ""
#: ../Doc/library/typing.rst:652
msgid ""
"This defines the generic type ``IO[AnyStr]`` and aliases ``TextIO`` and "
"``BinaryIO`` for respectively ``IO[str]`` and ``IO[bytes]``. These "
"representing the types of I/O streams such as returned by :func:`open`."
msgstr ""
#: ../Doc/library/typing.rst:659
msgid "Wrapper namespace for regular expression matching types."
msgstr ""
#: ../Doc/library/typing.rst:661
msgid ""
"This defines the type aliases ``Pattern`` and ``Match`` which correspond to "
"the return types from :func:`re.compile` and :func:`re.match`. These types "
"(and the corresponding functions) are generic in ``AnyStr`` and can be made "
"specific by writing ``Pattern[str]``, ``Pattern[bytes]``, ``Match[str]``, or "
"``Match[bytes]``."
msgstr ""
#: ../Doc/library/typing.rst:670
msgid "Typed version of namedtuple."
msgstr ""
#: ../Doc/library/typing.rst:676
msgid "This is equivalent to::"
msgstr "Cest équivalent à ::"
#: ../Doc/library/typing.rst:680
msgid ""
"The resulting class has one extra attribute: _field_types, giving a dict "
"mapping field names to types. (The field names are in the _fields "
"attribute, which is part of the namedtuple API.)"
msgstr ""
#: ../Doc/library/typing.rst:687
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:696
msgid "Cast a value to a type."
msgstr "Convertit une valeur en un type."
#: ../Doc/library/typing.rst:698
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 ""
"Ceci renvoie la valeur inchangée. Pour le vérificateur de type, cela "
"signifie que la valeur de retour a le type désigné mais, à l'exécution, "
"intentionnellement, rien n'est vérifié (afin que cela soit aussi rapide que "
"possible)."
#: ../Doc/library/typing.rst:705
msgid "Return type hints for a function or method object."
msgstr ""
#: ../Doc/library/typing.rst:707
msgid ""
"This is often the same as ``obj.__annotations__``, but it handles forward "
"references encoded as string literals, and if necessary adds ``Optional[t]`` "
"if a default value equal to ``None`` is set."
msgstr ""
#: ../Doc/library/typing.rst:713
msgid ""
"The ``@overload`` decorator allows describing functions and methods that "
"support multiple different combinations of argument types. A series of "
"``@overload``-decorated definitions must be followed by exactly one non-"
"``@overload``-decorated definition (for the same function/method). The "
"``@overload``-decorated definitions are for the benefit of the type checker "
"only, since they will be overwritten by the non-``@overload``-decorated "
"definition, while the latter is used at runtime but should be ignored by a "
"type checker. At runtime, calling a ``@overload``-decorated function "
"directly will raise ``NotImplementedError``. An example of overload that "
"gives a more precise type than can be expressed using a union or a type "
"variable::"
msgstr ""
#: ../Doc/library/typing.rst:737
msgid "See :pep:`484` for details and comparison with other typing semantics."
msgstr ""
"Voir la :pep:`484` pour plus de détails et la comparaison avec d'autres "
"sémantiques de typage."
#: ../Doc/library/typing.rst:741
msgid "Decorator to indicate that annotations are not type hints."
msgstr ""
"Décorateur pour indiquer que les annotations ne sont pas des indications de "
"type."
#: ../Doc/library/typing.rst:743
msgid ""
"The argument must be a class or function; if it is 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:747
msgid "This mutates the function(s) in place."
msgstr "Cela fait muter la ou les fonctions en place."
#: ../Doc/library/typing.rst:751
msgid "Decorator to give another decorator the :func:`no_type_check` effect."
msgstr ""
"Décorateur pour donner à un autre décorateur l'effet :func:`no_type_check`."
#: ../Doc/library/typing.rst:753
msgid ""
"This wraps the decorator with something that wraps the decorated function "
"in :func:`no_type_check`."
msgstr ""
"Ceci enveloppe le décorateur avec quelque chose qui enveloppe la fonction "
"décorée dans :func:`no_type_check`."
#: ../Doc/library/typing.rst:758
msgid "Special type indicating an unconstrained type."
msgstr "Type spécial indiquant un type non contraint."
#: ../Doc/library/typing.rst:760
msgid "Every type is compatible with :data:`Any`."
msgstr "Chaque type est compatible avec :data:`Any`."
#: ../Doc/library/typing.rst:761
msgid ":data:`Any` is compatible with every type."
msgstr ":data:`Any` est compatible avec tous les types."
#: ../Doc/library/typing.rst:765
msgid "Union type; ``Union[X, Y]`` means either X or Y."
msgstr "Type « union » ; ``Union[X, Y]`` signifie X ou Y."
#: ../Doc/library/typing.rst:767
msgid "To define a union, use e.g. ``Union[int, str]``. Details:"
msgstr ""
"Pour définir une union, utilisez par exemple ``Union[int, str]``. Détail :"
#: ../Doc/library/typing.rst:769
msgid "The arguments must be types and there must be at least one."
msgstr ""
"Les arguments doivent être des types et il doit y en avoir au moins un."
#: ../Doc/library/typing.rst:771
msgid "Unions of unions are flattened, e.g.::"
msgstr "Les unions d'unions sont aplanies, par exemple ::"
#: ../Doc/library/typing.rst:775
msgid "Unions of a single argument vanish, e.g.::"
msgstr "Les unions d'un seul argument disparaissent, par exemple ::"
#: ../Doc/library/typing.rst:779
msgid "Redundant arguments are skipped, e.g.::"
msgstr "Les arguments redondants sont ignorés, par exemple ::"
#: ../Doc/library/typing.rst:783
msgid "When comparing unions, the argument order is ignored, e.g.::"
msgstr ""
"Lors de la comparaison d'unions, l'ordre des arguments est ignoré, par "
"exemple ::"
#: ../Doc/library/typing.rst:787
msgid ""
"When a class and its subclass are present, the former is skipped, e.g.::"
msgstr ""
#: ../Doc/library/typing.rst:791
msgid "You cannot subclass or instantiate a union."
msgstr "Vous ne pouvez pas sous-classer ou instancier une union."
#: ../Doc/library/typing.rst:793
msgid "You cannot write ``Union[X][Y]``."
msgstr "Vous ne pouvez pas écrire ``Union[X][Y]``."
#: ../Doc/library/typing.rst:795
msgid "You can use ``Optional[X]`` as a shorthand for ``Union[X, None]``."
msgstr ""
"Vous pouvez utiliser l'abréviation ``Optional[X]`` pour ``Union[X, None]``."
#: ../Doc/library/typing.rst:799
msgid "Optional type."
msgstr "Type « optionnel »."
#: ../Doc/library/typing.rst:801
msgid "``Optional[X]`` is equivalent to ``Union[X, None]``."
msgstr "``Optional[X]`` équivaut à ``Union[X, None]``."
#: ../Doc/library/typing.rst:803
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 needn't use the "
"``Optional`` qualifier on its type annotation (although it is inferred if "
"the default is ``None``). A mandatory argument may still have an "
"``Optional`` type if an explicit value of ``None`` is allowed."
msgstr ""
#: ../Doc/library/typing.rst:812
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:815
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 ""
"Exemple : ``Tuple[T1, T2]`` est une paire correspondant aux variables de "
"type ``T1`` et ``T2``. ``Tuple[int, float, str]`` est un triplet composé "
"d'un entier, d'un flottant et d'une chaîne de caractères."
#: ../Doc/library/typing.rst:819
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 :data:`tuple`."
msgstr ""
#: ../Doc/library/typing.rst:825
msgid "Callable type; ``Callable[[int], str]`` is a function of (int) -> str."
msgstr ""
"Type Appelable. ``Callable[[int], str]`` est une fonction de type ``(int) -> "
"str``."
#: ../Doc/library/typing.rst:827
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; the return type must be a single type."
msgstr ""
#: ../Doc/library/typing.rst:831
msgid ""
"There is no syntax to indicate optional or keyword arguments; such function "
"types are rarely used as callback types. ``Callable[..., ReturnType]`` "
"(literal ellipsis) can be used to type hint a callable taking any number of "
"arguments and returning ``ReturnType``. A plain :data:`Callable` is "
"equivalent to ``Callable[..., Any]``, and in turn to :class:`collections.abc."
"Callable`."
msgstr ""
"Il n'y a pas de syntaxe pour indiquer les arguments optionnels ou les "
"arguments par mots-clés ; de tels types de fonctions sont rarement utilisés "
"comme types de rappel. ``Callable[..., ReturnType]`` (ellipse) peut être "
"utilisé pour annoter le type d'un appelable, prenant un nombre quelconque "
"d'arguments et renvoyant ``ReturnType``. Un simple :data:`Callable` est "
"équivalent à ``Callable[..., Any]`` et, à son tour, à :class:`collections."
"abc.Callable`."
#: ../Doc/library/typing.rst:841
msgid "Special type construct to mark class variables."
msgstr ""
"Construction de type particulière pour indiquer les variables de classe."
#: ../Doc/library/typing.rst:843
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 ""
"Telle qu'introduite dans la :pep:`526`, une annotation de variable "
"enveloppée dans ClassVar indique qu'un attribut donné est destiné à être "
"utilisé comme une variable de classe et ne doit pas être défini sur des "
"instances de cette classe. Utilisation ::"
#: ../Doc/library/typing.rst:851
msgid ":data:`ClassVar` accepts only types and cannot be further subscribed."
msgstr ":data:`ClassVar` n'accepte que les types et ne peut plus être dérivé."
#: ../Doc/library/typing.rst:853
msgid ""
":data:`ClassVar` is not a class itself, and should not be used with :func:"
"`isinstance` or :func:`issubclass`. Note that :data:`ClassVar` does not "
"change Python runtime behavior; it can be used by 3rd party type checkers, "
"so that the following code might flagged as an error by those::"
msgstr ""
#: ../Doc/library/typing.rst:867
msgid ""
"``AnyStr`` is a type variable defined as ``AnyStr = TypeVar('AnyStr', str, "
"bytes)``."
msgstr ""
"``AnyStr`` est une variable de type définie comme ``AnyStr = "
"TypeVar('AnyStr', str, bytes)``."
#: ../Doc/library/typing.rst:870
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 ""
"Cela est destiné à être utilisé pour des fonctions qui peuvent accepter "
"n'importe quel type de chaîne de caractères sans permettre à différents "
"types de chaînes de caractères de se mélanger. Par exemple ::"
#: ../Doc/library/typing.rst:882
msgid ""
"A special constant that is assumed to be ``True`` by 3rd party static type "
"checkers. It is ``False`` at runtime. Usage::"
msgstr ""
"Constante spéciale qui vaut ``True`` pour les vérificateurs de type "
"statiques tiers et ``False`` à l'exécution. Utilisation ::"