forked from AFPy/python-docs-fr
deronnax
142fb63d76
rejouage de #160, qui a été mis en suspens et a maintenant trop de conflits. Co-authored-by: Mathieu Dupuy <mathieu.dupuy@gitguardian.com> Reviewed-on: AFPy/python-docs-fr#170 Reviewed-by: Christophe Nanteuil <christophenan@noreply.localhost>
9076 lines
359 KiB
Plaintext
9076 lines
359 KiB
Plaintext
# Copyright (C) 2001-2018, Python Software Foundation
|
||
# For licence information, see README file.
|
||
#
|
||
msgid ""
|
||
msgstr ""
|
||
"Project-Id-Version: Python 3\n"
|
||
"Report-Msgid-Bugs-To: \n"
|
||
"POT-Creation-Date: 2023-07-23 14:38+0200\n"
|
||
"PO-Revision-Date: 2023-07-16 16:03+0200\n"
|
||
"Last-Translator: Loc Cosnier <loc.cosnier@pm.me>\n"
|
||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
||
"Language: fr\n"
|
||
"MIME-Version: 1.0\n"
|
||
"Content-Type: text/plain; charset=UTF-8\n"
|
||
"Content-Transfer-Encoding: 8bit\n"
|
||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||
"X-Generator: Poedit 3.3.1\n"
|
||
|
||
#: library/stdtypes.rst:8
|
||
msgid "Built-in Types"
|
||
msgstr "Types natifs"
|
||
|
||
#: library/stdtypes.rst:10
|
||
msgid ""
|
||
"The following sections describe the standard types that are built into the "
|
||
"interpreter."
|
||
msgstr ""
|
||
"Les sections suivantes décrivent les types standards intégrés à "
|
||
"l'interpréteur."
|
||
|
||
#: library/stdtypes.rst:15
|
||
msgid ""
|
||
"The principal built-in types are numerics, sequences, mappings, classes, "
|
||
"instances and exceptions."
|
||
msgstr ""
|
||
"Les principaux types natifs sont les numériques, les séquences, les "
|
||
"dictionnaires, les classes, les instances et les exceptions."
|
||
|
||
#: library/stdtypes.rst:18
|
||
msgid ""
|
||
"Some collection classes are mutable. The methods that add, subtract, or "
|
||
"rearrange their members in place, and don't return a specific item, never "
|
||
"return the collection instance itself but ``None``."
|
||
msgstr ""
|
||
"Certaines classes de collection sont muables. Les méthodes qui ajoutent, "
|
||
"retirent, ou réorganisent leurs éléments sur place, et qui ne renvoient pas "
|
||
"un élément spécifique, ne renvoient jamais l'instance de la collection elle-"
|
||
"même, mais ``None``."
|
||
|
||
#: library/stdtypes.rst:22
|
||
msgid ""
|
||
"Some operations are supported by several object types; in particular, "
|
||
"practically all objects can be compared for equality, tested for truth "
|
||
"value, and converted to a string (with the :func:`repr` function or the "
|
||
"slightly different :func:`str` function). The latter function is implicitly "
|
||
"used when an object is written by the :func:`print` function."
|
||
msgstr ""
|
||
"Certaines opérations sont prises en charge par plusieurs types d'objets ; en "
|
||
"particulier, pratiquement tous les objets peuvent être comparés en égalité, "
|
||
"testés en véridicité (valeur booléenne) et convertis en une chaîne de "
|
||
"caractères (avec la fonction :func:`repr` ou la fonction légèrement "
|
||
"différente :func:`str`). Cette dernière est implicitement utilisée quand un "
|
||
"objet est affiché par la fonction :func:`print`."
|
||
|
||
#: library/stdtypes.rst:32
|
||
msgid "Truth Value Testing"
|
||
msgstr "Valeurs booléennes"
|
||
|
||
#: library/stdtypes.rst:41
|
||
msgid ""
|
||
"Any object can be tested for truth value, for use in an :keyword:`if` or :"
|
||
"keyword:`while` condition or as operand of the Boolean operations below."
|
||
msgstr ""
|
||
"Tout objet peut être comparé à une valeur booléenne, typiquement dans une "
|
||
"condition :keyword:`if` ou :keyword:`while` ou comme opérande des opérations "
|
||
"booléennes ci-dessous."
|
||
|
||
#: library/stdtypes.rst:46
|
||
msgid ""
|
||
"By default, an object is considered true unless its class defines either a :"
|
||
"meth:`__bool__` method that returns ``False`` or a :meth:`__len__` method "
|
||
"that returns zero, when called with the object. [1]_ Here are most of the "
|
||
"built-in objects considered false:"
|
||
msgstr ""
|
||
"Par défaut, tout objet est considéré vrai à moins que sa classe définisse "
|
||
"soit une méthode :meth:`__bool__` renvoyant ``False`` soit une méthode :meth:"
|
||
"`__len__` renvoyant zéro lorsqu'elle est appelée avec l'objet [1]_. Voici la "
|
||
"majorité des objets natifs considérés comme étant faux :"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:55
|
||
#, fuzzy
|
||
msgid "constants defined to be false: ``None`` and ``False``"
|
||
msgstr "les constantes définies comme étant fausses : ``None`` et ``False`` ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:57
|
||
msgid ""
|
||
"zero of any numeric type: ``0``, ``0.0``, ``0j``, ``Decimal(0)``, "
|
||
"``Fraction(0, 1)``"
|
||
msgstr ""
|
||
"zéro de tout type numérique : ``0``, ``0.0``, ``0j``, ``Decimal(0)``, "
|
||
"``Fraction(0, 1)``"
|
||
|
||
# fin d'énumération
|
||
#: library/stdtypes.rst:60
|
||
msgid ""
|
||
"empty sequences and collections: ``''``, ``()``, ``[]``, ``{}``, ``set()``, "
|
||
"``range(0)``"
|
||
msgstr ""
|
||
"les chaînes et collections vides : ``''``, ``()``, ``[]``, ``{}``, "
|
||
"``set()``, ``range(0)``"
|
||
|
||
#: library/stdtypes.rst:69
|
||
msgid ""
|
||
"Operations and built-in functions that have a Boolean result always return "
|
||
"``0`` or ``False`` for false and ``1`` or ``True`` for true, unless "
|
||
"otherwise stated. (Important exception: the Boolean operations ``or`` and "
|
||
"``and`` always return one of their operands.)"
|
||
msgstr ""
|
||
"Les opérations et fonctions natives dont le résultat est booléen renvoient "
|
||
"toujours ``0`` ou ``False`` pour faux et ``1`` ou ``True`` pour vrai, sauf "
|
||
"indication contraire (exception importante : les opérations booléennes "
|
||
"``or`` et ``and`` renvoient toujours l'une de leurs opérandes)."
|
||
|
||
#: library/stdtypes.rst:78
|
||
msgid "Boolean Operations --- :keyword:`!and`, :keyword:`!or`, :keyword:`!not`"
|
||
msgstr ""
|
||
"Opérations booléennes — :keyword:`!and`, :keyword:`!or`, :keyword:`!not`"
|
||
|
||
#: library/stdtypes.rst:82
|
||
msgid "These are the Boolean operations, ordered by ascending priority:"
|
||
msgstr "Ce sont les opérations booléennes, classées par priorité ascendante :"
|
||
|
||
#: library/stdtypes.rst:143 library/stdtypes.rst:363 library/stdtypes.rst:922
|
||
#: library/stdtypes.rst:1127
|
||
msgid "Operation"
|
||
msgstr "Opération"
|
||
|
||
#: library/stdtypes.rst:275 library/stdtypes.rst:413 library/stdtypes.rst:1127
|
||
msgid "Result"
|
||
msgstr "Résultat"
|
||
|
||
#: library/stdtypes.rst:275 library/stdtypes.rst:922 library/stdtypes.rst:2372
|
||
#: library/stdtypes.rst:3590
|
||
msgid "Notes"
|
||
msgstr "Notes"
|
||
|
||
#: library/stdtypes.rst:87
|
||
msgid "``x or y``"
|
||
msgstr "``x or y``"
|
||
|
||
#: library/stdtypes.rst:87
|
||
msgid "if *x* is true, then *x*, else *y*"
|
||
msgstr "si *x* est faux, alors *x*, sinon *y*"
|
||
|
||
#: library/stdtypes.rst:285 library/stdtypes.rst:927 library/stdtypes.rst:2378
|
||
#: library/stdtypes.rst:3596
|
||
msgid "\\(1)"
|
||
msgstr "\\(1)"
|
||
|
||
#: library/stdtypes.rst:90
|
||
msgid "``x and y``"
|
||
msgstr "``x and y``"
|
||
|
||
#: library/stdtypes.rst:90
|
||
msgid "if *x* is false, then *x*, else *y*"
|
||
msgstr "si *x* est faux, alors *x*, sinon *y*"
|
||
|
||
#: library/stdtypes.rst:288 library/stdtypes.rst:1166 library/stdtypes.rst:2384
|
||
#: library/stdtypes.rst:3602
|
||
msgid "\\(2)"
|
||
msgstr "\\(2)"
|
||
|
||
#: library/stdtypes.rst:93
|
||
msgid "``not x``"
|
||
msgstr "``not x``"
|
||
|
||
#: library/stdtypes.rst:93
|
||
msgid "if *x* is false, then ``True``, else ``False``"
|
||
msgstr "si *x* est faux, alors ``True``, sinon ``False``"
|
||
|
||
#: library/stdtypes.rst:936 library/stdtypes.rst:2386 library/stdtypes.rst:2390
|
||
#: library/stdtypes.rst:3604 library/stdtypes.rst:3608
|
||
#: library/stdtypes.rst:3610
|
||
msgid "\\(3)"
|
||
msgstr "\\(3)"
|
||
|
||
#: library/stdtypes.rst:319 library/stdtypes.rst:973 library/stdtypes.rst:2418
|
||
#: library/stdtypes.rst:3640
|
||
msgid "Notes:"
|
||
msgstr "Notes :"
|
||
|
||
#: library/stdtypes.rst:105
|
||
msgid ""
|
||
"This is a short-circuit operator, so it only evaluates the second argument "
|
||
"if the first one is false."
|
||
msgstr ""
|
||
"C'est un opérateur court-circuit : il n'évalue le deuxième argument que si "
|
||
"le premier est faux."
|
||
|
||
#: library/stdtypes.rst:109
|
||
msgid ""
|
||
"This is a short-circuit operator, so it only evaluates the second argument "
|
||
"if the first one is true."
|
||
msgstr ""
|
||
"C'est un opérateur court-circuit : il n'évalue le deuxième argument que si "
|
||
"le premier est vrai."
|
||
|
||
#: library/stdtypes.rst:113
|
||
msgid ""
|
||
"``not`` has a lower priority than non-Boolean operators, so ``not a == b`` "
|
||
"is interpreted as ``not (a == b)``, and ``a == not b`` is a syntax error."
|
||
msgstr ""
|
||
"``not`` a une priorité inférieure à celle des opérateurs non-booléens, donc "
|
||
"``not a == b`` est interprété comme ``not (a == b)`` et ``a == not b`` est "
|
||
"une erreur de syntaxe."
|
||
|
||
#: library/stdtypes.rst:120
|
||
msgid "Comparisons"
|
||
msgstr "Comparaisons"
|
||
|
||
#: library/stdtypes.rst:134
|
||
msgid ""
|
||
"There are eight comparison operations in Python. They all have the same "
|
||
"priority (which is higher than that of the Boolean operations). Comparisons "
|
||
"can be chained arbitrarily; for example, ``x < y <= z`` is equivalent to ``x "
|
||
"< y and y <= z``, except that *y* is evaluated only once (but in both cases "
|
||
"*z* is not evaluated at all when ``x < y`` is found to be false)."
|
||
msgstr ""
|
||
"Il y a huit opérations de comparaison en Python. Elles ont toutes la même "
|
||
"priorité (qui est supérieure à celle des opérations booléennes). Les "
|
||
"comparaisons peuvent être enchaînées arbitrairement ; par exemple, ``x < y "
|
||
"<= z`` est équivalent à ``x < y and y <= z``, sauf que *y* n'est évalué "
|
||
"qu'une seule fois (mais dans les deux cas *z* n'est pas évalué du tout quand "
|
||
"``x < y`` est faux)."
|
||
|
||
#: library/stdtypes.rst:140
|
||
msgid "This table summarizes the comparison operations:"
|
||
msgstr "Ce tableau résume les opérations de comparaison :"
|
||
|
||
#: library/stdtypes.rst:2349 library/stdtypes.rst:3567
|
||
#: library/stdtypes.rst:3590
|
||
msgid "Meaning"
|
||
msgstr "Signification"
|
||
|
||
#: library/stdtypes.rst:145
|
||
msgid "``<``"
|
||
msgstr "``<``"
|
||
|
||
#: library/stdtypes.rst:145
|
||
msgid "strictly less than"
|
||
msgstr "strictement inférieur"
|
||
|
||
#: library/stdtypes.rst:147
|
||
msgid "``<=``"
|
||
msgstr "``<=``"
|
||
|
||
#: library/stdtypes.rst:147
|
||
msgid "less than or equal"
|
||
msgstr "inférieur ou égal"
|
||
|
||
#: library/stdtypes.rst:149
|
||
msgid "``>``"
|
||
msgstr "``>``"
|
||
|
||
#: library/stdtypes.rst:149
|
||
msgid "strictly greater than"
|
||
msgstr "strictement supérieur"
|
||
|
||
#: library/stdtypes.rst:151
|
||
msgid "``>=``"
|
||
msgstr "``>=``"
|
||
|
||
#: library/stdtypes.rst:151
|
||
msgid "greater than or equal"
|
||
msgstr "supérieur ou égal"
|
||
|
||
#: library/stdtypes.rst:153
|
||
msgid "``==``"
|
||
msgstr "``==``"
|
||
|
||
#: library/stdtypes.rst:153
|
||
msgid "equal"
|
||
msgstr "égal"
|
||
|
||
#: library/stdtypes.rst:155
|
||
msgid "``!=``"
|
||
msgstr "``!=``"
|
||
|
||
#: library/stdtypes.rst:155
|
||
msgid "not equal"
|
||
msgstr "différent"
|
||
|
||
#: library/stdtypes.rst:157
|
||
msgid "``is``"
|
||
msgstr "``is``"
|
||
|
||
#: library/stdtypes.rst:157
|
||
msgid "object identity"
|
||
msgstr "identité d'objet"
|
||
|
||
#: library/stdtypes.rst:159
|
||
msgid "``is not``"
|
||
msgstr "``is not``"
|
||
|
||
#: library/stdtypes.rst:159
|
||
msgid "negated object identity"
|
||
msgstr "contraire de l'identité d'objet"
|
||
|
||
#: library/stdtypes.rst:166
|
||
msgid ""
|
||
"Objects of different types, except different numeric types, never compare "
|
||
"equal. The ``==`` operator is always defined but for some object types (for "
|
||
"example, class objects) is equivalent to :keyword:`is`. The ``<``, ``<=``, "
|
||
"``>`` and ``>=`` operators are only defined where they make sense; for "
|
||
"example, they raise a :exc:`TypeError` exception when one of the arguments "
|
||
"is a complex number."
|
||
msgstr ""
|
||
"Vous ne pouvez pas tester l'égalité d'objets de types différents, à "
|
||
"l'exception des types numériques entre eux. L'opérateur ``==`` est toujours "
|
||
"défini mais pour certains types d'objets (par exemple, les objets de type "
|
||
"classe), il est équivalent à :keyword:`is`. Les opérateurs ``<``, ``<=``, "
|
||
"``>`` et ``>=`` sont définis seulement quand ils ont un sens. Par exemple, "
|
||
"ils lèvent une exception :exc:`TypeError` lorsque l'un des arguments est un "
|
||
"nombre complexe."
|
||
|
||
#: library/stdtypes.rst:180
|
||
msgid ""
|
||
"Non-identical instances of a class normally compare as non-equal unless the "
|
||
"class defines the :meth:`~object.__eq__` method."
|
||
msgstr ""
|
||
"Des instances différentes d'une classe sont normalement considérées "
|
||
"différentes à moins que la classe ne définisse la méthode :meth:`~object."
|
||
"__eq__`."
|
||
|
||
#: library/stdtypes.rst:183
|
||
msgid ""
|
||
"Instances of a class cannot be ordered with respect to other instances of "
|
||
"the same class, or other types of object, unless the class defines enough of "
|
||
"the methods :meth:`~object.__lt__`, :meth:`~object.__le__`, :meth:`~object."
|
||
"__gt__`, and :meth:`~object.__ge__` (in general, :meth:`~object.__lt__` and :"
|
||
"meth:`~object.__eq__` are sufficient, if you want the conventional meanings "
|
||
"of the comparison operators)."
|
||
msgstr ""
|
||
"Les instances d'une classe ne peuvent pas être ordonnées par rapport à "
|
||
"d'autres instances de la même classe, ou d'autres types d'objets, à moins "
|
||
"que la classe ne définisse suffisamment de méthodes parmi :meth:`~object."
|
||
"__lt__`, :meth:`~object.__le__`, :meth:`~object.__gt__` et :meth:`~object."
|
||
"__ge__` (en général, :meth:`__lt__` et :meth:`__eq__` sont suffisantes, si "
|
||
"vous voulez les significations classiques des opérateurs de comparaison)."
|
||
|
||
#: library/stdtypes.rst:190
|
||
msgid ""
|
||
"The behavior of the :keyword:`is` and :keyword:`is not` operators cannot be "
|
||
"customized; also they can be applied to any two objects and never raise an "
|
||
"exception."
|
||
msgstr ""
|
||
"Le comportement des opérateurs :keyword:`is` et :keyword:`is not` ne peut "
|
||
"pas être personnalisé ; aussi ils peuvent être appliqués à deux objets "
|
||
"quelconques et ne lèvent jamais d'exception."
|
||
|
||
#: library/stdtypes.rst:198
|
||
msgid ""
|
||
"Two more operations with the same syntactic priority, :keyword:`in` and :"
|
||
"keyword:`not in`, are supported by types that are :term:`iterable` or "
|
||
"implement the :meth:`__contains__` method."
|
||
msgstr ""
|
||
"Deux autres opérations avec la même priorité syntaxique, :keyword:`in` et :"
|
||
"keyword:`not in`, sont pris en charge par les types :term:`itérables "
|
||
"<iterable>` ou qui implémentent la méthode :meth:`__contains__`."
|
||
|
||
#: library/stdtypes.rst:205
|
||
msgid "Numeric Types --- :class:`int`, :class:`float`, :class:`complex`"
|
||
msgstr "Types numériques — :class:`int`, :class:`float`, :class:`complex`"
|
||
|
||
#: library/stdtypes.rst:215
|
||
msgid ""
|
||
"There are three distinct numeric types: :dfn:`integers`, :dfn:`floating "
|
||
"point numbers`, and :dfn:`complex numbers`. In addition, Booleans are a "
|
||
"subtype of integers. Integers have unlimited precision. Floating point "
|
||
"numbers are usually implemented using :c:expr:`double` in C; information "
|
||
"about the precision and internal representation of floating point numbers "
|
||
"for the machine on which your program is running is available in :data:`sys."
|
||
"float_info`. Complex numbers have a real and imaginary part, which are each "
|
||
"a floating point number. To extract these parts from a complex number *z*, "
|
||
"use ``z.real`` and ``z.imag``. (The standard library includes the additional "
|
||
"numeric types :mod:`fractions.Fraction`, for rationals, and :mod:`decimal."
|
||
"Decimal`, for floating-point numbers with user-definable precision.)"
|
||
msgstr ""
|
||
"Il existe trois types numériques distincts : les entiers (:dfn:`integers`), "
|
||
"les nombres flottants (:dfn:`floating point numbers`) et les nombres "
|
||
"complexes (:dfn:`complex numbers`). En outre, les booléens sont un sous-type "
|
||
"des entiers. Les entiers ont une précision illimitée. Les nombres à virgule "
|
||
"flottante sont généralement implémentés en utilisant des :c:expr:`double` en "
|
||
"C ; des informations sur la précision et la représentation interne des "
|
||
"nombres à virgule flottante pour la machine sur laquelle le programme est en "
|
||
"cours d'exécution sont disponibles dans :data:`sys.float_info`. Les nombres "
|
||
"complexes ont une partie réelle et une partie imaginaire, qui sont chacune "
|
||
"des nombres à virgule flottante. Pour extraire ces parties d'un nombre "
|
||
"complexe *z*, utilisez ``z.real`` et ``z.imag``. (La bibliothèque standard "
|
||
"comprend les types numériques additionnels :mod:`fractions.Fraction` pour "
|
||
"les rationnels et :mod:`decimal.Decimal` pour les nombres à virgule "
|
||
"flottante avec une précision définissable par l'utilisateur.)"
|
||
|
||
#: library/stdtypes.rst:237
|
||
msgid ""
|
||
"Numbers are created by numeric literals or as the result of built-in "
|
||
"functions and operators. Unadorned integer literals (including hex, octal "
|
||
"and binary numbers) yield integers. Numeric literals containing a decimal "
|
||
"point or an exponent sign yield floating point numbers. Appending ``'j'`` "
|
||
"or ``'J'`` to a numeric literal yields an imaginary number (a complex number "
|
||
"with a zero real part) which you can add to an integer or float to get a "
|
||
"complex number with real and imaginary parts."
|
||
msgstr ""
|
||
"Les nombres sont créés par des littéraux numériques ou sont le résultat de "
|
||
"fonctions natives ou d'opérateurs. Les entiers littéraux basiques (y compris "
|
||
"leur forme hexadécimale, octale et binaire) donnent des entiers. Les nombres "
|
||
"littéraux contenant un point décimal (NdT : notation anglo-saxonne de la "
|
||
"virgule) ou un exposant donnent des nombres à virgule flottante. Suffixer "
|
||
"``'j'`` ou ``'J'`` à un nombre littéral donne un nombre imaginaire (un "
|
||
"nombre complexe avec une partie réelle nulle) que vous pouvez ajouter à un "
|
||
"nombre (entier ou à virgule flottante) pour obtenir un nombre complexe avec "
|
||
"une partie réelle et une partie imaginaire."
|
||
|
||
#: library/stdtypes.rst:262
|
||
msgid ""
|
||
"Python fully supports mixed arithmetic: when a binary arithmetic operator "
|
||
"has operands of different numeric types, the operand with the \"narrower\" "
|
||
"type is widened to that of the other, where integer is narrower than "
|
||
"floating point, which is narrower than complex. A comparison between numbers "
|
||
"of different types behaves as though the exact values of those numbers were "
|
||
"being compared. [2]_"
|
||
msgstr ""
|
||
"Python gère pleinement l'arithmétique de types numériques mixtes : lorsqu'un "
|
||
"opérateur arithmétique binaire possède des opérandes de types numériques "
|
||
"différents, l'opérande de type le plus « étroit » est élargi à celui de "
|
||
"l'autre. Dans ce système, l'entier est plus « étroit » que la virgule "
|
||
"flottante, qui est plus « étroite » que le complexe. Une comparaison entre "
|
||
"des nombres de types différents se comporte comme si les valeurs exactes de "
|
||
"ces nombres étaient comparées [2]_."
|
||
|
||
#: library/stdtypes.rst:268
|
||
msgid ""
|
||
"The constructors :func:`int`, :func:`float`, and :func:`complex` can be used "
|
||
"to produce numbers of a specific type."
|
||
msgstr ""
|
||
"Les constructeurs :func:`int`, :func:`float` et :func:`complex` peuvent être "
|
||
"utilisés pour produire des nombres d'un type numérique spécifique."
|
||
|
||
#: library/stdtypes.rst:271
|
||
msgid ""
|
||
"All numeric types (except complex) support the following operations (for "
|
||
"priorities of the operations, see :ref:`operator-summary`):"
|
||
msgstr ""
|
||
"Tous les types numériques (sauf complexe) gèrent les opérations suivantes "
|
||
"(pour les priorités des opérations, voir :ref:`operator-summary`) :"
|
||
|
||
#: library/stdtypes.rst:275
|
||
msgid "Full documentation"
|
||
msgstr "Documentation complète"
|
||
|
||
#: library/stdtypes.rst:277
|
||
msgid "``x + y``"
|
||
msgstr "``x + y``"
|
||
|
||
#: library/stdtypes.rst:277
|
||
msgid "sum of *x* and *y*"
|
||
msgstr "somme de *x* et *y*"
|
||
|
||
#: library/stdtypes.rst:279
|
||
msgid "``x - y``"
|
||
msgstr "``x - y``"
|
||
|
||
#: library/stdtypes.rst:279
|
||
msgid "difference of *x* and *y*"
|
||
msgstr "différence de *x* et *y*"
|
||
|
||
#: library/stdtypes.rst:281
|
||
msgid "``x * y``"
|
||
msgstr "``x * y``"
|
||
|
||
#: library/stdtypes.rst:281
|
||
msgid "product of *x* and *y*"
|
||
msgstr "produit de *x* et *y*"
|
||
|
||
#: library/stdtypes.rst:283
|
||
msgid "``x / y``"
|
||
msgstr "``x / y``"
|
||
|
||
#: library/stdtypes.rst:283
|
||
msgid "quotient of *x* and *y*"
|
||
msgstr "quotient de *x* et *y*"
|
||
|
||
#: library/stdtypes.rst:285
|
||
msgid "``x // y``"
|
||
msgstr "``x // y``"
|
||
|
||
#: library/stdtypes.rst:285
|
||
msgid "floored quotient of *x* and *y*"
|
||
msgstr "quotient entier de *x* et *y*"
|
||
|
||
#: library/stdtypes.rst:288
|
||
msgid "``x % y``"
|
||
msgstr "``x % y``"
|
||
|
||
#: library/stdtypes.rst:288
|
||
msgid "remainder of ``x / y``"
|
||
msgstr "reste de ``x / y``"
|
||
|
||
#: library/stdtypes.rst:290
|
||
msgid "``-x``"
|
||
msgstr "``-x``"
|
||
|
||
#: library/stdtypes.rst:290
|
||
msgid "*x* negated"
|
||
msgstr "négatif de *x*"
|
||
|
||
#: library/stdtypes.rst:292
|
||
msgid "``+x``"
|
||
msgstr "``+x``"
|
||
|
||
#: library/stdtypes.rst:292
|
||
msgid "*x* unchanged"
|
||
msgstr "*x* inchangé"
|
||
|
||
#: library/stdtypes.rst:294
|
||
msgid "``abs(x)``"
|
||
msgstr "``abs(x)``"
|
||
|
||
#: library/stdtypes.rst:294
|
||
msgid "absolute value or magnitude of *x*"
|
||
msgstr "valeur absolue de *x*"
|
||
|
||
#: library/stdtypes.rst:294
|
||
msgid ":func:`abs`"
|
||
msgstr ":func:`abs`"
|
||
|
||
#: library/stdtypes.rst:297
|
||
msgid "``int(x)``"
|
||
msgstr "``int(x)``"
|
||
|
||
#: library/stdtypes.rst:297
|
||
msgid "*x* converted to integer"
|
||
msgstr "*x* converti en nombre entier"
|
||
|
||
#: library/stdtypes.rst:297
|
||
msgid "\\(3)\\(6)"
|
||
msgstr "\\(3)\\(6)"
|
||
|
||
#: library/stdtypes.rst:297
|
||
msgid ":func:`int`"
|
||
msgstr ":func:`int`"
|
||
|
||
#: library/stdtypes.rst:299
|
||
msgid "``float(x)``"
|
||
msgstr "``float(x)``"
|
||
|
||
#: library/stdtypes.rst:299
|
||
msgid "*x* converted to floating point"
|
||
msgstr "*x* converti en nombre à virgule flottante"
|
||
|
||
#: library/stdtypes.rst:299
|
||
msgid "\\(4)\\(6)"
|
||
msgstr "\\(4)\\(6)"
|
||
|
||
#: library/stdtypes.rst:299
|
||
msgid ":func:`float`"
|
||
msgstr ":func:`float`"
|
||
|
||
#: library/stdtypes.rst:301
|
||
msgid "``complex(re, im)``"
|
||
msgstr "``complex(re, im)``"
|
||
|
||
#: library/stdtypes.rst:301
|
||
msgid ""
|
||
"a complex number with real part *re*, imaginary part *im*. *im* defaults to "
|
||
"zero."
|
||
msgstr ""
|
||
"un nombre complexe avec *re* pour partie réelle et *im* pour partie "
|
||
"imaginaire. *im* vaut zéro par défaut."
|
||
|
||
#: library/stdtypes.rst:1159 library/stdtypes.rst:3627
|
||
msgid "\\(6)"
|
||
msgstr "\\(6)"
|
||
|
||
#: library/stdtypes.rst:301
|
||
msgid ":func:`complex`"
|
||
msgstr ":func:`complex`"
|
||
|
||
#: library/stdtypes.rst:305
|
||
msgid "``c.conjugate()``"
|
||
msgstr "``c.conjugate()``"
|
||
|
||
#: library/stdtypes.rst:305
|
||
msgid "conjugate of the complex number *c*"
|
||
msgstr "conjugué du nombre complexe *c*"
|
||
|
||
#: library/stdtypes.rst:308
|
||
msgid "``divmod(x, y)``"
|
||
msgstr "``divmod(x, y)``"
|
||
|
||
#: library/stdtypes.rst:308
|
||
msgid "the pair ``(x // y, x % y)``"
|
||
msgstr "la paire ``(x // y, x % y)``"
|
||
|
||
#: library/stdtypes.rst:308
|
||
msgid ":func:`divmod`"
|
||
msgstr ":func:`divmod`"
|
||
|
||
#: library/stdtypes.rst:310
|
||
msgid "``pow(x, y)``"
|
||
msgstr "``pow(x, y)``"
|
||
|
||
#: library/stdtypes.rst:312
|
||
msgid "*x* to the power *y*"
|
||
msgstr "*x* à la puissance *y*"
|
||
|
||
#: library/stdtypes.rst:312 library/stdtypes.rst:1151 library/stdtypes.rst:2408
|
||
#: library/stdtypes.rst:3623 library/stdtypes.rst:3630
|
||
msgid "\\(5)"
|
||
msgstr "\\(5)"
|
||
|
||
#: library/stdtypes.rst:310
|
||
msgid ":func:`pow`"
|
||
msgstr ":func:`pow`"
|
||
|
||
#: library/stdtypes.rst:312
|
||
msgid "``x ** y``"
|
||
msgstr "``x ** y``"
|
||
|
||
#: library/stdtypes.rst:322
|
||
msgid ""
|
||
"Also referred to as integer division. The resultant value is a whole "
|
||
"integer, though the result's type is not necessarily int. The result is "
|
||
"always rounded towards minus infinity: ``1//2`` is ``0``, ``(-1)//2`` is "
|
||
"``-1``, ``1//(-2)`` is ``-1``, and ``(-1)//(-2)`` is ``0``."
|
||
msgstr ""
|
||
"Également appelé division entière. La valeur résultante est un nombre "
|
||
"entier, bien que le type du résultat ne soit pas nécessairement *int*. Le "
|
||
"résultat est toujours arrondi vers moins l'infini : ``1//2`` vaut ``0``, "
|
||
"``(-1)//2`` vaut ``-1``, ``1//(-2)`` vaut ``-1``, et ``(-1)//(-2)`` vaut "
|
||
"``0``."
|
||
|
||
#: library/stdtypes.rst:328
|
||
msgid ""
|
||
"Not for complex numbers. Instead convert to floats using :func:`abs` if "
|
||
"appropriate."
|
||
msgstr ""
|
||
"Pas pour les nombres complexes. Convertissez-les plutôt en nombres flottants "
|
||
"à l'aide de :func:`abs` si c'est approprié."
|
||
|
||
#: library/stdtypes.rst:339
|
||
msgid ""
|
||
"Conversion from :class:`float` to :class:`int` truncates, discarding the "
|
||
"fractional part. See functions :func:`math.floor` and :func:`math.ceil` for "
|
||
"alternative conversions."
|
||
msgstr ""
|
||
"La conversion de :class:`float` en :class:`int` tronque la partie "
|
||
"fractionnaire. Voir les fonctions :func:`math.floor` et :func:`math.ceil` "
|
||
"pour d'autres conversions."
|
||
|
||
#: library/stdtypes.rst:344
|
||
msgid ""
|
||
"float also accepts the strings \"nan\" and \"inf\" with an optional prefix "
|
||
"\"+\" or \"-\" for Not a Number (NaN) and positive or negative infinity."
|
||
msgstr ""
|
||
"*float* accepte aussi les chaînes *nan* et *inf* avec un préfixe optionnel "
|
||
"``+`` ou ``-`` pour *Not a Number* (*NaN*) et les infinis positif ou négatif."
|
||
|
||
#: library/stdtypes.rst:348
|
||
msgid ""
|
||
"Python defines ``pow(0, 0)`` and ``0 ** 0`` to be ``1``, as is common for "
|
||
"programming languages."
|
||
msgstr ""
|
||
"Python définit ``pow(0, 0)`` et ``0 ** 0`` valant ``1``, puisque c'est "
|
||
"courant pour les langages de programmation, et logique."
|
||
|
||
#: library/stdtypes.rst:352
|
||
msgid ""
|
||
"The numeric literals accepted include the digits ``0`` to ``9`` or any "
|
||
"Unicode equivalent (code points with the ``Nd`` property)."
|
||
msgstr ""
|
||
"Les littéraux numériques acceptés comprennent les chiffres ``0`` à ``9`` ou "
|
||
"tout équivalent Unicode (caractères avec la propriété ``Nd``)."
|
||
|
||
#: library/stdtypes.rst:355
|
||
#, fuzzy
|
||
msgid ""
|
||
"See https://www.unicode.org/Public/14.0.0/ucd/extracted/DerivedNumericType."
|
||
"txt for a complete list of code points with the ``Nd`` property."
|
||
msgstr ""
|
||
"Voir https://www.unicode.org/Public/14.0.0/ucd/extracted/DerivedNumericType."
|
||
"txt pour une liste complète des caractères avec la propriété ``Nd``."
|
||
|
||
#: library/stdtypes.rst:359
|
||
msgid ""
|
||
"All :class:`numbers.Real` types (:class:`int` and :class:`float`) also "
|
||
"include the following operations:"
|
||
msgstr ""
|
||
"Tous types :class:`numbers.Real` (:class:`int` et :class:`float`) "
|
||
"comprennent également les opérations suivantes :"
|
||
|
||
#: library/stdtypes.rst:365
|
||
msgid ":func:`math.trunc(\\ x) <math.trunc>`"
|
||
msgstr ":func:`math.trunc(\\ x) <math.trunc>`"
|
||
|
||
#: library/stdtypes.rst:365
|
||
msgid "*x* truncated to :class:`~numbers.Integral`"
|
||
msgstr "*x* tronqué à l':class:`~numbers.Integral`"
|
||
|
||
#: library/stdtypes.rst:368
|
||
msgid ":func:`round(x[, n]) <round>`"
|
||
msgstr ":func:`round(x[, n]) <round>`"
|
||
|
||
#: library/stdtypes.rst:368
|
||
msgid ""
|
||
"*x* rounded to *n* digits, rounding half to even. If *n* is omitted, it "
|
||
"defaults to 0."
|
||
msgstr ""
|
||
"*x* arrondi à *n* chiffres, arrondissant la moitié au pair. Si *n* est omis, "
|
||
"la valeur par défaut est 0."
|
||
|
||
#: library/stdtypes.rst:372
|
||
msgid ":func:`math.floor(\\ x) <math.floor>`"
|
||
msgstr ":func:`math.floor(\\ x) <math.floor>`"
|
||
|
||
#: library/stdtypes.rst:372
|
||
msgid "the greatest :class:`~numbers.Integral` <= *x*"
|
||
msgstr "le plus grand :class:`~numbers.Integral` ≤ *x*"
|
||
|
||
#: library/stdtypes.rst:375
|
||
msgid ":func:`math.ceil(x) <math.ceil>`"
|
||
msgstr ":func:`math.ceil(x) <math.ceil>`"
|
||
|
||
#: library/stdtypes.rst:375
|
||
msgid "the least :class:`~numbers.Integral` >= *x*"
|
||
msgstr "le plus petit :class:`~numbers.Integral` ≥ *x*"
|
||
|
||
#: library/stdtypes.rst:379
|
||
msgid ""
|
||
"For additional numeric operations see the :mod:`math` and :mod:`cmath` "
|
||
"modules."
|
||
msgstr ""
|
||
"Pour d'autres opérations numériques voir les modules :mod:`math` et :mod:"
|
||
"`cmath`."
|
||
|
||
#: library/stdtypes.rst:388
|
||
msgid "Bitwise Operations on Integer Types"
|
||
msgstr "Opérations sur les bits des nombres entiers"
|
||
|
||
#: library/stdtypes.rst:402
|
||
msgid ""
|
||
"Bitwise operations only make sense for integers. The result of bitwise "
|
||
"operations is calculated as though carried out in two's complement with an "
|
||
"infinite number of sign bits."
|
||
msgstr ""
|
||
"Les opérations bit à bit n'ont de sens que pour les entiers relatifs. Le "
|
||
"résultat d'une opération bit à bit est calculé comme si elle était effectuée "
|
||
"en complément à deux avec un nombre infini de bits de signe."
|
||
|
||
#: library/stdtypes.rst:406
|
||
msgid ""
|
||
"The priorities of the binary bitwise operations are all lower than the "
|
||
"numeric operations and higher than the comparisons; the unary operation "
|
||
"``~`` has the same priority as the other unary numeric operations (``+`` and "
|
||
"``-``)."
|
||
msgstr ""
|
||
"Les priorités de toutes les opérations bit à bit à deux opérandes sont "
|
||
"inférieures à celles des opérations numériques et plus élevées que les "
|
||
"comparaisons ; l'opération unaire ``~`` a la même priorité que les autres "
|
||
"opérations numériques unaires (``+`` et ``-``)."
|
||
|
||
#: library/stdtypes.rst:410
|
||
msgid "This table lists the bitwise operations sorted in ascending priority:"
|
||
msgstr ""
|
||
"Ce tableau répertorie les opérations binaires triées par priorité "
|
||
"ascendante :"
|
||
|
||
#: library/stdtypes.rst:415
|
||
msgid "``x | y``"
|
||
msgstr "``x | y``"
|
||
|
||
#: library/stdtypes.rst:415
|
||
msgid "bitwise :dfn:`or` of *x* and *y*"
|
||
msgstr ":dfn:`OU` bit à bit de *x* et *y*"
|
||
|
||
#: library/stdtypes.rst:418 library/stdtypes.rst:1172 library/stdtypes.rst:2398
|
||
#: library/stdtypes.rst:3616
|
||
msgid "\\(4)"
|
||
msgstr "\\(4)"
|
||
|
||
#: library/stdtypes.rst:418
|
||
msgid "``x ^ y``"
|
||
msgstr "``x ^ y``"
|
||
|
||
#: library/stdtypes.rst:418
|
||
msgid "bitwise :dfn:`exclusive or` of *x* and *y*"
|
||
msgstr ":dfn:`OU exclusif` bit à bit de *x* et *y*"
|
||
|
||
#: library/stdtypes.rst:421
|
||
msgid "``x & y``"
|
||
msgstr "``x & y``"
|
||
|
||
#: library/stdtypes.rst:421
|
||
msgid "bitwise :dfn:`and` of *x* and *y*"
|
||
msgstr ":dfn:`ET` bit à bit de *x* et *y*"
|
||
|
||
#: library/stdtypes.rst:424
|
||
msgid "``x << n``"
|
||
msgstr "``x << n``"
|
||
|
||
#: library/stdtypes.rst:424
|
||
msgid "*x* shifted left by *n* bits"
|
||
msgstr "*x* décalé vers la gauche de *n* bits"
|
||
|
||
#: library/stdtypes.rst:424
|
||
msgid "(1)(2)"
|
||
msgstr "(1)(2)"
|
||
|
||
#: library/stdtypes.rst:426
|
||
msgid "``x >> n``"
|
||
msgstr "``x >> n``"
|
||
|
||
#: library/stdtypes.rst:426
|
||
msgid "*x* shifted right by *n* bits"
|
||
msgstr "*x* décalé vers la droite de *n* bits"
|
||
|
||
#: library/stdtypes.rst:426
|
||
msgid "(1)(3)"
|
||
msgstr "(1)(3)"
|
||
|
||
#: library/stdtypes.rst:428
|
||
msgid "``~x``"
|
||
msgstr "``~x``"
|
||
|
||
#: library/stdtypes.rst:428
|
||
msgid "the bits of *x* inverted"
|
||
msgstr "les bits de *x*, inversés"
|
||
|
||
#: library/stdtypes.rst:434
|
||
msgid ""
|
||
"Negative shift counts are illegal and cause a :exc:`ValueError` to be raised."
|
||
msgstr ""
|
||
"Des valeurs de décalage négatives sont illégales et provoquent une "
|
||
"exception :exc:`ValueError`."
|
||
|
||
#: library/stdtypes.rst:437
|
||
msgid ""
|
||
"A left shift by *n* bits is equivalent to multiplication by ``pow(2, n)``."
|
||
msgstr ""
|
||
"Un décalage à gauche de *n* bits est équivalent à la multiplication par "
|
||
"``pow(2, n)``."
|
||
|
||
#: library/stdtypes.rst:440
|
||
msgid ""
|
||
"A right shift by *n* bits is equivalent to floor division by ``pow(2, n)``."
|
||
msgstr ""
|
||
"Un décalage à droite de *n* les bits est équivalent à la division par "
|
||
"``pow(2, n)``."
|
||
|
||
#: library/stdtypes.rst:443
|
||
msgid ""
|
||
"Performing these calculations with at least one extra sign extension bit in "
|
||
"a finite two's complement representation (a working bit-width of ``1 + max(x."
|
||
"bit_length(), y.bit_length())`` or more) is sufficient to get the same "
|
||
"result as if there were an infinite number of sign bits."
|
||
msgstr ""
|
||
"Effectuer ces calculs avec au moins un bit d'extension de signe "
|
||
"supplémentaire dans une représentation finie du complément à deux éléments "
|
||
"(une largeur de bit fonctionnelle de ``1 + max(x.bit_length(), y."
|
||
"bit_length()`` ou plus) est suffisante pour obtenir le même résultat que "
|
||
"s'il y avait un nombre infini de bits de signe."
|
||
|
||
#: library/stdtypes.rst:450
|
||
msgid "Additional Methods on Integer Types"
|
||
msgstr "Méthodes supplémentaires sur les entiers"
|
||
|
||
#: library/stdtypes.rst:452
|
||
msgid ""
|
||
"The int type implements the :class:`numbers.Integral` :term:`abstract base "
|
||
"class`. In addition, it provides a few more methods:"
|
||
msgstr ""
|
||
"Le type *int* implémente la :term:`classe mère abstraite <abstract base "
|
||
"class>` :class:`numbers.Integral`. Il fournit aussi quelques autres "
|
||
"méthodes :"
|
||
|
||
#: library/stdtypes.rst:457
|
||
msgid ""
|
||
"Return the number of bits necessary to represent an integer in binary, "
|
||
"excluding the sign and leading zeros::"
|
||
msgstr ""
|
||
"Renvoie le nombre de bits nécessaires pour représenter un nombre entier en "
|
||
"binaire, à l'exclusion du signe et des zéros non significatifs ::"
|
||
|
||
#: library/stdtypes.rst:466
|
||
msgid ""
|
||
"More precisely, if ``x`` is nonzero, then ``x.bit_length()`` is the unique "
|
||
"positive integer ``k`` such that ``2**(k-1) <= abs(x) < 2**k``. "
|
||
"Equivalently, when ``abs(x)`` is small enough to have a correctly rounded "
|
||
"logarithm, then ``k = 1 + int(log(abs(x), 2))``. If ``x`` is zero, then ``x."
|
||
"bit_length()`` returns ``0``."
|
||
msgstr ""
|
||
"Plus précisément, si ``x`` est différent de zéro, ``x.bit_length()`` est le "
|
||
"nombre entier positif unique, ``k`` tel que ``2**(k-1) <= abs(x) < 2**k``. "
|
||
"Équivalemment, quand ``abs(x)`` est assez petit pour avoir un logarithme "
|
||
"correctement arrondi, ``k = 1 + int(log(abs(x), 2))``. Si ``x`` est nul, "
|
||
"alors ``x.bit_length()`` donne ``0``."
|
||
|
||
#: library/stdtypes.rst:495 library/stdtypes.rst:584
|
||
msgid "Equivalent to::"
|
||
msgstr "Équivalent à ::"
|
||
|
||
#: library/stdtypes.rst:483
|
||
msgid ""
|
||
"Return the number of ones in the binary representation of the absolute value "
|
||
"of the integer. This is also known as the population count. Example::"
|
||
msgstr ""
|
||
"Renvoie le nombre de 1 dans la représentation binaire de la valeur absolue "
|
||
"de l'entier. On la connait également sous le nom de dénombrement de la "
|
||
"population. Par exemple ::"
|
||
|
||
#: library/stdtypes.rst:504
|
||
msgid "Return an array of bytes representing an integer."
|
||
msgstr "Renvoie un tableau d'octets représentant un nombre entier."
|
||
|
||
#: library/stdtypes.rst:516
|
||
msgid ""
|
||
"The integer is represented using *length* bytes, and defaults to 1. An :exc:"
|
||
"`OverflowError` is raised if the integer is not representable with the given "
|
||
"number of bytes."
|
||
msgstr ""
|
||
"L'entier est représenté en utilisant *length* octets, dont la valeur par "
|
||
"défaut est 1. Une exception :exc:`OverflowError` est levée s'il n'est pas "
|
||
"possible de représenter l'entier avec le nombre donné d'octets."
|
||
|
||
#: library/stdtypes.rst:520
|
||
msgid ""
|
||
"The *byteorder* argument determines the byte order used to represent the "
|
||
"integer, and defaults to ``\"big\"``. If *byteorder* is ``\"big\"``, the "
|
||
"most significant byte is at the beginning of the byte array. If *byteorder* "
|
||
"is ``\"little\"``, the most significant byte is at the end of the byte array."
|
||
msgstr ""
|
||
"L'argument *byteorder* détermine l'ordre des octets utilisé pour représenter "
|
||
"le nombre entier, la valeur par défaut étant ``\"big\"``. Si *byteorder* est "
|
||
"``\"big\"``, l'octet le plus significatif est au début du tableau d'octets. "
|
||
"Si *byteorder* est ``\"little\"``, l'octet le plus significatif est à la fin "
|
||
"du tableau d'octets."
|
||
|
||
#: library/stdtypes.rst:526
|
||
msgid ""
|
||
"The *signed* argument determines whether two's complement is used to "
|
||
"represent the integer. If *signed* is ``False`` and a negative integer is "
|
||
"given, an :exc:`OverflowError` is raised. The default value for *signed* is "
|
||
"``False``."
|
||
msgstr ""
|
||
"L'argument *signed* détermine si le complément à deux est utilisé pour "
|
||
"représenter le nombre entier. Si *signed* est ``False`` et qu'un entier "
|
||
"négatif est donné, une exception :exc:`OverflowError` est levée. La valeur "
|
||
"par défaut pour *signed* est ``False``."
|
||
|
||
#: library/stdtypes.rst:531
|
||
msgid ""
|
||
"The default values can be used to conveniently turn an integer into a single "
|
||
"byte object::"
|
||
msgstr ""
|
||
"Les valeurs par défaut peuvent être utilisées pour transformer facilement un "
|
||
"entier en un objet à un seul octet ::"
|
||
|
||
#: library/stdtypes.rst:537
|
||
msgid ""
|
||
"However, when using the default arguments, don't try to convert a value "
|
||
"greater than 255 or you'll get an :exc:`OverflowError`."
|
||
msgstr ""
|
||
"Cependant, lorsque vous utilisez les arguments par défaut, n'essayez pas de "
|
||
"convertir une valeur supérieure à 255 ou vous lèverez une :exc:"
|
||
"`OverflowError` ::"
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:553
|
||
msgid "Added default argument values for ``length`` and ``byteorder``."
|
||
msgstr ""
|
||
"ajout de valeurs par défaut pour les arguments ``length`` et ``byteorder``."
|
||
|
||
#: library/stdtypes.rst:558
|
||
msgid "Return the integer represented by the given array of bytes."
|
||
msgstr "Renvoie le nombre entier représenté par le tableau d'octets fourni."
|
||
|
||
#: library/stdtypes.rst:571
|
||
msgid ""
|
||
"The argument *bytes* must either be a :term:`bytes-like object` or an "
|
||
"iterable producing bytes."
|
||
msgstr ""
|
||
"L'argument *bytes* doit être soit un :term:`objet octet-compatible <bytes-"
|
||
"like object>`, soit un itérable produisant des *bytes*."
|
||
|
||
#: library/stdtypes.rst:574
|
||
msgid ""
|
||
"The *byteorder* argument determines the byte order used to represent the "
|
||
"integer, and defaults to ``\"big\"``. If *byteorder* is ``\"big\"``, the "
|
||
"most significant byte is at the beginning of the byte array. If *byteorder* "
|
||
"is ``\"little\"``, the most significant byte is at the end of the byte "
|
||
"array. To request the native byte order of the host system, use :data:`sys."
|
||
"byteorder` as the byte order value."
|
||
msgstr ""
|
||
"L'argument *byteorder* détermine l'ordre des octets utilisé pour représenter "
|
||
"le nombre entier, la valeur par défaut étant ``\"big\"``. Si *byteorder* est "
|
||
"``\"big\"``, l'octet le plus significatif est au début du tableau d'octets. "
|
||
"Si *byteorder* est ``\"little\"``, l'octet le plus significatif est à la fin "
|
||
"du tableau d'octets. Pour demander l'ordre natif des octets du système hôte, "
|
||
"donnez :data:`sys.byteorder` comme *byteorder*."
|
||
|
||
#: library/stdtypes.rst:581
|
||
msgid ""
|
||
"The *signed* argument indicates whether two's complement is used to "
|
||
"represent the integer."
|
||
msgstr ""
|
||
"L'argument *signed* indique si le complément à deux est utilisé pour "
|
||
"représenter le nombre entier."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:601
|
||
msgid "Added default argument value for ``byteorder``."
|
||
msgstr "ajout de la valeur par défaut pour l'argument ``byteorder``."
|
||
|
||
#: library/stdtypes.rst:606
|
||
#, fuzzy
|
||
msgid ""
|
||
"Return a pair of integers whose ratio is exactly equal to the original "
|
||
"integer and with a positive denominator. The integer ratio of integers "
|
||
"(whole numbers) is always the integer as the numerator and ``1`` as the "
|
||
"denominator."
|
||
msgstr ""
|
||
"Renvoie une paire de nombres entiers dont le rapport est exactement égal au "
|
||
"nombre d'origine et avec un dénominateur positif. L'\\ *integer_ratio* d'un "
|
||
"entier (tous les nombres entiers) est cet entier au numérateur et ``1`` "
|
||
"comme dénominateur."
|
||
|
||
#: library/stdtypes.rst:614
|
||
msgid "Additional Methods on Float"
|
||
msgstr "Méthodes supplémentaires sur les nombres à virgule flottante"
|
||
|
||
#: library/stdtypes.rst:616
|
||
msgid ""
|
||
"The float type implements the :class:`numbers.Real` :term:`abstract base "
|
||
"class`. float also has the following additional methods."
|
||
msgstr ""
|
||
"Le type *float* implémente la :term:`classe mère abstraite <abstract base "
|
||
"class>` :class:`numbers.Real` et a également les méthodes suivantes."
|
||
|
||
#: library/stdtypes.rst:621
|
||
#, fuzzy
|
||
msgid ""
|
||
"Return a pair of integers whose ratio is exactly equal to the original float "
|
||
"and with a positive denominator. Raises :exc:`OverflowError` on infinities "
|
||
"and a :exc:`ValueError` on NaNs."
|
||
msgstr ""
|
||
"Renvoie une paire de nombres entiers dont le rapport est exactement égal au "
|
||
"nombre d'origine et avec un dénominateur positif. Lève :exc:`OverflowError` "
|
||
"avec un infini et :exc:`ValueError` avec un NaN."
|
||
|
||
#: library/stdtypes.rst:628
|
||
msgid ""
|
||
"Return ``True`` if the float instance is finite with integral value, and "
|
||
"``False`` otherwise::"
|
||
msgstr ""
|
||
"Renvoie ``True`` si l'instance de *float* est finie avec une valeur entière, "
|
||
"et ``False`` autrement ::"
|
||
|
||
#: library/stdtypes.rst:636
|
||
msgid ""
|
||
"Two methods support conversion to and from hexadecimal strings. Since "
|
||
"Python's floats are stored internally as binary numbers, converting a float "
|
||
"to or from a *decimal* string usually involves a small rounding error. In "
|
||
"contrast, hexadecimal strings allow exact representation and specification "
|
||
"of floating-point numbers. This can be useful when debugging, and in "
|
||
"numerical work."
|
||
msgstr ""
|
||
"Deux méthodes prennent en charge la conversion vers et à partir de chaînes "
|
||
"hexadécimales. Étant donné que les *float* de Python sont stockés en interne "
|
||
"sous forme de nombres binaires, la conversion d'un *float* depuis ou vers "
|
||
"une chaine décimale implique généralement une petite erreur d'arrondi. En "
|
||
"revanche, les chaînes hexadécimales permettent de représenter exactement les "
|
||
"nombres à virgule flottante. Cela peut être utile lors du débogage, et dans "
|
||
"un travail numérique."
|
||
|
||
#: library/stdtypes.rst:647
|
||
msgid ""
|
||
"Return a representation of a floating-point number as a hexadecimal string. "
|
||
"For finite floating-point numbers, this representation will always include a "
|
||
"leading ``0x`` and a trailing ``p`` and exponent."
|
||
msgstr ""
|
||
"Renvoie une représentation d'un nombre à virgule flottante sous forme de "
|
||
"chaîne hexadécimale. Pour les nombres à virgule flottante finis, cette "
|
||
"représentation comprendra toujours un préfixe ``0x``, un suffixe ``p`` et un "
|
||
"exposant."
|
||
|
||
#: library/stdtypes.rst:655
|
||
msgid ""
|
||
"Class method to return the float represented by a hexadecimal string *s*. "
|
||
"The string *s* may have leading and trailing whitespace."
|
||
msgstr ""
|
||
"Méthode de classe pour obtenir le *float* représenté par une chaîne de "
|
||
"caractères hexadécimale *s*. La chaîne *s* peut contenir des espaces avant "
|
||
"et après le nombre."
|
||
|
||
#: library/stdtypes.rst:660
|
||
msgid ""
|
||
"Note that :meth:`float.hex` is an instance method, while :meth:`float."
|
||
"fromhex` is a class method."
|
||
msgstr ""
|
||
"Notez que :meth:`float.hex` est une méthode d'instance, alors que :meth:"
|
||
"`float.fromhex` est une méthode de classe."
|
||
|
||
#: library/stdtypes.rst:663
|
||
msgid "A hexadecimal string takes the form::"
|
||
msgstr "Une chaîne hexadécimale prend la forme ::"
|
||
|
||
#: library/stdtypes.rst:667
|
||
msgid ""
|
||
"where the optional ``sign`` may by either ``+`` or ``-``, ``integer`` and "
|
||
"``fraction`` are strings of hexadecimal digits, and ``exponent`` is a "
|
||
"decimal integer with an optional leading sign. Case is not significant, and "
|
||
"there must be at least one hexadecimal digit in either the integer or the "
|
||
"fraction. This syntax is similar to the syntax specified in section 6.4.4.2 "
|
||
"of the C99 standard, and also to the syntax used in Java 1.5 onwards. In "
|
||
"particular, the output of :meth:`float.hex` is usable as a hexadecimal "
|
||
"floating-point literal in C or Java code, and hexadecimal strings produced "
|
||
"by C's ``%a`` format character or Java's ``Double.toHexString`` are accepted "
|
||
"by :meth:`float.fromhex`."
|
||
msgstr ""
|
||
"où ``sign`` peut être soit ``+`` soit ``-``, ``integer`` et ``fraction`` "
|
||
"sont des chaînes de chiffres hexadécimaux, et ``exponent`` est un entier "
|
||
"décimal facultativement signé. La casse n'est pas significative, et il doit "
|
||
"y avoir au moins un chiffre hexadécimal soit dans le nombre entier soit dans "
|
||
"la fraction. Cette syntaxe est similaire à la syntaxe spécifiée dans la "
|
||
"section 6.4.4.2 de la norme C99, et est aussi la syntaxe utilisée à partir "
|
||
"de Java 1.5. En particulier, la sortie de :meth:`float.hex` est utilisable "
|
||
"comme valeur hexadécimale à virgule flottante littérale en C ou Java, et des "
|
||
"chaînes hexadécimales produites en C via un format ``%a`` ou Java via "
|
||
"``Double.toHexString`` sont acceptées par :meth:`float.fromhex`."
|
||
|
||
#: library/stdtypes.rst:680
|
||
msgid ""
|
||
"Note that the exponent is written in decimal rather than hexadecimal, and "
|
||
"that it gives the power of 2 by which to multiply the coefficient. For "
|
||
"example, the hexadecimal string ``0x3.a7p10`` represents the floating-point "
|
||
"number ``(3 + 10./16 + 7./16**2) * 2.0**10``, or ``3740.0``::"
|
||
msgstr ""
|
||
"Notez que l'exposant est écrit en décimal plutôt qu'en hexadécimal, et qu'il "
|
||
"donne la puissance de 2 par lequel multiplier le coefficient. Par exemple, "
|
||
"la chaîne hexadécimale ``0x3.a7p10`` représente le nombre à virgule "
|
||
"flottante ``(3 + 10./16 + 7./16**2) *2.0**10``, ou ``3740.0`` ::"
|
||
|
||
#: library/stdtypes.rst:690
|
||
msgid ""
|
||
"Applying the reverse conversion to ``3740.0`` gives a different hexadecimal "
|
||
"string representing the same number::"
|
||
msgstr ""
|
||
"L'application de la conversion inverse à ``3740.0`` donne une chaîne "
|
||
"hexadécimale différente représentant le même nombre ::"
|
||
|
||
#: library/stdtypes.rst:700
|
||
msgid "Hashing of numeric types"
|
||
msgstr "Hachage des types numériques"
|
||
|
||
#: library/stdtypes.rst:702
|
||
msgid ""
|
||
"For numbers ``x`` and ``y``, possibly of different types, it's a requirement "
|
||
"that ``hash(x) == hash(y)`` whenever ``x == y`` (see the :meth:`~object."
|
||
"__hash__` method documentation for more details). For ease of "
|
||
"implementation and efficiency across a variety of numeric types (including :"
|
||
"class:`int`, :class:`float`, :class:`decimal.Decimal` and :class:`fractions."
|
||
"Fraction`) Python's hash for numeric types is based on a single mathematical "
|
||
"function that's defined for any rational number, and hence applies to all "
|
||
"instances of :class:`int` and :class:`fractions.Fraction`, and all finite "
|
||
"instances of :class:`float` and :class:`decimal.Decimal`. Essentially, this "
|
||
"function is given by reduction modulo ``P`` for a fixed prime ``P``. The "
|
||
"value of ``P`` is made available to Python as the :attr:`modulus` attribute "
|
||
"of :data:`sys.hash_info`."
|
||
msgstr ""
|
||
"Pour deux nombres égaux ``x`` et ``y`` (c.-à-d. ``x == y``), pouvant être de "
|
||
"différents types, il est requis que ``hash(x) == hash(y)`` (voir la "
|
||
"documentation de :meth:`~object.__hash__`). Pour faciliter la mise en œuvre "
|
||
"et l'efficacité à travers une variété de types numériques (y compris :class:"
|
||
"`int`, :class:`float`, :class:`decimal.Decimal` et :class:`fractions."
|
||
"Fraction`) le hachage en Python pour les types numérique est basé sur une "
|
||
"fonction mathématique unique qui est définie pour tout nombre rationnel, et "
|
||
"donc s'applique à toutes les instances de :class:`int` et :class:`fractions."
|
||
"Fraction`, et toutes les instances finies de :class:`float` et :class:"
|
||
"`decimal.Decimal`. Essentiellement, cette fonction est donnée par la "
|
||
"réduction modulo ``P`` pour un nombre ``P`` premier fixe. La valeur de ``P`` "
|
||
"est disponible comme attribut :attr:`modulus` de :data:`sys.hash_info`."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:717
|
||
msgid ""
|
||
"Currently, the prime used is ``P = 2**31 - 1`` on machines with 32-bit C "
|
||
"longs and ``P = 2**61 - 1`` on machines with 64-bit C longs."
|
||
msgstr ""
|
||
"actuellement, le premier utilisé est ``P = 2 ** 31 - 1`` sur des machines "
|
||
"dont les *longs* en C sont de 32 bits ``P = 2 ** 61 - 1`` sur des machines "
|
||
"dont les *longs* en C font 64 bits."
|
||
|
||
#: library/stdtypes.rst:720
|
||
msgid "Here are the rules in detail:"
|
||
msgstr "Voici les règles en détail :"
|
||
|
||
#: library/stdtypes.rst:722
|
||
msgid ""
|
||
"If ``x = m / n`` is a nonnegative rational number and ``n`` is not divisible "
|
||
"by ``P``, define ``hash(x)`` as ``m * invmod(n, P) % P``, where ``invmod(n, "
|
||
"P)`` gives the inverse of ``n`` modulo ``P``."
|
||
msgstr ""
|
||
"Si ``x = m / n`` est un nombre rationnel non négatif et ``n`` n'est pas "
|
||
"divisible par ``P``, définir ``hash(x)`` comme ``m * invmod(n, P) % P``, où "
|
||
"``invmod(n, P)`` donne l'inverse de ``n`` modulo ``P``."
|
||
|
||
#: library/stdtypes.rst:726
|
||
msgid ""
|
||
"If ``x = m / n`` is a nonnegative rational number and ``n`` is divisible by "
|
||
"``P`` (but ``m`` is not) then ``n`` has no inverse modulo ``P`` and the rule "
|
||
"above doesn't apply; in this case define ``hash(x)`` to be the constant "
|
||
"value ``sys.hash_info.inf``."
|
||
msgstr ""
|
||
"Si ``x = m / n`` est un nombre rationnel non négatif et ``n`` est divisible "
|
||
"par ``P`` (mais ``m`` ne l'est pas), alors ``n`` n'a pas de modulo inverse "
|
||
"``P`` et la règle ci-dessus n'est pas applicable ; dans ce cas définir "
|
||
"``hash(x)`` comme étant la valeur de la constante ``sys.hash_info.inf``."
|
||
|
||
#: library/stdtypes.rst:731
|
||
msgid ""
|
||
"If ``x = m / n`` is a negative rational number define ``hash(x)`` as ``-"
|
||
"hash(-x)``. If the resulting hash is ``-1``, replace it with ``-2``."
|
||
msgstr ""
|
||
"Si ``x = m / n`` est un nombre rationnel négatif définir ``hash(x)`` comme "
|
||
"``-hash(-x)``. Si le résultat est ``-1``, le remplacer par ``-2``."
|
||
|
||
#: library/stdtypes.rst:735
|
||
msgid ""
|
||
"The particular values ``sys.hash_info.inf`` and ``-sys.hash_info.inf`` are "
|
||
"used as hash values for positive infinity or negative infinity "
|
||
"(respectively)."
|
||
msgstr ""
|
||
"Les valeurs particulières ``sys.hash_info.inf`` et ``-sys.hash_info.inf`` "
|
||
"sont utilisées comme valeurs de hachage pour l'infini positif et l'infini "
|
||
"négatif (respectivement)."
|
||
|
||
#: library/stdtypes.rst:739
|
||
msgid ""
|
||
"For a :class:`complex` number ``z``, the hash values of the real and "
|
||
"imaginary parts are combined by computing ``hash(z.real) + sys.hash_info."
|
||
"imag * hash(z.imag)``, reduced modulo ``2**sys.hash_info.width`` so that it "
|
||
"lies in ``range(-2**(sys.hash_info.width - 1), 2**(sys.hash_info.width - "
|
||
"1))``. Again, if the result is ``-1``, it's replaced with ``-2``."
|
||
msgstr ""
|
||
"Pour un nombre :class:`complexe <complex>` ``z``, les valeurs de hachage des "
|
||
"parties réelles et imaginaires sont combinées en calculant ``hash(z.real) + "
|
||
"sys.hash_info.imag * hash(z.imag)``, réduit au modulo ``2**sys.hash_info."
|
||
"width`` de sorte qu'il se trouve dans ``range(-2**(sys.hash_info.width - 1), "
|
||
"2**(sys.hash_info.width - 1))``. Encore une fois, si le résultat est ``-1``, "
|
||
"il est remplacé par ``-2``."
|
||
|
||
#: library/stdtypes.rst:747
|
||
msgid ""
|
||
"To clarify the above rules, here's some example Python code, equivalent to "
|
||
"the built-in hash, for computing the hash of a rational number, :class:"
|
||
"`float`, or :class:`complex`::"
|
||
msgstr ""
|
||
"Afin de clarifier les règles ci-dessus, voici quelques exemples de code "
|
||
"Python, équivalent à la fonction de hachage native, pour calculer le hachage "
|
||
"d'un nombre rationnel, d'un :class:`float`, ou d'un :class:`complex` ::"
|
||
|
||
#: library/stdtypes.rst:802
|
||
msgid "Iterator Types"
|
||
msgstr "Les types itérateurs"
|
||
|
||
#: library/stdtypes.rst:810
|
||
msgid ""
|
||
"Python supports a concept of iteration over containers. This is implemented "
|
||
"using two distinct methods; these are used to allow user-defined classes to "
|
||
"support iteration. Sequences, described below in more detail, always "
|
||
"support the iteration methods."
|
||
msgstr ""
|
||
"Python gère un concept d'itération sur les conteneurs. Il l'implémente en "
|
||
"utilisant deux méthodes distinctes qui permettent aux classes définies par "
|
||
"l'utilisateur de devenir itérables. Les séquences, décrites plus bas en "
|
||
"détail, savent toujours gérer les méthodes d'itération."
|
||
|
||
#: library/stdtypes.rst:815
|
||
msgid ""
|
||
"One method needs to be defined for container objects to provide :term:"
|
||
"`iterable` support:"
|
||
msgstr ""
|
||
"Une méthode doit être définie afin que les objets conteneurs prennent en "
|
||
"charge :term:`l’itération <iterable>` :"
|
||
|
||
#: library/stdtypes.rst:822
|
||
msgid ""
|
||
"Return an :term:`iterator` object. The object is required to support the "
|
||
"iterator protocol described below. If a container supports different types "
|
||
"of iteration, additional methods can be provided to specifically request "
|
||
"iterators for those iteration types. (An example of an object supporting "
|
||
"multiple forms of iteration would be a tree structure which supports both "
|
||
"breadth-first and depth-first traversal.) This method corresponds to the :c:"
|
||
"member:`~PyTypeObject.tp_iter` slot of the type structure for Python objects "
|
||
"in the Python/C API."
|
||
msgstr ""
|
||
"Renvoie un objet :term:`itérateur <iterator>`. L'objet doit implémenter le "
|
||
"protocole d'itération décrit ci-dessous. Si un conteneur prend en charge "
|
||
"différents types d'itération, d'autres méthodes peuvent être fournies pour "
|
||
"obtenir spécifiquement les itérateurs pour ces types d'itération. (Exemple "
|
||
"d'un objet gérant plusieurs formes d'itération : une structure d'arbre "
|
||
"pouvant être parcourue en largeur ou en profondeur.) Cette méthode "
|
||
"correspond à l'attribut :c:member:`~PyTypeObject.tp_iter` de la structure du "
|
||
"type des objets Python dans l'API Python/C."
|
||
|
||
#: library/stdtypes.rst:831
|
||
msgid ""
|
||
"The iterator objects themselves are required to support the following two "
|
||
"methods, which together form the :dfn:`iterator protocol`:"
|
||
msgstr ""
|
||
"Les itérateurs eux-mêmes doivent implémenter les deux méthodes suivantes, "
|
||
"qui forment ensemble le :dfn:`protocole d'itération` :"
|
||
|
||
#: library/stdtypes.rst:837
|
||
msgid ""
|
||
"Return the :term:`iterator` object itself. This is required to allow both "
|
||
"containers and iterators to be used with the :keyword:`for` and :keyword:"
|
||
"`in` statements. This method corresponds to the :c:member:`~PyTypeObject."
|
||
"tp_iter` slot of the type structure for Python objects in the Python/C API."
|
||
msgstr ""
|
||
"Renvoie :term:`l’objet itérateur<iterator>` lui-même. C'est nécessaire pour "
|
||
"permettre à la fois à des conteneurs et des itérateurs d'être utilisés avec "
|
||
"les instructions :keyword:`for` et :keyword:`in`. Cette méthode correspond à "
|
||
"l'attribut :c:member:`~PyTypeObject.tp_iter` de la structure des types des "
|
||
"objets Python dans l'API Python/C."
|
||
|
||
#: library/stdtypes.rst:846
|
||
msgid ""
|
||
"Return the next item from the :term:`iterator`. If there are no further "
|
||
"items, raise the :exc:`StopIteration` exception. This method corresponds to "
|
||
"the :c:member:`~PyTypeObject.tp_iternext` slot of the type structure for "
|
||
"Python objects in the Python/C API."
|
||
msgstr ""
|
||
"Renvoie l'élément suivant de l’:term:`itérateur<iterator>`. S'il n'y a pas "
|
||
"d'autres éléments, une exception :exc:`StopIteration` est levée. Cette "
|
||
"méthode correspond à l'attribut :c:member:`~PyTypeObject.tp_iternext` de la "
|
||
"structure du type des objets Python dans l'API Python/C."
|
||
|
||
#: library/stdtypes.rst:851
|
||
msgid ""
|
||
"Python defines several iterator objects to support iteration over general "
|
||
"and specific sequence types, dictionaries, and other more specialized "
|
||
"forms. The specific types are not important beyond their implementation of "
|
||
"the iterator protocol."
|
||
msgstr ""
|
||
"Python définit plusieurs objets itérateurs pour itérer sur les types "
|
||
"standards ou spécifiques de séquence, de dictionnaires et d'autres formes "
|
||
"plus spécialisées. Les types spécifiques ne sont pas importants au-delà de "
|
||
"leur implémentation du protocole d'itération."
|
||
|
||
#: library/stdtypes.rst:856
|
||
msgid ""
|
||
"Once an iterator's :meth:`~iterator.__next__` method raises :exc:"
|
||
"`StopIteration`, it must continue to do so on subsequent calls. "
|
||
"Implementations that do not obey this property are deemed broken."
|
||
msgstr ""
|
||
"Dès que la méthode :meth:`~iterator.__next__` lève une exception :exc:"
|
||
"`StopIteration`, elle doit continuer à le faire lors des appels ultérieurs. "
|
||
"Les implémentations qui ne respectent pas cette propriété sont considérées "
|
||
"cassées."
|
||
|
||
#: library/stdtypes.rst:864
|
||
msgid "Generator Types"
|
||
msgstr "Types générateurs"
|
||
|
||
#: library/stdtypes.rst:866
|
||
msgid ""
|
||
"Python's :term:`generator`\\s provide a convenient way to implement the "
|
||
"iterator protocol. If a container object's :meth:`__iter__` method is "
|
||
"implemented as a generator, it will automatically return an iterator object "
|
||
"(technically, a generator object) supplying the :meth:`__iter__` and :meth:"
|
||
"`~generator.__next__` methods. More information about generators can be "
|
||
"found in :ref:`the documentation for the yield expression <yieldexpr>`."
|
||
msgstr ""
|
||
"Les :term:`générateurs <generator>` offrent un moyen pratique d'implémenter "
|
||
"le protocole d'itération. Si la méthode :meth:`__iter__` d'un objet "
|
||
"conteneur est implémentée comme un générateur, elle renverra automatiquement "
|
||
"un objet *iterator* (techniquement, un objet générateur) fournissant les "
|
||
"méthodes :meth:`__iter__` et :meth:`~generator.__next__`. Plus "
|
||
"d'informations sur les générateurs peuvent être trouvées dans :ref:`la "
|
||
"documentation de l'expression yield <yieldexpr>`."
|
||
|
||
#: library/stdtypes.rst:878
|
||
msgid "Sequence Types --- :class:`list`, :class:`tuple`, :class:`range`"
|
||
msgstr "Types séquentiels — :class:`list`, :class:`tuple`, :class:`range`"
|
||
|
||
#: library/stdtypes.rst:880
|
||
msgid ""
|
||
"There are three basic sequence types: lists, tuples, and range objects. "
|
||
"Additional sequence types tailored for processing of :ref:`binary data "
|
||
"<binaryseq>` and :ref:`text strings <textseq>` are described in dedicated "
|
||
"sections."
|
||
msgstr ""
|
||
"Il existe trois types séquentiels élémentaires : les listes (objets *list*), "
|
||
"*n*-uplets (objets *tuple*) et les intervalles (objets *range*). D'autres "
|
||
"types séquentiels spécifiques au traitement de :ref:`données binaires "
|
||
"<binaryseq>` et :ref:`chaînes de caractères <textseq>` sont décrits dans des "
|
||
"sections dédiées."
|
||
|
||
#: library/stdtypes.rst:889
|
||
msgid "Common Sequence Operations"
|
||
msgstr "Opérations communes sur les séquences"
|
||
|
||
#: library/stdtypes.rst:893
|
||
msgid ""
|
||
"The operations in the following table are supported by most sequence types, "
|
||
"both mutable and immutable. The :class:`collections.abc.Sequence` ABC is "
|
||
"provided to make it easier to correctly implement these operations on custom "
|
||
"sequence types."
|
||
msgstr ""
|
||
"Les opérations dans le tableau ci-dessous sont prises en charge par la "
|
||
"plupart des types séquentiels, variables et immuables. La classe mère "
|
||
"abstraite :class:`collections.abc.Sequence` est fournie pour aider à "
|
||
"implémenter correctement ces opérations sur les types séquentiels "
|
||
"personnalisés."
|
||
|
||
#: library/stdtypes.rst:898
|
||
msgid ""
|
||
"This table lists the sequence operations sorted in ascending priority. In "
|
||
"the table, *s* and *t* are sequences of the same type, *n*, *i*, *j* and *k* "
|
||
"are integers and *x* is an arbitrary object that meets any type and value "
|
||
"restrictions imposed by *s*."
|
||
msgstr ""
|
||
"Ce tableau répertorie les opérations sur les séquences triées par priorité "
|
||
"ascendante. Dans le tableau, *s* et *t* sont des séquences du même type, "
|
||
"*n*, *i*, *j* et *k* sont des nombres entiers et *x* est un objet arbitraire "
|
||
"qui répond à toutes les restrictions de type et de valeur imposée par *s*."
|
||
|
||
#: library/stdtypes.rst:903
|
||
msgid ""
|
||
"The ``in`` and ``not in`` operations have the same priorities as the "
|
||
"comparison operations. The ``+`` (concatenation) and ``*`` (repetition) "
|
||
"operations have the same priority as the corresponding numeric operations. "
|
||
"[3]_"
|
||
msgstr ""
|
||
"Les opérations ``in`` et ``not in`` ont les mêmes priorités que les "
|
||
"opérations de comparaison. Les opérations ``+`` (concaténation) et ``*`` "
|
||
"(répétition) ont la même priorité que les opérations numériques "
|
||
"correspondantes [3]_."
|
||
|
||
#: library/stdtypes.rst:924
|
||
msgid "``x in s``"
|
||
msgstr "``x in s``"
|
||
|
||
#: library/stdtypes.rst:924
|
||
msgid "``True`` if an item of *s* is equal to *x*, else ``False``"
|
||
msgstr "``True`` si un élément de *s* est égal à *x*, sinon ``False``"
|
||
|
||
#: library/stdtypes.rst:927
|
||
msgid "``x not in s``"
|
||
msgstr "``x not in s``"
|
||
|
||
#: library/stdtypes.rst:927
|
||
msgid "``False`` if an item of *s* is equal to *x*, else ``True``"
|
||
msgstr "``False`` si un élément de *s* est égal à *x*, sinon ``True``"
|
||
|
||
#: library/stdtypes.rst:930
|
||
msgid "``s + t``"
|
||
msgstr "``s + t``"
|
||
|
||
#: library/stdtypes.rst:930
|
||
msgid "the concatenation of *s* and *t*"
|
||
msgstr "la concaténation de *s* et *t*"
|
||
|
||
#: library/stdtypes.rst:930
|
||
msgid "(6)(7)"
|
||
msgstr "(6)(7)"
|
||
|
||
#: library/stdtypes.rst:933
|
||
msgid "``s * n`` or ``n * s``"
|
||
msgstr "``s * n`` ou ``n * s``"
|
||
|
||
#: library/stdtypes.rst:933
|
||
msgid "equivalent to adding *s* to itself *n* times"
|
||
msgstr "équivalent à ajouter *s* *n* fois à lui-même"
|
||
|
||
#: library/stdtypes.rst:933
|
||
msgid "(2)(7)"
|
||
msgstr "(2)(7)"
|
||
|
||
#: library/stdtypes.rst:936
|
||
msgid "``s[i]``"
|
||
msgstr "``s[i]``"
|
||
|
||
#: library/stdtypes.rst:936
|
||
msgid "*i*\\ th item of *s*, origin 0"
|
||
msgstr "*i*\\ :sup:`e` élément de *s* en commençant par 0"
|
||
|
||
#: library/stdtypes.rst:938
|
||
msgid "``s[i:j]``"
|
||
msgstr "``s[i:j]``"
|
||
|
||
#: library/stdtypes.rst:938
|
||
msgid "slice of *s* from *i* to *j*"
|
||
msgstr "tranche (*slice*) de *s* de *i* à *j*"
|
||
|
||
#: library/stdtypes.rst:938
|
||
msgid "(3)(4)"
|
||
msgstr "(3)(4)"
|
||
|
||
#: library/stdtypes.rst:940
|
||
msgid "``s[i:j:k]``"
|
||
msgstr "``s[i:j:k]``"
|
||
|
||
#: library/stdtypes.rst:940
|
||
msgid "slice of *s* from *i* to *j* with step *k*"
|
||
msgstr "tranche (*slice*) de *s* de *i* à *j* avec un pas de *k*"
|
||
|
||
#: library/stdtypes.rst:940
|
||
msgid "(3)(5)"
|
||
msgstr "(3)(5)"
|
||
|
||
#: library/stdtypes.rst:943
|
||
msgid "``len(s)``"
|
||
msgstr "``len(s)``"
|
||
|
||
#: library/stdtypes.rst:943
|
||
msgid "length of *s*"
|
||
msgstr "longueur de *s*"
|
||
|
||
#: library/stdtypes.rst:945
|
||
msgid "``min(s)``"
|
||
msgstr "``min(s)``"
|
||
|
||
#: library/stdtypes.rst:945
|
||
msgid "smallest item of *s*"
|
||
msgstr "plus petit élément de *s*"
|
||
|
||
#: library/stdtypes.rst:947
|
||
msgid "``max(s)``"
|
||
msgstr "``max(s)``"
|
||
|
||
#: library/stdtypes.rst:947
|
||
msgid "largest item of *s*"
|
||
msgstr "plus grand élément de *s*"
|
||
|
||
#: library/stdtypes.rst:949
|
||
msgid "``s.index(x[, i[, j]])``"
|
||
msgstr "``s.index(x[, i[, j]])``"
|
||
|
||
#: library/stdtypes.rst:949
|
||
msgid ""
|
||
"index of the first occurrence of *x* in *s* (at or after index *i* and "
|
||
"before index *j*)"
|
||
msgstr ""
|
||
"indice de la première occurrence de *x* dans *s* (à ou après l'indice *i* et "
|
||
"avant l'indice *j*)"
|
||
|
||
#: library/stdtypes.rst:3598
|
||
msgid "\\(8)"
|
||
msgstr "\\(8)"
|
||
|
||
#: library/stdtypes.rst:953
|
||
msgid "``s.count(x)``"
|
||
msgstr "``s.count(x)``"
|
||
|
||
#: library/stdtypes.rst:953
|
||
msgid "total number of occurrences of *x* in *s*"
|
||
msgstr "nombre total d'occurrences de *x* dans *s*"
|
||
|
||
#: library/stdtypes.rst:957
|
||
msgid ""
|
||
"Sequences of the same type also support comparisons. In particular, tuples "
|
||
"and lists are compared lexicographically by comparing corresponding "
|
||
"elements. This means that to compare equal, every element must compare equal "
|
||
"and the two sequences must be of the same type and have the same length. "
|
||
"(For full details see :ref:`comparisons` in the language reference.)"
|
||
msgstr ""
|
||
"Les séquences du même type gèrent également la comparaison. En particulier, "
|
||
"les *n*-uplets et les listes sont comparés lexicographiquement en comparant "
|
||
"les éléments correspondants. Cela signifie que, pour que deux séquences soit "
|
||
"égales, les éléments les constituant doivent être égaux deux à deux et les "
|
||
"deux séquences doivent être du même type et de la même longueur. (Pour plus "
|
||
"de détails voir :ref:`comparisons` dans la référence du langage.)"
|
||
|
||
#: library/stdtypes.rst:967
|
||
msgid ""
|
||
"Forward and reversed iterators over mutable sequences access values using an "
|
||
"index. That index will continue to march forward (or backward) even if the "
|
||
"underlying sequence is mutated. The iterator terminates only when an :exc:"
|
||
"`IndexError` or a :exc:`StopIteration` is encountered (or when the index "
|
||
"drops below zero)."
|
||
msgstr ""
|
||
"Les itérateurs avant et arrière sur des séquences modifiables accèdent aux "
|
||
"valeurs à l'aide d'un indice. Cet indice continue à avancer (ou à reculer) "
|
||
"même si la séquence sous-jacente est modifiée. L'itérateur ne se termine que "
|
||
"lorsqu'une :exc:`IndexError` ou une :exc:`StopIteration` est rencontrée (ou "
|
||
"lorsque l'indice tombe en dessous de zéro)."
|
||
|
||
#: library/stdtypes.rst:976
|
||
msgid ""
|
||
"While the ``in`` and ``not in`` operations are used only for simple "
|
||
"containment testing in the general case, some specialised sequences (such "
|
||
"as :class:`str`, :class:`bytes` and :class:`bytearray`) also use them for "
|
||
"subsequence testing::"
|
||
msgstr ""
|
||
"Bien que les opérations ``in`` et ``not in`` ne soient généralement "
|
||
"utilisées que pour les tests d'appartenance simple, certaines séquences "
|
||
"spécialisées (telles que :class:`str`, :class:`bytes` et :class:`bytearray`) "
|
||
"les utilisent aussi pour tester l'existence de sous-séquences ::"
|
||
|
||
#: library/stdtypes.rst:985
|
||
msgid ""
|
||
"Values of *n* less than ``0`` are treated as ``0`` (which yields an empty "
|
||
"sequence of the same type as *s*). Note that items in the sequence *s* are "
|
||
"not copied; they are referenced multiple times. This often haunts new "
|
||
"Python programmers; consider::"
|
||
msgstr ""
|
||
"Les valeurs de *n* plus petites que ``0`` sont traitées comme ``0`` (ce qui "
|
||
"donne une séquence vide du même type que *s*). Notez que les éléments de *s* "
|
||
"ne sont pas copiés ; ils sont référencés plusieurs fois. Cela hante souvent "
|
||
"de nouveaux développeurs Python, typiquement ::"
|
||
|
||
#: library/stdtypes.rst:997
|
||
msgid ""
|
||
"What has happened is that ``[[]]`` is a one-element list containing an empty "
|
||
"list, so all three elements of ``[[]] * 3`` are references to this single "
|
||
"empty list. Modifying any of the elements of ``lists`` modifies this single "
|
||
"list. You can create a list of different lists this way::"
|
||
msgstr ""
|
||
"Ce qui est arrivé est que ``[[]]`` est une liste à un élément contenant une "
|
||
"liste vide, de sorte que les trois éléments de ``[[]] * 3`` sont des "
|
||
"références à cette seule liste vide. Modifier l'un des éléments de ``lists`` "
|
||
"modifie cette liste unique. Vous pouvez créer une liste des différentes "
|
||
"listes de cette façon ::"
|
||
|
||
#: library/stdtypes.rst:1009
|
||
msgid ""
|
||
"Further explanation is available in the FAQ entry :ref:`faq-multidimensional-"
|
||
"list`."
|
||
msgstr ""
|
||
"De plus amples explications sont disponibles dans la FAQ à la question :ref:"
|
||
"`faq-multidimensional-list`."
|
||
|
||
#: library/stdtypes.rst:1013
|
||
msgid ""
|
||
"If *i* or *j* is negative, the index is relative to the end of sequence *s*: "
|
||
"``len(s) + i`` or ``len(s) + j`` is substituted. But note that ``-0`` is "
|
||
"still ``0``."
|
||
msgstr ""
|
||
"Si *i* ou *j* sont négatifs, l'indice est relatif à la fin de la séquence "
|
||
"*s* : ``len(s) + i`` ou ``len(s) + j`` est substitué. Mais notez que ``-0`` "
|
||
"est toujours ``0``."
|
||
|
||
#: library/stdtypes.rst:1018
|
||
msgid ""
|
||
"The slice of *s* from *i* to *j* is defined as the sequence of items with "
|
||
"index *k* such that ``i <= k < j``. If *i* or *j* is greater than "
|
||
"``len(s)``, use ``len(s)``. If *i* is omitted or ``None``, use ``0``. If "
|
||
"*j* is omitted or ``None``, use ``len(s)``. If *i* is greater than or equal "
|
||
"to *j*, the slice is empty."
|
||
msgstr ""
|
||
"La tranche de *s* de *i* à *j* est définie comme la séquence d'éléments "
|
||
"d'indices *k* tels que ``i <= k < j``. Si *i* ou *j* est supérieur à "
|
||
"``len(s)``, ``len(s)`` est utilisé. Si *i* est omis ou ``None``, ``0`` est "
|
||
"utilisé. Si *j* est omis ou ``None``, ``len(s)`` est utilisé. Si *i* est "
|
||
"supérieur ou égal à *j*, la tranche est vide."
|
||
|
||
#: library/stdtypes.rst:1025
|
||
msgid ""
|
||
"The slice of *s* from *i* to *j* with step *k* is defined as the sequence of "
|
||
"items with index ``x = i + n*k`` such that ``0 <= n < (j-i)/k``. In other "
|
||
"words, the indices are ``i``, ``i+k``, ``i+2*k``, ``i+3*k`` and so on, "
|
||
"stopping when *j* is reached (but never including *j*). When *k* is "
|
||
"positive, *i* and *j* are reduced to ``len(s)`` if they are greater. When "
|
||
"*k* is negative, *i* and *j* are reduced to ``len(s) - 1`` if they are "
|
||
"greater. If *i* or *j* are omitted or ``None``, they become \"end\" values "
|
||
"(which end depends on the sign of *k*). Note, *k* cannot be zero. If *k* is "
|
||
"``None``, it is treated like ``1``."
|
||
msgstr ""
|
||
"La tranche de *s* de *i* à *j* avec un pas de *k* est définie comme la "
|
||
"séquence d'éléments d'indices ``x = i + n*k`` tels que ``0 <= n < (j-i)/k``. "
|
||
"En d'autres termes, les indices sont ``i``, ``i+k``, ``i+2*k``, ``i+3*k`` et "
|
||
"ainsi de suite, en arrêtant lorsque *j* est atteint (mais jamais inclus). Si "
|
||
"*k* est positif, *i* et *j* sont réduits, s'ils sont plus grands, à "
|
||
"``len(s)``. Si *k* est négatif, *i* et *j* sont réduits à ``len(s) - 1`` "
|
||
"s'ils sont plus grands. Si *i* ou *j* sont omis ou sont ``None``, ils "
|
||
"deviennent des valeurs « limites » (la limite haute ou basse dépend du signe "
|
||
"de *k*). Notez que *k* ne peut pas valoir zéro. Si *k* est ``None``, il est "
|
||
"traité comme ``1``."
|
||
|
||
#: library/stdtypes.rst:1036
|
||
msgid ""
|
||
"Concatenating immutable sequences always results in a new object. This "
|
||
"means that building up a sequence by repeated concatenation will have a "
|
||
"quadratic runtime cost in the total sequence length. To get a linear "
|
||
"runtime cost, you must switch to one of the alternatives below:"
|
||
msgstr ""
|
||
"Concaténer des séquences immuables donne toujours un nouvel objet. Cela "
|
||
"signifie que la construction d'une séquence par concaténations répétées aura "
|
||
"une durée d'exécution quadratique par rapport à la longueur de la séquence "
|
||
"totale. Pour obtenir un temps d'exécution linéaire, vous devez utiliser "
|
||
"l'une des alternatives suivantes :"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:1041
|
||
msgid ""
|
||
"if concatenating :class:`str` objects, you can build a list and use :meth:"
|
||
"`str.join` at the end or else write to an :class:`io.StringIO` instance and "
|
||
"retrieve its value when complete"
|
||
msgstr ""
|
||
"si vous concaténez des :class:`str`, vous pouvez construire une liste puis "
|
||
"utiliser :meth:`str.join` à la fin, ou bien écrire dans une instance de :"
|
||
"class:`io.StringIO` et récupérer sa valeur lorsque vous avez terminé ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:1045
|
||
msgid ""
|
||
"if concatenating :class:`bytes` objects, you can similarly use :meth:`bytes."
|
||
"join` or :class:`io.BytesIO`, or you can do in-place concatenation with a :"
|
||
"class:`bytearray` object. :class:`bytearray` objects are mutable and have "
|
||
"an efficient overallocation mechanism"
|
||
msgstr ""
|
||
"si vous concaténez des :class:`bytes`, vous pouvez aussi utiliser :meth:"
|
||
"`bytes.join` ou :class:`io.BytesIO`, ou vous pouvez faire les concaténations "
|
||
"sur place avec un objet :class:`bytearray`. Les objets :class:`bytearray` "
|
||
"sont muables et ont un mécanisme de sur-allocation efficace ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:1050
|
||
msgid "if concatenating :class:`tuple` objects, extend a :class:`list` instead"
|
||
msgstr ""
|
||
"si vous concaténez des :class:`n-uplets<tuple>`, utilisez plutôt *extend* "
|
||
"sur une :class:`list` ;"
|
||
|
||
# fin d'énumération
|
||
#: library/stdtypes.rst:1052
|
||
msgid "for other types, investigate the relevant class documentation"
|
||
msgstr ""
|
||
"pour les autres types, cherchez dans la documentation de la classe concernée."
|
||
|
||
#: library/stdtypes.rst:1056
|
||
msgid ""
|
||
"Some sequence types (such as :class:`range`) only support item sequences "
|
||
"that follow specific patterns, and hence don't support sequence "
|
||
"concatenation or repetition."
|
||
msgstr ""
|
||
"Certains types séquentiels (tels que :class:`range`) ne gèrent que des "
|
||
"séquences qui suivent des modèles spécifiques, et donc ne prennent pas en "
|
||
"charge la concaténation ou la répétition."
|
||
|
||
#: library/stdtypes.rst:1061
|
||
msgid ""
|
||
"``index`` raises :exc:`ValueError` when *x* is not found in *s*. Not all "
|
||
"implementations support passing the additional arguments *i* and *j*. These "
|
||
"arguments allow efficient searching of subsections of the sequence. Passing "
|
||
"the extra arguments is roughly equivalent to using ``s[i:j].index(x)``, only "
|
||
"without copying any data and with the returned index being relative to the "
|
||
"start of the sequence rather than the start of the slice."
|
||
msgstr ""
|
||
"``index`` lève une exception :exc:`ValueError` quand *x* ne se trouve pas "
|
||
"dans *s*. Toutes les implémentations ne gèrent pas les deux paramètres "
|
||
"supplémentaires *i* et *j*. Ces deux arguments permettent de chercher "
|
||
"efficacement dans une sous-séquence de la séquence. Donner ces arguments est "
|
||
"plus ou moins équivalent à ``s[i:j].index(x)``, sans copier les données ; "
|
||
"l'indice renvoyé est relatif au début de la séquence et non au début de la "
|
||
"tranche."
|
||
|
||
#: library/stdtypes.rst:1072
|
||
msgid "Immutable Sequence Types"
|
||
msgstr "Types de séquences immuables"
|
||
|
||
#: library/stdtypes.rst:1079
|
||
msgid ""
|
||
"The only operation that immutable sequence types generally implement that is "
|
||
"not also implemented by mutable sequence types is support for the :func:"
|
||
"`hash` built-in."
|
||
msgstr ""
|
||
"La seule opération que les types de séquences immuables implémentent et qui "
|
||
"n'est pas implémentée par les types de séquences muables est la fonction "
|
||
"native :func:`hash`."
|
||
|
||
#: library/stdtypes.rst:1083
|
||
msgid ""
|
||
"This support allows immutable sequences, such as :class:`tuple` instances, "
|
||
"to be used as :class:`dict` keys and stored in :class:`set` and :class:"
|
||
"`frozenset` instances."
|
||
msgstr ""
|
||
"Cette implémentation permet d'utiliser des séquences immuables, comme les "
|
||
"instances de :class:`n-uplets <tuple>`, en tant que clés de :class:`dict` et "
|
||
"stockées dans les instances de :class:`set` et :class:`frozenset`."
|
||
|
||
#: library/stdtypes.rst:1087
|
||
msgid ""
|
||
"Attempting to hash an immutable sequence that contains unhashable values "
|
||
"will result in :exc:`TypeError`."
|
||
msgstr ""
|
||
"Essayer de hacher une séquence immuable qui contient des valeurs non "
|
||
"hachables lève une :exc:`TypeError`."
|
||
|
||
#: library/stdtypes.rst:1094
|
||
msgid "Mutable Sequence Types"
|
||
msgstr "Types de séquences muables"
|
||
|
||
#: library/stdtypes.rst:1101
|
||
msgid ""
|
||
"The operations in the following table are defined on mutable sequence types. "
|
||
"The :class:`collections.abc.MutableSequence` ABC is provided to make it "
|
||
"easier to correctly implement these operations on custom sequence types."
|
||
msgstr ""
|
||
"Les opérations dans le tableau ci-dessous sont définies sur les types de "
|
||
"séquences muables. La classe mère abstraite :class:`collections.abc."
|
||
"MutableSequence` est prévue pour faciliter l'implémentation correcte de ces "
|
||
"opérations sur les types de séquences personnalisées."
|
||
|
||
#: library/stdtypes.rst:1105
|
||
msgid ""
|
||
"In the table *s* is an instance of a mutable sequence type, *t* is any "
|
||
"iterable object and *x* is an arbitrary object that meets any type and value "
|
||
"restrictions imposed by *s* (for example, :class:`bytearray` only accepts "
|
||
"integers that meet the value restriction ``0 <= x <= 255``)."
|
||
msgstr ""
|
||
"Dans le tableau ci-dessosus, *s* est une instance d'un type de séquence "
|
||
"muable, *t* est un objet itérable et *x* est un objet arbitraire qui répond "
|
||
"à toutes les restrictions de type et de valeur imposées par *s* (par "
|
||
"exemple, :class:`bytearray` accepte uniquement des nombres entiers qui "
|
||
"répondent à la restriction de la valeur ``0 <= x <= 255``)."
|
||
|
||
#: library/stdtypes.rst:1129
|
||
msgid "``s[i] = x``"
|
||
msgstr "``s[i] = x``"
|
||
|
||
#: library/stdtypes.rst:1129
|
||
msgid "item *i* of *s* is replaced by *x*"
|
||
msgstr "l'élément *i* de *s* est remplacé par *x*"
|
||
|
||
#: library/stdtypes.rst:1132
|
||
msgid "``s[i:j] = t``"
|
||
msgstr "``s[i:j] = t``"
|
||
|
||
#: library/stdtypes.rst:1132
|
||
msgid ""
|
||
"slice of *s* from *i* to *j* is replaced by the contents of the iterable *t*"
|
||
msgstr ""
|
||
"la tranche de *s* de *i* à *j* est remplacée par le contenu de l'itérable *t*"
|
||
|
||
#: library/stdtypes.rst:1136
|
||
msgid "``del s[i:j]``"
|
||
msgstr "``del s[i:j]``"
|
||
|
||
#: library/stdtypes.rst:1136
|
||
msgid "same as ``s[i:j] = []``"
|
||
msgstr "identique à ``s[i:j] = []``"
|
||
|
||
#: library/stdtypes.rst:1138
|
||
msgid "``s[i:j:k] = t``"
|
||
msgstr "``s[i:j:k] = t``"
|
||
|
||
#: library/stdtypes.rst:1138
|
||
msgid "the elements of ``s[i:j:k]`` are replaced by those of *t*"
|
||
msgstr "les éléments de ``s[i:j:k]`` sont remplacés par ceux de *t*"
|
||
|
||
#: library/stdtypes.rst:1141
|
||
msgid "``del s[i:j:k]``"
|
||
msgstr "``del s[i:j:k]``"
|
||
|
||
#: library/stdtypes.rst:1141
|
||
msgid "removes the elements of ``s[i:j:k]`` from the list"
|
||
msgstr "supprime les éléments de ``s[i:j:k]`` de la liste"
|
||
|
||
#: library/stdtypes.rst:1144
|
||
msgid "``s.append(x)``"
|
||
msgstr "``s.append(x)``"
|
||
|
||
#: library/stdtypes.rst:1144
|
||
msgid ""
|
||
"appends *x* to the end of the sequence (same as ``s[len(s):len(s)] = [x]``)"
|
||
msgstr ""
|
||
"ajoute *x* à la fin de la séquence (identique à ``s[len(s):len(s)] = [x]``)"
|
||
|
||
#: library/stdtypes.rst:1148
|
||
msgid "``s.clear()``"
|
||
msgstr "``s.clear()``"
|
||
|
||
#: library/stdtypes.rst:1148
|
||
msgid "removes all items from *s* (same as ``del s[:]``)"
|
||
msgstr "supprime tous les éléments de *s* (identique à ``del s[:]``)"
|
||
|
||
#: library/stdtypes.rst:1151
|
||
msgid "``s.copy()``"
|
||
msgstr "``s.copy()``"
|
||
|
||
#: library/stdtypes.rst:1151
|
||
msgid "creates a shallow copy of *s* (same as ``s[:]``)"
|
||
msgstr "crée une copie superficielle de *s* (identique à ``s[:]``)"
|
||
|
||
#: library/stdtypes.rst:1154
|
||
msgid "``s.extend(t)`` or ``s += t``"
|
||
msgstr "``s.extend(t)`` ou ``s += t``"
|
||
|
||
#: library/stdtypes.rst:1154
|
||
msgid ""
|
||
"extends *s* with the contents of *t* (for the most part the same as "
|
||
"``s[len(s):len(s)] = t``)"
|
||
msgstr "étend *s* avec le contenu de *t* (proche de ``s[len(s):len(s)] = t``)"
|
||
|
||
#: library/stdtypes.rst:1159
|
||
msgid "``s *= n``"
|
||
msgstr "``s *= n``"
|
||
|
||
#: library/stdtypes.rst:1159
|
||
msgid "updates *s* with its contents repeated *n* times"
|
||
msgstr "met à jour *s* avec son contenu répété *n* fois"
|
||
|
||
#: library/stdtypes.rst:1162
|
||
msgid "``s.insert(i, x)``"
|
||
msgstr "``s.insert(i, x)``"
|
||
|
||
#: library/stdtypes.rst:1162
|
||
msgid ""
|
||
"inserts *x* into *s* at the index given by *i* (same as ``s[i:i] = [x]``)"
|
||
msgstr ""
|
||
"insère *x* dans *s* à l'indice donné par *i* (identique à ``s[i:i] = [x]``)"
|
||
|
||
#: library/stdtypes.rst:1166
|
||
msgid "``s.pop()`` or ``s.pop(i)``"
|
||
msgstr "``s.pop()`` ou ``s.pop(i)``"
|
||
|
||
#: library/stdtypes.rst:1166
|
||
msgid "retrieves the item at *i* and also removes it from *s*"
|
||
msgstr "récupère l'élément à la position *i* et le supprime de *s*"
|
||
|
||
#: library/stdtypes.rst:1169
|
||
msgid "``s.remove(x)``"
|
||
msgstr "``s.remove(x)``"
|
||
|
||
#: library/stdtypes.rst:1169
|
||
msgid "remove the first item from *s* where ``s[i]`` is equal to *x*"
|
||
msgstr "supprime le premier élément de *s* pour lequel ``s[i]`` est égal à *x*"
|
||
|
||
#: library/stdtypes.rst:1172
|
||
msgid "``s.reverse()``"
|
||
msgstr "``s.reverse()``"
|
||
|
||
#: library/stdtypes.rst:1172
|
||
msgid "reverses the items of *s* in place"
|
||
msgstr "inverse sur place les éléments de *s*"
|
||
|
||
#: library/stdtypes.rst:1180
|
||
msgid "*t* must have the same length as the slice it is replacing."
|
||
msgstr "*t* doit avoir la même longueur que la tranche qu'il remplace."
|
||
|
||
#: library/stdtypes.rst:1183
|
||
msgid ""
|
||
"The optional argument *i* defaults to ``-1``, so that by default the last "
|
||
"item is removed and returned."
|
||
msgstr ""
|
||
"L'argument optionnel *i* vaut ``-1`` par défaut, afin que, par défaut, le "
|
||
"dernier élément soit retiré et renvoyé."
|
||
|
||
#: library/stdtypes.rst:1187
|
||
msgid ":meth:`remove` raises :exc:`ValueError` when *x* is not found in *s*."
|
||
msgstr ""
|
||
":meth:`remove` lève une exception :exc:`ValueError` si *x* ne se trouve pas "
|
||
"dans *s*."
|
||
|
||
#: library/stdtypes.rst:1190
|
||
msgid ""
|
||
"The :meth:`reverse` method modifies the sequence in place for economy of "
|
||
"space when reversing a large sequence. To remind users that it operates by "
|
||
"side effect, it does not return the reversed sequence."
|
||
msgstr ""
|
||
"La méthode :meth:`reverse` modifie la séquence sur place pour économiser de "
|
||
"l'espace lors du traitement de grandes séquences. Pour rappeler aux "
|
||
"utilisateurs qu'elle a un effet de bord, elle ne renvoie pas la séquence "
|
||
"inversée."
|
||
|
||
#: library/stdtypes.rst:1195
|
||
msgid ""
|
||
":meth:`clear` and :meth:`!copy` are included for consistency with the "
|
||
"interfaces of mutable containers that don't support slicing operations (such "
|
||
"as :class:`dict` and :class:`set`). :meth:`!copy` is not part of the :class:"
|
||
"`collections.abc.MutableSequence` ABC, but most concrete mutable sequence "
|
||
"classes provide it."
|
||
msgstr ""
|
||
":meth:`clear` et :meth:`!copy` sont incluses pour la compatibilité avec les "
|
||
"interfaces des conteneurs muables qui ne gèrent pas les opérations de "
|
||
"découpage (comme :class:`dict` et :class:`set`). :meth:`!copy` ne fait pas "
|
||
"partie des classes mères abstraites (*ABC*) de :class:`collections.abc."
|
||
"MutableSequence`, mais la plupart des classes implémentées gérant des "
|
||
"séquences la proposent."
|
||
|
||
#: library/stdtypes.rst:1201
|
||
msgid ":meth:`clear` and :meth:`!copy` methods."
|
||
msgstr "méthodes :meth:`clear` et :meth:`!copy`."
|
||
|
||
#: library/stdtypes.rst:1205
|
||
msgid ""
|
||
"The value *n* is an integer, or an object implementing :meth:`~object."
|
||
"__index__`. Zero and negative values of *n* clear the sequence. Items in "
|
||
"the sequence are not copied; they are referenced multiple times, as "
|
||
"explained for ``s * n`` under :ref:`typesseq-common`."
|
||
msgstr ""
|
||
"La valeur *n* est un entier, ou un objet implémentant :meth:`~object."
|
||
"__index__`. Zéro et les valeurs négatives de *n* permettent d'effacer la "
|
||
"séquence. Les éléments dans la séquence ne sont pas copiés ; ils sont "
|
||
"référencés plusieurs fois, comme expliqué pour ``s * n`` dans :ref:`typesseq-"
|
||
"common`."
|
||
|
||
#: library/stdtypes.rst:1214
|
||
msgid "Lists"
|
||
msgstr "Listes"
|
||
|
||
#: library/stdtypes.rst:1218
|
||
msgid ""
|
||
"Lists are mutable sequences, typically used to store collections of "
|
||
"homogeneous items (where the precise degree of similarity will vary by "
|
||
"application)."
|
||
msgstr ""
|
||
"Les listes sont des séquences muables, généralement utilisées pour stocker "
|
||
"des collections d'éléments homogènes (le degré de similitude varie selon "
|
||
"l'usage)."
|
||
|
||
#: library/stdtypes.rst:1224
|
||
msgid "Lists may be constructed in several ways:"
|
||
msgstr "Les listes peuvent être construites de différentes manières :"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:1226
|
||
msgid "Using a pair of square brackets to denote the empty list: ``[]``"
|
||
msgstr ""
|
||
"en utilisant une paire de crochets pour indiquer une liste vide : ``[]`` ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:1227
|
||
msgid ""
|
||
"Using square brackets, separating items with commas: ``[a]``, ``[a, b, c]``"
|
||
msgstr ""
|
||
"au moyen de crochets, en séparant les éléments par des virgules : ``[a]``, "
|
||
"``[a, b, c]`` ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:1228
|
||
msgid "Using a list comprehension: ``[x for x in iterable]``"
|
||
msgstr "en utilisant une liste en compréhension : ``[x for x in iterable]`` ;"
|
||
|
||
# fin d'énumération
|
||
#: library/stdtypes.rst:1229
|
||
msgid "Using the type constructor: ``list()`` or ``list(iterable)``"
|
||
msgstr ""
|
||
"en utilisant le constructeur du type : ``list()`` ou ``list(iterable)``."
|
||
|
||
#: library/stdtypes.rst:1231
|
||
msgid ""
|
||
"The constructor builds a list whose items are the same and in the same order "
|
||
"as *iterable*'s items. *iterable* may be either a sequence, a container "
|
||
"that supports iteration, or an iterator object. If *iterable* is already a "
|
||
"list, a copy is made and returned, similar to ``iterable[:]``. For example, "
|
||
"``list('abc')`` returns ``['a', 'b', 'c']`` and ``list( (1, 2, 3) )`` "
|
||
"returns ``[1, 2, 3]``. If no argument is given, the constructor creates a "
|
||
"new empty list, ``[]``."
|
||
msgstr ""
|
||
"Le constructeur crée une liste dont les éléments sont les mêmes et dans le "
|
||
"même ordre que les éléments d'*iterable*. *iterable* peut être une séquence, "
|
||
"un conteneur qui prend en charge l'itération, ou un itérateur. Si *iterable* "
|
||
"est déjà une liste, une copie est faite et renvoyée, comme avec "
|
||
"``iterable[:]``. Par exemple, ``list('abc')`` renvoie ``['a', 'b', 'c']`` et "
|
||
"``list( (1, 2, 3) )`` renvoie ``[1, 2, 3]``. Si aucun argument est donné, le "
|
||
"constructeur crée une nouvelle liste vide, ``[]``."
|
||
|
||
#: library/stdtypes.rst:1240
|
||
msgid ""
|
||
"Many other operations also produce lists, including the :func:`sorted` built-"
|
||
"in."
|
||
msgstr ""
|
||
"De nombreuses autres opérations produisent des listes, comme la fonction "
|
||
"native :func:`sorted`."
|
||
|
||
#: library/stdtypes.rst:1243
|
||
msgid ""
|
||
"Lists implement all of the :ref:`common <typesseq-common>` and :ref:`mutable "
|
||
"<typesseq-mutable>` sequence operations. Lists also provide the following "
|
||
"additional method:"
|
||
msgstr ""
|
||
"Les listes gèrent toutes les opérations des séquences :ref:`communes "
|
||
"<typesseq-common>` et :ref:`muables <typesseq-mutable>`. Les listes "
|
||
"fournissent également la méthode supplémentaire suivante :"
|
||
|
||
#: library/stdtypes.rst:1249
|
||
msgid ""
|
||
"This method sorts the list in place, using only ``<`` comparisons between "
|
||
"items. Exceptions are not suppressed - if any comparison operations fail, "
|
||
"the entire sort operation will fail (and the list will likely be left in a "
|
||
"partially modified state)."
|
||
msgstr ""
|
||
"Cette méthode trie la liste sur place, en utilisant uniquement des "
|
||
"comparaisons ``<`` entre les éléments. Les exceptions ne sont pas "
|
||
"supprimées : si n'importe quelle opération de comparaison échoue, le tri "
|
||
"échoue (et la liste sera probablement laissée dans un état partiellement "
|
||
"modifié)."
|
||
|
||
#: library/stdtypes.rst:1254
|
||
msgid ""
|
||
":meth:`sort` accepts two arguments that can only be passed by keyword (:ref:"
|
||
"`keyword-only arguments <keyword-only_parameter>`):"
|
||
msgstr ""
|
||
":meth:`sort` accepte deux arguments qui ne peuvent être fournis que nommés "
|
||
"(voir :ref:`arguments nommés <keyword-only_parameter>`) :"
|
||
|
||
#: library/stdtypes.rst:1257
|
||
msgid ""
|
||
"*key* specifies a function of one argument that is used to extract a "
|
||
"comparison key from each list element (for example, ``key=str.lower``). The "
|
||
"key corresponding to each item in the list is calculated once and then used "
|
||
"for the entire sorting process. The default value of ``None`` means that "
|
||
"list items are sorted directly without calculating a separate key value."
|
||
msgstr ""
|
||
"*key* spécifie une fonction d'un argument utilisée pour extraire une clé de "
|
||
"comparaison de chaque élément de la liste (par exemple, ``key=str.lower``). "
|
||
"La clé correspondant à chaque élément de la liste n'est calculée qu'une "
|
||
"seule fois, puis utilisée durant tout le processus. La valeur par défaut, "
|
||
"``None``, signifie que les éléments sont triés directement sans calculer de "
|
||
"« valeur clé » séparée."
|
||
|
||
#: library/stdtypes.rst:1264
|
||
msgid ""
|
||
"The :func:`functools.cmp_to_key` utility is available to convert a 2.x style "
|
||
"*cmp* function to a *key* function."
|
||
msgstr ""
|
||
"La fonction utilitaire :func:`functools.cmp_to_key` est disponible pour "
|
||
"convertir une fonction *cmp* du style 2.x à une fonction *key*."
|
||
|
||
#: library/stdtypes.rst:1267
|
||
msgid ""
|
||
"*reverse* is a boolean value. If set to ``True``, then the list elements "
|
||
"are sorted as if each comparison were reversed."
|
||
msgstr ""
|
||
"*reverse*, une valeur booléenne. Si elle est ``True``, la liste d'éléments "
|
||
"est triée comme si toutes les comparaisons étaient inversées."
|
||
|
||
#: library/stdtypes.rst:1270
|
||
msgid ""
|
||
"This method modifies the sequence in place for economy of space when sorting "
|
||
"a large sequence. To remind users that it operates by side effect, it does "
|
||
"not return the sorted sequence (use :func:`sorted` to explicitly request a "
|
||
"new sorted list instance)."
|
||
msgstr ""
|
||
"Cette méthode modifie la séquence sur place pour économiser de l'espace lors "
|
||
"du tri de grandes séquences. Pour rappeler aux utilisateurs cet effet de "
|
||
"bord, elle ne renvoie pas la séquence triée (utilisez :func:`sorted` pour "
|
||
"demander explicitement une nouvelle instance de liste triée)."
|
||
|
||
#: library/stdtypes.rst:1275
|
||
msgid ""
|
||
"The :meth:`sort` method is guaranteed to be stable. A sort is stable if it "
|
||
"guarantees not to change the relative order of elements that compare equal "
|
||
"--- this is helpful for sorting in multiple passes (for example, sort by "
|
||
"department, then by salary grade)."
|
||
msgstr ""
|
||
"La méthode :meth:`sort` est garantie stable. Un tri est stable s'il garantit "
|
||
"de ne pas changer l'ordre relatif des éléments égaux — cela est utile pour "
|
||
"trier en plusieurs passes (par exemple, trier par service, puis par niveau "
|
||
"de salaire)."
|
||
|
||
#: library/stdtypes.rst:1280
|
||
msgid ""
|
||
"For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`."
|
||
msgstr ""
|
||
"Pour des exemples de tris et un bref tutoriel, consultez :ref:`sortinghowto`."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:1284
|
||
msgid ""
|
||
"While a list is being sorted, the effect of attempting to mutate, or even "
|
||
"inspect, the list is undefined. The C implementation of Python makes the "
|
||
"list appear empty for the duration, and raises :exc:`ValueError` if it can "
|
||
"detect that the list has been mutated during a sort."
|
||
msgstr ""
|
||
"l'effet de tenter de modifier, ou même inspecter la liste pendant qu'on la "
|
||
"trie est indéfini. L'implémentation C de Python fait apparaître la liste "
|
||
"comme vide pour la durée du traitement, et lève :exc:`ValueError` si elle "
|
||
"détecte que la liste a été modifiée au cours du tri."
|
||
|
||
#: library/stdtypes.rst:1293
|
||
msgid "Tuples"
|
||
msgstr "*N*-uplets"
|
||
|
||
#: library/stdtypes.rst:1297
|
||
msgid ""
|
||
"Tuples are immutable sequences, typically used to store collections of "
|
||
"heterogeneous data (such as the 2-tuples produced by the :func:`enumerate` "
|
||
"built-in). Tuples are also used for cases where an immutable sequence of "
|
||
"homogeneous data is needed (such as allowing storage in a :class:`set` or :"
|
||
"class:`dict` instance)."
|
||
msgstr ""
|
||
"Les *n*-uplets (*tuples* en anglais) sont des séquences immuables, "
|
||
"généralement utilisées pour stocker des collections de données hétérogènes "
|
||
"(telles que les paires produites par la fonction native :func:`enumerate`). "
|
||
"Les *n*-uplets sont également utilisés dans des cas où une séquence homogène "
|
||
"et immuable de données est nécessaire (pour, par exemple, les stocker dans "
|
||
"un :class:`ensemble <set>` ou un :class:`dictionnaire <dict>`)."
|
||
|
||
#: library/stdtypes.rst:1305
|
||
msgid "Tuples may be constructed in a number of ways:"
|
||
msgstr "Les *n*-uplets peuvent être construits de différentes façons :"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:1307
|
||
msgid "Using a pair of parentheses to denote the empty tuple: ``()``"
|
||
msgstr ""
|
||
"en utilisant une paire de parenthèses pour désigner le *n*-uplet vide : "
|
||
"``()`` ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:1308
|
||
msgid "Using a trailing comma for a singleton tuple: ``a,`` or ``(a,)``"
|
||
msgstr ""
|
||
"en utilisant une virgule, pour créer un *n*-uplet d'un élément : ``a,`` ou "
|
||
"``(a,)`` ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:1309
|
||
msgid "Separating items with commas: ``a, b, c`` or ``(a, b, c)``"
|
||
msgstr ""
|
||
"en séparant les éléments avec des virgules : ``a, b, c`` ou ``(a, b, c)`` ;"
|
||
|
||
# fin d'énumération
|
||
#: library/stdtypes.rst:1310
|
||
msgid "Using the :func:`tuple` built-in: ``tuple()`` or ``tuple(iterable)``"
|
||
msgstr ""
|
||
"en utilisant la fonction native :func:`tuple` : ``tuple()`` ou "
|
||
"``tuple(iterable)``."
|
||
|
||
#: library/stdtypes.rst:1312
|
||
msgid ""
|
||
"The constructor builds a tuple whose items are the same and in the same "
|
||
"order as *iterable*'s items. *iterable* may be either a sequence, a "
|
||
"container that supports iteration, or an iterator object. If *iterable* is "
|
||
"already a tuple, it is returned unchanged. For example, ``tuple('abc')`` "
|
||
"returns ``('a', 'b', 'c')`` and ``tuple( [1, 2, 3] )`` returns ``(1, 2, "
|
||
"3)``. If no argument is given, the constructor creates a new empty tuple, "
|
||
"``()``."
|
||
msgstr ""
|
||
"Le constructeur construit un *n*-uplet dont les éléments sont les mêmes et "
|
||
"dans le même ordre que les éléments de *iterable*. *iterable* peut être une "
|
||
"séquence, un conteneur qui prend en charge l'itération ou un itérateur. Si "
|
||
"*iterable* est déjà un *n*-uplet, il est renvoyé inchangé. Par exemple, "
|
||
"``tuple('abc')`` renvoie ``('a', 'b', 'c')`` et ``tuple( [1, 2, 3] )`` "
|
||
"renvoie ``(1, 2, 3)``. Si aucun argument n'est donné, le constructeur crée "
|
||
"un nouveau *n*-uplet vide, ``()``."
|
||
|
||
#: library/stdtypes.rst:1320
|
||
msgid ""
|
||
"Note that it is actually the comma which makes a tuple, not the parentheses. "
|
||
"The parentheses are optional, except in the empty tuple case, or when they "
|
||
"are needed to avoid syntactic ambiguity. For example, ``f(a, b, c)`` is a "
|
||
"function call with three arguments, while ``f((a, b, c))`` is a function "
|
||
"call with a 3-tuple as the sole argument."
|
||
msgstr ""
|
||
"Notez que c'est en fait la virgule qui fait un *n*-uplet et non les "
|
||
"parenthèses. Les parenthèses sont facultatives, sauf dans le cas du *n*-"
|
||
"uplet vide, ou lorsqu'elles sont nécessaires pour éviter l'ambiguïté "
|
||
"syntaxique. Par exemple, ``f(a, b, c)`` est un appel de fonction avec trois "
|
||
"arguments, alors que ``f((a, b, c))`` est un appel de fonction avec un "
|
||
"triplet comme unique argument."
|
||
|
||
#: library/stdtypes.rst:1326
|
||
msgid ""
|
||
"Tuples implement all of the :ref:`common <typesseq-common>` sequence "
|
||
"operations."
|
||
msgstr ""
|
||
"Les *n*-uplets implémentent toutes les opérations :ref:`communes <typesseq-"
|
||
"common>` des séquences."
|
||
|
||
#: library/stdtypes.rst:1329
|
||
msgid ""
|
||
"For heterogeneous collections of data where access by name is clearer than "
|
||
"access by index, :func:`collections.namedtuple` may be a more appropriate "
|
||
"choice than a simple tuple object."
|
||
msgstr ""
|
||
"Pour les collections hétérogènes de données où l'accès par nom est plus "
|
||
"clair que l'accès par indice, :func:`collections.namedtuple` peut être un "
|
||
"choix plus approprié qu'un simple *n*-uplet."
|
||
|
||
#: library/stdtypes.rst:1337
|
||
msgid "Ranges"
|
||
msgstr "*Ranges*"
|
||
|
||
#: library/stdtypes.rst:1341
|
||
msgid ""
|
||
"The :class:`range` type represents an immutable sequence of numbers and is "
|
||
"commonly used for looping a specific number of times in :keyword:`for` loops."
|
||
msgstr ""
|
||
"Le type :class:`range` représente une séquence immuable de nombres et est "
|
||
"couramment utilisé pour itérer un certain nombre de fois dans les boucles :"
|
||
"keyword:`for`."
|
||
|
||
#: library/stdtypes.rst:1348
|
||
msgid ""
|
||
"The arguments to the range constructor must be integers (either built-in :"
|
||
"class:`int` or any object that implements the :meth:`~object.__index__` "
|
||
"special method). If the *step* argument is omitted, it defaults to ``1``. "
|
||
"If the *start* argument is omitted, it defaults to ``0``. If *step* is "
|
||
"zero, :exc:`ValueError` is raised."
|
||
msgstr ""
|
||
"Les arguments du constructeur de *range* doivent être des entiers (des :"
|
||
"class:`int` ou tout autre objet qui implémente la méthode spéciale :meth:"
|
||
"`~object.__index__`). La valeur par défaut de l'argument *step* est ``1``. "
|
||
"La valeur par défaut de l'argument *start* est ``0``. Si *step* est égal à "
|
||
"zéro, une exception :exc:`ValueError` est levée."
|
||
|
||
#: library/stdtypes.rst:1354
|
||
msgid ""
|
||
"For a positive *step*, the contents of a range ``r`` are determined by the "
|
||
"formula ``r[i] = start + step*i`` where ``i >= 0`` and ``r[i] < stop``."
|
||
msgstr ""
|
||
"Pour un *step* positif, le contenu d'un *range* ``r`` est déterminé par la "
|
||
"formule ``r[i] = start + step*i`` où ``i >= 0`` et ``r[i] < stop``."
|
||
|
||
#: library/stdtypes.rst:1358
|
||
msgid ""
|
||
"For a negative *step*, the contents of the range are still determined by the "
|
||
"formula ``r[i] = start + step*i``, but the constraints are ``i >= 0`` and "
|
||
"``r[i] > stop``."
|
||
msgstr ""
|
||
"Pour un *step* négatif, le contenu du *range* est toujours déterminé par la "
|
||
"formule ``r[i] = start + step*i``, mais les contraintes sont ``i >= 0`` et "
|
||
"``r[i] > stop``."
|
||
|
||
#: library/stdtypes.rst:1362
|
||
msgid ""
|
||
"A range object will be empty if ``r[0]`` does not meet the value constraint. "
|
||
"Ranges do support negative indices, but these are interpreted as indexing "
|
||
"from the end of the sequence determined by the positive indices."
|
||
msgstr ""
|
||
"Un objet *range* sera vide si ``r[0]`` ne répond pas à la contrainte de "
|
||
"valeur. Les *range* prennent en charge les indices négatifs, mais ceux-ci "
|
||
"sont interprétées comme un indice à partir de la fin de la séquence "
|
||
"déterminée par les indices positifs."
|
||
|
||
#: library/stdtypes.rst:1367
|
||
msgid ""
|
||
"Ranges containing absolute values larger than :data:`sys.maxsize` are "
|
||
"permitted but some features (such as :func:`len`) may raise :exc:"
|
||
"`OverflowError`."
|
||
msgstr ""
|
||
"Les *range* contenant des valeurs absolues plus grandes que :data:`sys."
|
||
"maxsize` sont permises, mais certaines fonctionnalités (comme :func:`len`) "
|
||
"peuvent lever :exc:`OverflowError`."
|
||
|
||
#: library/stdtypes.rst:1371
|
||
msgid "Range examples::"
|
||
msgstr "Exemples avec *range* ::"
|
||
|
||
#: library/stdtypes.rst:1388
|
||
msgid ""
|
||
"Ranges implement all of the :ref:`common <typesseq-common>` sequence "
|
||
"operations except concatenation and repetition (due to the fact that range "
|
||
"objects can only represent sequences that follow a strict pattern and "
|
||
"repetition and concatenation will usually violate that pattern)."
|
||
msgstr ""
|
||
"*range* implémente toutes les opérations :ref:`communes <typesseq-common>` "
|
||
"des séquences sauf la concaténation et la répétition (en raison du fait que "
|
||
"les *range* ne peuvent représenter que des séquences qui respectent un motif "
|
||
"strict et que la répétition et la concaténation les feraient dévier de ce "
|
||
"motif)."
|
||
|
||
#: library/stdtypes.rst:1395
|
||
msgid ""
|
||
"The value of the *start* parameter (or ``0`` if the parameter was not "
|
||
"supplied)"
|
||
msgstr ""
|
||
"Valeur du paramètre *start* (ou ``0`` si le paramètre n'a pas été fourni)"
|
||
|
||
#: library/stdtypes.rst:1400
|
||
msgid "The value of the *stop* parameter"
|
||
msgstr "Valeur du paramètre *stop*"
|
||
|
||
#: library/stdtypes.rst:1404
|
||
msgid ""
|
||
"The value of the *step* parameter (or ``1`` if the parameter was not "
|
||
"supplied)"
|
||
msgstr ""
|
||
"Valeur du paramètre *step* (ou ``1`` si le paramètre n'a pas été fourni)"
|
||
|
||
#: library/stdtypes.rst:1407
|
||
msgid ""
|
||
"The advantage of the :class:`range` type over a regular :class:`list` or :"
|
||
"class:`tuple` is that a :class:`range` object will always take the same "
|
||
"(small) amount of memory, no matter the size of the range it represents (as "
|
||
"it only stores the ``start``, ``stop`` and ``step`` values, calculating "
|
||
"individual items and subranges as needed)."
|
||
msgstr ""
|
||
"L'avantage du type :class:`range` sur une :class:`liste <list>` classique ou "
|
||
"un :class:`n-uplet <tuple>` est qu'un objet :class:`range` occupe toujours "
|
||
"la même (petite) quantité de mémoire, peu importe la taille de l'intervalle "
|
||
"qu'il représente (car il ne stocke que les valeurs ``start``, ``stop``, "
|
||
"``step``, le calcul des éléments individuels et les sous-intervalles au "
|
||
"besoin)."
|
||
|
||
#: library/stdtypes.rst:1413
|
||
msgid ""
|
||
"Range objects implement the :class:`collections.abc.Sequence` ABC, and "
|
||
"provide features such as containment tests, element index lookup, slicing "
|
||
"and support for negative indices (see :ref:`typesseq`):"
|
||
msgstr ""
|
||
"Les *range* implémentent la classe mère abstraite :class:`collections.abc."
|
||
"Sequence` et offrent des fonctionnalités telles que les tests d'appartenance "
|
||
"(avec *in*), de recherche par indice, les tranches et ils gèrent les indices "
|
||
"négatifs (voir :ref:`typesseq`) :"
|
||
|
||
#: library/stdtypes.rst:1433
|
||
msgid ""
|
||
"Testing range objects for equality with ``==`` and ``!=`` compares them as "
|
||
"sequences. That is, two range objects are considered equal if they "
|
||
"represent the same sequence of values. (Note that two range objects that "
|
||
"compare equal might have different :attr:`~range.start`, :attr:`~range.stop` "
|
||
"and :attr:`~range.step` attributes, for example ``range(0) == range(2, 1, "
|
||
"3)`` or ``range(0, 3, 2) == range(0, 4, 2)``.)"
|
||
msgstr ""
|
||
"Comparer des *range* avec ``==`` et ``!=`` les compare comme des séquences. "
|
||
"C'est-à-dire que deux objets *range* sont considérés comme égaux s'ils "
|
||
"représentent la même séquence de valeurs. (Notez que deux objets *range* "
|
||
"dits égaux pourraient avoir leurs attributs :attr:`~range.start`, :attr:"
|
||
"`~range.stop` et :attr:`~range.step` différents, par exemple ``range(0) == "
|
||
"range(2, 1, 3)`` ou ``range(0, 3, 2) == range(0, 4, 2)``.)"
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:1440
|
||
msgid ""
|
||
"Implement the Sequence ABC. Support slicing and negative indices. Test :"
|
||
"class:`int` objects for membership in constant time instead of iterating "
|
||
"through all items."
|
||
msgstr ""
|
||
"implémente la classe mère abstraite *Sequence*. prend en charge les tranches "
|
||
"(*slicing*) et les indices négatifs. Teste l'appartenance d'un :class:`int` "
|
||
"en temps constant au lieu d'itérer sur tous les éléments."
|
||
|
||
#: library/stdtypes.rst:1446
|
||
msgid ""
|
||
"Define '==' and '!=' to compare range objects based on the sequence of "
|
||
"values they define (instead of comparing based on object identity)."
|
||
msgstr ""
|
||
"``==`` et ``!=`` comparent des *range* en fonction de la séquence de valeurs "
|
||
"qu'ils définissent (au lieu d'une comparaison fondée sur l'identité de "
|
||
"l'objet)."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:1451
|
||
msgid ""
|
||
"The :attr:`~range.start`, :attr:`~range.stop` and :attr:`~range.step` "
|
||
"attributes."
|
||
msgstr ""
|
||
"les attributs :attr:`~range.start`, :attr:`~range.stop` et :attr:`~range."
|
||
"step`."
|
||
|
||
#: library/stdtypes.rst:1457
|
||
msgid ""
|
||
"The `linspace recipe <https://code.activestate.com/recipes/579000/>`_ shows "
|
||
"how to implement a lazy version of range suitable for floating point "
|
||
"applications."
|
||
msgstr ""
|
||
"La `recette linspace <https://code.activestate.com/recipes/579000/>`_ montre "
|
||
"comment implémenter une version paresseuse de *range* adaptée aux nombres à "
|
||
"virgule flottante."
|
||
|
||
#: library/stdtypes.rst:1469
|
||
msgid "Text Sequence Type --- :class:`str`"
|
||
msgstr "Type Séquence de Texte — :class:`str`"
|
||
|
||
#: library/stdtypes.rst:1471
|
||
msgid ""
|
||
"Textual data in Python is handled with :class:`str` objects, or :dfn:"
|
||
"`strings`. Strings are immutable :ref:`sequences <typesseq>` of Unicode code "
|
||
"points. String literals are written in a variety of ways:"
|
||
msgstr ""
|
||
"Les données textuelles en Python sont manipulées avec des objets :class:"
|
||
"`str` ou :dfn:`strings`. Les chaînes sont des :ref:`séquences <typesseq>` "
|
||
"immuables de points de code Unicode. Les chaînes littérales peuvent être "
|
||
"écrites de différentes manières :"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:1476
|
||
msgid "Single quotes: ``'allows embedded \"double\" quotes'``"
|
||
msgstr ""
|
||
"entre guillemets simples : ``'cela autorise les \"guillemets anglais\"'`` ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:1477
|
||
msgid "Double quotes: ``\"allows embedded 'single' quotes\"``"
|
||
msgstr ""
|
||
"entre guillemets (anglais) : ``\"cela autorise les guillemets 'simples'\"`` ;"
|
||
|
||
# fin d'énumération
|
||
#: library/stdtypes.rst:1478
|
||
msgid ""
|
||
"Triple quoted: ``'''Three single quotes'''``, ``\"\"\"Three double "
|
||
"quotes\"\"\"``"
|
||
msgstr ""
|
||
"entre guillemets triples : ``'''Trois guillemets simples'''``, ``\"\"\"Trois "
|
||
"guillemets anglais\"\"\"``."
|
||
|
||
#: library/stdtypes.rst:1480
|
||
msgid ""
|
||
"Triple quoted strings may span multiple lines - all associated whitespace "
|
||
"will be included in the string literal."
|
||
msgstr ""
|
||
"Les chaînes entre guillemets triples peuvent couvrir plusieurs lignes, tous "
|
||
"les espaces associées sont alors incluses dans la chaîne littérale."
|
||
|
||
#: library/stdtypes.rst:1483
|
||
msgid ""
|
||
"String literals that are part of a single expression and have only "
|
||
"whitespace between them will be implicitly converted to a single string "
|
||
"literal. That is, ``(\"spam \" \"eggs\") == \"spam eggs\"``."
|
||
msgstr ""
|
||
"Les chaînes littérales qui font partie d'une seule expression et ont "
|
||
"seulement des espaces entre elles sont implicitement converties en une seule "
|
||
"chaîne littérale. Autrement dit, ``(\"spam \" \"eggs\") == \"spam eggs\"``."
|
||
|
||
#: library/stdtypes.rst:1487
|
||
msgid ""
|
||
"See :ref:`strings` for more about the various forms of string literal, "
|
||
"including supported escape sequences, and the ``r`` (\"raw\") prefix that "
|
||
"disables most escape sequence processing."
|
||
msgstr ""
|
||
"Voir :ref:`strings` pour plus d'informations sur les différentes formes de "
|
||
"chaînes littérales, y compris les séquences d'échappement prises en charge, "
|
||
"et le préfixe ``r`` (*raw* pour brut) qui désactive la plupart des "
|
||
"traitements de séquence d'échappement."
|
||
|
||
#: library/stdtypes.rst:1491
|
||
msgid ""
|
||
"Strings may also be created from other objects using the :class:`str` "
|
||
"constructor."
|
||
msgstr ""
|
||
"Les chaînes peuvent également être créées à partir d'autres objets à l'aide "
|
||
"du constructeur :class:`str`."
|
||
|
||
#: library/stdtypes.rst:1494
|
||
msgid ""
|
||
"Since there is no separate \"character\" type, indexing a string produces "
|
||
"strings of length 1. That is, for a non-empty string *s*, ``s[0] == s[0:1]``."
|
||
msgstr ""
|
||
"Comme il n'y a pas de type « caractère » propre, un indice d'une chaîne "
|
||
"produit une chaîne de longueur 1. Autrement dit, pour une chaîne non vide "
|
||
"*s*, ``s[0] == s[0:1]``."
|
||
|
||
#: library/stdtypes.rst:1500
|
||
msgid ""
|
||
"There is also no mutable string type, but :meth:`str.join` or :class:`io."
|
||
"StringIO` can be used to efficiently construct strings from multiple "
|
||
"fragments."
|
||
msgstr ""
|
||
"Il n'y a aucun type de chaîne muable, mais :meth:`str.join` ou :class:`io."
|
||
"StringIO` peuvent être utilisées pour construire efficacement des chaînes à "
|
||
"partir de plusieurs fragments."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:1504
|
||
msgid ""
|
||
"For backwards compatibility with the Python 2 series, the ``u`` prefix is "
|
||
"once again permitted on string literals. It has no effect on the meaning of "
|
||
"string literals and cannot be combined with the ``r`` prefix."
|
||
msgstr ""
|
||
"pour une compatibilité ascendante avec la série Python 2, le préfixe ``u`` "
|
||
"est à nouveau autorisé sur les chaînes littérales. Il n'a aucun effet sur le "
|
||
"sens des chaînes littérales et ne peut pas être combiné avec le préfixe "
|
||
"``r``."
|
||
|
||
#: library/stdtypes.rst:1516
|
||
msgid ""
|
||
"Return a :ref:`string <textseq>` version of *object*. If *object* is not "
|
||
"provided, returns the empty string. Otherwise, the behavior of ``str()`` "
|
||
"depends on whether *encoding* or *errors* is given, as follows."
|
||
msgstr ""
|
||
"Renvoie une représentation en :ref:`chaîne de caractères <textseq>` de "
|
||
"*object*. Si *object* n'est pas fourni, renvoie une chaîne vide. Sinon, le "
|
||
"comportement de ``str()`` dépend des valeurs données pour *encoding* et "
|
||
"*errors*, comme indiqué ci-dessous."
|
||
|
||
#: library/stdtypes.rst:1520
|
||
#, fuzzy
|
||
msgid ""
|
||
"If neither *encoding* nor *errors* is given, ``str(object)`` returns :meth:"
|
||
"`type(object).__str__(object) <object.__str__>`, which is the \"informal\" "
|
||
"or nicely printable string representation of *object*. For string objects, "
|
||
"this is the string itself. If *object* does not have a :meth:`~object."
|
||
"__str__` method, then :func:`str` falls back to returning :meth:"
|
||
"`repr(object) <repr>`."
|
||
msgstr ""
|
||
"Si ni *encoding* ni *errors* ne sont donnés, ``str(object)`` renvoie :meth:"
|
||
"`type(object).__str__(object) <object.__str__>`, qui est la représentation "
|
||
"en chaîne de caractères « informelle » ou joliment affichable de *object*. "
|
||
"Pour les chaînes, c'est la chaîne elle-même. Si *object* n'a pas de méthode :"
|
||
"meth:`~object.__str__`, :func:`str` utilise :meth:`repr(object) <repr>`."
|
||
|
||
#: library/stdtypes.rst:1532
|
||
msgid ""
|
||
"If at least one of *encoding* or *errors* is given, *object* should be a :"
|
||
"term:`bytes-like object` (e.g. :class:`bytes` or :class:`bytearray`). In "
|
||
"this case, if *object* is a :class:`bytes` (or :class:`bytearray`) object, "
|
||
"then ``str(bytes, encoding, errors)`` is equivalent to :meth:`bytes."
|
||
"decode(encoding, errors) <bytes.decode>`. Otherwise, the bytes object "
|
||
"underlying the buffer object is obtained before calling :meth:`bytes."
|
||
"decode`. See :ref:`binaryseq` and :ref:`bufferobjects` for information on "
|
||
"buffer objects."
|
||
msgstr ""
|
||
"Si au moins un des deux arguments *encoding* ou *errors* est donné, *object* "
|
||
"doit être un :term:`objet octet-compatible <bytes-like object>` (par "
|
||
"exemple, :class:`bytes` ou :class:`bytearray`). Dans ce cas, si *object* est "
|
||
"un objet :class:`bytes` (ou :class:`bytearray`), alors ``str(bytes, "
|
||
"encoding, errors)`` est équivalent à :meth:`bytes.decode(encoding, errors) "
|
||
"<bytes.decode>`. Sinon, l'objet *bytes* sous-jacent au tampon est obtenu "
|
||
"avant d'appeler :meth:`bytes.decode`. Voir :ref:`binaryseq` et :ref:"
|
||
"`bufferobjects` pour plus d'informations sur les tampons."
|
||
|
||
#: library/stdtypes.rst:1541
|
||
msgid ""
|
||
"Passing a :class:`bytes` object to :func:`str` without the *encoding* or "
|
||
"*errors* arguments falls under the first case of returning the informal "
|
||
"string representation (see also the :option:`-b` command-line option to "
|
||
"Python). For example::"
|
||
msgstr ""
|
||
"Donner un objet :class:`bytes` à :func:`str` sans argument *encoding* ni "
|
||
"argument *errors* relève du premier cas, où la représentation informelle de "
|
||
"la chaîne est renvoyée (voir aussi l'option :option:`-b` de Python). Par "
|
||
"exemple ::"
|
||
|
||
#: library/stdtypes.rst:1549
|
||
msgid ""
|
||
"For more information on the ``str`` class and its methods, see :ref:"
|
||
"`textseq` and the :ref:`string-methods` section below. To output formatted "
|
||
"strings, see the :ref:`f-strings` and :ref:`formatstrings` sections. In "
|
||
"addition, see the :ref:`stringservices` section."
|
||
msgstr ""
|
||
"Pour plus d'informations sur la classe ``str`` et ses méthodes, voir les "
|
||
"sections :ref:`textseq` et :ref:`string-methods`. Pour formater des chaînes "
|
||
"de caractères, voir les sections :ref:`f-strings` et :ref:`formatstrings`. "
|
||
"La section :ref:`stringservices` contient aussi des informations."
|
||
|
||
#: library/stdtypes.rst:1561
|
||
msgid "String Methods"
|
||
msgstr "Méthodes de chaînes de caractères"
|
||
|
||
#: library/stdtypes.rst:1566
|
||
msgid ""
|
||
"Strings implement all of the :ref:`common <typesseq-common>` sequence "
|
||
"operations, along with the additional methods described below."
|
||
msgstr ""
|
||
"Les chaînes implémentent toutes les opérations :ref:`communes des séquences "
|
||
"<typesseq-common>`, ainsi que les autres méthodes décrites ci-dessous."
|
||
|
||
#: library/stdtypes.rst:1569
|
||
msgid ""
|
||
"Strings also support two styles of string formatting, one providing a large "
|
||
"degree of flexibility and customization (see :meth:`str.format`, :ref:"
|
||
"`formatstrings` and :ref:`string-formatting`) and the other based on C "
|
||
"``printf`` style formatting that handles a narrower range of types and is "
|
||
"slightly harder to use correctly, but is often faster for the cases it can "
|
||
"handle (:ref:`old-string-formatting`)."
|
||
msgstr ""
|
||
"Les chaînes gèrent aussi deux styles de mise en forme, l'un fournissant une "
|
||
"grande flexibilité et de personnalisation (voir :meth:`str.format`, :ref:"
|
||
"`formatstrings` et :ref:`string-formatting`) et l'autre basée sur le style "
|
||
"de formatage de ``printf`` du C qui gère une gamme plus étroite de types et "
|
||
"est légèrement plus difficile à utiliser correctement, mais qui est souvent "
|
||
"plus rapide pour les cas pris en charge (:ref:`old-string-formatting`)."
|
||
|
||
#: library/stdtypes.rst:1576
|
||
msgid ""
|
||
"The :ref:`textservices` section of the standard library covers a number of "
|
||
"other modules that provide various text related utilities (including regular "
|
||
"expression support in the :mod:`re` module)."
|
||
msgstr ""
|
||
"La section :ref:`textservices` de la bibliothèque standard couvre un certain "
|
||
"nombre d'autres modules qui fournissent différents services relatifs au "
|
||
"texte (y compris les expressions rationnelles dans le module :mod:`re`)."
|
||
|
||
#: library/stdtypes.rst:1582
|
||
msgid ""
|
||
"Return a copy of the string with its first character capitalized and the "
|
||
"rest lowercased."
|
||
msgstr ""
|
||
"Renvoie une copie de la chaîne avec son premier caractère en majuscule et le "
|
||
"reste en minuscule."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:1585
|
||
msgid ""
|
||
"The first character is now put into titlecase rather than uppercase. This "
|
||
"means that characters like digraphs will only have their first letter "
|
||
"capitalized, instead of the full character."
|
||
msgstr ""
|
||
"le premier caractère est maintenant mis en *titlecase* plutôt qu'en "
|
||
"majuscule. Cela veut dire que les caractères comme les digrammes auront "
|
||
"seulement leur première lettre en majuscule, au lieu du caractère en entier."
|
||
|
||
#: library/stdtypes.rst:1592
|
||
msgid ""
|
||
"Return a casefolded copy of the string. Casefolded strings may be used for "
|
||
"caseless matching."
|
||
msgstr ""
|
||
"Renvoie une copie *casefolded* de la chaîne. Les chaînes *casefolded* "
|
||
"peuvent être utilisées dans des comparaisons insensibles à la casse."
|
||
|
||
#: library/stdtypes.rst:1595
|
||
msgid ""
|
||
"Casefolding is similar to lowercasing but more aggressive because it is "
|
||
"intended to remove all case distinctions in a string. For example, the "
|
||
"German lowercase letter ``'ß'`` is equivalent to ``\"ss\"``. Since it is "
|
||
"already lowercase, :meth:`lower` would do nothing to ``'ß'``; :meth:"
|
||
"`casefold` converts it to ``\"ss\"``."
|
||
msgstr ""
|
||
"Le *casefolding* est une technique agressive de mise en minuscule, car il "
|
||
"vise à éliminer toutes les distinctions de casse dans une chaîne. Par "
|
||
"exemple, la lettre minuscule ``'ß'`` de l'allemand équivaut à ``\"ss\"``. "
|
||
"Comme il est déjà minuscule, :meth:`lower` ne fait rien à ``'ß'`` ; :meth:"
|
||
"`casefold` le convertit en ``\"ss\"``."
|
||
|
||
#: library/stdtypes.rst:1601
|
||
#, fuzzy
|
||
msgid ""
|
||
"The casefolding algorithm is described in section 3.13 of the Unicode "
|
||
"Standard."
|
||
msgstr ""
|
||
"L'algorithme de *casefolding* est décrit dans la section 3.13 de la norme "
|
||
"Unicode."
|
||
|
||
#: library/stdtypes.rst:1609
|
||
msgid ""
|
||
"Return centered in a string of length *width*. Padding is done using the "
|
||
"specified *fillchar* (default is an ASCII space). The original string is "
|
||
"returned if *width* is less than or equal to ``len(s)``."
|
||
msgstr ""
|
||
"Renvoie la chaîne au centre d'une chaîne de longueur *width*. Le remplissage "
|
||
"est fait en utilisant l'argument *fillchar* (qui par défaut est une espace "
|
||
"ASCII). La chaîne d'origine est renvoyée si *width* est inférieure ou égale "
|
||
"à ``len(s)``."
|
||
|
||
#: library/stdtypes.rst:1617
|
||
msgid ""
|
||
"Return the number of non-overlapping occurrences of substring *sub* in the "
|
||
"range [*start*, *end*]. Optional arguments *start* and *end* are "
|
||
"interpreted as in slice notation."
|
||
msgstr ""
|
||
"Renvoie le nombre d'occurrences de *sub* ne se chevauchant pas dans "
|
||
"l'intervalle [*start*, *end*]. Les arguments facultatifs *start* et *end* "
|
||
"sont interprétés comme dans la notation des tranches (*slices* en anglais)."
|
||
|
||
#: library/stdtypes.rst:1621
|
||
msgid ""
|
||
"If *sub* is empty, returns the number of empty strings between characters "
|
||
"which is the length of the string plus one."
|
||
msgstr ""
|
||
"Si *sub* est vide, renvoie le nombre de chaînes vides entre les caractères "
|
||
"de début et de fin, ce qui correspond à la longueur de la chaîne plus un."
|
||
|
||
#: library/stdtypes.rst:1627
|
||
msgid "Return the string encoded to :class:`bytes`."
|
||
msgstr "Renvoie la chaine encodée dans une instance de :class:`bytes`."
|
||
|
||
#: library/stdtypes.rst:2764
|
||
msgid ""
|
||
"*encoding* defaults to ``'utf-8'``; see :ref:`standard-encodings` for "
|
||
"possible values."
|
||
msgstr ""
|
||
"*encoding* vaut par défaut ``utf-8`` ; pour une liste des encodages "
|
||
"possibles, voir la section :ref:`standard-encodings`."
|
||
|
||
#: library/stdtypes.rst:1632
|
||
msgid ""
|
||
"*errors* controls how encoding errors are handled. If ``'strict'`` (the "
|
||
"default), a :exc:`UnicodeError` exception is raised. Other possible values "
|
||
"are ``'ignore'``, ``'replace'``, ``'xmlcharrefreplace'``, "
|
||
"``'backslashreplace'`` and any other name registered via :func:`codecs."
|
||
"register_error`. See :ref:`error-handlers` for details."
|
||
msgstr ""
|
||
"*errors* détermine la manière dont les erreurs sont traitées. La valeur par "
|
||
"défaut est ``'strict'``, ce qui signifie que les erreurs d'encodage lèvent "
|
||
"une :exc:`UnicodeError`. Les autres valeurs possibles sont ``'ignore'``, "
|
||
"``'replace'``, ``'xmlcharrefreplace'``, ``'backslashreplace'`` et tout autre "
|
||
"nom enregistré *via* :func:`codecs.register_error`. Voir la section :ref:"
|
||
"`error-handlers` pour plus de détails."
|
||
|
||
#: library/stdtypes.rst:1639
|
||
msgid ""
|
||
"For performance reasons, the value of *errors* is not checked for validity "
|
||
"unless an encoding error actually occurs, :ref:`devmode` is enabled or a :"
|
||
"ref:`debug build <debug-build>` is used."
|
||
msgstr ""
|
||
"Pour des raisons de performances, la valeur de *errors* n'est pas vérifiée à "
|
||
"moins qu'une erreur d'encodage ne se produise réellement, que le :ref:`mode "
|
||
"développeur <devmode>` ne soit activé ou que Python ait été compilé en :ref:"
|
||
"`mode débogage <debug-build>`."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:2783
|
||
msgid "Added support for keyword arguments."
|
||
msgstr "gère les arguments nommés."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:2786
|
||
msgid ""
|
||
"The value of the *errors* argument is now checked in :ref:`devmode` and in :"
|
||
"ref:`debug mode <debug-build>`."
|
||
msgstr ""
|
||
"les valeurs de *errors* sont maintenant vérifiées en :ref:`mode de "
|
||
"développement <devmode>` et en :ref:`mode de débogage <debug-build>`."
|
||
|
||
#: library/stdtypes.rst:1654
|
||
msgid ""
|
||
"Return ``True`` if the string ends with the specified *suffix*, otherwise "
|
||
"return ``False``. *suffix* can also be a tuple of suffixes to look for. "
|
||
"With optional *start*, test beginning at that position. With optional "
|
||
"*end*, stop comparing at that position."
|
||
msgstr ""
|
||
"Renvoie ``True`` si la chaîne se termine par *suffix*, sinon ``False``. "
|
||
"*suffix* peut aussi être un *n*-uplet de suffixes à rechercher. Si "
|
||
"l'argument optionnel *start* est donné, le test se fait à partir de cette "
|
||
"position. Si l'argument optionnel *end* est fourni, la comparaison s'arrête "
|
||
"à cette position."
|
||
|
||
#: library/stdtypes.rst:1662
|
||
msgid ""
|
||
"Return a copy of the string where all tab characters are replaced by one or "
|
||
"more spaces, depending on the current column and the given tab size. Tab "
|
||
"positions occur every *tabsize* characters (default is 8, giving tab "
|
||
"positions at columns 0, 8, 16 and so on). To expand the string, the current "
|
||
"column is set to zero and the string is examined character by character. If "
|
||
"the character is a tab (``\\t``), one or more space characters are inserted "
|
||
"in the result until the current column is equal to the next tab position. "
|
||
"(The tab character itself is not copied.) If the character is a newline "
|
||
"(``\\n``) or return (``\\r``), it is copied and the current column is reset "
|
||
"to zero. Any other character is copied unchanged and the current column is "
|
||
"incremented by one regardless of how the character is represented when "
|
||
"printed."
|
||
msgstr ""
|
||
"Renvoie une copie de la chaîne où toutes les tabulations sont remplacées par "
|
||
"une ou plusieurs espaces, en fonction de la colonne courante et de la taille "
|
||
"de tabulation donnée. Les positions des tabulations se trouvent tous les "
|
||
"*tabsize* caractères (8 par défaut, ce qui donne les positions de "
|
||
"tabulations aux colonnes 0, 8, 16 et ainsi de suite). Pour travailler sur la "
|
||
"chaîne, la colonne en cours est mise à zéro et la chaîne est examinée "
|
||
"caractère par caractère. Si le caractère est une tabulation (``\\t``), un ou "
|
||
"plusieurs caractères d'espacement sont insérés dans le résultat jusqu'à ce "
|
||
"que la colonne courante soit égale à la position de tabulation suivante (le "
|
||
"caractère tabulation lui-même n'est pas copié). Si le caractère est un saut "
|
||
"de ligne (``\\n``) ou un retour chariot (``\\r``), il est copié et la "
|
||
"colonne en cours est remise à zéro. Tout autre caractère est copié inchangé "
|
||
"et la colonne en cours est incrémentée de un indépendamment de la façon dont "
|
||
"le caractère est représenté lors de l'affichage."
|
||
|
||
#: library/stdtypes.rst:1683
|
||
msgid ""
|
||
"Return the lowest index in the string where substring *sub* is found within "
|
||
"the slice ``s[start:end]``. Optional arguments *start* and *end* are "
|
||
"interpreted as in slice notation. Return ``-1`` if *sub* is not found."
|
||
msgstr ""
|
||
"Renvoie l'indice de la première position dans la chaîne où *sub* est trouvé "
|
||
"dans le découpage ``s[start:end]``. Les arguments facultatifs *start* et "
|
||
"*end* sont interprétés comme dans la notation des découpages (*slice* en "
|
||
"anglais). Renvoie ``-1`` si *sub* n'est pas trouvé."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:1689
|
||
msgid ""
|
||
"The :meth:`~str.find` method should be used only if you need to know the "
|
||
"position of *sub*. To check if *sub* is a substring or not, use the :"
|
||
"keyword:`in` operator::"
|
||
msgstr ""
|
||
"la méthode :meth:`~str.find` ne doit être utilisée que si vous avez besoin "
|
||
"de connaître la position de *sub*. Pour vérifier si *sub* est une sous "
|
||
"chaine ou non, utilisez l'opérateur :keyword:`in` ::"
|
||
|
||
#: library/stdtypes.rst:1699
|
||
msgid ""
|
||
"Perform a string formatting operation. The string on which this method is "
|
||
"called can contain literal text or replacement fields delimited by braces "
|
||
"``{}``. Each replacement field contains either the numeric index of a "
|
||
"positional argument, or the name of a keyword argument. Returns a copy of "
|
||
"the string where each replacement field is replaced with the string value of "
|
||
"the corresponding argument."
|
||
msgstr ""
|
||
"Formate une chaîne. La chaîne sur laquelle cette méthode est appelée peut "
|
||
"contenir du texte littéral ou des emplacements de remplacement délimités par "
|
||
"des accolades ``{}``. Chaque champ de remplacement contient soit l'indice "
|
||
"numérique d'un argument positionnel, soit le nom d'un argument nommé. "
|
||
"Renvoie une copie de la chaîne où chaque champ de remplacement est remplacé "
|
||
"par la valeur de chaîne de l'argument correspondant."
|
||
|
||
#: library/stdtypes.rst:1709
|
||
msgid ""
|
||
"See :ref:`formatstrings` for a description of the various formatting options "
|
||
"that can be specified in format strings."
|
||
msgstr ""
|
||
"Voir :ref:`formatstrings` pour une description des options de formatage qui "
|
||
"peuvent être spécifiées dans les chaînes de format."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:1713
|
||
msgid ""
|
||
"When formatting a number (:class:`int`, :class:`float`, :class:`complex`, :"
|
||
"class:`decimal.Decimal` and subclasses) with the ``n`` type (ex: ``'{:n}'."
|
||
"format(1234)``), the function temporarily sets the ``LC_CTYPE`` locale to "
|
||
"the ``LC_NUMERIC`` locale to decode ``decimal_point`` and ``thousands_sep`` "
|
||
"fields of :c:func:`localeconv` if they are non-ASCII or longer than 1 byte, "
|
||
"and the ``LC_NUMERIC`` locale is different than the ``LC_CTYPE`` locale. "
|
||
"This temporary change affects other threads."
|
||
msgstr ""
|
||
"lors du formatage avec le format ``n`` (comme ``'{:n}'.format(1234)``) d'un "
|
||
"nombre (:class:`int`, :class:`float`, :class:`complex`, :class:`decimal."
|
||
"Decimal` et classes dérivées), la fonction met temporairement la variable "
|
||
"``LC_CTYPE`` à la valeur de ``LC_NUMERIC`` pour décoder correctement les "
|
||
"attributs ``decimal_point`` et ``thousands_sep`` de :c:func:`localeconv`, "
|
||
"s'ils ne sont pas en ASCII ou font plus d'un octet et que ``LC_NUMERIC`` est "
|
||
"différent de ``LC_CTYPE``. Ce changement temporaire affecte les autres fils "
|
||
"d'exécution."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:1722
|
||
msgid ""
|
||
"When formatting a number with the ``n`` type, the function sets temporarily "
|
||
"the ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale in some cases."
|
||
msgstr ""
|
||
"lors du formatage d'un nombre avec le format ``n``, la fonction change "
|
||
"temporairement ``LC_CTYPE`` par la valeur de ``LC_NUMERIC`` dans certains "
|
||
"cas."
|
||
|
||
#: library/stdtypes.rst:1730
|
||
msgid ""
|
||
"Similar to ``str.format(**mapping)``, except that ``mapping`` is used "
|
||
"directly and not copied to a :class:`dict`. This is useful if for example "
|
||
"``mapping`` is a dict subclass:"
|
||
msgstr ""
|
||
"Semblable à ``str.format(**mapping)``, sauf que ``mapping`` est utilisé "
|
||
"directement et non copié dans un :class:`dict`. C'est utile si, par exemple, "
|
||
"``mapping`` est une sous-classe de ``dict`` :"
|
||
|
||
#: library/stdtypes.rst:1746
|
||
msgid ""
|
||
"Like :meth:`~str.find`, but raise :exc:`ValueError` when the substring is "
|
||
"not found."
|
||
msgstr ""
|
||
"Comme :meth:`~str.find`, mais lève une :exc:`ValueError` lorsque la chaîne "
|
||
"est introuvable."
|
||
|
||
#: library/stdtypes.rst:1752
|
||
msgid ""
|
||
"Return ``True`` if all characters in the string are alphanumeric and there "
|
||
"is at least one character, ``False`` otherwise. A character ``c`` is "
|
||
"alphanumeric if one of the following returns ``True``: ``c.isalpha()``, ``c."
|
||
"isdecimal()``, ``c.isdigit()``, or ``c.isnumeric()``."
|
||
msgstr ""
|
||
"Renvoie ``True`` si tous les caractères de la chaîne sont alphanumériques et "
|
||
"qu'il y a au moins un caractère, sinon ``False``. Un caractère ``c`` est "
|
||
"alphanumérique si l'un des tests suivants renvoie ``True`` : ``c."
|
||
"isalpha()``, ``c.isdecimal()``, ``c.isdigit()`` ou ``c.isnumeric()``."
|
||
|
||
#: library/stdtypes.rst:1760
|
||
#, fuzzy
|
||
msgid ""
|
||
"Return ``True`` if all characters in the string are alphabetic and there is "
|
||
"at least one character, ``False`` otherwise. Alphabetic characters are "
|
||
"those characters defined in the Unicode character database as \"Letter\", i."
|
||
"e., those with general category property being one of \"Lm\", \"Lt\", "
|
||
"\"Lu\", \"Ll\", or \"Lo\". Note that this is different from the "
|
||
"\"Alphabetic\" property defined in the Unicode Standard."
|
||
msgstr ""
|
||
"Renvoie ``True`` si tous les caractères de la chaîne sont alphabétiques et "
|
||
"qu'elle contient au moins un caractère, sinon ``False``. Les caractères "
|
||
"alphabétiques sont les caractères définis dans la base de données de "
|
||
"caractères Unicode comme *Letter*, à savoir, ceux qui ont \"Lm\", \"Lt\", "
|
||
"\"Lu\", \"Ll\" ou \"Lo\" comme catégorie générale. Notez que c'est différent "
|
||
"de la propriété *Alphabetic* définie dans la norme Unicode."
|
||
|
||
#: library/stdtypes.rst:1769
|
||
msgid ""
|
||
"Return ``True`` if the string is empty or all characters in the string are "
|
||
"ASCII, ``False`` otherwise. ASCII characters have code points in the range "
|
||
"U+0000-U+007F."
|
||
msgstr ""
|
||
"Renvoie ``True`` si la chaîne est vide ou ne contient que des caractères "
|
||
"ASCII, ``False`` sinon. Les caractères ASCII ont un code dans l'intervalle "
|
||
"``\"U+0000\"``\\ –\\ ``\"U+007F\"``."
|
||
|
||
#: library/stdtypes.rst:1778
|
||
msgid ""
|
||
"Return ``True`` if all characters in the string are decimal characters and "
|
||
"there is at least one character, ``False`` otherwise. Decimal characters are "
|
||
"those that can be used to form numbers in base 10, e.g. U+0660, ARABIC-INDIC "
|
||
"DIGIT ZERO. Formally a decimal character is a character in the Unicode "
|
||
"General Category \"Nd\"."
|
||
msgstr ""
|
||
"Renvoie ``True`` si tous les caractères de la chaîne sont des caractères "
|
||
"décimaux et qu'elle contient au moins un caractère, sinon ``False``. Les "
|
||
"caractères décimaux sont ceux pouvant être utilisés pour former des nombres "
|
||
"en base 10, tels que U+0660, ARABIC-INDIC DIGIT ZERO. Formellement, un "
|
||
"caractère décimal est un caractère dans la catégorie Unicode générale \"Nd\"."
|
||
|
||
#: library/stdtypes.rst:1788
|
||
msgid ""
|
||
"Return ``True`` if all characters in the string are digits and there is at "
|
||
"least one character, ``False`` otherwise. Digits include decimal characters "
|
||
"and digits that need special handling, such as the compatibility superscript "
|
||
"digits. This covers digits which cannot be used to form numbers in base 10, "
|
||
"like the Kharosthi numbers. Formally, a digit is a character that has the "
|
||
"property value Numeric_Type=Digit or Numeric_Type=Decimal."
|
||
msgstr ""
|
||
"Renvoie ``True`` si tous les caractères de la chaîne sont des chiffres et "
|
||
"qu'elle contient au moins un caractère, ``False`` sinon. Les chiffres "
|
||
"incluent des caractères décimaux et des chiffres qui nécessitent une "
|
||
"manipulation particulière, tels que les *compatibility superscript digits*. "
|
||
"Ça couvre les chiffres qui ne peuvent pas être utilisés pour construire des "
|
||
"nombres en base 10, tels que les nombres de Kharosthi. Formellement, un "
|
||
"chiffre est un caractère dont la valeur de la propriété *Numeric_Type* est "
|
||
"*Digit* ou *Decimal*."
|
||
|
||
#: library/stdtypes.rst:1798
|
||
msgid ""
|
||
"Return ``True`` if the string is a valid identifier according to the "
|
||
"language definition, section :ref:`identifiers`."
|
||
msgstr ""
|
||
"Renvoie ``True`` si la chaîne est un identifiant valide selon la définition "
|
||
"du langage, section :ref:`identifiers`."
|
||
|
||
#: library/stdtypes.rst:1801
|
||
#, fuzzy
|
||
msgid ""
|
||
"Call :func:`keyword.iskeyword` to test whether string ``s`` is a reserved "
|
||
"identifier, such as :keyword:`def` and :keyword:`class`."
|
||
msgstr ""
|
||
"Utilisez :func:`keyword.iskeyword` pour savoir si la chaîne ``s`` est un "
|
||
"identifiant réservé, tels que :keyword:`def` et :keyword:`class`."
|
||
|
||
#: library/stdtypes.rst:1804
|
||
msgid "Example: ::"
|
||
msgstr "Par exemple ::"
|
||
|
||
#: library/stdtypes.rst:1817
|
||
msgid ""
|
||
"Return ``True`` if all cased characters [4]_ in the string are lowercase and "
|
||
"there is at least one cased character, ``False`` otherwise."
|
||
msgstr ""
|
||
"Renvoie ``True`` si tous les caractères capitalisables [4]_ de la chaîne "
|
||
"sont en minuscules et qu'elle contient au moins un caractère capitalisable. "
|
||
"Renvoie ``False`` dans le cas contraire."
|
||
|
||
#: library/stdtypes.rst:1823
|
||
msgid ""
|
||
"Return ``True`` if all characters in the string are numeric characters, and "
|
||
"there is at least one character, ``False`` otherwise. Numeric characters "
|
||
"include digit characters, and all characters that have the Unicode numeric "
|
||
"value property, e.g. U+2155, VULGAR FRACTION ONE FIFTH. Formally, numeric "
|
||
"characters are those with the property value Numeric_Type=Digit, "
|
||
"Numeric_Type=Decimal or Numeric_Type=Numeric."
|
||
msgstr ""
|
||
"Renvoie ``True`` si tous les caractères de la chaîne sont des caractères "
|
||
"numériques et qu'elle contient au moins un caractère, sinon ``False``. Les "
|
||
"caractères numériques comprennent les chiffres et tous les caractères qui "
|
||
"ont la propriété Unicode *numeric value*, par exemple U+2155, *VULGAR "
|
||
"FRACTION OF FIFTH*. Formellement, les caractères numériques sont ceux avec "
|
||
"les propriétés *Numeric_Type=Digit*, *Numeric_Type=Decimal* ou "
|
||
"*Numeric_Type=Numeric*."
|
||
|
||
#: library/stdtypes.rst:1833
|
||
msgid ""
|
||
"Return ``True`` if all characters in the string are printable or the string "
|
||
"is empty, ``False`` otherwise. Nonprintable characters are those characters "
|
||
"defined in the Unicode character database as \"Other\" or \"Separator\", "
|
||
"excepting the ASCII space (0x20) which is considered printable. (Note that "
|
||
"printable characters in this context are those which should not be escaped "
|
||
"when :func:`repr` is invoked on a string. It has no bearing on the handling "
|
||
"of strings written to :data:`sys.stdout` or :data:`sys.stderr`.)"
|
||
msgstr ""
|
||
"Renvoie ``True`` si tous les caractères de la chaîne sont affichables ou si "
|
||
"elle est vide, sinon ``False``. Les caractères non affichables sont les "
|
||
"caractères définis dans la base de données de caractères Unicode comme "
|
||
"« *Other* » ou « *Separator* », à l'exception de l'espace ASCII (``0x20``) "
|
||
"qui est considérée comme affichable. (Notez que les caractères imprimables "
|
||
"dans ce contexte sont ceux qui ne doivent pas être échappés quand :func:"
|
||
"`repr` est invoquée sur une chaîne. Ça n'a aucune incidence sur le "
|
||
"traitement des chaînes écrites sur :data:`sys.stdout` ou :data:`sys.stderr`.)"
|
||
|
||
#: library/stdtypes.rst:1844
|
||
msgid ""
|
||
"Return ``True`` if there are only whitespace characters in the string and "
|
||
"there is at least one character, ``False`` otherwise."
|
||
msgstr ""
|
||
"Renvoie ``True`` s'il n'y a que des caractères d'espacement dans la chaîne "
|
||
"et qu'elle comporte au moins un caractère. Renvoie ``False`` dans le cas "
|
||
"contraire."
|
||
|
||
#: library/stdtypes.rst:1847
|
||
msgid ""
|
||
"A character is *whitespace* if in the Unicode character database (see :mod:"
|
||
"`unicodedata`), either its general category is ``Zs`` (\"Separator, "
|
||
"space\"), or its bidirectional class is one of ``WS``, ``B``, or ``S``."
|
||
msgstr ""
|
||
"Un caractère est considéré comme un caractère d'espacement (*whitespace* en "
|
||
"anglais) si, dans la base de données caractères Unicode (voir :mod:"
|
||
"`unicodedata`), sa catégorie générale est ``Zs`` (« séparateur, espace »), "
|
||
"ou sa classe bidirectionnelle est une de ``WS``, ``B``, ou ``S``."
|
||
|
||
#: library/stdtypes.rst:1855
|
||
msgid ""
|
||
"Return ``True`` if the string is a titlecased string and there is at least "
|
||
"one character, for example uppercase characters may only follow uncased "
|
||
"characters and lowercase characters only cased ones. Return ``False`` "
|
||
"otherwise."
|
||
msgstr ""
|
||
"Renvoie ``True`` si la chaîne est une chaîne *titlecased* et qu'elle "
|
||
"contient au moins un caractère, par exemple les caractères majuscules ne "
|
||
"peuvent suivre les caractères non capitalisables et les caractères "
|
||
"minuscules ne peuvent suivre que des caractères capitalisables. Renvoie "
|
||
"``False`` dans le cas contraire."
|
||
|
||
#: library/stdtypes.rst:1862
|
||
msgid ""
|
||
"Return ``True`` if all cased characters [4]_ in the string are uppercase and "
|
||
"there is at least one cased character, ``False`` otherwise."
|
||
msgstr ""
|
||
"Renvoie ``True`` si tous les caractères différentiables sur la casse [4]_ de "
|
||
"la chaîne sont en majuscules et s'il y a au moins un caractère "
|
||
"différentiable sur la casse, sinon ``False``."
|
||
|
||
#: library/stdtypes.rst:1880
|
||
msgid ""
|
||
"Return a string which is the concatenation of the strings in *iterable*. A :"
|
||
"exc:`TypeError` will be raised if there are any non-string values in "
|
||
"*iterable*, including :class:`bytes` objects. The separator between "
|
||
"elements is the string providing this method."
|
||
msgstr ""
|
||
"Renvoie une chaîne qui est la concaténation des chaînes contenues dans "
|
||
"*iterable*. Une :exc:`TypeError` est levée si une valeur d'*iterable* n'est "
|
||
"pas une chaîne, y compris pour les objets :class:`bytes`. Le séparateur "
|
||
"entre les éléments est la chaîne fournissant cette méthode."
|
||
|
||
#: library/stdtypes.rst:1888
|
||
msgid ""
|
||
"Return the string left justified in a string of length *width*. Padding is "
|
||
"done using the specified *fillchar* (default is an ASCII space). The "
|
||
"original string is returned if *width* is less than or equal to ``len(s)``."
|
||
msgstr ""
|
||
"Renvoie la chaîne justifiée à gauche dans une chaîne de longueur *width*. Le "
|
||
"bourrage est fait en utilisant *fillchar* (qui par défaut est une espace "
|
||
"ASCII). La chaîne d'origine est renvoyée si *width* est inférieure ou égale "
|
||
"à ``len(s)``."
|
||
|
||
#: library/stdtypes.rst:1895
|
||
msgid ""
|
||
"Return a copy of the string with all the cased characters [4]_ converted to "
|
||
"lowercase."
|
||
msgstr ""
|
||
"Renvoie une copie de la chaîne avec tous les caractères différentiables sur "
|
||
"la casse [4]_ convertis en minuscules."
|
||
|
||
#: library/stdtypes.rst:1898
|
||
#, fuzzy
|
||
msgid ""
|
||
"The lowercasing algorithm used is described in section 3.13 of the Unicode "
|
||
"Standard."
|
||
msgstr ""
|
||
"L'algorithme de mise en minuscules utilisé est décrit dans la section 3.13 "
|
||
"de la norme Unicode."
|
||
|
||
#: library/stdtypes.rst:1904
|
||
msgid ""
|
||
"Return a copy of the string with leading characters removed. The *chars* "
|
||
"argument is a string specifying the set of characters to be removed. If "
|
||
"omitted or ``None``, the *chars* argument defaults to removing whitespace. "
|
||
"The *chars* argument is not a prefix; rather, all combinations of its values "
|
||
"are stripped::"
|
||
msgstr ""
|
||
"Renvoie une copie de la chaîne avec des caractères supprimés au début. "
|
||
"L'argument *chars* est une chaîne spécifiant le jeu de caractères à "
|
||
"supprimer. En cas d'omission ou ``None``, la valeur par défaut de *chars* "
|
||
"permet de supprimer des caractères d'espacement. L'argument *chars* n'est "
|
||
"pas un préfixe, toutes les combinaisons de ses valeurs sont supprimées ::"
|
||
|
||
#: library/stdtypes.rst:1914
|
||
msgid ""
|
||
"See :meth:`str.removeprefix` for a method that will remove a single prefix "
|
||
"string rather than all of a set of characters. For example::"
|
||
msgstr ""
|
||
"Voir :meth:`str.removeprefix` pour une méthode qui supprime une seule chaîne "
|
||
"de préfixe plutôt que la totalité d'un ensemble de caractères. Par exemple ::"
|
||
|
||
#: library/stdtypes.rst:1925
|
||
msgid ""
|
||
"This static method returns a translation table usable for :meth:`str."
|
||
"translate`."
|
||
msgstr ""
|
||
"Cette méthode statique renvoie une table de traduction utilisable pour :meth:"
|
||
"`str.translate`."
|
||
|
||
#: library/stdtypes.rst:1927
|
||
msgid ""
|
||
"If there is only one argument, it must be a dictionary mapping Unicode "
|
||
"ordinals (integers) or characters (strings of length 1) to Unicode ordinals, "
|
||
"strings (of arbitrary lengths) or ``None``. Character keys will then be "
|
||
"converted to ordinals."
|
||
msgstr ""
|
||
"Si un seul argument est fourni, ce soit être un dictionnaire faisant "
|
||
"correspondre des points de code Unicode (nombres entiers) ou des caractères "
|
||
"(chaînes de longueur 1) à des points de code Unicode."
|
||
|
||
#: library/stdtypes.rst:1932
|
||
msgid ""
|
||
"If there are two arguments, they must be strings of equal length, and in the "
|
||
"resulting dictionary, each character in x will be mapped to the character at "
|
||
"the same position in y. If there is a third argument, it must be a string, "
|
||
"whose characters will be mapped to ``None`` in the result."
|
||
msgstr ""
|
||
"Si deux arguments sont fournis, ce doit être deux chaînes de caractères de "
|
||
"même longueur. Le dictionnaire renvoyé fera correspondre pour chaque "
|
||
"caractère de x un caractère de y pris à la même place. Si un troisième "
|
||
"argument est fourni, ce doit être une chaîne dont chaque caractère "
|
||
"correspondra à ``None`` dans le résultat."
|
||
|
||
#: library/stdtypes.rst:1940
|
||
msgid ""
|
||
"Split the string at the first occurrence of *sep*, and return a 3-tuple "
|
||
"containing the part before the separator, the separator itself, and the part "
|
||
"after the separator. If the separator is not found, return a 3-tuple "
|
||
"containing the string itself, followed by two empty strings."
|
||
msgstr ""
|
||
"Divise la chaîne à la première occurrence de *sep*, et renvoie un triplet "
|
||
"contenant la partie avant le séparateur, le séparateur lui-même, et la "
|
||
"partie après le séparateur. Si le séparateur n'est pas trouvé, le triplet "
|
||
"contient la chaîne elle-même, suivie de deux chaînes vides."
|
||
|
||
#: library/stdtypes.rst:1948
|
||
msgid ""
|
||
"If the string starts with the *prefix* string, return "
|
||
"``string[len(prefix):]``. Otherwise, return a copy of the original string::"
|
||
msgstr ""
|
||
"Si la chaîne de caractères commence par la chaîne *prefix*, renvoie "
|
||
"``string[len(prefix):]``. Sinon, renvoie une copie de la chaîne originale ::"
|
||
|
||
#: library/stdtypes.rst:1962
|
||
msgid ""
|
||
"If the string ends with the *suffix* string and that *suffix* is not empty, "
|
||
"return ``string[:-len(suffix)]``. Otherwise, return a copy of the original "
|
||
"string::"
|
||
msgstr ""
|
||
"Si la chaîne de caractères se termine par la chaîne *suffix* et que *suffix* "
|
||
"n'est pas vide, renvoie ``string[:-len(suffix)]``. Sinon, renvoie une copie "
|
||
"de la chaîne originale ::"
|
||
|
||
#: library/stdtypes.rst:1976
|
||
msgid ""
|
||
"Return a copy of the string with all occurrences of substring *old* replaced "
|
||
"by *new*. If the optional argument *count* is given, only the first *count* "
|
||
"occurrences are replaced."
|
||
msgstr ""
|
||
"Renvoie une copie de la chaîne dont toutes les occurrences de la sous-"
|
||
"chaîne *old* sont remplacées par *new*. Si l'argument optionnel *count* est "
|
||
"donné, seules les *count* premières occurrences sont remplacées."
|
||
|
||
#: library/stdtypes.rst:1983
|
||
msgid ""
|
||
"Return the highest index in the string where substring *sub* is found, such "
|
||
"that *sub* is contained within ``s[start:end]``. Optional arguments *start* "
|
||
"and *end* are interpreted as in slice notation. Return ``-1`` on failure."
|
||
msgstr ""
|
||
"Renvoie l'indice le plus élevé dans la chaîne où la sous-chaîne *sub* se "
|
||
"trouve, de telle sorte que *sub* soit contenue dans ``s[start:end]``. Les "
|
||
"arguments facultatifs *start* et *end* sont interprétés comme dans la "
|
||
"notation des découpages. Renvoie ``-1`` en cas d'échec."
|
||
|
||
#: library/stdtypes.rst:1990
|
||
msgid ""
|
||
"Like :meth:`rfind` but raises :exc:`ValueError` when the substring *sub* is "
|
||
"not found."
|
||
msgstr ""
|
||
"Comme :meth:`rfind` mais lève une exception :exc:`ValueError` lorsque la "
|
||
"sous-chaîne *sub* est introuvable."
|
||
|
||
#: library/stdtypes.rst:1996
|
||
msgid ""
|
||
"Return the string right justified in a string of length *width*. Padding is "
|
||
"done using the specified *fillchar* (default is an ASCII space). The "
|
||
"original string is returned if *width* is less than or equal to ``len(s)``."
|
||
msgstr ""
|
||
"Renvoie la chaîne justifiée à droite dans une chaîne de longueur *width*. Le "
|
||
"bourrage est fait en utilisant le caractère spécifié par *fillchar* (par "
|
||
"défaut une espace ASCII). La chaîne d'origine est renvoyée si *width* est "
|
||
"inférieure ou égale à ``len(s)``."
|
||
|
||
#: library/stdtypes.rst:2003
|
||
msgid ""
|
||
"Split the string at the last occurrence of *sep*, and return a 3-tuple "
|
||
"containing the part before the separator, the separator itself, and the part "
|
||
"after the separator. If the separator is not found, return a 3-tuple "
|
||
"containing two empty strings, followed by the string itself."
|
||
msgstr ""
|
||
"Divise la chaîne à la dernière occurrence de *sep*, et renvoie un triplet "
|
||
"contenant la partie avant le séparateur, le séparateur lui-même, et la "
|
||
"partie après le séparateur. Si le séparateur n'est pas trouvé, le triplet "
|
||
"contient deux chaînes vides, puis la chaîne elle-même."
|
||
|
||
#: library/stdtypes.rst:2011
|
||
msgid ""
|
||
"Return a list of the words in the string, using *sep* as the delimiter "
|
||
"string. If *maxsplit* is given, at most *maxsplit* splits are done, the "
|
||
"*rightmost* ones. If *sep* is not specified or ``None``, any whitespace "
|
||
"string is a separator. Except for splitting from the right, :meth:`rsplit` "
|
||
"behaves like :meth:`split` which is described in detail below."
|
||
msgstr ""
|
||
"Renvoie une liste des mots de la chaîne, en utilisant *sep* comme "
|
||
"séparateur. Si *maxsplit* est donné, c'est le nombre maximum de divisions "
|
||
"qui pourront être faites, celles « les plus à droite ». Si *sep* est pas "
|
||
"spécifié ou est ``None``, tout caractère d'espacement est un séparateur. En "
|
||
"dehors du fait qu'il découpe par la droite, :meth:`rsplit` se comporte "
|
||
"comme :meth:`split` qui est décrit en détail ci-dessous."
|
||
|
||
#: library/stdtypes.rst:2020
|
||
msgid ""
|
||
"Return a copy of the string with trailing characters removed. The *chars* "
|
||
"argument is a string specifying the set of characters to be removed. If "
|
||
"omitted or ``None``, the *chars* argument defaults to removing whitespace. "
|
||
"The *chars* argument is not a suffix; rather, all combinations of its values "
|
||
"are stripped::"
|
||
msgstr ""
|
||
"Renvoie une copie de la chaîne avec des caractères finaux supprimés. "
|
||
"L'argument *chars* est une chaîne spécifiant le jeu de caractères à "
|
||
"supprimer. En cas d'omission ou ``None``, les caractères d'espacement sont "
|
||
"supprimés. L'argument *chars* n'est pas un suffixe : toutes les combinaisons "
|
||
"de ses valeurs sont retirées ::"
|
||
|
||
#: library/stdtypes.rst:2030
|
||
msgid ""
|
||
"See :meth:`str.removesuffix` for a method that will remove a single suffix "
|
||
"string rather than all of a set of characters. For example::"
|
||
msgstr ""
|
||
"Voir :meth:`str.removesuffix` pour une méthode qui supprime une seule chaîne "
|
||
"de suffixe plutôt que la totalité d'un ensemble de caractères. Par exemple ::"
|
||
|
||
#: library/stdtypes.rst:2040
|
||
msgid ""
|
||
"Return a list of the words in the string, using *sep* as the delimiter "
|
||
"string. If *maxsplit* is given, at most *maxsplit* splits are done (thus, "
|
||
"the list will have at most ``maxsplit+1`` elements). If *maxsplit* is not "
|
||
"specified or ``-1``, then there is no limit on the number of splits (all "
|
||
"possible splits are made)."
|
||
msgstr ""
|
||
"Renvoie une liste des mots de la chaîne, en utilisant *sep* comme séparateur "
|
||
"de mots. Si *maxsplit* est donné, c'est le nombre maximum de divisions qui "
|
||
"pourront être effectuées (donnant ainsi une liste de longueur "
|
||
"``maxsplit+1``). Si *maxsplit* n'est pas fourni, ou vaut ``-1``, le nombre "
|
||
"de découpes n'est pas limité (toutes les découpes possibles sont faites)."
|
||
|
||
#: library/stdtypes.rst:2046
|
||
msgid ""
|
||
"If *sep* is given, consecutive delimiters are not grouped together and are "
|
||
"deemed to delimit empty strings (for example, ``'1,,2'.split(',')`` returns "
|
||
"``['1', '', '2']``). The *sep* argument may consist of multiple characters "
|
||
"(for example, ``'1<>2<>3'.split('<>')`` returns ``['1', '2', '3']``). "
|
||
"Splitting an empty string with a specified separator returns ``['']``."
|
||
msgstr ""
|
||
"Si *sep* est donné, les délimiteurs consécutifs ne sont pas regroupés et "
|
||
"ainsi délimitent des chaînes vides (par exemple, ``'1,,2'.split(',')`` "
|
||
"renvoie ``['1', '', '2']``). L'argument *sep* peut contenir plusieurs "
|
||
"caractères (par exemple, ``'1<>2<>3'.split('<>')`` renvoie ``['1', '2', "
|
||
"'3']``). Découper une chaîne vide en spécifiant *sep* renvoie ``['']``."
|
||
|
||
#: library/stdtypes.rst:2068 library/stdtypes.rst:2188
|
||
#: library/stdtypes.rst:3102 library/stdtypes.rst:3209
|
||
#: library/stdtypes.rst:3250 library/stdtypes.rst:3292
|
||
#: library/stdtypes.rst:3324 library/stdtypes.rst:3374
|
||
#: library/stdtypes.rst:3443 library/stdtypes.rst:3467
|
||
msgid "For example::"
|
||
msgstr "Par exemple ::"
|
||
|
||
#: library/stdtypes.rst:2061
|
||
msgid ""
|
||
"If *sep* is not specified or is ``None``, a different splitting algorithm is "
|
||
"applied: runs of consecutive whitespace are regarded as a single separator, "
|
||
"and the result will contain no empty strings at the start or end if the "
|
||
"string has leading or trailing whitespace. Consequently, splitting an empty "
|
||
"string or a string consisting of just whitespace with a ``None`` separator "
|
||
"returns ``[]``."
|
||
msgstr ""
|
||
"Si *sep* n'est pas spécifié ou est ``None``, un autre algorithme de "
|
||
"découpage est appliqué : les caractères d'espacement consécutifs sont "
|
||
"considérés comme un seul séparateur, et le résultat ne contient pas les "
|
||
"chaînes vides de début ou de la fin si la chaîne est préfixée ou suffixé de "
|
||
"caractères d'espacement. Par conséquent, diviser une chaîne vide ou une "
|
||
"chaîne composée d'espaces avec un séparateur ``None`` renvoie ``[]``."
|
||
|
||
#: library/stdtypes.rst:2083
|
||
msgid ""
|
||
"Return a list of the lines in the string, breaking at line boundaries. Line "
|
||
"breaks are not included in the resulting list unless *keepends* is given and "
|
||
"true."
|
||
msgstr ""
|
||
"Renvoie les lignes de la chaîne sous forme de liste, la découpe se faisant "
|
||
"au niveau des limites des lignes. Les sauts de ligne ne sont pas inclus dans "
|
||
"la liste des résultats, sauf si *keepends* est donné et est vrai."
|
||
|
||
#: library/stdtypes.rst:2087
|
||
msgid ""
|
||
"This method splits on the following line boundaries. In particular, the "
|
||
"boundaries are a superset of :term:`universal newlines`."
|
||
msgstr ""
|
||
"Cette méthode découpe sur les limites de ligne suivantes. Ces limites sont "
|
||
"un sur-ensemble de :term:`universal newlines`."
|
||
|
||
#: library/stdtypes.rst:2091
|
||
msgid "Representation"
|
||
msgstr "Représentation"
|
||
|
||
#: library/stdtypes.rst:2091
|
||
msgid "Description"
|
||
msgstr "Description"
|
||
|
||
#: library/stdtypes.rst:2093
|
||
msgid "``\\n``"
|
||
msgstr "``\\n``"
|
||
|
||
#: library/stdtypes.rst:2093
|
||
msgid "Line Feed"
|
||
msgstr "Saut de ligne"
|
||
|
||
#: library/stdtypes.rst:2095
|
||
msgid "``\\r``"
|
||
msgstr "``\\r``"
|
||
|
||
#: library/stdtypes.rst:2095
|
||
msgid "Carriage Return"
|
||
msgstr "Retour chariot"
|
||
|
||
#: library/stdtypes.rst:2097
|
||
msgid "``\\r\\n``"
|
||
msgstr "``\\r\\n``"
|
||
|
||
#: library/stdtypes.rst:2097
|
||
msgid "Carriage Return + Line Feed"
|
||
msgstr "Retour chariot + saut de ligne"
|
||
|
||
#: library/stdtypes.rst:2099
|
||
msgid "``\\v`` or ``\\x0b``"
|
||
msgstr "``\\v`` or ``\\x0b``"
|
||
|
||
#: library/stdtypes.rst:2099
|
||
msgid "Line Tabulation"
|
||
msgstr "Tabulation verticale"
|
||
|
||
#: library/stdtypes.rst:2101
|
||
msgid "``\\f`` or ``\\x0c``"
|
||
msgstr "``\\f`` or ``\\x0c``"
|
||
|
||
#: library/stdtypes.rst:2101
|
||
msgid "Form Feed"
|
||
msgstr "Saut de page"
|
||
|
||
#: library/stdtypes.rst:2103
|
||
msgid "``\\x1c``"
|
||
msgstr "``\\x1c``"
|
||
|
||
#: library/stdtypes.rst:2103
|
||
msgid "File Separator"
|
||
msgstr "Séparateur de fichiers"
|
||
|
||
#: library/stdtypes.rst:2105
|
||
msgid "``\\x1d``"
|
||
msgstr "``\\x1d``"
|
||
|
||
#: library/stdtypes.rst:2105
|
||
msgid "Group Separator"
|
||
msgstr "Séparateur de groupes"
|
||
|
||
#: library/stdtypes.rst:2107
|
||
msgid "``\\x1e``"
|
||
msgstr "``\\x1e``"
|
||
|
||
#: library/stdtypes.rst:2107
|
||
msgid "Record Separator"
|
||
msgstr "Séparateur d'enregistrements"
|
||
|
||
#: library/stdtypes.rst:2109
|
||
msgid "``\\x85``"
|
||
msgstr "``\\x85``"
|
||
|
||
#: library/stdtypes.rst:2109
|
||
msgid "Next Line (C1 Control Code)"
|
||
msgstr "Ligne suivante (code de contrôle *C1*)"
|
||
|
||
#: library/stdtypes.rst:2111
|
||
msgid "``\\u2028``"
|
||
msgstr "``\\u2028``"
|
||
|
||
#: library/stdtypes.rst:2111
|
||
msgid "Line Separator"
|
||
msgstr "Séparateur de ligne"
|
||
|
||
#: library/stdtypes.rst:2113
|
||
msgid "``\\u2029``"
|
||
msgstr "``\\u2029``"
|
||
|
||
#: library/stdtypes.rst:2113
|
||
msgid "Paragraph Separator"
|
||
msgstr "Séparateur de paragraphe"
|
||
|
||
#: library/stdtypes.rst:2118
|
||
msgid "``\\v`` and ``\\f`` added to list of line boundaries."
|
||
msgstr "``\\v`` et ``\\f`` ajoutés à la liste des limites de lignes."
|
||
|
||
#: library/stdtypes.rst:2127
|
||
msgid ""
|
||
"Unlike :meth:`~str.split` when a delimiter string *sep* is given, this "
|
||
"method returns an empty list for the empty string, and a terminal line break "
|
||
"does not result in an extra line::"
|
||
msgstr ""
|
||
"Contrairement à :meth:`~str.split` lorsque *sep* est fourni, cette méthode "
|
||
"renvoie une liste vide pour la chaîne vide, et un saut de ligne à la fin ne "
|
||
"se traduit pas par une ligne supplémentaire ::"
|
||
|
||
#: library/stdtypes.rst:2136
|
||
msgid "For comparison, ``split('\\n')`` gives::"
|
||
msgstr "À titre de comparaison, ``split('\\n')`` donne ::"
|
||
|
||
#: library/stdtypes.rst:2146
|
||
msgid ""
|
||
"Return ``True`` if string starts with the *prefix*, otherwise return "
|
||
"``False``. *prefix* can also be a tuple of prefixes to look for. With "
|
||
"optional *start*, test string beginning at that position. With optional "
|
||
"*end*, stop comparing string at that position."
|
||
msgstr ""
|
||
"Renvoie ``True`` si la chaîne commence par *prefix*, sinon ``False``. "
|
||
"*prefix* peut aussi être un *n*-uplet de préfixes à rechercher. Lorsque "
|
||
"*start* est donné, la comparaison commence à cette position et, lorsque "
|
||
"*end* est donné, la comparaison s'arrête à celle-ci."
|
||
|
||
#: library/stdtypes.rst:2154
|
||
msgid ""
|
||
"Return a copy of the string with the leading and trailing characters "
|
||
"removed. The *chars* argument is a string specifying the set of characters "
|
||
"to be removed. If omitted or ``None``, the *chars* argument defaults to "
|
||
"removing whitespace. The *chars* argument is not a prefix or suffix; rather, "
|
||
"all combinations of its values are stripped::"
|
||
msgstr ""
|
||
"Renvoie une copie de la chaîne dont des caractères initiaux et finaux sont "
|
||
"supprimés. L'argument *chars* est une chaîne spécifiant le jeu de caractères "
|
||
"à supprimer. En cas d'omission ou ``None``, les caractères d'espacement sont "
|
||
"supprimés. L'argument *chars* est pas un préfixe ni un suffixe, toutes les "
|
||
"combinaisons de ses valeurs sont supprimées ::"
|
||
|
||
#: library/stdtypes.rst:2165
|
||
msgid ""
|
||
"The outermost leading and trailing *chars* argument values are stripped from "
|
||
"the string. Characters are removed from the leading end until reaching a "
|
||
"string character that is not contained in the set of characters in *chars*. "
|
||
"A similar action takes place on the trailing end. For example::"
|
||
msgstr ""
|
||
"Les caractères de *char* sont retirés du début et de la fin de la chaîne. "
|
||
"Les caractères sont retirés de la gauche jusqu'à atteindre un caractère ne "
|
||
"figurant pas dans le jeu de caractères dans *chars*. La même opération a "
|
||
"lieu par la droite. Par exemple ::"
|
||
|
||
#: library/stdtypes.rst:2178
|
||
msgid ""
|
||
"Return a copy of the string with uppercase characters converted to lowercase "
|
||
"and vice versa. Note that it is not necessarily true that ``s.swapcase()."
|
||
"swapcase() == s``."
|
||
msgstr ""
|
||
"Renvoie une copie de la chaîne dont les caractères majuscules sont convertis "
|
||
"en minuscules et vice versa. Notez qu'il est pas nécessairement vrai que ``s."
|
||
"swapcase().swapcase() == s``."
|
||
|
||
#: library/stdtypes.rst:2185
|
||
msgid ""
|
||
"Return a titlecased version of the string where words start with an "
|
||
"uppercase character and the remaining characters are lowercase."
|
||
msgstr ""
|
||
"Renvoie une version de la chaîne où les mots commencent par une capitale et "
|
||
"les caractères restants sont en minuscules."
|
||
|
||
#: library/stdtypes.rst:3411
|
||
msgid ""
|
||
"The algorithm uses a simple language-independent definition of a word as "
|
||
"groups of consecutive letters. The definition works in many contexts but it "
|
||
"means that apostrophes in contractions and possessives form word boundaries, "
|
||
"which may not be the desired result::"
|
||
msgstr ""
|
||
"Pour l'algorithme, la notion de mot est définie simplement et indépendamment "
|
||
"de la langue comme un groupe de lettres consécutives. La définition "
|
||
"fonctionne dans de nombreux contextes, mais cela signifie que les "
|
||
"apostrophes (typiquement de la forme possessive en Anglais) forment les "
|
||
"limites de mot, ce qui n'est pas toujours le résultat souhaité ::"
|
||
|
||
#: library/stdtypes.rst:2201
|
||
msgid ""
|
||
"The :func:`string.capwords` function does not have this problem, as it "
|
||
"splits words on spaces only."
|
||
msgstr ""
|
||
"La fonction :func:`string.capwords` n'a pas ce problème, car elle sépare les "
|
||
"mots uniquement sur les espaces."
|
||
|
||
#: library/stdtypes.rst:2204
|
||
msgid ""
|
||
"Alternatively, a workaround for apostrophes can be constructed using regular "
|
||
"expressions::"
|
||
msgstr ""
|
||
"Sinon, une solution pour contourner le problème des apostrophes est "
|
||
"d'utiliser des expressions rationnelles ::"
|
||
|
||
#: library/stdtypes.rst:2219
|
||
msgid ""
|
||
"Return a copy of the string in which each character has been mapped through "
|
||
"the given translation table. The table must be an object that implements "
|
||
"indexing via :meth:`__getitem__`, typically a :term:`mapping` or :term:"
|
||
"`sequence`. When indexed by a Unicode ordinal (an integer), the table "
|
||
"object can do any of the following: return a Unicode ordinal or a string, to "
|
||
"map the character to one or more other characters; return ``None``, to "
|
||
"delete the character from the return string; or raise a :exc:`LookupError` "
|
||
"exception, to map the character to itself."
|
||
msgstr ""
|
||
"Renvoie une copie de la chaîne dans laquelle chaque caractère a été changé "
|
||
"selon la table de traduction donnée. La table doit être un objet qui "
|
||
"implémente l'indexation via :meth:`__getitem__`, typiquement un :term:"
|
||
"`tableau de correspondances <mapping>` ou une :term:`séquence <sequence>`. "
|
||
"Pour un ordinal Unicode (un entier), la table peut donner un ordinal Unicode "
|
||
"ou une chaîne pour faire correspondre un ou plusieurs caractères au "
|
||
"caractère donné, ``None`` pour supprimer le caractère de la chaîne renvoyée "
|
||
"ou lever une exception :exc:`LookupError` pour ne pas changer le caractère."
|
||
|
||
#: library/stdtypes.rst:2228
|
||
msgid ""
|
||
"You can use :meth:`str.maketrans` to create a translation map from character-"
|
||
"to-character mappings in different formats."
|
||
msgstr ""
|
||
"Vous pouvez utiliser :meth:`str.maketrans` pour créer une table de "
|
||
"correspondances de caractères dans différents formats."
|
||
|
||
#: library/stdtypes.rst:2231
|
||
msgid ""
|
||
"See also the :mod:`codecs` module for a more flexible approach to custom "
|
||
"character mappings."
|
||
msgstr ""
|
||
"Voir aussi le module :mod:`codecs` pour une approche plus souple de "
|
||
"changements de caractères par correspondance."
|
||
|
||
#: library/stdtypes.rst:2237
|
||
msgid ""
|
||
"Return a copy of the string with all the cased characters [4]_ converted to "
|
||
"uppercase. Note that ``s.upper().isupper()`` might be ``False`` if ``s`` "
|
||
"contains uncased characters or if the Unicode category of the resulting "
|
||
"character(s) is not \"Lu\" (Letter, uppercase), but e.g. \"Lt\" (Letter, "
|
||
"titlecase)."
|
||
msgstr ""
|
||
"Renvoie une copie de la chaîne où tous les caractères capitalisables [4]_ "
|
||
"ont été convertis en capitales. Notez que ``s.upper().isupper()`` peut être "
|
||
"``False`` si ``s`` contient des caractères non capitalisables ou si la "
|
||
"catégorie Unicode d'un caractère du résultat n'est pas \"Lu\" (*Letter*, "
|
||
"*uppercase*), mais par exemple \"Lt\" (*Letter*, *titlecase*)."
|
||
|
||
#: library/stdtypes.rst:2243
|
||
#, fuzzy
|
||
msgid ""
|
||
"The uppercasing algorithm used is described in section 3.13 of the Unicode "
|
||
"Standard."
|
||
msgstr ""
|
||
"L'algorithme de capitalisation utilisé est décrit dans la section 3.13 de la "
|
||
"norme Unicode."
|
||
|
||
#: library/stdtypes.rst:2249
|
||
msgid ""
|
||
"Return a copy of the string left filled with ASCII ``'0'`` digits to make a "
|
||
"string of length *width*. A leading sign prefix (``'+'``/``'-'``) is handled "
|
||
"by inserting the padding *after* the sign character rather than before. The "
|
||
"original string is returned if *width* is less than or equal to ``len(s)``."
|
||
msgstr ""
|
||
"Renvoie une copie de la chaîne remplie par la gauche du chiffre (le "
|
||
"caractère ASCII) ``'0'`` pour faire une chaîne de longueur *width*. Un "
|
||
"préfixe (``'+'`` / ``'-'``) est permis par l'insertion du caractère de "
|
||
"bourrage *après* le caractère désigné plutôt qu'avant. La chaîne d'origine "
|
||
"est renvoyée si *width* est inférieure ou égale à ``len(s)``."
|
||
|
||
#: library/stdtypes.rst:2267
|
||
msgid "``printf``-style String Formatting"
|
||
msgstr "Formatage de chaines à la ``printf``"
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:2280
|
||
msgid ""
|
||
"The formatting operations described here exhibit a variety of quirks that "
|
||
"lead to a number of common errors (such as failing to display tuples and "
|
||
"dictionaries correctly). Using the newer :ref:`formatted string literals <f-"
|
||
"strings>`, the :meth:`str.format` interface, or :ref:`template strings "
|
||
"<template-strings>` may help avoid these errors. Each of these alternatives "
|
||
"provides their own trade-offs and benefits of simplicity, flexibility, and/"
|
||
"or extensibility."
|
||
msgstr ""
|
||
"ces opérations de mise en forme contiennent des bizarreries menant à de "
|
||
"nombreuses erreurs classiques (telles que ne pas réussir à afficher des *n*-"
|
||
"uplets ou des dictionnaires correctement). Utiliser les :ref:`formatted "
|
||
"string literals <f-strings>`, la méthode :meth:`str.format` ou les :ref:"
|
||
"`template strings <template-strings>` aide à éviter ces erreurs. Chacune de "
|
||
"ces alternatives apporte son lot d'avantages et inconvénients en matière de "
|
||
"simplicité, de flexibilité et/ou de généralisation possible."
|
||
|
||
#: library/stdtypes.rst:2288
|
||
msgid ""
|
||
"String objects have one unique built-in operation: the ``%`` operator "
|
||
"(modulo). This is also known as the string *formatting* or *interpolation* "
|
||
"operator. Given ``format % values`` (where *format* is a string), ``%`` "
|
||
"conversion specifications in *format* are replaced with zero or more "
|
||
"elements of *values*. The effect is similar to using the :c:func:`sprintf` "
|
||
"in the C language."
|
||
msgstr ""
|
||
"Les objets *str* n'exposent qu'une opération : l'opérateur ``%`` (modulo). "
|
||
"Aussi connu sous le nom d'opérateur de formatage, ou opérateur "
|
||
"d'interpolation. Étant donné ``format % values`` (où *format* est une "
|
||
"chaîne), les marqueurs ``%`` de *format* sont remplacés par zéro ou "
|
||
"plusieurs éléments de *values*. L'effet est similaire à la fonction :c:func:"
|
||
"`sprintf` du langage C."
|
||
|
||
#: library/stdtypes.rst:2294
|
||
msgid ""
|
||
"If *format* requires a single argument, *values* may be a single non-tuple "
|
||
"object. [5]_ Otherwise, *values* must be a tuple with exactly the number of "
|
||
"items specified by the format string, or a single mapping object (for "
|
||
"example, a dictionary)."
|
||
msgstr ""
|
||
"Si *format* ne nécessite qu'un seul argument, *values* peut être un objet "
|
||
"unique [5]_. Si *values* est un *n*-uplet, il doit contenir exactement le "
|
||
"nombre d'éléments spécifiés par la chaîne de format, ou un seul objet "
|
||
"tableau de correspondances (*mapping object*, par exemple, un dictionnaire)."
|
||
|
||
#: library/stdtypes.rst:3522
|
||
msgid ""
|
||
"A conversion specifier contains two or more characters and has the following "
|
||
"components, which must occur in this order:"
|
||
msgstr ""
|
||
"Un indicateur de conversion contient deux ou plusieurs caractères et "
|
||
"comporte les éléments suivants, qui doivent apparaître dans cet ordre :"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:3525
|
||
msgid "The ``'%'`` character, which marks the start of the specifier."
|
||
msgstr "le caractère ``'%'``, qui marque le début du marqueur ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:3527
|
||
msgid ""
|
||
"Mapping key (optional), consisting of a parenthesised sequence of characters "
|
||
"(for example, ``(somename)``)."
|
||
msgstr ""
|
||
"la clé de correspondance (facultative), composée d'une suite de caractères "
|
||
"entre parenthèses (par exemple, ``(somename)``) ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:3530
|
||
msgid ""
|
||
"Conversion flags (optional), which affect the result of some conversion "
|
||
"types."
|
||
msgstr ""
|
||
"des indications de conversion, facultatives, qui affectent le résultat de "
|
||
"certains types de conversion ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:3533
|
||
msgid ""
|
||
"Minimum field width (optional). If specified as an ``'*'`` (asterisk), the "
|
||
"actual width is read from the next element of the tuple in *values*, and the "
|
||
"object to convert comes after the minimum field width and optional precision."
|
||
msgstr ""
|
||
"largeur minimum (facultative). Si elle vaut ``'*'`` (astérisque), la largeur "
|
||
"est lue de l'élément suivant du *n*-uplet *values*, et l'objet à convertir "
|
||
"vient après la largeur de champ minimale et la précision facultative ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:3537
|
||
msgid ""
|
||
"Precision (optional), given as a ``'.'`` (dot) followed by the precision. "
|
||
"If specified as ``'*'`` (an asterisk), the actual precision is read from the "
|
||
"next element of the tuple in *values*, and the value to convert comes after "
|
||
"the precision."
|
||
msgstr ""
|
||
"précision (facultatif), donnée sous la forme d'un ``'.'`` (point) suivi de "
|
||
"la précision. Si la précision est ``'*'`` (un astérisque), la précision est "
|
||
"lue à partir de l'élément suivant du *n*-uplet *values* et la valeur à "
|
||
"convertir vient ensuite ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:3542
|
||
msgid "Length modifier (optional)."
|
||
msgstr "modificateur de longueur (facultatif) ;"
|
||
|
||
# fin d'énumération
|
||
#: library/stdtypes.rst:3544
|
||
msgid "Conversion type."
|
||
msgstr "type de conversion."
|
||
|
||
#: library/stdtypes.rst:2328
|
||
msgid ""
|
||
"When the right argument is a dictionary (or other mapping type), then the "
|
||
"formats in the string *must* include a parenthesised mapping key into that "
|
||
"dictionary inserted immediately after the ``'%'`` character. The mapping key "
|
||
"selects the value to be formatted from the mapping. For example:"
|
||
msgstr ""
|
||
"Lorsque l'argument de droite est un dictionnaire (ou un autre type de "
|
||
"tableau de correspondances), les marqueurs dans la chaîne *doivent* inclure "
|
||
"une clé présente dans le dictionnaire, écrite entre parenthèses, "
|
||
"immédiatement après le caractère ``'%'``. La clé indique quelle valeur du "
|
||
"dictionnaire doit être formatée. Par exemple :"
|
||
|
||
#: library/stdtypes.rst:3555
|
||
msgid ""
|
||
"In this case no ``*`` specifiers may occur in a format (since they require a "
|
||
"sequential parameter list)."
|
||
msgstr ""
|
||
"Dans ce cas, aucune ``*`` ne peut se trouver dans le format (car ces ``*`` "
|
||
"nécessitent une liste (accès séquentiel) de paramètres)."
|
||
|
||
#: library/stdtypes.rst:3558
|
||
msgid "The conversion flag characters are:"
|
||
msgstr "Les caractères indicateurs de conversion sont :"
|
||
|
||
#: library/stdtypes.rst:3567
|
||
msgid "Flag"
|
||
msgstr "Option"
|
||
|
||
#: library/stdtypes.rst:3569
|
||
msgid "``'#'``"
|
||
msgstr "``'#'``"
|
||
|
||
#: library/stdtypes.rst:3569
|
||
msgid ""
|
||
"The value conversion will use the \"alternate form\" (where defined below)."
|
||
msgstr "La conversion utilise la « forme alternative » (définie ci-dessous)."
|
||
|
||
#: library/stdtypes.rst:3572
|
||
msgid "``'0'``"
|
||
msgstr "``'0'``"
|
||
|
||
#: library/stdtypes.rst:3572
|
||
msgid "The conversion will be zero padded for numeric values."
|
||
msgstr "Les valeurs numériques converties sont complétées de zéros."
|
||
|
||
#: library/stdtypes.rst:3574
|
||
msgid "``'-'``"
|
||
msgstr "``'-'``"
|
||
|
||
#: library/stdtypes.rst:3574
|
||
msgid ""
|
||
"The converted value is left adjusted (overrides the ``'0'`` conversion if "
|
||
"both are given)."
|
||
msgstr ""
|
||
"La valeur convertie est ajustée à gauche (remplace la conversion ``'0'`` si "
|
||
"les deux sont données)."
|
||
|
||
#: library/stdtypes.rst:3577
|
||
msgid "``' '``"
|
||
msgstr "``' '``"
|
||
|
||
#: library/stdtypes.rst:3577
|
||
msgid ""
|
||
"(a space) A blank should be left before a positive number (or empty string) "
|
||
"produced by a signed conversion."
|
||
msgstr ""
|
||
"(une espace) Une espace doit être laissée avant un nombre positif (ou chaîne "
|
||
"vide) produite par la conversion d'une valeur signée."
|
||
|
||
#: library/stdtypes.rst:3580
|
||
msgid "``'+'``"
|
||
msgstr "``'+'``"
|
||
|
||
#: library/stdtypes.rst:3580
|
||
msgid ""
|
||
"A sign character (``'+'`` or ``'-'``) will precede the conversion (overrides "
|
||
"a \"space\" flag)."
|
||
msgstr ""
|
||
"Un caractère de signe (``'+'`` ou ``'-'``) précède la valeur convertie "
|
||
"(remplace le marqueur « espace »)."
|
||
|
||
#: library/stdtypes.rst:3584
|
||
msgid ""
|
||
"A length modifier (``h``, ``l``, or ``L``) may be present, but is ignored as "
|
||
"it is not necessary for Python -- so e.g. ``%ld`` is identical to ``%d``."
|
||
msgstr ""
|
||
"Un modificateur de longueur (``h``, ``l`` ou ``L``) peut être présent, mais "
|
||
"est ignoré car il est pas nécessaire pour Python, donc par exemple ``%ld`` "
|
||
"est identique à ``%d``."
|
||
|
||
#: library/stdtypes.rst:3587
|
||
msgid "The conversion types are:"
|
||
msgstr "Les types utilisables dans les conversions sont :"
|
||
|
||
#: library/stdtypes.rst:3590
|
||
msgid "Conversion"
|
||
msgstr "Conversion"
|
||
|
||
#: library/stdtypes.rst:3592
|
||
msgid "``'d'``"
|
||
msgstr "``'d'``"
|
||
|
||
#: library/stdtypes.rst:2376 library/stdtypes.rst:3594
|
||
msgid "Signed integer decimal."
|
||
msgstr "Entier décimal signé."
|
||
|
||
#: library/stdtypes.rst:3594
|
||
msgid "``'i'``"
|
||
msgstr "``'i'``"
|
||
|
||
#: library/stdtypes.rst:3596
|
||
msgid "``'o'``"
|
||
msgstr "``'o'``"
|
||
|
||
#: library/stdtypes.rst:3596
|
||
msgid "Signed octal value."
|
||
msgstr "Valeur octale signée."
|
||
|
||
#: library/stdtypes.rst:3598
|
||
msgid "``'u'``"
|
||
msgstr "``'u'``"
|
||
|
||
#: library/stdtypes.rst:3598
|
||
msgid "Obsolete type -- it is identical to ``'d'``."
|
||
msgstr "Type obsolète — identique à ``'d'``."
|
||
|
||
#: library/stdtypes.rst:3600
|
||
msgid "``'x'``"
|
||
msgstr "``'x'``"
|
||
|
||
#: library/stdtypes.rst:3600
|
||
msgid "Signed hexadecimal (lowercase)."
|
||
msgstr "Hexadécimal signé (en minuscules)."
|
||
|
||
#: library/stdtypes.rst:3602
|
||
msgid "``'X'``"
|
||
msgstr "``'X'``"
|
||
|
||
#: library/stdtypes.rst:3602
|
||
msgid "Signed hexadecimal (uppercase)."
|
||
msgstr "Hexadécimal signé (capitales)."
|
||
|
||
#: library/stdtypes.rst:3604
|
||
msgid "``'e'``"
|
||
msgstr "``'e'``"
|
||
|
||
#: library/stdtypes.rst:3604
|
||
msgid "Floating point exponential format (lowercase)."
|
||
msgstr "Format exponentiel pour un *float* (minuscule)."
|
||
|
||
#: library/stdtypes.rst:3606
|
||
msgid "``'E'``"
|
||
msgstr "``'E'``"
|
||
|
||
#: library/stdtypes.rst:3606
|
||
msgid "Floating point exponential format (uppercase)."
|
||
msgstr "Format exponentiel pour un *float* (en capitales)."
|
||
|
||
#: library/stdtypes.rst:3608
|
||
msgid "``'f'``"
|
||
msgstr "``'f'``"
|
||
|
||
#: library/stdtypes.rst:2392 library/stdtypes.rst:3610
|
||
msgid "Floating point decimal format."
|
||
msgstr "Format décimal pour un *float*."
|
||
|
||
#: library/stdtypes.rst:3610
|
||
msgid "``'F'``"
|
||
msgstr "``'F'``"
|
||
|
||
#: library/stdtypes.rst:3612
|
||
msgid "``'g'``"
|
||
msgstr "``'g'``"
|
||
|
||
#: library/stdtypes.rst:3612
|
||
msgid ""
|
||
"Floating point format. Uses lowercase exponential format if exponent is less "
|
||
"than -4 or not less than precision, decimal format otherwise."
|
||
msgstr ""
|
||
"Format *float*. Utilise le format exponentiel minuscules si l'exposant est "
|
||
"inférieur à ``-4`` ou pas plus petit que la précision, sinon le format "
|
||
"décimal."
|
||
|
||
#: library/stdtypes.rst:3616
|
||
msgid "``'G'``"
|
||
msgstr "``'G'``"
|
||
|
||
#: library/stdtypes.rst:3616
|
||
msgid ""
|
||
"Floating point format. Uses uppercase exponential format if exponent is less "
|
||
"than -4 or not less than precision, decimal format otherwise."
|
||
msgstr ""
|
||
"Format *float*. Utilise le format exponentiel en capitales si l'exposant est "
|
||
"inférieur à ``-4`` ou pas plus petit que la précision, sinon le format "
|
||
"décimal."
|
||
|
||
#: library/stdtypes.rst:3620
|
||
msgid "``'c'``"
|
||
msgstr "``'c'``"
|
||
|
||
#: library/stdtypes.rst:2402
|
||
msgid "Single character (accepts integer or single character string)."
|
||
msgstr ""
|
||
"Un seul caractère (accepte des entiers ou une chaîne d'un seul caractère)."
|
||
|
||
#: library/stdtypes.rst:3633
|
||
msgid "``'r'``"
|
||
msgstr "``'r'``"
|
||
|
||
#: library/stdtypes.rst:2405
|
||
msgid "String (converts any Python object using :func:`repr`)."
|
||
msgstr "String (convertit n'importe quel objet Python avec :func:`repr`)."
|
||
|
||
#: library/stdtypes.rst:3627
|
||
msgid "``'s'``"
|
||
msgstr "``'s'``"
|
||
|
||
#: library/stdtypes.rst:2408
|
||
msgid "String (converts any Python object using :func:`str`)."
|
||
msgstr "String (convertit n'importe quel objet Python avec :func:`str`)."
|
||
|
||
#: library/stdtypes.rst:3630
|
||
msgid "``'a'``"
|
||
msgstr "``'a'``"
|
||
|
||
#: library/stdtypes.rst:2411
|
||
msgid "String (converts any Python object using :func:`ascii`)."
|
||
msgstr ""
|
||
"String (convertit n'importe quel objet Python en utilisant :func:`ascii`)."
|
||
|
||
#: library/stdtypes.rst:3636
|
||
msgid "``'%'``"
|
||
msgstr "``'%'``"
|
||
|
||
#: library/stdtypes.rst:3636
|
||
msgid "No argument is converted, results in a ``'%'`` character in the result."
|
||
msgstr ""
|
||
"Aucun argument n'est converti, donne un caractère de ``'%'`` dans le "
|
||
"résultat."
|
||
|
||
#: library/stdtypes.rst:3643
|
||
msgid ""
|
||
"The alternate form causes a leading octal specifier (``'0o'``) to be "
|
||
"inserted before the first digit."
|
||
msgstr ""
|
||
"La forme alternative entraîne l'insertion d'un préfixe octal (``'0o'``) "
|
||
"avant le premier chiffre."
|
||
|
||
#: library/stdtypes.rst:3647
|
||
msgid ""
|
||
"The alternate form causes a leading ``'0x'`` or ``'0X'`` (depending on "
|
||
"whether the ``'x'`` or ``'X'`` format was used) to be inserted before the "
|
||
"first digit."
|
||
msgstr ""
|
||
"La forme alternative entraîne l'insertion d'un préfixe ``'0x'`` ou ``'0X'`` "
|
||
"(respectivement pour les formats ``'x'`` et ``'X'``) avant le premier "
|
||
"chiffre."
|
||
|
||
#: library/stdtypes.rst:3651
|
||
msgid ""
|
||
"The alternate form causes the result to always contain a decimal point, even "
|
||
"if no digits follow it."
|
||
msgstr ""
|
||
"La forme alternative implique la présence d'un point décimal, même si aucun "
|
||
"chiffre ne le suit."
|
||
|
||
#: library/stdtypes.rst:3654
|
||
msgid ""
|
||
"The precision determines the number of digits after the decimal point and "
|
||
"defaults to 6."
|
||
msgstr ""
|
||
"La précision détermine le nombre de chiffres après la virgule, 6 par défaut."
|
||
|
||
#: library/stdtypes.rst:3658
|
||
msgid ""
|
||
"The alternate form causes the result to always contain a decimal point, and "
|
||
"trailing zeroes are not removed as they would otherwise be."
|
||
msgstr ""
|
||
"La forme alternative implique la présence d'un point décimal et les zéros "
|
||
"non significatifs sont conservés (ils ne le seraient pas autrement)."
|
||
|
||
#: library/stdtypes.rst:3661
|
||
msgid ""
|
||
"The precision determines the number of significant digits before and after "
|
||
"the decimal point and defaults to 6."
|
||
msgstr ""
|
||
"La précision détermine le nombre de chiffres significatifs avant et après la "
|
||
"virgule. 6 par défaut."
|
||
|
||
#: library/stdtypes.rst:3665
|
||
msgid "If precision is ``N``, the output is truncated to ``N`` characters."
|
||
msgstr "Si la précision est ``N``, la sortie est tronquée à ``N`` caractères."
|
||
|
||
#: library/stdtypes.rst:3674
|
||
msgid "See :pep:`237`."
|
||
msgstr "Voir la :pep:`237`."
|
||
|
||
#: library/stdtypes.rst:2448
|
||
msgid ""
|
||
"Since Python strings have an explicit length, ``%s`` conversions do not "
|
||
"assume that ``'\\0'`` is the end of the string."
|
||
msgstr ""
|
||
"Puisque les chaînes Python ont une longueur explicite, les conversions "
|
||
"``%s`` ne considèrent pas ``'\\0'`` comme la fin de la chaîne."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:2453
|
||
msgid ""
|
||
"``%f`` conversions for numbers whose absolute value is over 1e50 are no "
|
||
"longer replaced by ``%g`` conversions."
|
||
msgstr ""
|
||
"les conversions ``%f`` des nombres dont la valeur absolue est supérieure à "
|
||
"``1e50`` ne sont plus remplacées par des conversions ``%g``."
|
||
|
||
#: library/stdtypes.rst:2464
|
||
msgid ""
|
||
"Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, :class:"
|
||
"`memoryview`"
|
||
msgstr ""
|
||
"Séquences Binaires — :class:`bytes`, :class:`bytearray`, :class:`vue mémoire "
|
||
"<memoryview>`"
|
||
|
||
#: library/stdtypes.rst:2472
|
||
msgid ""
|
||
"The core built-in types for manipulating binary data are :class:`bytes` and :"
|
||
"class:`bytearray`. They are supported by :class:`memoryview` which uses the :"
|
||
"ref:`buffer protocol <bufferobjects>` to access the memory of other binary "
|
||
"objects without needing to make a copy."
|
||
msgstr ""
|
||
"Les principaux types natifs pour manipuler des données binaires sont :class:"
|
||
"`bytes` et :class:`bytearray`. Ils sont gérés par les :class:`vues mémoire "
|
||
"<memoryview>` qui utilisent le :ref:`protocole tampon <bufferobjects>` pour "
|
||
"accéder à la mémoire d'autres objets binaires sans avoir besoin d'en faire "
|
||
"une copie."
|
||
|
||
#: library/stdtypes.rst:2477
|
||
msgid ""
|
||
"The :mod:`array` module supports efficient storage of basic data types like "
|
||
"32-bit integers and IEEE754 double-precision floating values."
|
||
msgstr ""
|
||
"Le module :mod:`array` permet le stockage efficace de types basiques comme "
|
||
"les entiers de 32 bits et les *float* double précision IEEE754."
|
||
|
||
#: library/stdtypes.rst:2483
|
||
msgid "Bytes Objects"
|
||
msgstr "Objets *bytes*"
|
||
|
||
#: library/stdtypes.rst:2487
|
||
msgid ""
|
||
"Bytes objects are immutable sequences of single bytes. Since many major "
|
||
"binary protocols are based on the ASCII text encoding, bytes objects offer "
|
||
"several methods that are only valid when working with ASCII compatible data "
|
||
"and are closely related to string objects in a variety of other ways."
|
||
msgstr ""
|
||
"Les *bytes* sont des séquences immuables d'octets. Comme beaucoup de "
|
||
"protocoles binaires utilisent l'ASCII, les objets *bytes* offrent plusieurs "
|
||
"méthodes qui ne sont valables que lors de la manipulation de données ASCII "
|
||
"et sont étroitement liés aux objets *str* dans bien d'autres aspects."
|
||
|
||
#: library/stdtypes.rst:2494
|
||
msgid ""
|
||
"Firstly, the syntax for bytes literals is largely the same as that for "
|
||
"string literals, except that a ``b`` prefix is added:"
|
||
msgstr ""
|
||
"Tout d'abord, la syntaxe des *bytes* littéraux est en grande partie la même "
|
||
"que pour les chaînes littérales, en dehors du préfixe ``b`` :"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:2497
|
||
msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``"
|
||
msgstr ""
|
||
"entre guillemets simples : ``b'cela autorise les guillemets \"doubles\"'`` ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:2498
|
||
msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``"
|
||
msgstr ""
|
||
"entre guillemets (anglais) : ``b\"cela permet aussi les guillemets "
|
||
"'simples'\"`` ;"
|
||
|
||
# fin d'énumération
|
||
#: library/stdtypes.rst:2499
|
||
msgid ""
|
||
"Triple quoted: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``"
|
||
msgstr ""
|
||
"entre guillemets triples : ``b'''3 single quotes'''``, ``b\"\"\"3 double "
|
||
"quotes\"\"\"``."
|
||
|
||
#: library/stdtypes.rst:2501
|
||
msgid ""
|
||
"Only ASCII characters are permitted in bytes literals (regardless of the "
|
||
"declared source code encoding). Any binary values over 127 must be entered "
|
||
"into bytes literals using the appropriate escape sequence."
|
||
msgstr ""
|
||
"Seuls les caractères ASCII sont autorisés dans les littéraux de *bytes* "
|
||
"(quel que soit l'encodage du code source déclaré). Toutes les valeurs au-"
|
||
"delà de 127 doivent être écrites en utilisant une séquence d'échappement "
|
||
"appropriée."
|
||
|
||
#: library/stdtypes.rst:2505
|
||
msgid ""
|
||
"As with string literals, bytes literals may also use a ``r`` prefix to "
|
||
"disable processing of escape sequences. See :ref:`strings` for more about "
|
||
"the various forms of bytes literal, including supported escape sequences."
|
||
msgstr ""
|
||
"Comme avec les chaînes littérales, les *bytes* littéraux peuvent également "
|
||
"utiliser un préfixe ``r`` pour désactiver le traitement des séquences "
|
||
"d'échappement. Voir :ref:`strings` pour plus d'informations sur les "
|
||
"différentes formes littérales de *bytes*, y compris les séquences "
|
||
"d'échappement gérées."
|
||
|
||
#: library/stdtypes.rst:2509
|
||
msgid ""
|
||
"While bytes literals and representations are based on ASCII text, bytes "
|
||
"objects actually behave like immutable sequences of integers, with each "
|
||
"value in the sequence restricted such that ``0 <= x < 256`` (attempts to "
|
||
"violate this restriction will trigger :exc:`ValueError`). This is done "
|
||
"deliberately to emphasise that while many binary formats include ASCII based "
|
||
"elements and can be usefully manipulated with some text-oriented algorithms, "
|
||
"this is not generally the case for arbitrary binary data (blindly applying "
|
||
"text processing algorithms to binary data formats that are not ASCII "
|
||
"compatible will usually lead to data corruption)."
|
||
msgstr ""
|
||
"Bien que les *bytes* littéraux, et leur représentation, soient basés sur du "
|
||
"texte ASCII, les *bytes* se comportent en fait comme des séquences immuables "
|
||
"de nombres entiers, dont les valeurs sont restreintes dans l'intervalle ``0 "
|
||
"<= x < 256`` (ne pas respecter cette restriction lève une :exc:"
|
||
"`ValueError`). C'est délibéré afin de souligner que, bien que de nombreux "
|
||
"encodages binaires soient compatibles avec l'ASCII, et peuvent être "
|
||
"manipulés avec des algorithmes orientés texte, ce n'est généralement pas le "
|
||
"cas pour les données binaires arbitraires (appliquer aveuglément des "
|
||
"algorithmes de texte sur des données binaires qui ne sont pas compatibles "
|
||
"ASCII conduit généralement à leur corruption)."
|
||
|
||
#: library/stdtypes.rst:2519
|
||
msgid ""
|
||
"In addition to the literal forms, bytes objects can be created in a number "
|
||
"of other ways:"
|
||
msgstr ""
|
||
"En plus des formes littérales, des objets *bytes* peuvent être créés par de "
|
||
"nombreux moyens :"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:2522
|
||
msgid "A zero-filled bytes object of a specified length: ``bytes(10)``"
|
||
msgstr ""
|
||
"un objet *bytes* rempli de zéros d'une longueur spécifiée : ``bytes(10)`` ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:2523
|
||
msgid "From an iterable of integers: ``bytes(range(20))``"
|
||
msgstr "un itérable d'entiers : ``bytes(range(20))`` ;"
|
||
|
||
# fin d'énumération
|
||
#: library/stdtypes.rst:2524
|
||
msgid "Copying existing binary data via the buffer protocol: ``bytes(obj)``"
|
||
msgstr ""
|
||
"la copie de données binaires existantes via le protocole tampon : "
|
||
"``bytes(obj)``."
|
||
|
||
#: library/stdtypes.rst:2526
|
||
msgid "Also see the :ref:`bytes <func-bytes>` built-in."
|
||
msgstr "Voir aussi la fonction native :ref:`bytes <func-bytes>`."
|
||
|
||
#: library/stdtypes.rst:2528
|
||
msgid ""
|
||
"Since 2 hexadecimal digits correspond precisely to a single byte, "
|
||
"hexadecimal numbers are a commonly used format for describing binary data. "
|
||
"Accordingly, the bytes type has an additional class method to read data in "
|
||
"that format:"
|
||
msgstr ""
|
||
"Puisque 2 chiffres hexadécimaux correspondent précisément à un seul octet, "
|
||
"les nombres hexadécimaux sont un format couramment utilisé pour décrire les "
|
||
"données binaires. Par conséquent, le type *bytes* a une méthode de classe "
|
||
"pour lire des données dans ce format :"
|
||
|
||
#: library/stdtypes.rst:2534
|
||
msgid ""
|
||
"This :class:`bytes` class method returns a bytes object, decoding the given "
|
||
"string object. The string must contain two hexadecimal digits per byte, "
|
||
"with ASCII whitespace being ignored."
|
||
msgstr ""
|
||
"Cette méthode de la classe :class:`bytes` renvoie un objet *bytes*, décodant "
|
||
"la chaîne donnée. La chaîne doit contenir deux chiffres hexadécimaux par "
|
||
"octet, les espaces ASCII sont ignorés."
|
||
|
||
#: library/stdtypes.rst:2541
|
||
msgid ""
|
||
":meth:`bytes.fromhex` now skips all ASCII whitespace in the string, not just "
|
||
"spaces."
|
||
msgstr ""
|
||
":meth:`bytes.fromhex` saute maintenant dans la chaîne tous les caractères "
|
||
"ASCII d'espacement, pas seulement les espaces."
|
||
|
||
#: library/stdtypes.rst:2545
|
||
msgid ""
|
||
"A reverse conversion function exists to transform a bytes object into its "
|
||
"hexadecimal representation."
|
||
msgstr ""
|
||
"Une fonction de conversion inverse existe pour transformer un objet *bytes* "
|
||
"en sa représentation hexadécimale."
|
||
|
||
#: library/stdtypes.rst:2635
|
||
msgid ""
|
||
"Return a string object containing two hexadecimal digits for each byte in "
|
||
"the instance."
|
||
msgstr ""
|
||
"Renvoie une chaîne contenant deux chiffres hexadécimaux pour chaque octet de "
|
||
"l'instance."
|
||
|
||
#: library/stdtypes.rst:2556
|
||
msgid ""
|
||
"If you want to make the hex string easier to read, you can specify a single "
|
||
"character separator *sep* parameter to include in the output. By default, "
|
||
"this separator will be included between each byte. A second optional "
|
||
"*bytes_per_sep* parameter controls the spacing. Positive values calculate "
|
||
"the separator position from the right, negative values from the left."
|
||
msgstr ""
|
||
"Si vous voulez obtenir une chaîne hexadécimale plus facile à lire, vous "
|
||
"pouvez spécifier le paramètre *sep* comme « caractère de séparation », à "
|
||
"inclure dans la sortie. Par défaut, ce caractère est inséré entre chaque "
|
||
"octet. Un second paramètre optionnel *bytes_per_sep* contrôle l'espacement. "
|
||
"Les valeurs positives calculent la position du séparateur en partant de la "
|
||
"droite, les valeurs négatives de la gauche."
|
||
|
||
#: library/stdtypes.rst:2573
|
||
msgid ""
|
||
":meth:`bytes.hex` now supports optional *sep* and *bytes_per_sep* parameters "
|
||
"to insert separators between bytes in the hex output."
|
||
msgstr ""
|
||
":meth:`bytes.hex` prend désormais en charge les paramètres optionnels *sep* "
|
||
"et *bytes_per_sep* pour insérer des séparateurs entre les octets dans la "
|
||
"sortie hexadécimale."
|
||
|
||
#: library/stdtypes.rst:2577
|
||
msgid ""
|
||
"Since bytes objects are sequences of integers (akin to a tuple), for a bytes "
|
||
"object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be a bytes "
|
||
"object of length 1. (This contrasts with text strings, where both indexing "
|
||
"and slicing will produce a string of length 1)"
|
||
msgstr ""
|
||
"Comme les objets *bytes* sont des séquences d'entiers (semblables à un *n*-"
|
||
"uplet), pour une instance de *bytes* *b*, ``b[0]`` est un entier, tandis que "
|
||
"``b[0:1]`` est un objet *bytes* de longueur 1. (Cela contraste avec les "
|
||
"chaînes, où un indice et le découpage donnent une chaîne de longueur 1.)"
|
||
|
||
#: library/stdtypes.rst:2582
|
||
msgid ""
|
||
"The representation of bytes objects uses the literal format (``b'...'``) "
|
||
"since it is often more useful than e.g. ``bytes([46, 46, 46])``. You can "
|
||
"always convert a bytes object into a list of integers using ``list(b)``."
|
||
msgstr ""
|
||
"La représentation des *bytes* utilise le format littéral (``b'...'``) car il "
|
||
"est souvent plus utile que par exemple ``bytes([46, 46, 46])``. Vous pouvez "
|
||
"toujours convertir un *bytes* en liste d'entiers en utilisant ``list(b)``."
|
||
|
||
#: library/stdtypes.rst:2590
|
||
msgid "Bytearray Objects"
|
||
msgstr "Objets *bytearray*"
|
||
|
||
#: library/stdtypes.rst:2594
|
||
msgid ""
|
||
":class:`bytearray` objects are a mutable counterpart to :class:`bytes` "
|
||
"objects."
|
||
msgstr ""
|
||
"Les objets :class:`bytearray` sont l'équivalent muable des objets :class:"
|
||
"`bytes`."
|
||
|
||
#: library/stdtypes.rst:2599
|
||
msgid ""
|
||
"There is no dedicated literal syntax for bytearray objects, instead they are "
|
||
"always created by calling the constructor:"
|
||
msgstr ""
|
||
"Il n'y a pas de syntaxe littérale dédiée aux *bytearray*, ils sont toujours "
|
||
"créés en appelant le constructeur :"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:2602
|
||
msgid "Creating an empty instance: ``bytearray()``"
|
||
msgstr "créer une instance vide : ``bytearray()`` ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:2603
|
||
msgid "Creating a zero-filled instance with a given length: ``bytearray(10)``"
|
||
msgstr ""
|
||
"crée une instance remplie de zéros d'une longueur donnée : "
|
||
"``bytearray(10)`` ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:2604
|
||
msgid "From an iterable of integers: ``bytearray(range(20))``"
|
||
msgstr "à partir d'un itérable d'entiers : ``bytearray(range(20))`` ;"
|
||
|
||
# fin d'énumération
|
||
#: library/stdtypes.rst:2605
|
||
msgid ""
|
||
"Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``"
|
||
msgstr ""
|
||
"copie des données binaires existantes via le protocole tampon : "
|
||
"``bytearray(b'Hi!')``."
|
||
|
||
#: library/stdtypes.rst:2607
|
||
msgid ""
|
||
"As bytearray objects are mutable, they support the :ref:`mutable <typesseq-"
|
||
"mutable>` sequence operations in addition to the common bytes and bytearray "
|
||
"operations described in :ref:`bytes-methods`."
|
||
msgstr ""
|
||
"Comme les *bytearray* sont muables, ils prennent en charge les opérations de "
|
||
"séquences :ref:`muables <typesseq-mutable>` en plus des opérations communes "
|
||
"de *bytes* et *bytearray* décrites dans :ref:`bytes-methods`."
|
||
|
||
#: library/stdtypes.rst:2611
|
||
msgid "Also see the :ref:`bytearray <func-bytearray>` built-in."
|
||
msgstr "Voir aussi la fonction native :ref:`bytearray <func-bytearray>`."
|
||
|
||
#: library/stdtypes.rst:2613
|
||
msgid ""
|
||
"Since 2 hexadecimal digits correspond precisely to a single byte, "
|
||
"hexadecimal numbers are a commonly used format for describing binary data. "
|
||
"Accordingly, the bytearray type has an additional class method to read data "
|
||
"in that format:"
|
||
msgstr ""
|
||
"Puisque 2 chiffres hexadécimaux correspondent précisément à un octet, les "
|
||
"nombres hexadécimaux sont un format couramment utilisé pour décrire les "
|
||
"données binaires. Par conséquent, le type *bytearray* a une méthode de "
|
||
"classe pour lire les données dans ce format :"
|
||
|
||
#: library/stdtypes.rst:2619
|
||
msgid ""
|
||
"This :class:`bytearray` class method returns bytearray object, decoding the "
|
||
"given string object. The string must contain two hexadecimal digits per "
|
||
"byte, with ASCII whitespace being ignored."
|
||
msgstr ""
|
||
"Cette méthode de la classe :class:`bytearray` renvoie un objet *bytearray*, "
|
||
"décodant la chaîne donnée. La chaîne doit contenir deux chiffres "
|
||
"hexadécimaux par octet, les caractères d'espacement ASCII sont ignorés."
|
||
|
||
#: library/stdtypes.rst:2626
|
||
msgid ""
|
||
":meth:`bytearray.fromhex` now skips all ASCII whitespace in the string, not "
|
||
"just spaces."
|
||
msgstr ""
|
||
":meth:`bytearray.fromhex` saute maintenant tous les caractères d'espacement "
|
||
"ASCII dans la chaîne, pas seulement les espaces."
|
||
|
||
#: library/stdtypes.rst:2630
|
||
msgid ""
|
||
"A reverse conversion function exists to transform a bytearray object into "
|
||
"its hexadecimal representation."
|
||
msgstr ""
|
||
"Une fonction de conversion inverse existe pour transformer un objet "
|
||
"*bytearray* en sa représentation hexadécimale."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:2643
|
||
msgid ""
|
||
"Similar to :meth:`bytes.hex`, :meth:`bytearray.hex` now supports optional "
|
||
"*sep* and *bytes_per_sep* parameters to insert separators between bytes in "
|
||
"the hex output."
|
||
msgstr ""
|
||
"similaire à :meth:`bytes.hex`, :meth:`bytearray.hex` prend désormais en "
|
||
"charge les paramètres optionnels *sep* et *bytes_per_sep* pour insérer des "
|
||
"séparateurs entre les octets dans la sortie hexadécimale."
|
||
|
||
#: library/stdtypes.rst:2648
|
||
msgid ""
|
||
"Since bytearray objects are sequences of integers (akin to a list), for a "
|
||
"bytearray object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be "
|
||
"a bytearray object of length 1. (This contrasts with text strings, where "
|
||
"both indexing and slicing will produce a string of length 1)"
|
||
msgstr ""
|
||
"Comme les *bytearray* sont des séquences d'entiers (semblables à une liste), "
|
||
"pour un objet *bytearray* *b*, ``b[0]`` est un entier, tandis que ``b[0:1]`` "
|
||
"est un objet *bytearray* de longueur 1. (Ceci contraste avec les chaînes de "
|
||
"texte, où l'indice et le découpage produisent une chaîne de longueur 1)"
|
||
|
||
#: library/stdtypes.rst:2653
|
||
msgid ""
|
||
"The representation of bytearray objects uses the bytes literal format "
|
||
"(``bytearray(b'...')``) since it is often more useful than e.g. "
|
||
"``bytearray([46, 46, 46])``. You can always convert a bytearray object into "
|
||
"a list of integers using ``list(b)``."
|
||
msgstr ""
|
||
"La représentation des objets *bytearray* utilise le format littéral des "
|
||
"*bytes* (``bytearray(b'...')``) car il est souvent plus utile que par "
|
||
"exemple ``bytearray([46, 46, 46])``. Vous pouvez toujours convertir un objet "
|
||
"*bytearray* en une liste de nombres entiers en utilisant ``list(b)``."
|
||
|
||
#: library/stdtypes.rst:2662
|
||
msgid "Bytes and Bytearray Operations"
|
||
msgstr "Opérations sur les *bytes* et *bytearray*"
|
||
|
||
#: library/stdtypes.rst:2667
|
||
msgid ""
|
||
"Both bytes and bytearray objects support the :ref:`common <typesseq-common>` "
|
||
"sequence operations. They interoperate not just with operands of the same "
|
||
"type, but with any :term:`bytes-like object`. Due to this flexibility, they "
|
||
"can be freely mixed in operations without causing errors. However, the "
|
||
"return type of the result may depend on the order of operands."
|
||
msgstr ""
|
||
"*bytes* et *bytearray* prennent en charge les opérations :ref:`communes "
|
||
"<typesseq-common>` des séquences. Ils interagissent non seulement avec des "
|
||
"opérandes de même type, mais aussi avec les :term:`objets octet-compatibles "
|
||
"<bytes-like object>`. En raison de cette flexibilité, ils peuvent être "
|
||
"mélangés librement dans des opérations sans provoquer d'erreurs. Cependant, "
|
||
"le type du résultat peut dépendre de l'ordre des opérandes."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:2675
|
||
msgid ""
|
||
"The methods on bytes and bytearray objects don't accept strings as their "
|
||
"arguments, just as the methods on strings don't accept bytes as their "
|
||
"arguments. For example, you have to write::"
|
||
msgstr ""
|
||
"les méthodes sur les *bytes* et les *bytearray* n'acceptent pas les chaînes "
|
||
"comme arguments, tout comme les méthodes sur les chaînes n'acceptent pas les "
|
||
"*bytes* comme arguments. Par exemple, vous devez écrire ::"
|
||
|
||
#: library/stdtypes.rst:2682
|
||
msgid "and::"
|
||
msgstr "et ::"
|
||
|
||
#: library/stdtypes.rst:2687
|
||
msgid ""
|
||
"Some bytes and bytearray operations assume the use of ASCII compatible "
|
||
"binary formats, and hence should be avoided when working with arbitrary "
|
||
"binary data. These restrictions are covered below."
|
||
msgstr ""
|
||
"Quelques opérations de *bytes* et *bytesarray* supposent l'utilisation de "
|
||
"formats binaires compatibles ASCII, et donc doivent être évités lorsque vous "
|
||
"travaillez avec des données binaires arbitraires. Ces restrictions sont "
|
||
"couvertes ci-dessous."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:2692
|
||
msgid ""
|
||
"Using these ASCII based operations to manipulate binary data that is not "
|
||
"stored in an ASCII based format may lead to data corruption."
|
||
msgstr ""
|
||
"utiliser ces opérations basées sur l'ASCII pour manipuler des données "
|
||
"binaires qui ne sont pas au format ASCII peut les corrompre."
|
||
|
||
#: library/stdtypes.rst:2695
|
||
msgid ""
|
||
"The following methods on bytes and bytearray objects can be used with "
|
||
"arbitrary binary data."
|
||
msgstr ""
|
||
"Les méthodes suivantes sur les *bytes* et *bytearray* peuvent être utilisées "
|
||
"avec des données binaires arbitraires."
|
||
|
||
#: library/stdtypes.rst:2701
|
||
msgid ""
|
||
"Return the number of non-overlapping occurrences of subsequence *sub* in the "
|
||
"range [*start*, *end*]. Optional arguments *start* and *end* are "
|
||
"interpreted as in slice notation."
|
||
msgstr ""
|
||
"Renvoie le nombre d'occurrences qui ne se chevauchent pas de la sous-"
|
||
"séquence *sub* dans l'intervalle [*start*, *end*]. Les arguments facultatifs "
|
||
"*start* et *end* sont interprétés comme dans la notation des découpages."
|
||
|
||
#: library/stdtypes.rst:2810 library/stdtypes.rst:2898
|
||
#: library/stdtypes.rst:2911
|
||
msgid ""
|
||
"The subsequence to search for may be any :term:`bytes-like object` or an "
|
||
"integer in the range 0 to 255."
|
||
msgstr ""
|
||
"La sous-séquence à rechercher peut être un quelconque :term:`objet octet-"
|
||
"compatible <bytes-like object>` ou un nombre entier compris entre 0 et 255."
|
||
|
||
#: library/stdtypes.rst:2708
|
||
msgid ""
|
||
"If *sub* is empty, returns the number of empty slices between characters "
|
||
"which is the length of the bytes object plus one."
|
||
msgstr ""
|
||
"Si *sub* est vide, renvoie le nombre de tranches vides entre les caractères "
|
||
"de début et de fin, ce qui correspond à la longueur de l'objet bytes plus un."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:2822 library/stdtypes.rst:2901
|
||
#: library/stdtypes.rst:2914
|
||
msgid "Also accept an integer in the range 0 to 255 as the subsequence."
|
||
msgstr ""
|
||
"accepte aussi un nombre entier compris entre 0 et 255 comme sous-séquence."
|
||
|
||
#: library/stdtypes.rst:2718
|
||
msgid ""
|
||
"If the binary data starts with the *prefix* string, return "
|
||
"``bytes[len(prefix):]``. Otherwise, return a copy of the original binary "
|
||
"data::"
|
||
msgstr ""
|
||
"Si les données binaires commencent par la chaîne *prefix*, renvoie "
|
||
"``bytes[len(prefix):]``. Sinon, renvoie une copie des données binaires "
|
||
"d'origine ::"
|
||
|
||
#: library/stdtypes.rst:2727
|
||
msgid "The *prefix* may be any :term:`bytes-like object`."
|
||
msgstr ""
|
||
"Le *prefix* peut être n'importe quel :term:`objet octet-compatible <bytes-"
|
||
"like object>`."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:2753 library/stdtypes.rst:2979
|
||
#: library/stdtypes.rst:3024 library/stdtypes.rst:3080
|
||
#: library/stdtypes.rst:3168 library/stdtypes.rst:3335
|
||
#: library/stdtypes.rst:3433 library/stdtypes.rst:3476
|
||
#: library/stdtypes.rst:3678
|
||
msgid ""
|
||
"The bytearray version of this method does *not* operate in place - it always "
|
||
"produces a new object, even if no changes were made."
|
||
msgstr ""
|
||
"la version *bytearray* de cette méthode *ne modifie pas* les octets, elle "
|
||
"produit toujours un nouvel objet, même si aucune modification n'a été "
|
||
"effectuée."
|
||
|
||
#: library/stdtypes.rst:2740
|
||
msgid ""
|
||
"If the binary data ends with the *suffix* string and that *suffix* is not "
|
||
"empty, return ``bytes[:-len(suffix)]``. Otherwise, return a copy of the "
|
||
"original binary data::"
|
||
msgstr ""
|
||
"Si les données binaires terminent par la chaîne *suffix*, renvoie ``bytes[:-"
|
||
"len(suffix)]``. Sinon, renvoie une copie des données binaires d'origine ::"
|
||
|
||
#: library/stdtypes.rst:2749
|
||
msgid "The *suffix* may be any :term:`bytes-like object`."
|
||
msgstr ""
|
||
"Le *suffix* peut être n'importe quel :term:`objet octet-compatible <bytes-"
|
||
"like object>`."
|
||
|
||
#: library/stdtypes.rst:2762
|
||
msgid "Return the bytes decoded to a :class:`str`."
|
||
msgstr "Renvoie la chaine d'octets décodée en instance de :class:`str`."
|
||
|
||
#: library/stdtypes.rst:2767
|
||
msgid ""
|
||
"*errors* controls how decoding errors are handled. If ``'strict'`` (the "
|
||
"default), a :exc:`UnicodeError` exception is raised. Other possible values "
|
||
"are ``'ignore'``, ``'replace'``, and any other name registered via :func:"
|
||
"`codecs.register_error`. See :ref:`error-handlers` for details."
|
||
msgstr ""
|
||
"*errors* détermine la manière dont sont traitées les erreurs. Sa valeur par "
|
||
"défaut est ``'strict'``, ce qui signifie que les erreurs d'encodage lèvent "
|
||
"une :exc:`UnicodeError`. Les autres valeurs possibles sont ``'ignore'``, "
|
||
"``'replace'`` et tout autre nom enregistré *via* :func:`codecs."
|
||
"register_error`, voir la section :ref:`error-handlers` pour les détails."
|
||
|
||
#: library/stdtypes.rst:2773
|
||
msgid ""
|
||
"For performance reasons, the value of *errors* is not checked for validity "
|
||
"unless a decoding error actually occurs, :ref:`devmode` is enabled or a :ref:"
|
||
"`debug build <debug-build>` is used."
|
||
msgstr ""
|
||
"Pour des raisons de performances, la valeur de *errors* n'est pas vérifiée à "
|
||
"moins qu'une erreur de décodage ne se produise réellement, que le :ref:`mode "
|
||
"développeur <devmode>` ne soit activé ou que Python ait été compilé en :ref:"
|
||
"`mode débogage <debug-build>`."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:2779
|
||
msgid ""
|
||
"Passing the *encoding* argument to :class:`str` allows decoding any :term:"
|
||
"`bytes-like object` directly, without needing to make a temporary :class:`!"
|
||
"bytes` or :class:`!bytearray` object."
|
||
msgstr ""
|
||
"passer l'argument *encoding* à :class:`str` permet de décoder tout :term:"
|
||
"`objet octet-compatible <bytes-like object>` directement, sans avoir besoin "
|
||
"d'utiliser un :class:`!bytes` ou :class:`!bytearray` temporaire."
|
||
|
||
#: library/stdtypes.rst:2794
|
||
msgid ""
|
||
"Return ``True`` if the binary data ends with the specified *suffix*, "
|
||
"otherwise return ``False``. *suffix* can also be a tuple of suffixes to "
|
||
"look for. With optional *start*, test beginning at that position. With "
|
||
"optional *end*, stop comparing at that position."
|
||
msgstr ""
|
||
"Renvoie ``True`` si les octets se terminent par *suffix*, sinon ``False``. "
|
||
"*suffix* peut aussi être un *n*-uplet de suffixes à rechercher. Avec "
|
||
"l'argument optionnel *start*, la recherche se fait à partir de cette "
|
||
"position. Avec l'argument optionnel *end*, la comparaison s'arrête à cette "
|
||
"position."
|
||
|
||
#: library/stdtypes.rst:2799
|
||
msgid "The suffix(es) to search for may be any :term:`bytes-like object`."
|
||
msgstr ""
|
||
"Les suffixes à rechercher peuvent être n'importe quel :term:`objet octet-"
|
||
"compatible <bytes-like object>`."
|
||
|
||
#: library/stdtypes.rst:2805
|
||
msgid ""
|
||
"Return the lowest index in the data where the subsequence *sub* is found, "
|
||
"such that *sub* is contained in the slice ``s[start:end]``. Optional "
|
||
"arguments *start* and *end* are interpreted as in slice notation. Return "
|
||
"``-1`` if *sub* is not found."
|
||
msgstr ""
|
||
"Renvoie la première position où le *sub* se trouve dans les données, de "
|
||
"telle sorte que *sub* soit contenue dans ``s[start:end]``. Les arguments "
|
||
"facultatifs *start* et *end* sont interprétés comme dans la notation des "
|
||
"découpages. Renvoie ``-1`` si *sub* n'est pas trouvé."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:2815
|
||
msgid ""
|
||
"The :meth:`~bytes.find` method should be used only if you need to know the "
|
||
"position of *sub*. To check if *sub* is a substring or not, use the :"
|
||
"keyword:`in` operator::"
|
||
msgstr ""
|
||
"la méthode :meth:`~bytes.find` ne doit être utilisée que si vous avez besoin "
|
||
"de connaître la position de *sub*. Pour vérifier si *sub* est présent ou "
|
||
"non, utilisez l'opérateur :keyword:`in` ::"
|
||
|
||
#: library/stdtypes.rst:2829
|
||
msgid ""
|
||
"Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence "
|
||
"is not found."
|
||
msgstr ""
|
||
"Comme :meth:`~bytes.find`, mais lève une :exc:`ValueError` lorsque la "
|
||
"séquence est introuvable."
|
||
|
||
#: library/stdtypes.rst:2842
|
||
msgid ""
|
||
"Return a bytes or bytearray object which is the concatenation of the binary "
|
||
"data sequences in *iterable*. A :exc:`TypeError` will be raised if there "
|
||
"are any values in *iterable* that are not :term:`bytes-like objects <bytes-"
|
||
"like object>`, including :class:`str` objects. The separator between "
|
||
"elements is the contents of the bytes or bytearray object providing this "
|
||
"method."
|
||
msgstr ""
|
||
"Renvoie un *bytes* ou *bytearray* qui est la concaténation des séquences de "
|
||
"données binaires dans *iterable*. Une exception :exc:`TypeError` est levée "
|
||
"si une valeur d'*iterable* n'est pas un :term:`objet octet-compatible <bytes-"
|
||
"like object>`, y compris pour des :class:`str`. Le séparateur entre les "
|
||
"éléments est le contenu du *bytes* ou du *bytearray* depuis lequel cette "
|
||
"méthode est appelée."
|
||
|
||
#: library/stdtypes.rst:2853
|
||
msgid ""
|
||
"This static method returns a translation table usable for :meth:`bytes."
|
||
"translate` that will map each character in *from* into the character at the "
|
||
"same position in *to*; *from* and *to* must both be :term:`bytes-like "
|
||
"objects <bytes-like object>` and have the same length."
|
||
msgstr ""
|
||
"Cette méthode statique renvoie une table de traduction utilisable par :meth:"
|
||
"`bytes.translate` qui permettra de changer chaque caractère de *from* par un "
|
||
"caractère à la même position dans *to* ; *from* et *to* doivent tous deux "
|
||
"être des :term:`objets octet-compatibles <bytes-like object>` et avoir la "
|
||
"même longueur."
|
||
|
||
#: library/stdtypes.rst:2864
|
||
msgid ""
|
||
"Split the sequence at the first occurrence of *sep*, and return a 3-tuple "
|
||
"containing the part before the separator, the separator itself or its "
|
||
"bytearray copy, and the part after the separator. If the separator is not "
|
||
"found, return a 3-tuple containing a copy of the original sequence, followed "
|
||
"by two empty bytes or bytearray objects."
|
||
msgstr ""
|
||
"Divise la séquence à la première occurrence de *sep*, et renvoie un triplet "
|
||
"contenant la partie précédant le séparateur, le séparateur lui-même (ou sa "
|
||
"copie en *byterray*), et la partie suivant le séparateur. Si le séparateur "
|
||
"n'est pas trouvé, le triplet renvoyé contient une copie de la séquence "
|
||
"d'origine, suivi de deux *bytes* ou *bytearray* vides."
|
||
|
||
#: library/stdtypes.rst:2928
|
||
msgid "The separator to search for may be any :term:`bytes-like object`."
|
||
msgstr ""
|
||
"Le séparateur à rechercher peut être tout :term:`objet octet-compatible "
|
||
"<bytes-like object>`."
|
||
|
||
#: library/stdtypes.rst:2877
|
||
msgid ""
|
||
"Return a copy of the sequence with all occurrences of subsequence *old* "
|
||
"replaced by *new*. If the optional argument *count* is given, only the "
|
||
"first *count* occurrences are replaced."
|
||
msgstr ""
|
||
"Renvoie une copie de la séquence dont toutes les occurrences de la sous-"
|
||
"séquence *old* sont remplacées par *new*. Si l'argument optionnel *count* "
|
||
"est donné, seules les *count* premières occurrences sont remplacées."
|
||
|
||
#: library/stdtypes.rst:2881
|
||
msgid ""
|
||
"The subsequence to search for and its replacement may be any :term:`bytes-"
|
||
"like object`."
|
||
msgstr ""
|
||
"La sous-séquence à rechercher et son remplacement peuvent être n'importe "
|
||
"quel :term:`objet octet-compatible <bytes-like object>`."
|
||
|
||
#: library/stdtypes.rst:2893
|
||
msgid ""
|
||
"Return the highest index in the sequence where the subsequence *sub* is "
|
||
"found, such that *sub* is contained within ``s[start:end]``. Optional "
|
||
"arguments *start* and *end* are interpreted as in slice notation. Return "
|
||
"``-1`` on failure."
|
||
msgstr ""
|
||
"Renvoie la plus grande position de *sub* dans la séquence, de telle sorte "
|
||
"que *sub* soit dans ``s[start:end]``. Les arguments facultatifs *start* et "
|
||
"*end* sont interprétés comme dans la notation des découpages. Renvoie ``-1`` "
|
||
"si *sub* n'est pas trouvable."
|
||
|
||
#: library/stdtypes.rst:2908
|
||
msgid ""
|
||
"Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the subsequence "
|
||
"*sub* is not found."
|
||
msgstr ""
|
||
"Semblable à :meth:`~bytes.rfind` mais lève une :exc:`ValueError` lorsque "
|
||
"*sub* est introuvable."
|
||
|
||
#: library/stdtypes.rst:2921
|
||
msgid ""
|
||
"Split the sequence at the last occurrence of *sep*, and return a 3-tuple "
|
||
"containing the part before the separator, the separator itself or its "
|
||
"bytearray copy, and the part after the separator. If the separator is not "
|
||
"found, return a 3-tuple containing two empty bytes or bytearray objects, "
|
||
"followed by a copy of the original sequence."
|
||
msgstr ""
|
||
"Coupe la séquence à la dernière occurrence de *sep*, et renvoie un triplet "
|
||
"de trois éléments contenant la partie précédant le séparateur, le séparateur "
|
||
"lui-même (ou sa copie, un *bytearray*), et la partie suivant le séparateur. "
|
||
"Si le séparateur n'est pas trouvé, le triplet contient deux *bytes* ou "
|
||
"*bytesarray* vides suivi d’une copie de la séquence d'origine."
|
||
|
||
#: library/stdtypes.rst:2934
|
||
msgid ""
|
||
"Return ``True`` if the binary data starts with the specified *prefix*, "
|
||
"otherwise return ``False``. *prefix* can also be a tuple of prefixes to "
|
||
"look for. With optional *start*, test beginning at that position. With "
|
||
"optional *end*, stop comparing at that position."
|
||
msgstr ""
|
||
"Renvoie ``True`` si les données binaires commencent par le *prefix* "
|
||
"spécifié, sinon ``False``. *prefix* peut aussi être un *n*-uplet de préfixes "
|
||
"à rechercher. Avec l'argument *start* la recherche commence à cette "
|
||
"position. Avec l'argument *end* option, la recherche s'arrête à cette "
|
||
"position."
|
||
|
||
#: library/stdtypes.rst:2939
|
||
msgid "The prefix(es) to search for may be any :term:`bytes-like object`."
|
||
msgstr ""
|
||
"Les préfixes à rechercher peuvent être n'importe quels :term:`objets octet-"
|
||
"compatibles <bytes-like object>`."
|
||
|
||
#: library/stdtypes.rst:2945
|
||
msgid ""
|
||
"Return a copy of the bytes or bytearray object where all bytes occurring in "
|
||
"the optional argument *delete* are removed, and the remaining bytes have "
|
||
"been mapped through the given translation table, which must be a bytes "
|
||
"object of length 256."
|
||
msgstr ""
|
||
"Renvoie une copie du *bytes* ou *bytearray* dont tous les octets de "
|
||
"*delete* sont supprimés, et les octets restants changés par la table de "
|
||
"correspondance donnée, qui doit être un objet *bytes* d'une longueur de 256."
|
||
|
||
#: library/stdtypes.rst:2950
|
||
msgid ""
|
||
"You can use the :func:`bytes.maketrans` method to create a translation table."
|
||
msgstr ""
|
||
"Vous pouvez utiliser la méthode :func:`bytes.maketrans` pour créer une table "
|
||
"de correspondance."
|
||
|
||
#: library/stdtypes.rst:2953
|
||
msgid ""
|
||
"Set the *table* argument to ``None`` for translations that only delete "
|
||
"characters::"
|
||
msgstr ""
|
||
"Donnez ``None`` comme *table* pour seulement supprimer des caractères ::"
|
||
|
||
#: library/stdtypes.rst:2959
|
||
msgid "*delete* is now supported as a keyword argument."
|
||
msgstr "*delete* est maintenant accepté comme argument nommé."
|
||
|
||
#: library/stdtypes.rst:2963
|
||
msgid ""
|
||
"The following methods on bytes and bytearray objects have default behaviours "
|
||
"that assume the use of ASCII compatible binary formats, but can still be "
|
||
"used with arbitrary binary data by passing appropriate arguments. Note that "
|
||
"all of the bytearray methods in this section do *not* operate in place, and "
|
||
"instead produce new objects."
|
||
msgstr ""
|
||
"Les méthodes suivantes sur les *bytes* et *bytearray* supposent par défaut "
|
||
"que les données traitées sont compatibles ASCII, mais peuvent toujours être "
|
||
"utilisées avec des données binaires, arbitraires, en passant des arguments "
|
||
"appropriés. Notez que toutes les méthodes de *bytearray* de cette section ne "
|
||
"travaillent jamais sur l'objet lui-même, mais renvoient un nouvel objet."
|
||
|
||
#: library/stdtypes.rst:2972
|
||
msgid ""
|
||
"Return a copy of the object centered in a sequence of length *width*. "
|
||
"Padding is done using the specified *fillbyte* (default is an ASCII space). "
|
||
"For :class:`bytes` objects, the original sequence is returned if *width* is "
|
||
"less than or equal to ``len(s)``."
|
||
msgstr ""
|
||
"Renvoie une copie de l'objet centrée dans une séquence de longueur *width*. "
|
||
"Le remplissage est fait en utilisant *fillbyte* (qui par défaut est une "
|
||
"espace ASCII). Pour les objets :class:`bytes`, la séquence initiale est "
|
||
"renvoyée si *width* est inférieure ou égale à ``len(s)``."
|
||
|
||
#: library/stdtypes.rst:2986
|
||
msgid ""
|
||
"Return a copy of the object left justified in a sequence of length *width*. "
|
||
"Padding is done using the specified *fillbyte* (default is an ASCII space). "
|
||
"For :class:`bytes` objects, the original sequence is returned if *width* is "
|
||
"less than or equal to ``len(s)``."
|
||
msgstr ""
|
||
"Renvoie une copie de l'objet aligné à gauche dans une séquence de longueur "
|
||
"*width*. Le remplissage est fait en utilisant *fillbyte* (par défaut un "
|
||
"espace ASCII). Pour les objets :class:`bytes`, la séquence initiale est "
|
||
"renvoyée si *width* est inférieure ou égale à ``len(s)``."
|
||
|
||
#: library/stdtypes.rst:3000
|
||
msgid ""
|
||
"Return a copy of the sequence with specified leading bytes removed. The "
|
||
"*chars* argument is a binary sequence specifying the set of byte values to "
|
||
"be removed - the name refers to the fact this method is usually used with "
|
||
"ASCII characters. If omitted or ``None``, the *chars* argument defaults to "
|
||
"removing ASCII whitespace. The *chars* argument is not a prefix; rather, "
|
||
"all combinations of its values are stripped::"
|
||
msgstr ""
|
||
"Renvoie une copie de la séquence dont certains préfixes ont été supprimés. "
|
||
"L’argument *chars* est une séquence binaire spécifiant le jeu d'octets à "
|
||
"supprimer. Ce nom se réfère au fait de cette méthode est généralement "
|
||
"utilisée avec des caractères ASCII. En cas d’omission ou ``None``, la valeur "
|
||
"par défaut de *chars* permet de supprimer des espaces ASCII. L’argument "
|
||
"*chars* n’est pas un préfixe, toutes les combinaisons de ses valeurs sont "
|
||
"supprimées ::"
|
||
|
||
#: library/stdtypes.rst:3012
|
||
msgid ""
|
||
"The binary sequence of byte values to remove may be any :term:`bytes-like "
|
||
"object`. See :meth:`~bytes.removeprefix` for a method that will remove a "
|
||
"single prefix string rather than all of a set of characters. For example::"
|
||
msgstr ""
|
||
"Les octets à retirer peuvent être n'importe quel :term:`bytes-like object`. "
|
||
"Voir :meth:`~bytes.removeprefix` pour une méthode qui supprime, au début de "
|
||
"la séquence, la chaîne de caractères en tant que telle plutôt que l'ensemble "
|
||
"des caractères passés en paramètre. Par exemple ::"
|
||
|
||
#: library/stdtypes.rst:3031
|
||
msgid ""
|
||
"Return a copy of the object right justified in a sequence of length *width*. "
|
||
"Padding is done using the specified *fillbyte* (default is an ASCII space). "
|
||
"For :class:`bytes` objects, the original sequence is returned if *width* is "
|
||
"less than or equal to ``len(s)``."
|
||
msgstr ""
|
||
"Renvoie une copie de l'objet justifié à droite dans une séquence de longueur "
|
||
"*width*. Le remplissage est fait en utilisant le caractère *fillbyte* (par "
|
||
"défaut est un espace ASCII). Pour les objets :class:`bytes`, la séquence "
|
||
"d'origine est renvoyée si *width* est inférieure ou égale à ``len(s)``."
|
||
|
||
#: library/stdtypes.rst:3045
|
||
msgid ""
|
||
"Split the binary sequence into subsequences of the same type, using *sep* as "
|
||
"the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are "
|
||
"done, the *rightmost* ones. If *sep* is not specified or ``None``, any "
|
||
"subsequence consisting solely of ASCII whitespace is a separator. Except for "
|
||
"splitting from the right, :meth:`rsplit` behaves like :meth:`split` which is "
|
||
"described in detail below."
|
||
msgstr ""
|
||
"Divise la séquence d'octets en sous-séquences du même type, en utilisant "
|
||
"*sep* comme séparateur. Si *maxsplit* est donné, c'est le nombre maximum de "
|
||
"divisions qui pourront être faites, celles \"à droite\". Si *sep* est pas "
|
||
"spécifié ou est ``None``, toute sous-séquence composée uniquement d'espaces "
|
||
"ASCII est un séparateur. En dehors du fait qu'il découpe par la droite, :"
|
||
"meth:`rsplit` se comporte comme :meth:`split` qui est décrit en détail ci-"
|
||
"dessous."
|
||
|
||
#: library/stdtypes.rst:3056
|
||
msgid ""
|
||
"Return a copy of the sequence with specified trailing bytes removed. The "
|
||
"*chars* argument is a binary sequence specifying the set of byte values to "
|
||
"be removed - the name refers to the fact this method is usually used with "
|
||
"ASCII characters. If omitted or ``None``, the *chars* argument defaults to "
|
||
"removing ASCII whitespace. The *chars* argument is not a suffix; rather, "
|
||
"all combinations of its values are stripped::"
|
||
msgstr ""
|
||
"Renvoie une copie de la séquence dont des octets finaux sont supprimés. "
|
||
"L'argument *chars* est une séquence d'octets spécifiant le jeu de caractères "
|
||
"à supprimer. En cas d'omission ou ``None``, les espaces ASCII sont "
|
||
"supprimées. L'argument *chars* n'est pas un suffixe : toutes les "
|
||
"combinaisons de ses valeurs sont retirées ::"
|
||
|
||
#: library/stdtypes.rst:3068
|
||
msgid ""
|
||
"The binary sequence of byte values to remove may be any :term:`bytes-like "
|
||
"object`. See :meth:`~bytes.removesuffix` for a method that will remove a "
|
||
"single suffix string rather than all of a set of characters. For example::"
|
||
msgstr ""
|
||
"Les octets à retirer peuvent être n'importe quel :term:`bytes-like object`. "
|
||
"Voir :meth:`~bytes.removesuffix` pour une méthode qui supprime, à la fin de "
|
||
"la séquence, la chaîne de caractères en tant que telle plutôt que l'ensemble "
|
||
"des caractères passés en paramètre. Par exemple ::"
|
||
|
||
#: library/stdtypes.rst:3087
|
||
msgid ""
|
||
"Split the binary sequence into subsequences of the same type, using *sep* as "
|
||
"the delimiter string. If *maxsplit* is given and non-negative, at most "
|
||
"*maxsplit* splits are done (thus, the list will have at most ``maxsplit+1`` "
|
||
"elements). If *maxsplit* is not specified or is ``-1``, then there is no "
|
||
"limit on the number of splits (all possible splits are made)."
|
||
msgstr ""
|
||
"Divise la séquence en sous-séquences du même type, en utilisant *sep* comme "
|
||
"séparateur. Si *maxsplit* est donné, c'est le nombre maximum de divisions "
|
||
"qui pourront être faites (la liste aura donc au plus ``maxsplit+1`` "
|
||
"éléments), Si *maxsplit* n'est pas spécifié ou faut ``-1``, il n'y a aucune "
|
||
"limite au nombre de découpes (elles sont toutes effectuées)."
|
||
|
||
#: library/stdtypes.rst:3093
|
||
msgid ""
|
||
"If *sep* is given, consecutive delimiters are not grouped together and are "
|
||
"deemed to delimit empty subsequences (for example, ``b'1,,2'.split(b',')`` "
|
||
"returns ``[b'1', b'', b'2']``). The *sep* argument may consist of a "
|
||
"multibyte sequence (for example, ``b'1<>2<>3'.split(b'<>')`` returns "
|
||
"``[b'1', b'2', b'3']``). Splitting an empty sequence with a specified "
|
||
"separator returns ``[b'']`` or ``[bytearray(b'')]`` depending on the type of "
|
||
"object being split. The *sep* argument may be any :term:`bytes-like object`."
|
||
msgstr ""
|
||
"Si *sep* est donné, les délimiteurs consécutifs ne sont pas regroupés et "
|
||
"ainsi délimitent ainsi des chaînes vides (par exemple, ``b'1,,2'."
|
||
"split(b',')`` renvoie ``[b'1', b'', b'2']``). L'argument *sep* peut contenir "
|
||
"plusieurs sous-séquences (par exemple, ``b'1<>2<>3'.split(b'<>')`` renvoie "
|
||
"``[b'1', b'2', b'3']``). Découper une chaîne vide en spécifiant *sep* "
|
||
"renvoie ``[b'']`` ou ``[bytearray(b'')]`` en fonction du type de l'objet "
|
||
"découpé. L'argument *sep* peut être n'importe quel :term:`bytes-like object`."
|
||
|
||
#: library/stdtypes.rst:3111
|
||
msgid ""
|
||
"If *sep* is not specified or is ``None``, a different splitting algorithm is "
|
||
"applied: runs of consecutive ASCII whitespace are regarded as a single "
|
||
"separator, and the result will contain no empty strings at the start or end "
|
||
"if the sequence has leading or trailing whitespace. Consequently, splitting "
|
||
"an empty sequence or a sequence consisting solely of ASCII whitespace "
|
||
"without a specified separator returns ``[]``."
|
||
msgstr ""
|
||
"Si *sep* n'est pas spécifié ou est ``None``, un autre algorithme de découpe "
|
||
"est appliqué : les espaces ASCII consécutifs sont considérés comme un seul "
|
||
"séparateur, et le résultat ne contiendra pas les chaînes vides de début ou "
|
||
"de la fin si la chaîne est préfixée ou suffixé d'espaces. Par conséquent, "
|
||
"diviser une séquence vide ou une séquence composée d'espaces ASCII avec un "
|
||
"séparateur ``None`` renvoie ``[]``."
|
||
|
||
#: library/stdtypes.rst:3132
|
||
msgid ""
|
||
"Return a copy of the sequence with specified leading and trailing bytes "
|
||
"removed. The *chars* argument is a binary sequence specifying the set of "
|
||
"byte values to be removed - the name refers to the fact this method is "
|
||
"usually used with ASCII characters. If omitted or ``None``, the *chars* "
|
||
"argument defaults to removing ASCII whitespace. The *chars* argument is not "
|
||
"a prefix or suffix; rather, all combinations of its values are stripped::"
|
||
msgstr ""
|
||
"Renvoie une copie de la séquence dont des caractères initiaux et finaux sont "
|
||
"supprimés. L'argument *chars* est une séquence spécifiant le jeu d'octets à "
|
||
"supprimer, le nom se réfère au fait de cette méthode est généralement "
|
||
"utilisée avec des caractères ASCII. En cas d'omission ou ``None``, les "
|
||
"espaces ASCII sont supprimés. L'argument *chars* n'est ni un préfixe ni un "
|
||
"suffixe, toutes les combinaisons de ses valeurs sont supprimées ::"
|
||
|
||
#: library/stdtypes.rst:3145
|
||
msgid ""
|
||
"The binary sequence of byte values to remove may be any :term:`bytes-like "
|
||
"object`."
|
||
msgstr "Les octets à retirer peuvent être tout :term:`bytes-like object`."
|
||
|
||
#: library/stdtypes.rst:3154
|
||
msgid ""
|
||
"The following methods on bytes and bytearray objects assume the use of ASCII "
|
||
"compatible binary formats and should not be applied to arbitrary binary "
|
||
"data. Note that all of the bytearray methods in this section do *not* "
|
||
"operate in place, and instead produce new objects."
|
||
msgstr ""
|
||
"Les méthodes suivantes sur les *bytes* et *bytearray* supposent "
|
||
"l'utilisation d'un format binaire compatible ASCII, et donc doivent être "
|
||
"évités lorsque vous travaillez avec des données binaires arbitraires. Notez "
|
||
"que toutes les méthodes de *bytearray* de cette section *ne modifient pas* "
|
||
"les octets, ils produisent de nouveaux objets."
|
||
|
||
#: library/stdtypes.rst:3162
|
||
msgid ""
|
||
"Return a copy of the sequence with each byte interpreted as an ASCII "
|
||
"character, and the first byte capitalized and the rest lowercased. Non-ASCII "
|
||
"byte values are passed through unchanged."
|
||
msgstr ""
|
||
"Renvoie une copie de la séquence dont chaque octet est interprété comme un "
|
||
"caractère ASCII, le premier octet en capitale et le reste en minuscules. Les "
|
||
"octets non ASCII ne sont pas modifiés."
|
||
|
||
#: library/stdtypes.rst:3175
|
||
msgid ""
|
||
"Return a copy of the sequence where all ASCII tab characters are replaced by "
|
||
"one or more ASCII spaces, depending on the current column and the given tab "
|
||
"size. Tab positions occur every *tabsize* bytes (default is 8, giving tab "
|
||
"positions at columns 0, 8, 16 and so on). To expand the sequence, the "
|
||
"current column is set to zero and the sequence is examined byte by byte. If "
|
||
"the byte is an ASCII tab character (``b'\\t'``), one or more space "
|
||
"characters are inserted in the result until the current column is equal to "
|
||
"the next tab position. (The tab character itself is not copied.) If the "
|
||
"current byte is an ASCII newline (``b'\\n'``) or carriage return "
|
||
"(``b'\\r'``), it is copied and the current column is reset to zero. Any "
|
||
"other byte value is copied unchanged and the current column is incremented "
|
||
"by one regardless of how the byte value is represented when printed::"
|
||
msgstr ""
|
||
"Renvoie une copie de la séquence où toutes les tabulations ASCII sont "
|
||
"remplacées par un ou plusieurs espaces ASCII, en fonction de la colonne "
|
||
"courante et de la taille de tabulation donnée. Les positions des tabulations "
|
||
"se trouvent tous les *tabsize* caractères (8 par défaut, ce qui donne les "
|
||
"positions de tabulations aux colonnes 0, 8, 16 et ainsi de suite). Pour "
|
||
"travailler sur la séquence, la colonne en cours est mise à zéro et la "
|
||
"séquence est examinée octets par octets. Si l'octet est une tabulation ASCII "
|
||
"(``b'\\t'``), un ou plusieurs espaces sont insérés au résultat jusqu’à ce "
|
||
"que la colonne courante soit égale à la position de tabulation suivante. (Le "
|
||
"caractère tabulation lui-même n’est pas copié.) Si l'octet courant est un "
|
||
"saut de ligne ASCII (``b'\\n'``) ou un retour chariot (``b'\\r'``), il est "
|
||
"copié et la colonne en cours est remise à zéro. Tout autre octet est copié "
|
||
"inchangé et la colonne en cours est incrémentée de un indépendamment de la "
|
||
"façon dont l'octet est représenté lors de l’affichage ::"
|
||
|
||
#: library/stdtypes.rst:3203
|
||
msgid ""
|
||
"Return ``True`` if all bytes in the sequence are alphabetical ASCII "
|
||
"characters or ASCII decimal digits and the sequence is not empty, ``False`` "
|
||
"otherwise. Alphabetic ASCII characters are those byte values in the sequence "
|
||
"``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``. ASCII decimal "
|
||
"digits are those byte values in the sequence ``b'0123456789'``."
|
||
msgstr ""
|
||
"Renvoie ``True`` si tous les caractères de la chaîne sont des caractères "
|
||
"ASCII alphabétiques ou chiffres et que la séquence n'est pas vide, sinon "
|
||
"``False``. Les caractères ASCII alphabétiques sont les suivants dans la "
|
||
"séquence d'octets "
|
||
"``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'`` et les "
|
||
"chiffres : ``b'0123456789'``."
|
||
|
||
#: library/stdtypes.rst:3220
|
||
msgid ""
|
||
"Return ``True`` if all bytes in the sequence are alphabetic ASCII characters "
|
||
"and the sequence is not empty, ``False`` otherwise. Alphabetic ASCII "
|
||
"characters are those byte values in the sequence "
|
||
"``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``."
|
||
msgstr ""
|
||
"Renvoie ``True`` si tous les octets dans la séquence sont des caractères "
|
||
"alphabétiques ASCII et que la séquence n'est pas vide, sinon ``False``. Les "
|
||
"caractères ASCII alphabétiques sont : "
|
||
"``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``."
|
||
|
||
#: library/stdtypes.rst:3236
|
||
msgid ""
|
||
"Return ``True`` if the sequence is empty or all bytes in the sequence are "
|
||
"ASCII, ``False`` otherwise. ASCII bytes are in the range 0-0x7F."
|
||
msgstr ""
|
||
"Renvoie ``True`` si la séquence est vide, ou si tous ses octets sont des "
|
||
"octets ASCII, renvoie ``False`` dans le cas contraire. Les octets ASCII dans "
|
||
"l'intervalle ``0``–``0x7F``."
|
||
|
||
#: library/stdtypes.rst:3246
|
||
msgid ""
|
||
"Return ``True`` if all bytes in the sequence are ASCII decimal digits and "
|
||
"the sequence is not empty, ``False`` otherwise. ASCII decimal digits are "
|
||
"those byte values in the sequence ``b'0123456789'``."
|
||
msgstr ""
|
||
"Renvoie ``True`` si tous les octets de la séquence sont des chiffres ASCII "
|
||
"et que la séquence n'est pas vide, sinon ``False``. Les chiffres ASCII sont "
|
||
"ceux dans la séquence d'octets ``b'0123456789'``."
|
||
|
||
#: library/stdtypes.rst:3261
|
||
msgid ""
|
||
"Return ``True`` if there is at least one lowercase ASCII character in the "
|
||
"sequence and no uppercase ASCII characters, ``False`` otherwise."
|
||
msgstr ""
|
||
"Renvoie ``True`` s'il y a au moins un caractère ASCII minuscule dans la "
|
||
"séquence et aucune capitale, sinon ``False``."
|
||
|
||
#: library/stdtypes.rst:3313 library/stdtypes.rst:3379
|
||
#: library/stdtypes.rst:3448
|
||
msgid ""
|
||
"Lowercase ASCII characters are those byte values in the sequence "
|
||
"``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte "
|
||
"values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``."
|
||
msgstr ""
|
||
"Les caractères ASCII minuscules sont ``b'abcdefghijklmnopqrstuvwxyz'``. Les "
|
||
"capitales ASCII sont ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``."
|
||
|
||
#: library/stdtypes.rst:3279
|
||
msgid ""
|
||
"Return ``True`` if all bytes in the sequence are ASCII whitespace and the "
|
||
"sequence is not empty, ``False`` otherwise. ASCII whitespace characters are "
|
||
"those byte values in the sequence ``b' \\t\\n\\r\\x0b\\f'`` (space, tab, "
|
||
"newline, carriage return, vertical tab, form feed)."
|
||
msgstr ""
|
||
"Renvoie ``True`` si tous les octets de la séquence sont des espaces ASCII et "
|
||
"que la séquence n'est pas vide, sinon ``False``. Les espèces ASCII sont ``b' "
|
||
"\\t\\n\\r\\x0b\\f'`` (espace, tabulation, saut de ligne, retour chariot, "
|
||
"tabulation verticale, saut de page)."
|
||
|
||
#: library/stdtypes.rst:3288
|
||
msgid ""
|
||
"Return ``True`` if the sequence is ASCII titlecase and the sequence is not "
|
||
"empty, ``False`` otherwise. See :meth:`bytes.title` for more details on the "
|
||
"definition of \"titlecase\"."
|
||
msgstr ""
|
||
"Renvoie ``True`` si la séquence ASCII est *titlecased*, et qu'elle n'est pas "
|
||
"vide, sinon ``False``. Voir :meth:`bytes.title` pour plus de détails sur la "
|
||
"définition de *titlecase*."
|
||
|
||
#: library/stdtypes.rst:3303
|
||
msgid ""
|
||
"Return ``True`` if there is at least one uppercase alphabetic ASCII "
|
||
"character in the sequence and no lowercase ASCII characters, ``False`` "
|
||
"otherwise."
|
||
msgstr ""
|
||
"Renvoie ``True`` s'il y a au moins un caractère alphabétique majuscule ASCII "
|
||
"dans la séquence et aucun caractère ASCII minuscule, sinon ``False``."
|
||
|
||
#: library/stdtypes.rst:3321
|
||
msgid ""
|
||
"Return a copy of the sequence with all the uppercase ASCII characters "
|
||
"converted to their corresponding lowercase counterpart."
|
||
msgstr ""
|
||
"Renvoie une copie de la séquence dont tous les caractères ASCII en "
|
||
"majuscules sont convertis en leur équivalent en minuscules."
|
||
|
||
#: library/stdtypes.rst:3346
|
||
msgid ""
|
||
"Return a list of the lines in the binary sequence, breaking at ASCII line "
|
||
"boundaries. This method uses the :term:`universal newlines` approach to "
|
||
"splitting lines. Line breaks are not included in the resulting list unless "
|
||
"*keepends* is given and true."
|
||
msgstr ""
|
||
"Renvoie une liste des lignes de la séquence d'octets, découpant au niveau "
|
||
"des fin de lignes ASCII. Cette méthode utilise l'approche :term:`universal "
|
||
"newlines` pour découper les lignes. Les fins de ligne ne sont pas inclus "
|
||
"dans la liste des résultats, sauf si *keepends* est donné et vrai."
|
||
|
||
#: library/stdtypes.rst:3358
|
||
msgid ""
|
||
"Unlike :meth:`~bytes.split` when a delimiter string *sep* is given, this "
|
||
"method returns an empty list for the empty string, and a terminal line break "
|
||
"does not result in an extra line::"
|
||
msgstr ""
|
||
"Contrairement à :meth:`~bytes.split` lorsque le délimiteur *sep* est fourni, "
|
||
"cette méthode renvoie une liste vide pour la chaîne vide, et un saut de "
|
||
"ligne à la fin ne se traduit pas par une ligne supplémentaire ::"
|
||
|
||
#: library/stdtypes.rst:3371
|
||
msgid ""
|
||
"Return a copy of the sequence with all the lowercase ASCII characters "
|
||
"converted to their corresponding uppercase counterpart and vice-versa."
|
||
msgstr ""
|
||
"Renvoie une copie de la séquence dont tous les caractères ASCII minuscules "
|
||
"sont convertis en majuscules et vice-versa."
|
||
|
||
#: library/stdtypes.rst:3383
|
||
msgid ""
|
||
"Unlike :func:`str.swapcase()`, it is always the case that ``bin.swapcase()."
|
||
"swapcase() == bin`` for the binary versions. Case conversions are "
|
||
"symmetrical in ASCII, even though that is not generally true for arbitrary "
|
||
"Unicode code points."
|
||
msgstr ""
|
||
"Contrairement à :func:`str.swapcase()`, ``bin.swapcase().swapcase() == "
|
||
"bin`` est toujours vrai. Les conversions majuscule/minuscule en ASCII étant "
|
||
"toujours symétrique, ce qui n'est pas toujours vrai avec Unicode."
|
||
|
||
#: library/stdtypes.rst:3397
|
||
msgid ""
|
||
"Return a titlecased version of the binary sequence where words start with an "
|
||
"uppercase ASCII character and the remaining characters are lowercase. "
|
||
"Uncased byte values are left unmodified."
|
||
msgstr ""
|
||
"Renvoie une version *titlecased* de la séquence d'octets où les mots "
|
||
"commencent par un caractère ASCII majuscule et les caractères restants sont "
|
||
"en minuscules. Les octets non capitalisables ne sont pas modifiés."
|
||
|
||
#: library/stdtypes.rst:3406
|
||
msgid ""
|
||
"Lowercase ASCII characters are those byte values in the sequence "
|
||
"``b'abcdefghijklmnopqrstuvwxyz'``. Uppercase ASCII characters are those byte "
|
||
"values in the sequence ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. All other byte "
|
||
"values are uncased."
|
||
msgstr ""
|
||
"Les caractères ASCII minuscules sont ``b'abcdefghijklmnopqrstuvwxyz'``. Les "
|
||
"caractères ASCII majuscules sont ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. Aucun "
|
||
"autre octet n'est capitalisable."
|
||
|
||
#: library/stdtypes.rst:3419
|
||
msgid ""
|
||
"A workaround for apostrophes can be constructed using regular expressions::"
|
||
msgstr ""
|
||
"Une solution pour contourner le problème des apostrophes peut être obtenue "
|
||
"en utilisant des expressions rationnelles ::"
|
||
|
||
#: library/stdtypes.rst:3440
|
||
msgid ""
|
||
"Return a copy of the sequence with all the lowercase ASCII characters "
|
||
"converted to their corresponding uppercase counterpart."
|
||
msgstr ""
|
||
"Renvoie une copie de la séquence dont tous les caractères ASCII minuscules "
|
||
"sont convertis en leur équivalent majuscule."
|
||
|
||
#: library/stdtypes.rst:3461
|
||
msgid ""
|
||
"Return a copy of the sequence left filled with ASCII ``b'0'`` digits to make "
|
||
"a sequence of length *width*. A leading sign prefix (``b'+'``/ ``b'-'``) is "
|
||
"handled by inserting the padding *after* the sign character rather than "
|
||
"before. For :class:`bytes` objects, the original sequence is returned if "
|
||
"*width* is less than or equal to ``len(seq)``."
|
||
msgstr ""
|
||
"Renvoie une copie de la séquence remplie par la gauche du chiffre ``b'0'`` "
|
||
"pour en faire une séquence de longueur *width*. Un préfixe (``b'+'`` / "
|
||
"``b'-'``) est permis par l'insertion du caractère de remplissage *après* le "
|
||
"caractère de signe plutôt qu'avant. Pour les objets :class:`bytes` la "
|
||
"séquence d'origine est renvoyée si *width* est inférieur ou égale à "
|
||
"``len(seq)``."
|
||
|
||
#: library/stdtypes.rst:3483
|
||
msgid "``printf``-style Bytes Formatting"
|
||
msgstr "Formatage de *bytes* a la ``printf``"
|
||
|
||
#: library/stdtypes.rst:3500
|
||
msgid ""
|
||
"The formatting operations described here exhibit a variety of quirks that "
|
||
"lead to a number of common errors (such as failing to display tuples and "
|
||
"dictionaries correctly). If the value being printed may be a tuple or "
|
||
"dictionary, wrap it in a tuple."
|
||
msgstr ""
|
||
"Les opérations de formatage décrites ici présentent une variété de "
|
||
"bizarreries qui conduisent à un certain nombre d’erreurs classiques "
|
||
"(typiquement, échouer à afficher des *n*-uplets ou des dictionnaires "
|
||
"correctement). Si la valeur à afficher peut être un *n*-uplet ou un "
|
||
"dictionnaire, mettez-le à l'intérieur d'un autre *n*-uplet."
|
||
|
||
#: library/stdtypes.rst:3505
|
||
msgid ""
|
||
"Bytes objects (``bytes``/``bytearray``) have one unique built-in operation: "
|
||
"the ``%`` operator (modulo). This is also known as the bytes *formatting* or "
|
||
"*interpolation* operator. Given ``format % values`` (where *format* is a "
|
||
"bytes object), ``%`` conversion specifications in *format* are replaced with "
|
||
"zero or more elements of *values*. The effect is similar to using the :c:"
|
||
"func:`sprintf` in the C language."
|
||
msgstr ""
|
||
"Les objets *bytes* (``bytes`` et ``bytearray``) ont un unique opérateur : "
|
||
"l'opérateur ``%`` (modulo). Il est aussi connu sous le nom d'opérateur de "
|
||
"mise en forme. Avec ``format % values`` (où *format* est un objet *bytes*), "
|
||
"les marqueurs de conversion ``%`` dans *format* sont remplacés par zéro ou "
|
||
"plus de *values*. L'effet est similaire à la fonction :c:func:`sprintf` du "
|
||
"langage C."
|
||
|
||
#: library/stdtypes.rst:3512
|
||
msgid ""
|
||
"If *format* requires a single argument, *values* may be a single non-tuple "
|
||
"object. [5]_ Otherwise, *values* must be a tuple with exactly the number of "
|
||
"items specified by the format bytes object, or a single mapping object (for "
|
||
"example, a dictionary)."
|
||
msgstr ""
|
||
"Si *format* ne nécessite qu'un seul argument, *values* peut être un objet "
|
||
"unique. [5]_ Si *values* est un *n*-uplet, il doit contenir exactement le "
|
||
"nombre d'éléments spécifiés dans le format en *bytes*, ou un seul objet de "
|
||
"correspondances (*mapping object*, par exemple, un dictionnaire)."
|
||
|
||
#: library/stdtypes.rst:3546
|
||
msgid ""
|
||
"When the right argument is a dictionary (or other mapping type), then the "
|
||
"formats in the bytes object *must* include a parenthesised mapping key into "
|
||
"that dictionary inserted immediately after the ``'%'`` character. The "
|
||
"mapping key selects the value to be formatted from the mapping. For example:"
|
||
msgstr ""
|
||
"Lorsque l'argument de droite est un dictionnaire (ou un autre type de "
|
||
"*mapping*), les marqueurs dans le *bytes* *doivent* inclure une clé présente "
|
||
"dans le dictionnaire, écrite entre parenthèses, immédiatement après le "
|
||
"caractère ``'%'``. La clé indique quelle valeur du dictionnaire doit être "
|
||
"formatée. Par exemple :"
|
||
|
||
#: library/stdtypes.rst:3620
|
||
msgid "Single byte (accepts integer or single byte objects)."
|
||
msgstr "Octet simple (Accepte un nombre entier ou un seul objet *byte*)."
|
||
|
||
#: library/stdtypes.rst:3623
|
||
msgid "``'b'``"
|
||
msgstr "``'b'``"
|
||
|
||
#: library/stdtypes.rst:3623
|
||
msgid ""
|
||
"Bytes (any object that follows the :ref:`buffer protocol <bufferobjects>` or "
|
||
"has :meth:`__bytes__`)."
|
||
msgstr ""
|
||
"*Bytes* (tout objet respectant le :ref:`buffer protocol <bufferobjects>` ou "
|
||
"ayant la méthode :meth:`__bytes__`)."
|
||
|
||
#: library/stdtypes.rst:3627
|
||
msgid ""
|
||
"``'s'`` is an alias for ``'b'`` and should only be used for Python2/3 code "
|
||
"bases."
|
||
msgstr ""
|
||
"``'s'`` est un alias de ``'b'`` et ne devrait être utilisé que pour du code "
|
||
"Python2/3."
|
||
|
||
#: library/stdtypes.rst:3630
|
||
msgid ""
|
||
"Bytes (converts any Python object using ``repr(obj).encode('ascii', "
|
||
"'backslashreplace')``)."
|
||
msgstr ""
|
||
"*Bytes* (convertit n'importe quel objet Python en utilisant ``repr(obj)."
|
||
"encode('ascii', 'backslashreplace)``)."
|
||
|
||
#: library/stdtypes.rst:3633
|
||
msgid ""
|
||
"``'r'`` is an alias for ``'a'`` and should only be used for Python2/3 code "
|
||
"bases."
|
||
msgstr ""
|
||
"``'r'`` est un alias de ``'a'`` et ne devrait être utilise que dans du code "
|
||
"Python2/3."
|
||
|
||
#: library/stdtypes.rst:3633
|
||
msgid "\\(7)"
|
||
msgstr "\\(7)"
|
||
|
||
#: library/stdtypes.rst:3668
|
||
msgid "``b'%s'`` is deprecated, but will not be removed during the 3.x series."
|
||
msgstr "``b'%s'`` est obsolète, mais ne sera pas retiré des version 3.x."
|
||
|
||
#: library/stdtypes.rst:3671
|
||
msgid "``b'%r'`` is deprecated, but will not be removed during the 3.x series."
|
||
msgstr "``b'%r'`` est obsolète mais ne sera pas retiré dans Python 3.x."
|
||
|
||
#: library/stdtypes.rst:3683
|
||
msgid ":pep:`461` - Adding % formatting to bytes and bytearray"
|
||
msgstr ":pep:`461` -- Ajout du formatage via % aux *bytes* et *bytesarray*"
|
||
|
||
#: library/stdtypes.rst:3690
|
||
msgid "Memory Views"
|
||
msgstr "Vues mémoire"
|
||
|
||
#: library/stdtypes.rst:3692
|
||
msgid ""
|
||
":class:`memoryview` objects allow Python code to access the internal data of "
|
||
"an object that supports the :ref:`buffer protocol <bufferobjects>` without "
|
||
"copying."
|
||
msgstr ""
|
||
"Les :class:`vues mémoire <memoryview>` permettent à du code Python d'accéder "
|
||
"sans copie aux données internes d'un objet prenant en charge le :ref:"
|
||
"`protocole tampon <bufferobjects>`."
|
||
|
||
#: library/stdtypes.rst:3698
|
||
msgid ""
|
||
"Create a :class:`memoryview` that references *object*. *object* must "
|
||
"support the buffer protocol. Built-in objects that support the buffer "
|
||
"protocol include :class:`bytes` and :class:`bytearray`."
|
||
msgstr ""
|
||
"Crée une :class:`vue mémoire <memoryview>` faisant référence à *object*. "
|
||
"*object* doit savoir gérer le protocole tampon. :class:`bytes` et :class:"
|
||
"`bytearray` sont des classes natives prenant en charge le protocole tampon."
|
||
|
||
#: library/stdtypes.rst:3702
|
||
msgid ""
|
||
"A :class:`memoryview` has the notion of an *element*, which is the atomic "
|
||
"memory unit handled by the originating *object*. For many simple types such "
|
||
"as :class:`bytes` and :class:`bytearray`, an element is a single byte, but "
|
||
"other types such as :class:`array.array` may have bigger elements."
|
||
msgstr ""
|
||
"Une :class:`vue mémoire <memoryview>` a la notion d'*élement*, qui est "
|
||
"l'unité de mémoire atomique gérée par l'objet *object* d'origine. Pour de "
|
||
"nombreux types simples comme :class:`bytes` et :class:`bytearray`, l'élément "
|
||
"est l'octet, mais pour d'autres types tels que :class:`array.array` les "
|
||
"éléments peuvent être plus grands."
|
||
|
||
#: library/stdtypes.rst:3707
|
||
msgid ""
|
||
"``len(view)`` is equal to the length of :class:`~memoryview.tolist`. If "
|
||
"``view.ndim = 0``, the length is 1. If ``view.ndim = 1``, the length is "
|
||
"equal to the number of elements in the view. For higher dimensions, the "
|
||
"length is equal to the length of the nested list representation of the view. "
|
||
"The :class:`~memoryview.itemsize` attribute will give you the number of "
|
||
"bytes in a single element."
|
||
msgstr ""
|
||
"``len(view)`` est égal à la grandeur de :class:`~memoryview.tolist`. Si "
|
||
"``view.ndim = 0``, la longueur vaut 1. Si ``view.ndim = 1``, la longueur est "
|
||
"égale au nombre d'éléments de la vue. Pour les dimensions plus grandes, la "
|
||
"longueur est égale à la longueur de la sous-liste représentée par la vue. "
|
||
"L'attribut :class:`~memoryview.itemsize` vous renvoie la taille en octets "
|
||
"d'un élément."
|
||
|
||
#: library/stdtypes.rst:3714
|
||
msgid ""
|
||
"A :class:`memoryview` supports slicing and indexing to expose its data. One-"
|
||
"dimensional slicing will result in a subview::"
|
||
msgstr ""
|
||
"Une :class:`vue mémoire <memoryview>` autorise le découpage et l'indiçage de "
|
||
"ses données. Découper sur une dimension donne une sous-vue ::"
|
||
|
||
#: library/stdtypes.rst:3727
|
||
msgid ""
|
||
"If :class:`~memoryview.format` is one of the native format specifiers from "
|
||
"the :mod:`struct` module, indexing with an integer or a tuple of integers is "
|
||
"also supported and returns a single *element* with the correct type. One-"
|
||
"dimensional memoryviews can be indexed with an integer or a one-integer "
|
||
"tuple. Multi-dimensional memoryviews can be indexed with tuples of exactly "
|
||
"*ndim* integers where *ndim* is the number of dimensions. Zero-dimensional "
|
||
"memoryviews can be indexed with the empty tuple."
|
||
msgstr ""
|
||
"Si le :class:`~memoryview.format` est un des formats natif du module :mod:"
|
||
"`struct`, indexer avec un nombre entier ou un *n*-uplet de nombres entiers "
|
||
"est aussi autorisé et renvoie un seul *element* du bon type. Les vues "
|
||
"mémoire unidimensionnelles peuvent être indexées avec un nombre entier ou un "
|
||
"*n*-uplet d'un entier. Les *memoryview* multi-dimensionnelles peuvent être "
|
||
"indexées avec des *ndim*-uplets où *ndim* est le nombre de dimensions. Les "
|
||
"*memoryviews* à zéro dimension peuvent être indexées avec un *n*-uplet vide."
|
||
|
||
#: library/stdtypes.rst:3736
|
||
msgid "Here is an example with a non-byte format::"
|
||
msgstr "Voici un exemple avec un autre format que *byte* ::"
|
||
|
||
#: library/stdtypes.rst:3748
|
||
msgid ""
|
||
"If the underlying object is writable, the memoryview supports one-"
|
||
"dimensional slice assignment. Resizing is not allowed::"
|
||
msgstr ""
|
||
"Si l'objet sous-jacent est accessible en écriture, la vue mémoire prend en "
|
||
"charge les assignations de tranches unidimensionnelles. Redimensionner n'est "
|
||
"cependant pas autorisé ::"
|
||
|
||
#: library/stdtypes.rst:3769
|
||
msgid ""
|
||
"One-dimensional memoryviews of :term:`hashable` (read-only) types with "
|
||
"formats 'B', 'b' or 'c' are also hashable. The hash is defined as ``hash(m) "
|
||
"== hash(m.tobytes())``::"
|
||
msgstr ""
|
||
"Les vues mémoire unidimensionnelles de :term:`hachables <hashable>` (lecture "
|
||
"seule) avec les formats 'B', 'b', ou 'c' sont aussi hachables. La fonction "
|
||
"de hachage est définie telle que ``hash(m) == hash(m.tobytes())`` ::"
|
||
|
||
#: library/stdtypes.rst:3781
|
||
msgid ""
|
||
"One-dimensional memoryviews can now be sliced. One-dimensional memoryviews "
|
||
"with formats 'B', 'b' or 'c' are now :term:`hashable`."
|
||
msgstr ""
|
||
"Les vues mémoire unidimensionnelles peuvent aussi être découpées. Les vues "
|
||
"mémoire unidimensionnelles avec les formats 'B', 'b' ou 'c' sont maintenant :"
|
||
"term:`hachables <hashable>`."
|
||
|
||
#: library/stdtypes.rst:3785
|
||
msgid ""
|
||
"memoryview is now registered automatically with :class:`collections.abc."
|
||
"Sequence`"
|
||
msgstr ""
|
||
"*memoryview* est maintenant enregistrée automatiquement avec :class:"
|
||
"`collections.abc.Sequence`"
|
||
|
||
#: library/stdtypes.rst:3789
|
||
msgid "memoryviews can now be indexed with tuple of integers."
|
||
msgstr ""
|
||
"les vues mémoire peuvent maintenant être indicées par un *n*-uplet d'entiers."
|
||
|
||
#: library/stdtypes.rst:3792
|
||
msgid ":class:`memoryview` has several methods:"
|
||
msgstr ""
|
||
"La classe :class:`vue mémoire <memoryview>` dispose de plusieurs méthodes :"
|
||
|
||
#: library/stdtypes.rst:3796
|
||
msgid ""
|
||
"A memoryview and a :pep:`3118` exporter are equal if their shapes are "
|
||
"equivalent and if all corresponding values are equal when the operands' "
|
||
"respective format codes are interpreted using :mod:`struct` syntax."
|
||
msgstr ""
|
||
"Une vue mémoire et un *exporter* de la :pep:`3118` sont égaux si leurs "
|
||
"formes sont équivalentes et si toutes les valeurs correspondantes sont "
|
||
"égales, les formats respectifs des opérandes étant interprétés en utilisant "
|
||
"la syntaxe de :mod:`struct`."
|
||
|
||
#: library/stdtypes.rst:3800
|
||
msgid ""
|
||
"For the subset of :mod:`struct` format strings currently supported by :meth:"
|
||
"`tolist`, ``v`` and ``w`` are equal if ``v.tolist() == w.tolist()``::"
|
||
msgstr ""
|
||
"Pour le sous-ensemble des formats de :mod:`struct` pris en charge par :meth:"
|
||
"`tolist`, ``v`` et ``w`` sont égaux si ``v.tolist() ==w.tolist()`` ::"
|
||
|
||
#: library/stdtypes.rst:3819
|
||
msgid ""
|
||
"If either format string is not supported by the :mod:`struct` module, then "
|
||
"the objects will always compare as unequal (even if the format strings and "
|
||
"buffer contents are identical)::"
|
||
msgstr ""
|
||
"Si l'un des formats n'est pas géré par le module de :mod:`struct`, les "
|
||
"objets sont toujours considérés différents (même si les formats et les "
|
||
"valeurs contenues sont identiques) ::"
|
||
|
||
#: library/stdtypes.rst:3835
|
||
msgid ""
|
||
"Note that, as with floating point numbers, ``v is w`` does *not* imply ``v "
|
||
"== w`` for memoryview objects."
|
||
msgstr ""
|
||
"Notez que pour les vues mémoire, comme pour les nombres à virgule flottante, "
|
||
"``v is w`` *n'implique pas* ``v == w``."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:3838
|
||
msgid ""
|
||
"Previous versions compared the raw memory disregarding the item format and "
|
||
"the logical array structure."
|
||
msgstr ""
|
||
"les versions précédentes comparaient la mémoire brute sans tenir compte du "
|
||
"format de l'objet ni de sa structure logique."
|
||
|
||
#: library/stdtypes.rst:3844
|
||
msgid ""
|
||
"Return the data in the buffer as a bytestring. This is equivalent to "
|
||
"calling the :class:`bytes` constructor on the memoryview. ::"
|
||
msgstr ""
|
||
"Renvoie les données de la vue mémoire sous forme de *bytes*. Cela équivaut "
|
||
"à appeler le constructeur :class:`bytes` sur la vue mémoire. ::"
|
||
|
||
#: library/stdtypes.rst:3853
|
||
msgid ""
|
||
"For non-contiguous arrays the result is equal to the flattened list "
|
||
"representation with all elements converted to bytes. :meth:`tobytes` "
|
||
"supports all format strings, including those that are not in :mod:`struct` "
|
||
"module syntax."
|
||
msgstr ""
|
||
"Pour les tableaux non contigus le résultat est égal à la représentation en "
|
||
"liste aplatie dont tous les éléments sont convertis en octets. :meth:"
|
||
"`tobytes` prend en charge toutes les chaînes de format, y compris celles qui "
|
||
"ne sont pas connues du module :mod:`struct`."
|
||
|
||
#: library/stdtypes.rst:3858
|
||
msgid ""
|
||
"*order* can be {'C', 'F', 'A'}. When *order* is 'C' or 'F', the data of the "
|
||
"original array is converted to C or Fortran order. For contiguous views, 'A' "
|
||
"returns an exact copy of the physical memory. In particular, in-memory "
|
||
"Fortran order is preserved. For non-contiguous views, the data is converted "
|
||
"to C first. *order=None* is the same as *order='C'*."
|
||
msgstr ""
|
||
"*order* peut être ``'C'``, ``'F'`` ou ``'A'``. Lorsque *order* est ``'C'`` "
|
||
"ou ``'F'``, les données du tableau original sont converties en ordre C ou "
|
||
"Fortran. Pour les vues contiguës, ``'A'`` renvoie une copie exacte de la "
|
||
"mémoire physique. En particulier, l'ordre Fortran en mémoire est conservé. "
|
||
"Pour les vues non contiguës, les données sont d'abord converties en C. "
|
||
"``order=None`` est identique à ``order='C'``."
|
||
|
||
#: library/stdtypes.rst:3867
|
||
msgid ""
|
||
"Return a string object containing two hexadecimal digits for each byte in "
|
||
"the buffer. ::"
|
||
msgstr ""
|
||
"Renvoie une chaîne contenant deux chiffres hexadécimaux pour chaque octet de "
|
||
"la mémoire. ::"
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:3876
|
||
msgid ""
|
||
"Similar to :meth:`bytes.hex`, :meth:`memoryview.hex` now supports optional "
|
||
"*sep* and *bytes_per_sep* parameters to insert separators between bytes in "
|
||
"the hex output."
|
||
msgstr ""
|
||
"similaire à :meth:`bytes.hex`, :meth:`memoryview.hex` prend désormais en "
|
||
"charge les paramètres optionnels *sep* et *bytes_per_sep* pour insérer des "
|
||
"séparateurs entre les octets dans la sortie hexadécimale."
|
||
|
||
#: library/stdtypes.rst:3883
|
||
msgid "Return the data in the buffer as a list of elements. ::"
|
||
msgstr ""
|
||
"Renvoie les données de la mémoire sous la forme d'une liste d'éléments. ::"
|
||
|
||
#: library/stdtypes.rst:3893
|
||
msgid ""
|
||
":meth:`tolist` now supports all single character native formats in :mod:"
|
||
"`struct` module syntax as well as multi-dimensional representations."
|
||
msgstr ""
|
||
":meth:`tolist` prend désormais en charge tous les formats d'un caractère du "
|
||
"module :mod:`struct` ainsi que des représentations multidimensionnelles."
|
||
|
||
#: library/stdtypes.rst:3900
|
||
msgid ""
|
||
"Return a readonly version of the memoryview object. The original memoryview "
|
||
"object is unchanged. ::"
|
||
msgstr ""
|
||
"Renvoie une version en lecture seule de l'objet *memoryview*. L'objet "
|
||
"original *memoryview* est inchangé. ::"
|
||
|
||
#: library/stdtypes.rst:3919
|
||
msgid ""
|
||
"Release the underlying buffer exposed by the memoryview object. Many "
|
||
"objects take special actions when a view is held on them (for example, a :"
|
||
"class:`bytearray` would temporarily forbid resizing); therefore, calling "
|
||
"release() is handy to remove these restrictions (and free any dangling "
|
||
"resources) as soon as possible."
|
||
msgstr ""
|
||
"Libère le tampon sous-jacent exposé par l'objet *memoryview*. Beaucoup "
|
||
"d'objets ont des comportements spécifiques lorsqu'ils sont liés à une vue "
|
||
"(par exemple, un :class:`bytearray` refusera temporairement de se faire "
|
||
"redimensionner). Par conséquent, appeler *release()* peut être pratique pour "
|
||
"lever ces restrictions (et libérer des ressources liées) aussi tôt que "
|
||
"possible."
|
||
|
||
#: library/stdtypes.rst:3925
|
||
msgid ""
|
||
"After this method has been called, any further operation on the view raises "
|
||
"a :class:`ValueError` (except :meth:`release()` itself which can be called "
|
||
"multiple times)::"
|
||
msgstr ""
|
||
"Après le premier appel de cette méthode, toute nouvelle opération sur la "
|
||
"vue mémoire lève une :class:`ValueError` (sauf :meth:`release()` elle-même "
|
||
"qui peut être appelée plusieurs fois) ::"
|
||
|
||
#: library/stdtypes.rst:3936
|
||
msgid ""
|
||
"The context management protocol can be used for a similar effect, using the "
|
||
"``with`` statement::"
|
||
msgstr ""
|
||
"Le protocole de gestion de contexte peut être utilisé pour obtenir un effet "
|
||
"similaire, via l'instruction ``with`` ::"
|
||
|
||
#: library/stdtypes.rst:3952
|
||
msgid ""
|
||
"Cast a memoryview to a new format or shape. *shape* defaults to "
|
||
"``[byte_length//new_itemsize]``, which means that the result view will be "
|
||
"one-dimensional. The return value is a new memoryview, but the buffer itself "
|
||
"is not copied. Supported casts are 1D -> C-:term:`contiguous` and C-"
|
||
"contiguous -> 1D."
|
||
msgstr ""
|
||
"Change le format ou la forme d'une vue mémoire. Par défaut *shape* vaut "
|
||
"``[byte_length//new_itemsize]``, ce qui signifie que la vue résultante n'a "
|
||
"qu'une dimension. La valeur renvoyée est une nouvelle vue mémoire, mais le "
|
||
"tampon sous-jacent lui-même n'est pas copié. Les changements de format pris "
|
||
"en charge sont « une dimension vers C-:term:`contiguous` » et « *C-"
|
||
"contiguous* vers une dimension »."
|
||
|
||
#: library/stdtypes.rst:3958
|
||
#, fuzzy
|
||
msgid ""
|
||
"The destination format is restricted to a single element native format in :"
|
||
"mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or "
|
||
"'c'). The byte length of the result must be the same as the original length. "
|
||
"Note that all byte lengths may depend on the operating system."
|
||
msgstr ""
|
||
"Le format de destination est limité à un seul élément natif de la syntaxe du "
|
||
"module :mod:`struct`. L'un des formats doit être un *byte* ('B', 'b', ou "
|
||
"'c'). La longueur du résultat en octets doit être la même que la longueur "
|
||
"initiale."
|
||
|
||
#: library/stdtypes.rst:3964
|
||
msgid "Cast 1D/long to 1D/unsigned bytes::"
|
||
msgstr "Transformer un *1D/long* en *1D/unsigned bytes* ::"
|
||
|
||
#: library/stdtypes.rst:3987
|
||
msgid "Cast 1D/unsigned bytes to 1D/char::"
|
||
msgstr "Transformer un *1D/unsigned bytes* en *1D/char* ::"
|
||
|
||
#: library/stdtypes.rst:4000
|
||
msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::"
|
||
msgstr "Transformer un *1D/bytes* en *3D/ints* en *1D/signed char* ::"
|
||
|
||
#: library/stdtypes.rst:4026
|
||
msgid "Cast 1D/unsigned long to 2D/unsigned long::"
|
||
msgstr "Transformer un *1D/unsigned char* en *2D/unsigned long* ::"
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:4040
|
||
msgid "The source format is no longer restricted when casting to a byte view."
|
||
msgstr ""
|
||
"le format de la source n'est plus restreint lors de la transformation vers "
|
||
"une vue d'octets."
|
||
|
||
#: library/stdtypes.rst:4043
|
||
msgid "There are also several readonly attributes available:"
|
||
msgstr "Plusieurs attributs en lecture seule sont également disponibles :"
|
||
|
||
#: library/stdtypes.rst:4047
|
||
msgid "The underlying object of the memoryview::"
|
||
msgstr "L'objet sous-jacent de la vue mémoire ::"
|
||
|
||
#: library/stdtypes.rst:4058
|
||
msgid ""
|
||
"``nbytes == product(shape) * itemsize == len(m.tobytes())``. This is the "
|
||
"amount of space in bytes that the array would use in a contiguous "
|
||
"representation. It is not necessarily equal to ``len(m)``::"
|
||
msgstr ""
|
||
"``nbytes == product(shape) * itemsize == len(m.tobytes())``. C'est l'espace "
|
||
"que la liste occuperait en octets, dans une représentation contiguë. Ce "
|
||
"n'est pas nécessairement égal à ``len(m)`` ::"
|
||
|
||
#: library/stdtypes.rst:4077
|
||
msgid "Multi-dimensional arrays::"
|
||
msgstr "Tableaux multidimensionnels ::"
|
||
|
||
#: library/stdtypes.rst:4094
|
||
msgid "A bool indicating whether the memory is read only."
|
||
msgstr "Booléen indiquant si la mémoire est en lecture seule."
|
||
|
||
#: library/stdtypes.rst:4098
|
||
msgid ""
|
||
"A string containing the format (in :mod:`struct` module style) for each "
|
||
"element in the view. A memoryview can be created from exporters with "
|
||
"arbitrary format strings, but some methods (e.g. :meth:`tolist`) are "
|
||
"restricted to native single element formats."
|
||
msgstr ""
|
||
"Chaîne contenant le format (dans le style de :mod:`struct`) pour chaque "
|
||
"élément de la vue. Une vue mémoire peut être créée depuis des exportateurs "
|
||
"de formats arbitraires, mais certaines méthodes (comme :meth:`tolist`) sont "
|
||
"limitées aux formats natifs à un seul élément."
|
||
|
||
#: library/stdtypes.rst:4103
|
||
msgid ""
|
||
"format ``'B'`` is now handled according to the struct module syntax. This "
|
||
"means that ``memoryview(b'abc')[0] == b'abc'[0] == 97``."
|
||
msgstr ""
|
||
"le format ``'B'`` est maintenant traité selon la syntaxe du module *struct*. "
|
||
"Cela signifie que ``memoryview(b'abc')[0] == b'abc'[0] == 97``."
|
||
|
||
#: library/stdtypes.rst:4109
|
||
msgid "The size in bytes of each element of the memoryview::"
|
||
msgstr "Taille en octets de chaque élément de la vue mémoire ::"
|
||
|
||
#: library/stdtypes.rst:4122
|
||
msgid ""
|
||
"An integer indicating how many dimensions of a multi-dimensional array the "
|
||
"memory represents."
|
||
msgstr ""
|
||
"Nombre de dimensions du tableau multi-dimensionnel pointé par la vue mémoire."
|
||
|
||
#: library/stdtypes.rst:4127
|
||
msgid ""
|
||
"A tuple of integers the length of :attr:`ndim` giving the shape of the "
|
||
"memory as an N-dimensional array."
|
||
msgstr ""
|
||
":attr:`ndim`-uplet d'entiers donnant la forme du tableau à N dimensions "
|
||
"pointé par la vue mémoire."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:4138
|
||
msgid "An empty tuple instead of ``None`` when ndim = 0."
|
||
msgstr "le *n*-uplet est vide au lieu de ``None`` lorsque *ndim* = 0."
|
||
|
||
#: library/stdtypes.rst:4135
|
||
msgid ""
|
||
"A tuple of integers the length of :attr:`ndim` giving the size in bytes to "
|
||
"access each element for each dimension of the array."
|
||
msgstr ""
|
||
":attr:`ndim`-uplet d'entiers donnant la taille en octets permettant "
|
||
"d'accéder à chaque élément pour chaque dimension du tableau."
|
||
|
||
#: library/stdtypes.rst:4143
|
||
msgid "Used internally for PIL-style arrays. The value is informational only."
|
||
msgstr ""
|
||
"Détail de l'implémentation des *PIL-style arrays*. La valeur n'est donnée "
|
||
"qu'à titre d'information."
|
||
|
||
#: library/stdtypes.rst:4147
|
||
msgid "A bool indicating whether the memory is C-:term:`contiguous`."
|
||
msgstr "Booléen indiquant si la mémoire est C-:term:`contiguë <contiguous>`."
|
||
|
||
#: library/stdtypes.rst:4153
|
||
msgid "A bool indicating whether the memory is Fortran :term:`contiguous`."
|
||
msgstr ""
|
||
"Booléen indiquant si la mémoire est Fortran-:term:`contiguë <contiguous>`."
|
||
|
||
#: library/stdtypes.rst:4159
|
||
msgid "A bool indicating whether the memory is :term:`contiguous`."
|
||
msgstr "Booléen indiquant si la mémoire est :term:`contiguë <contiguous>`."
|
||
|
||
#: library/stdtypes.rst:4167
|
||
msgid "Set Types --- :class:`set`, :class:`frozenset`"
|
||
msgstr "Types d'ensembles — :class:`set`, :class:`frozenset`"
|
||
|
||
#: library/stdtypes.rst:4171
|
||
msgid ""
|
||
"A :dfn:`set` object is an unordered collection of distinct :term:`hashable` "
|
||
"objects. Common uses include membership testing, removing duplicates from a "
|
||
"sequence, and computing mathematical operations such as intersection, union, "
|
||
"difference, and symmetric difference. (For other containers see the built-"
|
||
"in :class:`dict`, :class:`list`, and :class:`tuple` classes, and the :mod:"
|
||
"`collections` module.)"
|
||
msgstr ""
|
||
"Un ensemble (objet :dfn:`set`) est une collection non triée d'objets :term:"
|
||
"`hachables <hashable>` distincts. Les utilisations classiques sont le test "
|
||
"d'appartenance, la déduplication d'une séquence, ou le calcul d'opérations "
|
||
"mathématiques telles que l'intersection, l'union, la différence, ou la "
|
||
"différence symétrique. (Pour les autres conteneurs, voir les classes "
|
||
"natives :class:`dict`, :class:`liste <list>`, et :class:`n-uplet <tuple>`, "
|
||
"ainsi que le module :mod:`collections`.)"
|
||
|
||
#: library/stdtypes.rst:4178
|
||
msgid ""
|
||
"Like other collections, sets support ``x in set``, ``len(set)``, and ``for x "
|
||
"in set``. Being an unordered collection, sets do not record element "
|
||
"position or order of insertion. Accordingly, sets do not support indexing, "
|
||
"slicing, or other sequence-like behavior."
|
||
msgstr ""
|
||
"Comme pour les autres collections, les ensembles gèrent ``x in set``, "
|
||
"``len(set)``, et ``for x in set``. En tant que collection non triée, les "
|
||
"ensembles n'enregistrent pas la position des éléments ou leur ordre "
|
||
"d'insertion. En conséquence, les ensembles n'autorisent ni l'indexation, ni "
|
||
"le découpage, ou tout autre comportement de séquence."
|
||
|
||
#: library/stdtypes.rst:4183
|
||
msgid ""
|
||
"There are currently two built-in set types, :class:`set` and :class:"
|
||
"`frozenset`. The :class:`set` type is mutable --- the contents can be "
|
||
"changed using methods like :meth:`~set.add` and :meth:`~set.remove`. Since "
|
||
"it is mutable, it has no hash value and cannot be used as either a "
|
||
"dictionary key or as an element of another set. The :class:`frozenset` type "
|
||
"is immutable and :term:`hashable` --- its contents cannot be altered after "
|
||
"it is created; it can therefore be used as a dictionary key or as an element "
|
||
"of another set."
|
||
msgstr ""
|
||
"Il existe actuellement deux types natifs pour les ensembles, :class:`set` "
|
||
"et :class:`frozenset`. Le type :class:`set` est muable — son contenu peut "
|
||
"changer en utilisant des méthodes comme :meth:`~set.add` et :meth:`~set."
|
||
"remove`. Puisqu'il est muable, il n'a pas de valeur de hachage et ne peut "
|
||
"donc pas être utilisé ni comme clé de dictionnaire ni comme élément d'un "
|
||
"autre ensemble. Le type :class:`frozenset` est immuable et :term:`hachable "
|
||
"<hashable>` — son contenu ne peut être modifié après sa création, il peut "
|
||
"ainsi être utilisé comme clé de dictionnaire ou élément d'un autre ensemble."
|
||
|
||
#: library/stdtypes.rst:4191
|
||
msgid ""
|
||
"Non-empty sets (not frozensets) can be created by placing a comma-separated "
|
||
"list of elements within braces, for example: ``{'jack', 'sjoerd'}``, in "
|
||
"addition to the :class:`set` constructor."
|
||
msgstr ""
|
||
"Des *sets* (mais pas des *frozensets*) peuvent être créés par une liste "
|
||
"d'éléments séparés par des virgules et entre accolades, par exemple "
|
||
"``{'jack', 'sjoerd'}``, en plus du constructeur de la classe :class:`set`."
|
||
|
||
#: library/stdtypes.rst:4195
|
||
msgid "The constructors for both classes work the same:"
|
||
msgstr "Les constructeurs des deux classes fonctionnent de la même manière :"
|
||
|
||
#: library/stdtypes.rst:4200
|
||
msgid ""
|
||
"Return a new set or frozenset object whose elements are taken from "
|
||
"*iterable*. The elements of a set must be :term:`hashable`. To represent "
|
||
"sets of sets, the inner sets must be :class:`frozenset` objects. If "
|
||
"*iterable* is not specified, a new empty set is returned."
|
||
msgstr ""
|
||
"Renvoie un nouvel ensemble (*set* ou *frozenset*) dont les éléments viennent "
|
||
"d'*iterable*. Les éléments d'un *set* doivent être :term:`hachables "
|
||
"<hashable>`. Pour représenter des ensembles d'ensembles, les ensembles "
|
||
"intérieurs doivent être des :class:`frozenset`. Si *iterable* n'est pas "
|
||
"spécifié, un nouvel ensemble vide est renvoyé."
|
||
|
||
#: library/stdtypes.rst:4206
|
||
msgid "Sets can be created by several means:"
|
||
msgstr "Les ensembles peuvent être construits de différentes manières :"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:4208
|
||
msgid ""
|
||
"Use a comma-separated list of elements within braces: ``{'jack', 'sjoerd'}``"
|
||
msgstr ""
|
||
"en utilisant une liste d'éléments séparés par des virgules entre accolades : "
|
||
"``{'jack', 'sjoerd'}`` ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:4209
|
||
msgid ""
|
||
"Use a set comprehension: ``{c for c in 'abracadabra' if c not in 'abc'}``"
|
||
msgstr ""
|
||
"en utilisant un ensemble en compréhension : ``{c for c in 'abracadabra' if c "
|
||
"not in 'abc'}`` ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:4210
|
||
msgid ""
|
||
"Use the type constructor: ``set()``, ``set('foobar')``, ``set(['a', 'b', "
|
||
"'foo'])``"
|
||
msgstr ""
|
||
"en utilisant le constructeur du type : ``set()``, ``set('foobar')``, "
|
||
"``set(['a', 'b', 'foo'])``."
|
||
|
||
#: library/stdtypes.rst:4212
|
||
msgid ""
|
||
"Instances of :class:`set` and :class:`frozenset` provide the following "
|
||
"operations:"
|
||
msgstr ""
|
||
"Les instances de :class:`set` et :class:`frozenset` fournissent les "
|
||
"opérations suivantes :"
|
||
|
||
#: library/stdtypes.rst:4217
|
||
msgid "Return the number of elements in set *s* (cardinality of *s*)."
|
||
msgstr "Renvoie le nombre d'éléments dans l'ensemble *s* (cardinalité de *s*)."
|
||
|
||
#: library/stdtypes.rst:4221
|
||
msgid "Test *x* for membership in *s*."
|
||
msgstr "Test d'appartenance de *x* dans *s*."
|
||
|
||
#: library/stdtypes.rst:4225
|
||
msgid "Test *x* for non-membership in *s*."
|
||
msgstr "Test de non-appartenance de *x* dans *s*."
|
||
|
||
#: library/stdtypes.rst:4229
|
||
msgid ""
|
||
"Return ``True`` if the set has no elements in common with *other*. Sets are "
|
||
"disjoint if and only if their intersection is the empty set."
|
||
msgstr ""
|
||
"Renvoie ``True`` si l'ensemble n'a aucun élément en commun avec *other*. "
|
||
"Les ensembles sont disjoints si et seulement si leur intersection est un "
|
||
"ensemble vide."
|
||
|
||
#: library/stdtypes.rst:4235
|
||
msgid "Test whether every element in the set is in *other*."
|
||
msgstr "Teste si tous les éléments de l'ensemble sont dans *other*."
|
||
|
||
#: library/stdtypes.rst:4239
|
||
msgid ""
|
||
"Test whether the set is a proper subset of *other*, that is, ``set <= other "
|
||
"and set != other``."
|
||
msgstr ""
|
||
"Teste si l'ensemble est un sous-ensemble propre de *other*, c'est-à-dire "
|
||
"``set <= other and set != other``."
|
||
|
||
#: library/stdtypes.rst:4245
|
||
msgid "Test whether every element in *other* is in the set."
|
||
msgstr "Teste si tous les éléments de *other* sont dans l'ensemble."
|
||
|
||
#: library/stdtypes.rst:4249
|
||
msgid ""
|
||
"Test whether the set is a proper superset of *other*, that is, ``set >= "
|
||
"other and set != other``."
|
||
msgstr ""
|
||
"Teste si l'ensemble est un sur-ensemble propre de *other*, c'est-à-dire, "
|
||
"``set >= other and set != other``."
|
||
|
||
#: library/stdtypes.rst:4255
|
||
msgid "Return a new set with elements from the set and all others."
|
||
msgstr ""
|
||
"Renvoie un nouvel ensemble dont les éléments viennent de l'ensemble et de "
|
||
"tous les autres (*others*)."
|
||
|
||
#: library/stdtypes.rst:4260
|
||
msgid "Return a new set with elements common to the set and all others."
|
||
msgstr ""
|
||
"Renvoie un nouvel ensemble dont les éléments sont communs à l'ensemble et à "
|
||
"tous les autres (*others*)."
|
||
|
||
#: library/stdtypes.rst:4265
|
||
msgid "Return a new set with elements in the set that are not in the others."
|
||
msgstr ""
|
||
"Renvoie un nouvel ensemble dont les éléments sont dans l'ensemble mais ne "
|
||
"sont dans aucun des autres."
|
||
|
||
#: library/stdtypes.rst:4270
|
||
msgid ""
|
||
"Return a new set with elements in either the set or *other* but not both."
|
||
msgstr ""
|
||
"Renvoie un nouvel ensemble dont les éléments sont soit dans l'ensemble, soit "
|
||
"dans *other*, mais pas dans les deux."
|
||
|
||
#: library/stdtypes.rst:4274
|
||
msgid "Return a shallow copy of the set."
|
||
msgstr "Renvoie une copie superficielle du dictionnaire."
|
||
|
||
#: library/stdtypes.rst:4277
|
||
msgid ""
|
||
"Note, the non-operator versions of :meth:`union`, :meth:`intersection`, :"
|
||
"meth:`difference`, :meth:`symmetric_difference`, :meth:`issubset`, and :meth:"
|
||
"`issuperset` methods will accept any iterable as an argument. In contrast, "
|
||
"their operator based counterparts require their arguments to be sets. This "
|
||
"precludes error-prone constructions like ``set('abc') & 'cbs'`` in favor of "
|
||
"the more readable ``set('abc').intersection('cbs')``."
|
||
msgstr ""
|
||
"Remarque : les méthodes :meth:`union`, :meth:`intersection`, :meth:"
|
||
"`difference`, :meth:`symmetric_difference`, :meth:`issubset` et :meth:"
|
||
"`issuperset` acceptent n'importe quel itérable comme argument, contrairement "
|
||
"aux opérateurs équivalents qui n'acceptent que des ensembles. Il est donc "
|
||
"préférable d'éviter les constructions comme ``set('abc') & 'cbs'``, sources "
|
||
"typiques d'erreurs, en faveur d'une construction plus lisible : ``set('abc')."
|
||
"intersection('cbs')``."
|
||
|
||
#: library/stdtypes.rst:4284
|
||
msgid ""
|
||
"Both :class:`set` and :class:`frozenset` support set to set comparisons. Two "
|
||
"sets are equal if and only if every element of each set is contained in the "
|
||
"other (each is a subset of the other). A set is less than another set if and "
|
||
"only if the first set is a proper subset of the second set (is a subset, but "
|
||
"is not equal). A set is greater than another set if and only if the first "
|
||
"set is a proper superset of the second set (is a superset, but is not equal)."
|
||
msgstr ""
|
||
"Les classes :class:`set` et :class:`frozenset` gèrent les comparaisons "
|
||
"d'ensemble à ensemble. Deux ensembles sont égaux si et seulement si chaque "
|
||
"élément de chaque ensemble est contenu dans l'autre (autrement dit que "
|
||
"chaque ensemble est un sous-ensemble de l'autre). Un ensemble est plus petit "
|
||
"qu'un autre ensemble si et seulement si le premier est un sous-ensemble "
|
||
"propre du second (un sous-ensemble, mais pas égal). Un ensemble est plus "
|
||
"grand qu'un autre ensemble si et seulement si le premier est un sur-ensemble "
|
||
"propre du second (est un sur-ensemble mais n'est pas égal)."
|
||
|
||
#: library/stdtypes.rst:4291
|
||
msgid ""
|
||
"Instances of :class:`set` are compared to instances of :class:`frozenset` "
|
||
"based on their members. For example, ``set('abc') == frozenset('abc')`` "
|
||
"returns ``True`` and so does ``set('abc') in set([frozenset('abc')])``."
|
||
msgstr ""
|
||
"Les instances de :class:`set` se comparent aux instances de :class:"
|
||
"`frozenset` en fonction de leurs membres. Par exemple, ``set('abc') == "
|
||
"frozenset('abc')`` envoie ``True``, ainsi que ``set('abc') in "
|
||
"set([frozenset('abc')])``."
|
||
|
||
#: library/stdtypes.rst:4295
|
||
msgid ""
|
||
"The subset and equality comparisons do not generalize to a total ordering "
|
||
"function. For example, any two nonempty disjoint sets are not equal and are "
|
||
"not subsets of each other, so *all* of the following return ``False``: "
|
||
"``a<b``, ``a==b``, or ``a>b``."
|
||
msgstr ""
|
||
"Les tests de sous-ensemble et d'égalité ne se généralisent pas pour former "
|
||
"une fonction donnant un ordre total. Par exemple, deux ensembles disjoints "
|
||
"non vides ne sont ni égaux et ni des sous-ensembles l'un de l'autre, donc "
|
||
"toutes ces comparaisons donnent ``False`` : ``a<b``, ``a==b`` et ``a>b``."
|
||
|
||
#: library/stdtypes.rst:4300
|
||
msgid ""
|
||
"Since sets only define partial ordering (subset relationships), the output "
|
||
"of the :meth:`list.sort` method is undefined for lists of sets."
|
||
msgstr ""
|
||
"Puisque les ensembles ne définissent qu'un ordre partiel (par leurs "
|
||
"relations de sous-ensembles), la sortie de la méthode :meth:`list.sort` "
|
||
"n'est pas définie pour des listes d'ensembles."
|
||
|
||
#: library/stdtypes.rst:4303
|
||
msgid "Set elements, like dictionary keys, must be :term:`hashable`."
|
||
msgstr ""
|
||
"Les éléments des ensembles, comme les clés de dictionnaires, doivent être :"
|
||
"term:`hachables <hashable>`."
|
||
|
||
#: library/stdtypes.rst:4305
|
||
msgid ""
|
||
"Binary operations that mix :class:`set` instances with :class:`frozenset` "
|
||
"return the type of the first operand. For example: ``frozenset('ab') | "
|
||
"set('bc')`` returns an instance of :class:`frozenset`."
|
||
msgstr ""
|
||
"Les opérations binaires mélangeant des instances de :class:`set` et :class:"
|
||
"`frozenset` renvoient le type de la première opérande. Par exemple, "
|
||
"``frozenset('ab') | set('bc')`` renvoie une instance de :class:`frozenset`."
|
||
|
||
#: library/stdtypes.rst:4309
|
||
msgid ""
|
||
"The following table lists operations available for :class:`set` that do not "
|
||
"apply to immutable instances of :class:`frozenset`:"
|
||
msgstr ""
|
||
"La table suivante liste les opérations disponibles pour les :class:`set` "
|
||
"mais qui ne s'appliquent pas aux instances de :class:`frozenset` :"
|
||
|
||
#: library/stdtypes.rst:4315
|
||
msgid "Update the set, adding elements from all others."
|
||
msgstr ""
|
||
"Met à jour l'ensemble, ajoutant les éléments de tous les autres (*others*)."
|
||
|
||
#: library/stdtypes.rst:4320
|
||
msgid "Update the set, keeping only elements found in it and all others."
|
||
msgstr ""
|
||
"Met à jour l'ensemble, ne gardant que les éléments trouvés dans tous les "
|
||
"autres."
|
||
|
||
#: library/stdtypes.rst:4325
|
||
msgid "Update the set, removing elements found in others."
|
||
msgstr "Met à jour l'ensemble, retirant les éléments trouvés dans les autres."
|
||
|
||
#: library/stdtypes.rst:4330
|
||
msgid ""
|
||
"Update the set, keeping only elements found in either set, but not in both."
|
||
msgstr ""
|
||
"Met à jour l'ensemble, ne gardant que les éléments trouvés dans un des deux "
|
||
"ensembles mais pas dans les deux."
|
||
|
||
#: library/stdtypes.rst:4334
|
||
msgid "Add element *elem* to the set."
|
||
msgstr "Ajoute l'élément *elem* à l'ensemble."
|
||
|
||
#: library/stdtypes.rst:4338
|
||
msgid ""
|
||
"Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not "
|
||
"contained in the set."
|
||
msgstr ""
|
||
"Retire l'élément *elem* de l'ensemble. Lève une exception :exc:`KeyError` si "
|
||
"*elem* n'est pas dans l'ensemble."
|
||
|
||
#: library/stdtypes.rst:4343
|
||
msgid "Remove element *elem* from the set if it is present."
|
||
msgstr "Retire l'élément *elem* de l'ensemble s'il y est."
|
||
|
||
#: library/stdtypes.rst:4347
|
||
msgid ""
|
||
"Remove and return an arbitrary element from the set. Raises :exc:`KeyError` "
|
||
"if the set is empty."
|
||
msgstr ""
|
||
"Retire et renvoie un élément arbitraire de l'ensemble. Lève une exception :"
|
||
"exc:`KeyError` si l'ensemble est vide."
|
||
|
||
#: library/stdtypes.rst:4352
|
||
msgid "Remove all elements from the set."
|
||
msgstr "Supprime tous les éléments de l'ensemble."
|
||
|
||
#: library/stdtypes.rst:4355
|
||
msgid ""
|
||
"Note, the non-operator versions of the :meth:`update`, :meth:"
|
||
"`intersection_update`, :meth:`difference_update`, and :meth:"
|
||
"`symmetric_difference_update` methods will accept any iterable as an "
|
||
"argument."
|
||
msgstr ""
|
||
"Notez que les versions n'utilisant pas la syntaxe d'opérateur des méthodes :"
|
||
"meth:`update`, :meth:`intersection_update`, :meth:`difference_update`, et :"
|
||
"meth:`symmetric_difference_update` acceptent n'importe quel itérable comme "
|
||
"argument."
|
||
|
||
#: library/stdtypes.rst:4360
|
||
msgid ""
|
||
"Note, the *elem* argument to the :meth:`__contains__`, :meth:`remove`, and :"
|
||
"meth:`discard` methods may be a set. To support searching for an equivalent "
|
||
"frozenset, a temporary one is created from *elem*."
|
||
msgstr ""
|
||
"Notez que l'argument *elem* des méthodes :meth:`__contains__`, :meth:"
|
||
"`remove` et :meth:`discard` peut être un ensemble (*set*). Pour effectuer la "
|
||
"recherche d'un *frozenset* équivalent, un *frozenset* temporaire est crée "
|
||
"depuis *elem*."
|
||
|
||
#: library/stdtypes.rst:4368
|
||
msgid "Mapping Types --- :class:`dict`"
|
||
msgstr "Les types de correspondances — :class:`dict`"
|
||
|
||
#: library/stdtypes.rst:4378
|
||
msgid ""
|
||
"A :term:`mapping` object maps :term:`hashable` values to arbitrary objects. "
|
||
"Mappings are mutable objects. There is currently only one standard mapping "
|
||
"type, the :dfn:`dictionary`. (For other containers see the built-in :class:"
|
||
"`list`, :class:`set`, and :class:`tuple` classes, and the :mod:`collections` "
|
||
"module.)"
|
||
msgstr ""
|
||
"Un objet :term:`tableau de correspondances <mapping>` (*mapping*) fait "
|
||
"correspondre des valeurs :term:`hachables <hashable>` à des objets "
|
||
"arbitraires. Les tableaux de correspondances sont des objets muables. Il "
|
||
"n'existe pour le moment qu'un type de tableau de correspondances standard, "
|
||
"le :dfn:`dictionary`. (Pour les autres conteneurs, voir les types natifs :"
|
||
"class:`liste <list>`, :class:`ensemble <set>` et :class:`n-uplet <tuple>`, "
|
||
"ainsi que le module :mod:`collections`.)"
|
||
|
||
#: library/stdtypes.rst:4384
|
||
msgid ""
|
||
"A dictionary's keys are *almost* arbitrary values. Values that are not :"
|
||
"term:`hashable`, that is, values containing lists, dictionaries or other "
|
||
"mutable types (that are compared by value rather than by object identity) "
|
||
"may not be used as keys. Values that compare equal (such as ``1``, ``1.0``, "
|
||
"and ``True``) can be used interchangeably to index the same dictionary entry."
|
||
msgstr ""
|
||
"Les clés d'un dictionnaire sont *presque* des données arbitraires. Les "
|
||
"valeurs qui ne sont pas :term:`hachables <hashable>`, c'est-à-dire les "
|
||
"valeurs contenant des listes, dictionnaires ou autres types muables (qui "
|
||
"sont comparés à l'aide de leurs valeurs plutôt que par l'identité de "
|
||
"l'objet) ne peuvent pas être utilisées comme clés. Des valeurs qui sont "
|
||
"considérées égales lors d'une comparaison (comme ``1``, ``1.0`` et ``True``) "
|
||
"peuvent être utilisées pour obtenir la même entrée d'un dictionnaire."
|
||
|
||
#: library/stdtypes.rst:4395
|
||
msgid ""
|
||
"Return a new dictionary initialized from an optional positional argument and "
|
||
"a possibly empty set of keyword arguments."
|
||
msgstr ""
|
||
"Renvoie un nouveau dictionnaire initialisé à partir d'un argument "
|
||
"positionnel optionnel, et un ensemble (vide ou non) d'arguments nommés."
|
||
|
||
#: library/stdtypes.rst:4398
|
||
msgid "Dictionaries can be created by several means:"
|
||
msgstr "Les dictionnaires peuvent être construits de différentes manières :"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:4400
|
||
msgid ""
|
||
"Use a comma-separated list of ``key: value`` pairs within braces: ``{'jack': "
|
||
"4098, 'sjoerd': 4127}`` or ``{4098: 'jack', 4127: 'sjoerd'}``"
|
||
msgstr ""
|
||
"en utilisant une liste de paires ``clé: valeur`` séparées par des virgules "
|
||
"entre accolades : ``{'jack': 4098, 'sjoerd': 4127}`` ou ``{4098: 'jack', "
|
||
"4127: 'sjoerd'}`` ;"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:4402
|
||
msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``"
|
||
msgstr ""
|
||
"en utilisant un dictionnaire en compréhension : ``{}``, ``{x: x ** 2 for x "
|
||
"in range(10)}`` ;"
|
||
|
||
# fin d'énumération
|
||
#: library/stdtypes.rst:4403
|
||
msgid ""
|
||
"Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', "
|
||
"200)])``, ``dict(foo=100, bar=200)``"
|
||
msgstr ""
|
||
"en utilisant le constructeur du type : ``dict()``, ``dict([('foo', 100), "
|
||
"('bar', 200)])``, ``dict(foo=100, bar=200)``."
|
||
|
||
#: library/stdtypes.rst:4406
|
||
msgid ""
|
||
"If no positional argument is given, an empty dictionary is created. If a "
|
||
"positional argument is given and it is a mapping object, a dictionary is "
|
||
"created with the same key-value pairs as the mapping object. Otherwise, the "
|
||
"positional argument must be an :term:`iterable` object. Each item in the "
|
||
"iterable must itself be an iterable with exactly two objects. The first "
|
||
"object of each item becomes a key in the new dictionary, and the second "
|
||
"object the corresponding value. If a key occurs more than once, the last "
|
||
"value for that key becomes the corresponding value in the new dictionary."
|
||
msgstr ""
|
||
"Si aucun argument positionnel n'est donné, un dictionnaire vide est crée. Si "
|
||
"un argument positionnel est donné et est un *mapping object*, un "
|
||
"dictionnaire est crée avec les mêmes paires de clé-valeur que le *mapping* "
|
||
"donné. Autrement, l'argument positionnel doit être un objet :term:`itérable "
|
||
"<iterable>`. Chaque élément de cet itérable doit lui-même être un itérable "
|
||
"contenant exactement deux objets. Le premier objet de chaque élément "
|
||
"devient une clé du nouveau dictionnaire, et le second devient sa valeur "
|
||
"correspondante. Si une clé apparaît plus d'une fois, la dernière valeur "
|
||
"pour cette clé devient la valeur correspondante à cette clé dans le nouveau "
|
||
"dictionnaire."
|
||
|
||
#: library/stdtypes.rst:4416
|
||
msgid ""
|
||
"If keyword arguments are given, the keyword arguments and their values are "
|
||
"added to the dictionary created from the positional argument. If a key "
|
||
"being added is already present, the value from the keyword argument replaces "
|
||
"the value from the positional argument."
|
||
msgstr ""
|
||
"Si des arguments nommés sont donnés, ils sont ajoutés au dictionnaire créé "
|
||
"depuis l'argument positionnel. Si une clé est déjà présente, la valeur de "
|
||
"l'argument nommé remplace la valeur reçue par l'argument positionnel."
|
||
|
||
#: library/stdtypes.rst:4421
|
||
msgid ""
|
||
"To illustrate, the following examples all return a dictionary equal to "
|
||
"``{\"one\": 1, \"two\": 2, \"three\": 3}``::"
|
||
msgstr ""
|
||
"Typiquement, les exemples suivants renvoient tous un dictionnaire valant "
|
||
"``{\"one\": 1, \"two\": 2, \"three\": 3}`` ::"
|
||
|
||
#: library/stdtypes.rst:4433
|
||
msgid ""
|
||
"Providing keyword arguments as in the first example only works for keys that "
|
||
"are valid Python identifiers. Otherwise, any valid keys can be used."
|
||
msgstr ""
|
||
"Fournir les arguments nommés comme dans le premier exemple ne fonctionne que "
|
||
"pour des clés qui sont des identifiants valides en Python. Dans les autres "
|
||
"cas, toutes les clés valides sont utilisables."
|
||
|
||
#: library/stdtypes.rst:4437
|
||
msgid ""
|
||
"These are the operations that dictionaries support (and therefore, custom "
|
||
"mapping types should support too):"
|
||
msgstr ""
|
||
"Voici les opérations gérées par les dictionnaires (par conséquent, d'autres "
|
||
"types de tableaux de correspondances devraient les gérer aussi) :"
|
||
|
||
#: library/stdtypes.rst:4442
|
||
msgid "Return a list of all the keys used in the dictionary *d*."
|
||
msgstr ""
|
||
"Renvoie une liste de toutes les clés utilisées dans le dictionnaire *d*."
|
||
|
||
#: library/stdtypes.rst:4446
|
||
msgid "Return the number of items in the dictionary *d*."
|
||
msgstr "Renvoie le nombre d'éléments dans le dictionnaire *d*."
|
||
|
||
#: library/stdtypes.rst:4450
|
||
msgid ""
|
||
"Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is "
|
||
"not in the map."
|
||
msgstr ""
|
||
"Renvoie l'élément de *d* dont la clé est *key*. Lève une exception :exc:"
|
||
"`KeyError` si *key* n'est pas dans le dictionnaire."
|
||
|
||
#: library/stdtypes.rst:4455
|
||
msgid ""
|
||
"If a subclass of dict defines a method :meth:`__missing__` and *key* is not "
|
||
"present, the ``d[key]`` operation calls that method with the key *key* as "
|
||
"argument. The ``d[key]`` operation then returns or raises whatever is "
|
||
"returned or raised by the ``__missing__(key)`` call. No other operations or "
|
||
"methods invoke :meth:`__missing__`. If :meth:`__missing__` is not defined, :"
|
||
"exc:`KeyError` is raised. :meth:`__missing__` must be a method; it cannot be "
|
||
"an instance variable::"
|
||
msgstr ""
|
||
"Si une sous-classe de *dict* définit une méthode :meth:`__missing__` et que "
|
||
"*key* manque, l'opération ``d[key]`` appelle cette méthode avec la clé *key* "
|
||
"en argument. L'opération ``d[key]`` renvoie la valeur, ou lève l'exception "
|
||
"renvoyée ou levée par l'appel à ``__missing__(key)``. Aucune autre opération "
|
||
"ni méthode n'appelle :meth:`__missing__`. Si :meth:`__missing__` n'est pas "
|
||
"définie, une exception :exc:`KeyError` est levée. :meth:`__missing__` doit "
|
||
"être une méthode ; ça ne peut pas être une variable d'instance ::"
|
||
|
||
#: library/stdtypes.rst:4473
|
||
msgid ""
|
||
"The example above shows part of the implementation of :class:`collections."
|
||
"Counter`. A different ``__missing__`` method is used by :class:`collections."
|
||
"defaultdict`."
|
||
msgstr ""
|
||
"L'exemple ci-dessus montre une partie de l'implémentation de :class:"
|
||
"`collections.Counter`. :class:`collections.defaultdict` implémente aussi "
|
||
"``__missing__``."
|
||
|
||
#: library/stdtypes.rst:4479
|
||
msgid "Set ``d[key]`` to *value*."
|
||
msgstr "Assigne ``d[key]`` à *value*."
|
||
|
||
#: library/stdtypes.rst:4483
|
||
msgid ""
|
||
"Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the "
|
||
"map."
|
||
msgstr ""
|
||
"Supprime ``d[key]`` de *d*. Lève une exception :exc:`KeyError` si *key* "
|
||
"n'est pas dans le dictionnaire."
|
||
|
||
#: library/stdtypes.rst:4488
|
||
msgid "Return ``True`` if *d* has a key *key*, else ``False``."
|
||
msgstr "Renvoie ``True`` si *d* a la clé *key*, sinon ``False``."
|
||
|
||
#: library/stdtypes.rst:4492
|
||
msgid "Equivalent to ``not key in d``."
|
||
msgstr "Équivalent à ``not key in d``."
|
||
|
||
#: library/stdtypes.rst:4496
|
||
msgid ""
|
||
"Return an iterator over the keys of the dictionary. This is a shortcut for "
|
||
"``iter(d.keys())``."
|
||
msgstr ""
|
||
"Renvoie un itérateur sur les clés du dictionnaire. C'est un raccourci pour "
|
||
"``iter(d.keys())``."
|
||
|
||
#: library/stdtypes.rst:4501
|
||
msgid "Remove all items from the dictionary."
|
||
msgstr "Supprime tous les éléments du dictionnaire."
|
||
|
||
#: library/stdtypes.rst:4505
|
||
msgid "Return a shallow copy of the dictionary."
|
||
msgstr "Renvoie une copie superficielle du dictionnaire."
|
||
|
||
#: library/stdtypes.rst:4509
|
||
msgid ""
|
||
"Create a new dictionary with keys from *iterable* and values set to *value*."
|
||
msgstr ""
|
||
"Crée un nouveau dictionnaire avec les clés de *iterable* et les valeurs à "
|
||
"*value*."
|
||
|
||
#: library/stdtypes.rst:4511
|
||
msgid ""
|
||
":meth:`fromkeys` is a class method that returns a new dictionary. *value* "
|
||
"defaults to ``None``. All of the values refer to just a single instance, so "
|
||
"it generally doesn't make sense for *value* to be a mutable object such as "
|
||
"an empty list. To get distinct values, use a :ref:`dict comprehension "
|
||
"<dict>` instead."
|
||
msgstr ""
|
||
":meth:`fromkeys` est une méthode de classe qui renvoie un nouveau "
|
||
"dictionnaire. *value* vaut par défaut ``None``. Toutes les valeurs se "
|
||
"réfèrent à une seule instance, donc il n'est généralement pas logique que "
|
||
"*value* soit un objet mutable comme une liste vide. Pour avoir des valeurs "
|
||
"distinctes, utilisez plutôt une :ref:`compréhension de dictionnaire <dict>`."
|
||
|
||
#: library/stdtypes.rst:4519
|
||
msgid ""
|
||
"Return the value for *key* if *key* is in the dictionary, else *default*. If "
|
||
"*default* is not given, it defaults to ``None``, so that this method never "
|
||
"raises a :exc:`KeyError`."
|
||
msgstr ""
|
||
"Renvoie la valeur de *key* si *key* est dans le dictionnaire, sinon "
|
||
"*default*. Si *default* n'est pas donné, il vaut ``None`` par défaut, de "
|
||
"manière à ce que cette méthode ne lève jamais :exc:`KeyError`."
|
||
|
||
#: library/stdtypes.rst:4525
|
||
msgid ""
|
||
"Return a new view of the dictionary's items (``(key, value)`` pairs). See "
|
||
"the :ref:`documentation of view objects <dict-views>`."
|
||
msgstr ""
|
||
"Renvoie une nouvelle vue des éléments du dictionnaire (paires de ``(key, "
|
||
"value)``). Voir la :ref:`documentation des vues <dict-views>`."
|
||
|
||
#: library/stdtypes.rst:4530
|
||
msgid ""
|
||
"Return a new view of the dictionary's keys. See the :ref:`documentation of "
|
||
"view objects <dict-views>`."
|
||
msgstr ""
|
||
"Renvoie une nouvelle vue des clés du dictionnaire. Voir la :ref:"
|
||
"`documentation des vues <dict-views>`."
|
||
|
||
#: library/stdtypes.rst:4535
|
||
msgid ""
|
||
"If *key* is in the dictionary, remove it and return its value, else return "
|
||
"*default*. If *default* is not given and *key* is not in the dictionary, a :"
|
||
"exc:`KeyError` is raised."
|
||
msgstr ""
|
||
"Si *key* est dans le dictionnaire elle est supprimée et sa valeur est "
|
||
"renvoyée, sinon renvoie *default*. Si *default* n'est pas donné et que "
|
||
"*key* n'est pas dans le dictionnaire, une :exc:`KeyError` est levée."
|
||
|
||
#: library/stdtypes.rst:4541
|
||
msgid ""
|
||
"Remove and return a ``(key, value)`` pair from the dictionary. Pairs are "
|
||
"returned in :abbr:`LIFO (last-in, first-out)` order."
|
||
msgstr ""
|
||
"Supprime et renvoie une paire ``(key, value)`` du dictionnaire. Les paires "
|
||
"sont renvoyées dans un ordre :abbr:`LIFO (Last In - First Out c.-à-d. "
|
||
"dernier entré, premier sorti)`."
|
||
|
||
#: library/stdtypes.rst:4544
|
||
msgid ""
|
||
":meth:`popitem` is useful to destructively iterate over a dictionary, as "
|
||
"often used in set algorithms. If the dictionary is empty, calling :meth:"
|
||
"`popitem` raises a :exc:`KeyError`."
|
||
msgstr ""
|
||
":meth:`popitem` est pratique pour itérer un dictionnaire de manière "
|
||
"destructive, comme souvent dans les algorithmes sur les ensembles. Si le "
|
||
"dictionnaire est vide, appeler :meth:`popitem` lève une :exc:`KeyError`."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:4548
|
||
msgid ""
|
||
"LIFO order is now guaranteed. In prior versions, :meth:`popitem` would "
|
||
"return an arbitrary key/value pair."
|
||
msgstr ""
|
||
"l'ordre « dernier entré, premier sorti » (LIFO) est désormais assuré. Dans "
|
||
"les versions précédentes, :meth:`popitem` renvoyait une paire clé-valeur "
|
||
"arbitraire."
|
||
|
||
#: library/stdtypes.rst:4554
|
||
msgid ""
|
||
"Return a reverse iterator over the keys of the dictionary. This is a "
|
||
"shortcut for ``reversed(d.keys())``."
|
||
msgstr ""
|
||
"Renvoie un itérateur inversé sur les clés du dictionnaire. C'est un "
|
||
"raccourci pour ``reversed(d.keys())``."
|
||
|
||
#: library/stdtypes.rst:4561
|
||
msgid ""
|
||
"If *key* is in the dictionary, return its value. If not, insert *key* with "
|
||
"a value of *default* and return *default*. *default* defaults to ``None``."
|
||
msgstr ""
|
||
"Si *key* est dans le dictionnaire, sa valeur est renvoyée. Sinon, insère "
|
||
"*key* avec comme valeur *default* et renvoie *default*. *default* vaut "
|
||
"``None`` par défaut."
|
||
|
||
#: library/stdtypes.rst:4567
|
||
msgid ""
|
||
"Update the dictionary with the key/value pairs from *other*, overwriting "
|
||
"existing keys. Return ``None``."
|
||
msgstr ""
|
||
"Met à jour le dictionnaire avec les paires de clé-valeur d'*other*, écrasant "
|
||
"les clés existantes. Renvoie ``None``."
|
||
|
||
#: library/stdtypes.rst:4570
|
||
msgid ""
|
||
":meth:`update` accepts either another dictionary object or an iterable of "
|
||
"key/value pairs (as tuples or other iterables of length two). If keyword "
|
||
"arguments are specified, the dictionary is then updated with those key/value "
|
||
"pairs: ``d.update(red=1, blue=2)``."
|
||
msgstr ""
|
||
":meth:`update` accepte aussi bien un autre dictionnaire qu'un itérable de "
|
||
"clé-valeur (sous forme de *n*-uplets ou autres itérables de longueur deux). "
|
||
"Si des arguments nommés sont donnés, le dictionnaire est alors mis à jour "
|
||
"avec ces paires clé-valeur : ``d.update(red=1, blue=2)``."
|
||
|
||
#: library/stdtypes.rst:4577
|
||
msgid ""
|
||
"Return a new view of the dictionary's values. See the :ref:`documentation "
|
||
"of view objects <dict-views>`."
|
||
msgstr ""
|
||
"Renvoie une nouvelle vue des valeurs du dictionnaire. Voir la :ref:"
|
||
"`documentation des vues <dict-views>`."
|
||
|
||
#: library/stdtypes.rst:4580
|
||
msgid ""
|
||
"An equality comparison between one ``dict.values()`` view and another will "
|
||
"always return ``False``. This also applies when comparing ``dict.values()`` "
|
||
"to itself::"
|
||
msgstr ""
|
||
"Une comparaison d'égalité entre une vue de ``dict.values()`` et une autre "
|
||
"renvoie toujours ``False``. Cela s'applique aussi lorsque l'on compare "
|
||
"``dict.values()`` à lui-même ::"
|
||
|
||
#: library/stdtypes.rst:4590
|
||
msgid ""
|
||
"Create a new dictionary with the merged keys and values of *d* and *other*, "
|
||
"which must both be dictionaries. The values of *other* take priority when "
|
||
"*d* and *other* share keys."
|
||
msgstr ""
|
||
"Crée un nouveau dictionnaire avec les clés et les valeurs fusionnées de *d* "
|
||
"et *other*, qui doivent tous deux être des dictionnaires. Les valeurs de "
|
||
"*other* sont prioritaires lorsque *d* et *other* partagent des clés."
|
||
|
||
#: library/stdtypes.rst:4598
|
||
msgid ""
|
||
"Update the dictionary *d* with keys and values from *other*, which may be "
|
||
"either a :term:`mapping` or an :term:`iterable` of key/value pairs. The "
|
||
"values of *other* take priority when *d* and *other* share keys."
|
||
msgstr ""
|
||
"Met à jour le dictionnaire *d* avec les clés et les valeurs de *other*, qui "
|
||
"peut être soit un :term:`tableau de correspondances <mapping>` soit un :term:"
|
||
"`itérable <iterable>` de paires clé-valeur. Les valeurs de *other* sont "
|
||
"prioritaires lorsque *d* et *other* partagent des clés."
|
||
|
||
#: library/stdtypes.rst:4604
|
||
msgid ""
|
||
"Dictionaries compare equal if and only if they have the same ``(key, "
|
||
"value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', "
|
||
"'>') raise :exc:`TypeError`."
|
||
msgstr ""
|
||
"Deux dictionnaires sont égaux si et seulement s'ils ont les mêmes paires de "
|
||
"clé-valeur (``(key, value)``, peu importe leur ordre). Les comparaisons "
|
||
"d'ordre (``<``, ``<=``, ``>=``, ``>``) lèvent une :exc:`TypeError`."
|
||
|
||
#: library/stdtypes.rst:4608
|
||
msgid ""
|
||
"Dictionaries preserve insertion order. Note that updating a key does not "
|
||
"affect the order. Keys added after deletion are inserted at the end. ::"
|
||
msgstr ""
|
||
"Les dictionnaires préservent l'ordre des insertions. Notez que modifier une "
|
||
"clé n'affecte pas l'ordre. Les clés ajoutées après un effacement sont "
|
||
"insérées à la fin. ::"
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:4626
|
||
msgid ""
|
||
"Dictionary order is guaranteed to be insertion order. This behavior was an "
|
||
"implementation detail of CPython from 3.6."
|
||
msgstr ""
|
||
"l'ordre d'un dictionnaire est toujours l'ordre des insertions. Ce "
|
||
"comportement était un détail d'implémentation de CPython depuis la version "
|
||
"3.6."
|
||
|
||
#: library/stdtypes.rst:4630
|
||
msgid "Dictionaries and dictionary views are reversible. ::"
|
||
msgstr "Les dictionnaires et les vues de dictionnaires sont réversibles. ::"
|
||
|
||
# suit un ':' ("changed in version X.Y")
|
||
#: library/stdtypes.rst:4642
|
||
msgid "Dictionaries are now reversible."
|
||
msgstr "les dictionnaires sont maintenant réversibles."
|
||
|
||
#: library/stdtypes.rst:4647
|
||
msgid ""
|
||
":class:`types.MappingProxyType` can be used to create a read-only view of a :"
|
||
"class:`dict`."
|
||
msgstr ""
|
||
":class:`types.MappingProxyType` peut être utilisé pour créer une vue en "
|
||
"lecture seule d'un :class:`dict`."
|
||
|
||
#: library/stdtypes.rst:4654
|
||
msgid "Dictionary view objects"
|
||
msgstr "Les vues de dictionnaires"
|
||
|
||
#: library/stdtypes.rst:4656
|
||
msgid ""
|
||
"The objects returned by :meth:`dict.keys`, :meth:`dict.values` and :meth:"
|
||
"`dict.items` are *view objects*. They provide a dynamic view on the "
|
||
"dictionary's entries, which means that when the dictionary changes, the view "
|
||
"reflects these changes."
|
||
msgstr ""
|
||
"Les objets renvoyés par :meth:`dict.keys`, :meth:`dict.values` et :meth:"
|
||
"`dict.items` sont des *vues*. Ils fournissent une vue dynamique des "
|
||
"éléments du dictionnaire, ce qui signifie que si le dictionnaire change, la "
|
||
"vue reflète ces changements."
|
||
|
||
#: library/stdtypes.rst:4661
|
||
msgid ""
|
||
"Dictionary views can be iterated over to yield their respective data, and "
|
||
"support membership tests:"
|
||
msgstr ""
|
||
"Les vues de dictionnaires peuvent être itérées et ainsi renvoyer les données "
|
||
"du dictionnaire ; elles gèrent aussi les tests d'appartenance :"
|
||
|
||
#: library/stdtypes.rst:4666
|
||
msgid "Return the number of entries in the dictionary."
|
||
msgstr "Renvoie le nombre d'entrées du dictionnaire."
|
||
|
||
#: library/stdtypes.rst:4670
|
||
msgid ""
|
||
"Return an iterator over the keys, values or items (represented as tuples of "
|
||
"``(key, value)``) in the dictionary."
|
||
msgstr ""
|
||
"Renvoie un itérateur sur les clés, les valeurs ou les éléments (représentés "
|
||
"par des paires ``(clé, valeur)``) du dictionnaire."
|
||
|
||
#: library/stdtypes.rst:4673
|
||
msgid ""
|
||
"Keys and values are iterated over in insertion order. This allows the "
|
||
"creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d."
|
||
"values(), d.keys())``. Another way to create the same list is ``pairs = "
|
||
"[(v, k) for (k, v) in d.items()]``."
|
||
msgstr ""
|
||
"Les clés et les valeurs sont itérées dans l'ordre de leur insertion. Ceci "
|
||
"permet la création de paires de ``(key, value)`` en utilisant :func:`zip` : "
|
||
"``pairs = zip(d.values(), d.keys())``. Un autre moyen de construire la même "
|
||
"liste est ``pairs = [(v, k) for (k, v) in d.items()]``."
|
||
|
||
#: library/stdtypes.rst:4678
|
||
msgid ""
|
||
"Iterating views while adding or deleting entries in the dictionary may raise "
|
||
"a :exc:`RuntimeError` or fail to iterate over all entries."
|
||
msgstr ""
|
||
"Parcourir des vues tout en ajoutant ou supprimant des entrées dans un "
|
||
"dictionnaire peut lever une :exc:`RuntimeError` ou ne pas fournir toutes les "
|
||
"entrées."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:4681
|
||
msgid "Dictionary order is guaranteed to be insertion order."
|
||
msgstr "l'ordre d'un dictionnaire est toujours l'ordre des insertions."
|
||
|
||
#: library/stdtypes.rst:4686
|
||
msgid ""
|
||
"Return ``True`` if *x* is in the underlying dictionary's keys, values or "
|
||
"items (in the latter case, *x* should be a ``(key, value)`` tuple)."
|
||
msgstr ""
|
||
"Renvoie ``True`` si *x* est dans les clés, les valeurs ou les éléments du "
|
||
"dictionnaire sous-jacent (dans le dernier cas, *x* doit être une paire "
|
||
"``(key, value)``)."
|
||
|
||
#: library/stdtypes.rst:4691
|
||
msgid ""
|
||
"Return a reverse iterator over the keys, values or items of the dictionary. "
|
||
"The view will be iterated in reverse order of the insertion."
|
||
msgstr ""
|
||
"Renvoie un itérateur inversé sur les clés, les valeurs ou les éléments du "
|
||
"dictionnaire. La vue est itérée dans l'ordre inverse d'insertion."
|
||
|
||
# suit un ':' ("changed in version X.Y")
|
||
#: library/stdtypes.rst:4694
|
||
msgid "Dictionary views are now reversible."
|
||
msgstr "les vues de dictionnaires sont dorénavant réversibles."
|
||
|
||
#: library/stdtypes.rst:4699
|
||
msgid ""
|
||
"Return a :class:`types.MappingProxyType` that wraps the original dictionary "
|
||
"to which the view refers."
|
||
msgstr ""
|
||
"Renvoie une :class:`types.MappingProxyType` qui encapsule le dictionnaire "
|
||
"original auquel la vue se réfère."
|
||
|
||
#: library/stdtypes.rst:4704
|
||
msgid ""
|
||
"Keys views are set-like since their entries are unique and :term:"
|
||
"`hashable`. If all values are hashable, so that ``(key, value)`` pairs are "
|
||
"unique and hashable, then the items view is also set-like. (Values views "
|
||
"are not treated as set-like since the entries are generally not unique.) "
|
||
"For set-like views, all of the operations defined for the abstract base "
|
||
"class :class:`collections.abc.Set` are available (for example, ``==``, "
|
||
"``<``, or ``^``)."
|
||
msgstr ""
|
||
"Les vues de clés sont semblables à des ensembles puisque leurs entrées sont "
|
||
"uniques et :term:`hachables <hashable>`. Si toutes les valeurs sont "
|
||
"hachables, et qu'ainsi toutes les paires de ``(clé, valeur)`` sont uniques "
|
||
"et hachables, alors la vue donnée par *items()* est aussi semblable à un "
|
||
"ensemble. (Les vues sur les valeurs ne sont généralement pas traitées comme "
|
||
"des ensembles, car ces entrées ne sont généralement pas uniques.) Pour les "
|
||
"vues semblables aux ensembles, toutes les opérations définies dans la classe "
|
||
"mère abstraite :class:`collections.abc.Set` sont disponibles (comme ``==``, "
|
||
"``<``, ou ``^``)."
|
||
|
||
#: library/stdtypes.rst:4711
|
||
msgid "An example of dictionary view usage::"
|
||
msgstr "Voici un exemple d'utilisation de vue de dictionnaire ::"
|
||
|
||
#: library/stdtypes.rst:4754
|
||
msgid "Context Manager Types"
|
||
msgstr "Le type gestionnaire de contexte"
|
||
|
||
#: library/stdtypes.rst:4761
|
||
msgid ""
|
||
"Python's :keyword:`with` statement supports the concept of a runtime context "
|
||
"defined by a context manager. This is implemented using a pair of methods "
|
||
"that allow user-defined classes to define a runtime context that is entered "
|
||
"before the statement body is executed and exited when the statement ends:"
|
||
msgstr ""
|
||
"L'instruction Python :keyword:`with` permet de créer des contextes "
|
||
"d'exécution à l'aide de gestionnaires de contextes. L'implémentation est "
|
||
"réalisée via deux méthodes permettant aux classes définies par l'utilisateur "
|
||
"de définir un contexte d'exécution, dans lequel on entre avant l'exécution "
|
||
"du corps de l'instruction et que l'on quitte lorsque l'instruction se "
|
||
"termine :"
|
||
|
||
#: library/stdtypes.rst:4769
|
||
msgid ""
|
||
"Enter the runtime context and return either this object or another object "
|
||
"related to the runtime context. The value returned by this method is bound "
|
||
"to the identifier in the :keyword:`!as` clause of :keyword:`with` statements "
|
||
"using this context manager."
|
||
msgstr ""
|
||
"Entre dans le contexte d'exécution, soit se renvoyant lui-même, soit en "
|
||
"renvoyant un autre objet en lien avec ce contexte. La valeur renvoyée par "
|
||
"cette méthode est liée à l'identifiant donné au :keyword:`!as` de "
|
||
"l'instruction :keyword:`with` utilisant ce gestionnaire de contexte."
|
||
|
||
#: library/stdtypes.rst:4774
|
||
msgid ""
|
||
"An example of a context manager that returns itself is a :term:`file "
|
||
"object`. File objects return themselves from __enter__() to allow :func:"
|
||
"`open` to be used as the context expression in a :keyword:`with` statement."
|
||
msgstr ""
|
||
"Un exemple de gestionnaire de contexte se renvoyant lui-même est l':term:"
|
||
"`objet fichier<file object>`. Les objets fichiers se renvoient eux-mêmes "
|
||
"depuis ``__enter__()`` pour ainsi permettre à :func:`open` d'être utilisée "
|
||
"comme expression dans une instruction :keyword:`with`."
|
||
|
||
#: library/stdtypes.rst:4778
|
||
msgid ""
|
||
"An example of a context manager that returns a related object is the one "
|
||
"returned by :func:`decimal.localcontext`. These managers set the active "
|
||
"decimal context to a copy of the original decimal context and then return "
|
||
"the copy. This allows changes to be made to the current decimal context in "
|
||
"the body of the :keyword:`with` statement without affecting code outside "
|
||
"the :keyword:`!with` statement."
|
||
msgstr ""
|
||
"Un exemple de gestionnaire de contexte renvoyant un objet connexe est celui "
|
||
"renvoyé par :func:`decimal.localcontext`. Ces gestionnaires remplacent le "
|
||
"contexte décimal courant par une copie de l'original, copie qui est "
|
||
"renvoyée. Ça permet de changer le contexte courant dans le corps du :keyword:"
|
||
"`with` sans affecter le code en dehors de l'instruction :keyword:`!with`."
|
||
|
||
#: library/stdtypes.rst:4788
|
||
msgid ""
|
||
"Exit the runtime context and return a Boolean flag indicating if any "
|
||
"exception that occurred should be suppressed. If an exception occurred while "
|
||
"executing the body of the :keyword:`with` statement, the arguments contain "
|
||
"the exception type, value and traceback information. Otherwise, all three "
|
||
"arguments are ``None``."
|
||
msgstr ""
|
||
"Sort du contexte et renvoie un booléen indiquant si une exception est "
|
||
"survenue et doit être supprimée. Si une exception est survenue lors de "
|
||
"l'exécution du corps de l'instruction :keyword:`with`, les arguments "
|
||
"contiennent le type de l'exception, sa valeur et la trace de la pile "
|
||
"(*traceback*). Sinon les trois arguments valent ``None``."
|
||
|
||
#: library/stdtypes.rst:4793
|
||
msgid ""
|
||
"Returning a true value from this method will cause the :keyword:`with` "
|
||
"statement to suppress the exception and continue execution with the "
|
||
"statement immediately following the :keyword:`!with` statement. Otherwise "
|
||
"the exception continues propagating after this method has finished "
|
||
"executing. Exceptions that occur during execution of this method will "
|
||
"replace any exception that occurred in the body of the :keyword:`!with` "
|
||
"statement."
|
||
msgstr ""
|
||
"L'instruction :keyword:`with` inhibe l'exception si cette méthode renvoie la "
|
||
"valeur vraie, l'exécution continuant ainsi à l'instruction suivant "
|
||
"immédiatement l'instruction :keyword:`!with`. Sinon, l'exception continue de "
|
||
"se propager après la fin de cette méthode. Les exceptions se produisant "
|
||
"pendant l'exécution de cette méthode remplacent toute exception qui s'est "
|
||
"produite dans le corps du :keyword:`!with`."
|
||
|
||
#: library/stdtypes.rst:4800
|
||
msgid ""
|
||
"The exception passed in should never be reraised explicitly - instead, this "
|
||
"method should return a false value to indicate that the method completed "
|
||
"successfully and does not want to suppress the raised exception. This allows "
|
||
"context management code to easily detect whether or not an :meth:`__exit__` "
|
||
"method has actually failed."
|
||
msgstr ""
|
||
"L'exception reçue ne doit jamais être relancée explicitement, cette méthode "
|
||
"devrait plutôt renvoyer une valeur fausse pour indiquer que son exécution "
|
||
"s'est terminée avec succès et qu'elle ne veut pas supprimer l'exception. "
|
||
"Ceci permet au code de gestion du contexte de comprendre si une méthode :"
|
||
"meth:`__exit__` a échoué."
|
||
|
||
#: library/stdtypes.rst:4806
|
||
msgid ""
|
||
"Python defines several context managers to support easy thread "
|
||
"synchronisation, prompt closure of files or other objects, and simpler "
|
||
"manipulation of the active decimal arithmetic context. The specific types "
|
||
"are not treated specially beyond their implementation of the context "
|
||
"management protocol. See the :mod:`contextlib` module for some examples."
|
||
msgstr ""
|
||
"Python définit plusieurs gestionnaires de contexte pour faciliter la "
|
||
"synchronisation des fils d'exécution, la fermeture des fichiers ou d'autres "
|
||
"objets, et la configuration du contexte arithmétique décimal. Ces types "
|
||
"spécifiques ne sont pas traités différemment, ils respectent simplement le "
|
||
"protocole de gestion du contexte. Voir les exemples dans la documentation du "
|
||
"module :mod:`contextlib`."
|
||
|
||
#: library/stdtypes.rst:4812
|
||
msgid ""
|
||
"Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` "
|
||
"decorator provide a convenient way to implement these protocols. If a "
|
||
"generator function is decorated with the :class:`contextlib.contextmanager` "
|
||
"decorator, it will return a context manager implementing the necessary :meth:"
|
||
"`~contextmanager.__enter__` and :meth:`~contextmanager.__exit__` methods, "
|
||
"rather than the iterator produced by an undecorated generator function."
|
||
msgstr ""
|
||
"Les :term:`générateurs <generator>` Python et le décorateur :class:"
|
||
"`contextlib.contextmanager` permettent d'implémenter simplement ces "
|
||
"protocoles. Si un générateur est décoré avec :class:`contextlib. "
|
||
"contextmanager`, il renvoie un gestionnaire de contexte implémentant les "
|
||
"méthodes :meth:`~contextmanager.__enter__` et :meth:`~contextmanager."
|
||
"__exit__`, plutôt que l'itérateur produit par un générateur non décoré."
|
||
|
||
#: library/stdtypes.rst:4819
|
||
msgid ""
|
||
"Note that there is no specific slot for any of these methods in the type "
|
||
"structure for Python objects in the Python/C API. Extension types wanting to "
|
||
"define these methods must provide them as a normal Python accessible method. "
|
||
"Compared to the overhead of setting up the runtime context, the overhead of "
|
||
"a single class dictionary lookup is negligible."
|
||
msgstr ""
|
||
"Notez qu'il n'y a pas d'emplacement spécifique pour ces méthodes dans la "
|
||
"structure de type pour les objets Python dans l'API Python/C. Les types "
|
||
"souhaitant définir ces méthodes doivent les fournir comme une méthode "
|
||
"accessible en Python. Comparé au coût de la mise en place du contexte "
|
||
"d'exécution, le coût d'un accès au dictionnaire d'une classe unique est "
|
||
"négligeable."
|
||
|
||
#: library/stdtypes.rst:4827
|
||
msgid ""
|
||
"Type Annotation Types --- :ref:`Generic Alias <types-genericalias>`, :ref:"
|
||
"`Union <types-union>`"
|
||
msgstr ""
|
||
"Types d'annotation de type — :ref:`Alias générique <types-genericalias>`, :"
|
||
"ref:`Union <types-union>`"
|
||
|
||
#: library/stdtypes.rst:4832
|
||
msgid ""
|
||
"The core built-in types for :term:`type annotations <annotation>` are :ref:"
|
||
"`Generic Alias <types-genericalias>` and :ref:`Union <types-union>`."
|
||
msgstr ""
|
||
"Les principaux types natifs pour l':term:`annotation de types <annotation>` "
|
||
"sont l':ref:`Alias générique <types-genericalias>` et l':ref:`Union <types-"
|
||
"union>`."
|
||
|
||
#: library/stdtypes.rst:4839
|
||
msgid "Generic Alias Type"
|
||
msgstr "Type Alias générique"
|
||
|
||
#: library/stdtypes.rst:4845
|
||
msgid ""
|
||
"``GenericAlias`` objects are generally created by :ref:`subscripting "
|
||
"<subscriptions>` a class. They are most often used with :ref:`container "
|
||
"classes <sequence-types>`, such as :class:`list` or :class:`dict`. For "
|
||
"example, ``list[int]`` is a ``GenericAlias`` object created by subscripting "
|
||
"the ``list`` class with the argument :class:`int`. ``GenericAlias`` objects "
|
||
"are intended primarily for use with :term:`type annotations <annotation>`."
|
||
msgstr ""
|
||
"Les objets ``GenericAlias`` sont généralement créés en :ref:`indiçant "
|
||
"<subscriptions>` une classe. Ils sont le plus souvent utilisés avec des :ref:"
|
||
"`classes conteneurs <sequence-types>`, telles que :class:`list` ou :class:"
|
||
"`dict`. Par exemple, ``list[int]`` est un objet GenericAlias créé en "
|
||
"indiçant la classe ``list`` avec l'argument :class:`int`. Les objets "
|
||
"``GenericAlias`` sont principalement destinés à être utilisés en tant qu':"
|
||
"term:`annotations de types <annotation>`."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:4855
|
||
msgid ""
|
||
"It is generally only possible to subscript a class if the class implements "
|
||
"the special method :meth:`~object.__class_getitem__`."
|
||
msgstr ""
|
||
"il n'est généralement possible d'indicer une classe que si la classe "
|
||
"implémente la méthode spéciale :meth:`~object.__class_getitem__`."
|
||
|
||
#: library/stdtypes.rst:4858
|
||
msgid ""
|
||
"A ``GenericAlias`` object acts as a proxy for a :term:`generic type`, "
|
||
"implementing *parameterized generics*."
|
||
msgstr ""
|
||
"Un objet ``GenericAlias`` agit comme un mandataire pour un :term:`type "
|
||
"générique`, en implémentant des *types génériques pouvant recevoir des "
|
||
"paramètres*."
|
||
|
||
#: library/stdtypes.rst:4861
|
||
msgid ""
|
||
"For a container class, the argument(s) supplied to a :ref:`subscription "
|
||
"<subscriptions>` of the class may indicate the type(s) of the elements an "
|
||
"object contains. For example, ``set[bytes]`` can be used in type annotations "
|
||
"to signify a :class:`set` in which all the elements are of type :class:"
|
||
"`bytes`."
|
||
msgstr ""
|
||
"Pour une classe conteneur, les arguments fournis comme :ref:`indices "
|
||
"<subscriptions>` de la classe indiquent les types des éléments que l'objet "
|
||
"peut contenir. Par exemple, ``set[bytes]`` peut être utilisé dans les "
|
||
"annotations de type pour signifier un :class:`ensemble <set>` dans lequel "
|
||
"tous les éléments sont de type :class:`bytes`."
|
||
|
||
#: library/stdtypes.rst:4867
|
||
msgid ""
|
||
"For a class which defines :meth:`~object.__class_getitem__` but is not a "
|
||
"container, the argument(s) supplied to a subscription of the class will "
|
||
"often indicate the return type(s) of one or more methods defined on an "
|
||
"object. For example, :mod:`regular expressions <re>` can be used on both "
|
||
"the :class:`str` data type and the :class:`bytes` data type:"
|
||
msgstr ""
|
||
"Pour une classe qui définit :meth:`~object.__class_getitem__` mais n'est pas "
|
||
"un conteneur, les arguments fournis comme indices de la classe indiquent "
|
||
"souvent les types de retour d'une ou plusieurs méthodes définies sur un "
|
||
"objet. Par exemple, :mod:`re` (expressions rationnelles) peut être utilisé à "
|
||
"la fois sur le type de données :class:`str` et sur le type de données :class:"
|
||
"`bytes` :"
|
||
|
||
# énumération
|
||
#: library/stdtypes.rst:4873
|
||
msgid ""
|
||
"If ``x = re.search('foo', 'foo')``, ``x`` will be a :ref:`re.Match <match-"
|
||
"objects>` object where the return values of ``x.group(0)`` and ``x[0]`` will "
|
||
"both be of type :class:`str`. We can represent this kind of object in type "
|
||
"annotations with the ``GenericAlias`` ``re.Match[str]``."
|
||
msgstr ""
|
||
"si ``x = re.search('foo', 'foo')``, ``x`` est un objet :ref:`re.Match <match-"
|
||
"objects>` où les valeurs de retour de ``x.group(0)`` et ``x[0]`` sont toutes "
|
||
"les deux de type :class:`str`. Nous pouvons représenter ce type d'objet dans "
|
||
"des annotations de type avec le ``GenericAlias`` ``re.Match[str]`` ;"
|
||
|
||
# fin d'énumération
|
||
#: library/stdtypes.rst:4879
|
||
msgid ""
|
||
"If ``y = re.search(b'bar', b'bar')``, (note the ``b`` for :class:`bytes`), "
|
||
"``y`` will also be an instance of ``re.Match``, but the return values of ``y."
|
||
"group(0)`` and ``y[0]`` will both be of type :class:`bytes`. In type "
|
||
"annotations, we would represent this variety of :ref:`re.Match <match-"
|
||
"objects>` objects with ``re.Match[bytes]``."
|
||
msgstr ""
|
||
"si ``y = re.search(b'bar', b'bar')``, (notez le ``b`` pour :class:`bytes`), "
|
||
"``y`` est également une instance de ``re.Match``, mais les valeurs de retour "
|
||
"de ``y.group(0)`` et ``y[0]`` sont toutes les deux de type :class:`bytes`. "
|
||
"Dans les annotations de type, nous représenterons cette variété d'objets :"
|
||
"ref:`re.Match <match-objects>` par ``re.Match[bytes]``."
|
||
|
||
#: library/stdtypes.rst:4885
|
||
msgid ""
|
||
"``GenericAlias`` objects are instances of the class :class:`types."
|
||
"GenericAlias`, which can also be used to create ``GenericAlias`` objects "
|
||
"directly."
|
||
msgstr ""
|
||
"Les objets ``GenericAlias`` sont des instances de la classe :class:`types."
|
||
"GenericAlias`, qui peut également être utilisée pour créer directement des "
|
||
"objets ``GenericAlias``."
|
||
|
||
#: library/stdtypes.rst:4891
|
||
msgid ""
|
||
"Creates a ``GenericAlias`` representing a type ``T`` parameterized by types "
|
||
"*X*, *Y*, and more depending on the ``T`` used. For example, a function "
|
||
"expecting a :class:`list` containing :class:`float` elements::"
|
||
msgstr ""
|
||
"Crée un ``GenericAlias`` représentant un type ``T`` paramétré par les types "
|
||
"*X*, *Y* et plus selon le ``T`` utilisé. Par exemple, pour une fonction "
|
||
"attendant une :class:`list` contenant des éléments :class:`float` ::"
|
||
|
||
#: library/stdtypes.rst:4899
|
||
msgid ""
|
||
"Another example for :term:`mapping` objects, using a :class:`dict`, which is "
|
||
"a generic type expecting two type parameters representing the key type and "
|
||
"the value type. In this example, the function expects a ``dict`` with keys "
|
||
"of type :class:`str` and values of type :class:`int`::"
|
||
msgstr ""
|
||
"Un autre exemple peut être un objet :term:`tableau de correspondances "
|
||
"<mapping>`, utilisant un :class:`dict`, qui est un type générique attendant "
|
||
"deux paramètres de type représentant le type clé et le type valeur. Dans cet "
|
||
"exemple, la fonction attend un ``dict`` avec des clés de type :class:`str` "
|
||
"et des valeurs de type :class:`int` ::"
|
||
|
||
#: library/stdtypes.rst:4907
|
||
msgid ""
|
||
"The builtin functions :func:`isinstance` and :func:`issubclass` do not "
|
||
"accept ``GenericAlias`` types for their second argument::"
|
||
msgstr ""
|
||
"Les fonctions natives :func:`isinstance` et :func:`issubclass` n'acceptent "
|
||
"pas les types ``GenericAlias`` pour leur second argument ::"
|
||
|
||
#: library/stdtypes.rst:4915
|
||
msgid ""
|
||
"The Python runtime does not enforce :term:`type annotations <annotation>`. "
|
||
"This extends to generic types and their type parameters. When creating a "
|
||
"container object from a ``GenericAlias``, the elements in the container are "
|
||
"not checked against their type. For example, the following code is "
|
||
"discouraged, but will run without errors::"
|
||
msgstr ""
|
||
"Lors de l'exécution, Python ne regarde pas les :term:`annotations de type "
|
||
"<annotation>`. Cela vaut pour les types génériques et les types qu'on leur "
|
||
"passe en paramètres. Lors de la création d'un objet conteneur à partir d'un "
|
||
"``GenericAlias``, les types des éléments du conteneur ne sont pas vérifiés. "
|
||
"Par exemple, le code suivant est déconseillé, mais s'exécute sans erreur ::"
|
||
|
||
#: library/stdtypes.rst:4925
|
||
msgid ""
|
||
"Furthermore, parameterized generics erase type parameters during object "
|
||
"creation::"
|
||
msgstr ""
|
||
"De plus, les types génériques pouvant recevoir des paramètres effacent les "
|
||
"paramètres de type lors de la création d'objet ::"
|
||
|
||
#: library/stdtypes.rst:4936
|
||
msgid ""
|
||
"Calling :func:`repr` or :func:`str` on a generic shows the parameterized "
|
||
"type::"
|
||
msgstr ""
|
||
"Appeler :func:`repr` ou :func:`str` sur un type générique affiche le type "
|
||
"pouvant recevoir des paramètres ::"
|
||
|
||
#: library/stdtypes.rst:4944
|
||
msgid ""
|
||
"The :meth:`~object.__getitem__` method of generic containers will raise an "
|
||
"exception to disallow mistakes like ``dict[str][str]``::"
|
||
msgstr ""
|
||
"La méthode :meth:`~object.__getitem__` des conteneurs génériques lève une "
|
||
"exception pour interdire les erreurs telles que ``dict[str][str]`` ::"
|
||
|
||
#: library/stdtypes.rst:4952
|
||
msgid ""
|
||
"However, such expressions are valid when :ref:`type variables <generics>` "
|
||
"are used. The index must have as many elements as there are type variable "
|
||
"items in the ``GenericAlias`` object's :attr:`~genericalias.__args__`. ::"
|
||
msgstr ""
|
||
"Cependant, de telles expressions sont valides lorsque :ref:`des variables de "
|
||
"type <generics>` sont utilisées. L'indice doit avoir autant d'éléments qu'il "
|
||
"y a d'éléments variables de type dans l'objet ``GenericAlias`` :attr:"
|
||
"`~genericalias.__args__`. ::"
|
||
|
||
#: library/stdtypes.rst:4963
|
||
msgid "Standard Generic Classes"
|
||
msgstr "Classes génériques standards"
|
||
|
||
#: library/stdtypes.rst:4965
|
||
msgid ""
|
||
"The following standard library classes support parameterized generics. This "
|
||
"list is non-exhaustive."
|
||
msgstr ""
|
||
"Les classes suivantes de la bibliothèque standard prennent en charge les "
|
||
"types génériques pouvant accepter des paramètres. Cette liste est non "
|
||
"exhaustive."
|
||
|
||
#: library/stdtypes.rst:4968
|
||
msgid ":class:`tuple`"
|
||
msgstr ":class:`tuple`"
|
||
|
||
#: library/stdtypes.rst:4969
|
||
msgid ":class:`list`"
|
||
msgstr ":class:`list`"
|
||
|
||
#: library/stdtypes.rst:4970
|
||
msgid ":class:`dict`"
|
||
msgstr ":class:`dict`"
|
||
|
||
#: library/stdtypes.rst:4971
|
||
msgid ":class:`set`"
|
||
msgstr ":class:`set`"
|
||
|
||
#: library/stdtypes.rst:4972
|
||
msgid ":class:`frozenset`"
|
||
msgstr ":class:`frozenset`"
|
||
|
||
#: library/stdtypes.rst:4973
|
||
msgid ":class:`type`"
|
||
msgstr ":class:`type`"
|
||
|
||
#: library/stdtypes.rst:4974
|
||
msgid ":class:`collections.deque`"
|
||
msgstr ":class:`collections.deque`"
|
||
|
||
#: library/stdtypes.rst:4975
|
||
msgid ":class:`collections.defaultdict`"
|
||
msgstr ":class:`collections.defaultdict`"
|
||
|
||
#: library/stdtypes.rst:4976
|
||
msgid ":class:`collections.OrderedDict`"
|
||
msgstr ":class:`collections.OrderedDict`"
|
||
|
||
#: library/stdtypes.rst:4977
|
||
msgid ":class:`collections.Counter`"
|
||
msgstr ":class:`collections.Counter`"
|
||
|
||
#: library/stdtypes.rst:4978
|
||
msgid ":class:`collections.ChainMap`"
|
||
msgstr ":class:`collections.ChainMap`"
|
||
|
||
#: library/stdtypes.rst:4979
|
||
msgid ":class:`collections.abc.Awaitable`"
|
||
msgstr ":class:`collections.abc.Awaitable`"
|
||
|
||
#: library/stdtypes.rst:4980
|
||
msgid ":class:`collections.abc.Coroutine`"
|
||
msgstr ":class:`collections.abc.Coroutine`"
|
||
|
||
#: library/stdtypes.rst:4981
|
||
msgid ":class:`collections.abc.AsyncIterable`"
|
||
msgstr ":class:`collections.abc.AsyncIterable`"
|
||
|
||
#: library/stdtypes.rst:4982
|
||
msgid ":class:`collections.abc.AsyncIterator`"
|
||
msgstr ":class:`collections.abc.AsyncIterator`"
|
||
|
||
#: library/stdtypes.rst:4983
|
||
msgid ":class:`collections.abc.AsyncGenerator`"
|
||
msgstr ":class:`collections.abc.AsyncGenerator`"
|
||
|
||
#: library/stdtypes.rst:4984
|
||
msgid ":class:`collections.abc.Iterable`"
|
||
msgstr ":class:`collections.abc.Iterable`"
|
||
|
||
#: library/stdtypes.rst:4985
|
||
msgid ":class:`collections.abc.Iterator`"
|
||
msgstr ":class:`collections.abc.Iterator`"
|
||
|
||
#: library/stdtypes.rst:4986
|
||
msgid ":class:`collections.abc.Generator`"
|
||
msgstr ":class:`collections.abc.Generator`"
|
||
|
||
#: library/stdtypes.rst:4987
|
||
msgid ":class:`collections.abc.Reversible`"
|
||
msgstr ":class:`collections.abc.Reversible`"
|
||
|
||
#: library/stdtypes.rst:4988
|
||
msgid ":class:`collections.abc.Container`"
|
||
msgstr ":class:`collections.abc.Container`"
|
||
|
||
#: library/stdtypes.rst:4989
|
||
msgid ":class:`collections.abc.Collection`"
|
||
msgstr ":class:`collections.abc.Collection`"
|
||
|
||
#: library/stdtypes.rst:4990
|
||
msgid ":class:`collections.abc.Callable`"
|
||
msgstr ":class:`collections.abc.Callable`"
|
||
|
||
#: library/stdtypes.rst:4991
|
||
msgid ":class:`collections.abc.Set`"
|
||
msgstr ":class:`collections.abc.Set`"
|
||
|
||
#: library/stdtypes.rst:4992
|
||
msgid ":class:`collections.abc.MutableSet`"
|
||
msgstr ":class:`collections.abc.MutableSet`"
|
||
|
||
#: library/stdtypes.rst:4993
|
||
msgid ":class:`collections.abc.Mapping`"
|
||
msgstr ":class:`collections.abc.Mapping`"
|
||
|
||
#: library/stdtypes.rst:4994
|
||
msgid ":class:`collections.abc.MutableMapping`"
|
||
msgstr ":class:`collections.abc.MutableMapping`"
|
||
|
||
#: library/stdtypes.rst:4995
|
||
msgid ":class:`collections.abc.Sequence`"
|
||
msgstr ":class:`collections.abc.Sequence`"
|
||
|
||
#: library/stdtypes.rst:4996
|
||
msgid ":class:`collections.abc.MutableSequence`"
|
||
msgstr ":class:`collections.abc.MutableSequence`"
|
||
|
||
#: library/stdtypes.rst:4997
|
||
msgid ":class:`collections.abc.ByteString`"
|
||
msgstr ":class:`collections.abc.ByteString`"
|
||
|
||
#: library/stdtypes.rst:4998
|
||
msgid ":class:`collections.abc.MappingView`"
|
||
msgstr ":class:`collections.abc.MappingView`"
|
||
|
||
#: library/stdtypes.rst:4999
|
||
msgid ":class:`collections.abc.KeysView`"
|
||
msgstr ":class:`collections.abc.KeysView`"
|
||
|
||
#: library/stdtypes.rst:5000
|
||
msgid ":class:`collections.abc.ItemsView`"
|
||
msgstr ":class:`collections.abc.ItemsView`"
|
||
|
||
#: library/stdtypes.rst:5001
|
||
msgid ":class:`collections.abc.ValuesView`"
|
||
msgstr ":class:`collections.abc.ValuesView`"
|
||
|
||
#: library/stdtypes.rst:5002
|
||
msgid ":class:`contextlib.AbstractContextManager`"
|
||
msgstr ":class:`contextlib.AbstractContextManager`"
|
||
|
||
#: library/stdtypes.rst:5003
|
||
msgid ":class:`contextlib.AbstractAsyncContextManager`"
|
||
msgstr ":class:`contextlib.AbstractAsyncContextManager`"
|
||
|
||
#: library/stdtypes.rst:5004
|
||
msgid ":class:`dataclasses.Field`"
|
||
msgstr ":class:`dataclasses.Field`"
|
||
|
||
#: library/stdtypes.rst:5005
|
||
msgid ":class:`functools.cached_property`"
|
||
msgstr ":class:`functools.cached_property`"
|
||
|
||
#: library/stdtypes.rst:5006
|
||
msgid ":class:`functools.partialmethod`"
|
||
msgstr ":class:`functools.partialmethod`"
|
||
|
||
#: library/stdtypes.rst:5007
|
||
msgid ":class:`os.PathLike`"
|
||
msgstr ":class:`os.PathLike`"
|
||
|
||
#: library/stdtypes.rst:5008
|
||
msgid ":class:`queue.LifoQueue`"
|
||
msgstr ":class:`queue.LifoQueue`"
|
||
|
||
#: library/stdtypes.rst:5009
|
||
msgid ":class:`queue.Queue`"
|
||
msgstr ":class:`queue.Queue`"
|
||
|
||
#: library/stdtypes.rst:5010
|
||
msgid ":class:`queue.PriorityQueue`"
|
||
msgstr ":class:`queue.PriorityQueue`"
|
||
|
||
#: library/stdtypes.rst:5011
|
||
msgid ":class:`queue.SimpleQueue`"
|
||
msgstr ":class:`queue.SimpleQueue`"
|
||
|
||
#: library/stdtypes.rst:5012
|
||
msgid ":ref:`re.Pattern <re-objects>`"
|
||
msgstr ":ref:`re.Pattern <re-objects>`"
|
||
|
||
#: library/stdtypes.rst:5013
|
||
msgid ":ref:`re.Match <match-objects>`"
|
||
msgstr ":ref:`re.Match <match-objects>`"
|
||
|
||
#: library/stdtypes.rst:5014
|
||
msgid ":class:`shelve.BsdDbShelf`"
|
||
msgstr ":class:`shelve.BsdDbShelf`"
|
||
|
||
#: library/stdtypes.rst:5015
|
||
msgid ":class:`shelve.DbfilenameShelf`"
|
||
msgstr ":class:`shelve.DbfilenameShelf`"
|
||
|
||
#: library/stdtypes.rst:5016
|
||
msgid ":class:`shelve.Shelf`"
|
||
msgstr ":class:`shelve.Shelf`"
|
||
|
||
#: library/stdtypes.rst:5017
|
||
msgid ":class:`types.MappingProxyType`"
|
||
msgstr ":class:`types.MappingProxyType`"
|
||
|
||
#: library/stdtypes.rst:5018
|
||
msgid ":class:`weakref.WeakKeyDictionary`"
|
||
msgstr ":class:`weakref.WeakKeyDictionary`"
|
||
|
||
#: library/stdtypes.rst:5019
|
||
msgid ":class:`weakref.WeakMethod`"
|
||
msgstr ":class:`weakref.WeakMethod`"
|
||
|
||
#: library/stdtypes.rst:5020
|
||
msgid ":class:`weakref.WeakSet`"
|
||
msgstr ":class:`weakref.WeakSet`"
|
||
|
||
#: library/stdtypes.rst:5021
|
||
msgid ":class:`weakref.WeakValueDictionary`"
|
||
msgstr ":class:`weakref.WeakValueDictionary`"
|
||
|
||
#: library/stdtypes.rst:5026
|
||
msgid "Special Attributes of ``GenericAlias`` objects"
|
||
msgstr "Attributs spéciaux des alias génériques"
|
||
|
||
#: library/stdtypes.rst:5028
|
||
msgid "All parameterized generics implement special read-only attributes."
|
||
msgstr ""
|
||
"Tous les types génériques pouvant accepter des paramètres implémentent des "
|
||
"attributs spéciaux en lecture seule."
|
||
|
||
#: library/stdtypes.rst:5032
|
||
msgid "This attribute points at the non-parameterized generic class::"
|
||
msgstr "Cet attribut pointe vers la classe générique sans paramètres ::"
|
||
|
||
#: library/stdtypes.rst:5040
|
||
msgid ""
|
||
"This attribute is a :class:`tuple` (possibly of length 1) of generic types "
|
||
"passed to the original :meth:`~object.__class_getitem__` of the generic "
|
||
"class::"
|
||
msgstr ""
|
||
"Cet attribut est un :class:`n-uplet <tuple>` (éventuellement de longueur 1) "
|
||
"de types génériques passés à la :meth:`~object.__class_getitem__` d'origine "
|
||
"de la classe générique ::"
|
||
|
||
#: library/stdtypes.rst:5050
|
||
msgid ""
|
||
"This attribute is a lazily computed tuple (possibly empty) of unique type "
|
||
"variables found in ``__args__``::"
|
||
msgstr ""
|
||
"Cet attribut est un *n*-uplet calculé paresseusement (éventuellement vide) "
|
||
"de variables de type (chaque type n'est mentionné qu'une seule fois) "
|
||
"trouvées dans ``__args__`` ::"
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:5061
|
||
msgid ""
|
||
"A ``GenericAlias`` object with :class:`typing.ParamSpec` parameters may not "
|
||
"have correct ``__parameters__`` after substitution because :class:`typing."
|
||
"ParamSpec` is intended primarily for static type checking."
|
||
msgstr ""
|
||
"un objet ``GenericAlias`` avec des paramètres :class:`typing.ParamSpec` peut "
|
||
"ne pas avoir de ``__parameters__`` corrects après substitution car :class:"
|
||
"`typing.ParamSpec` est principalement destiné à la vérification de type "
|
||
"statique."
|
||
|
||
#: library/stdtypes.rst:5068
|
||
msgid ""
|
||
"A boolean that is true if the alias has been unpacked using the ``*`` "
|
||
"operator (see :data:`~typing.TypeVarTuple`)."
|
||
msgstr ""
|
||
"Booléen qui est vrai si l'alias a été décompressé à l'aide de l'opérateur "
|
||
"``*`` (voir :data:`~typing.TypeVarTuple`)."
|
||
|
||
#: library/stdtypes.rst:5077
|
||
msgid ":pep:`484` - Type Hints"
|
||
msgstr ":pep:`484` - Indications des types (page en anglais)"
|
||
|
||
#: library/stdtypes.rst:5077
|
||
msgid "Introducing Python's framework for type annotations."
|
||
msgstr "Présentation du cadre Python pour les annotations de type."
|
||
|
||
#: library/stdtypes.rst:5082
|
||
msgid ":pep:`585` - Type Hinting Generics In Standard Collections"
|
||
msgstr ""
|
||
":pep:`585` – Types génériques d'indication de type dans les conteneurs "
|
||
"standard (page en anglais)"
|
||
|
||
#: library/stdtypes.rst:5080
|
||
msgid ""
|
||
"Introducing the ability to natively parameterize standard-library classes, "
|
||
"provided they implement the special class method :meth:`~object."
|
||
"__class_getitem__`."
|
||
msgstr ""
|
||
"Présentation de la possibilité de paramétrer nativement les classes de la "
|
||
"bibliothèque standard, à condition qu'elles implémentent la méthode de "
|
||
"classe spéciale :meth:`~object.__class_getitem__`."
|
||
|
||
#: library/stdtypes.rst:5085
|
||
msgid ""
|
||
":ref:`Generics`, :ref:`user-defined generics <user-defined-generics>` and :"
|
||
"class:`typing.Generic`"
|
||
msgstr ""
|
||
":ref:`Génériques <Generics>`, :ref:`génériques personnalisés <user-defined-"
|
||
"generics>` et :class:`typing.Generic`"
|
||
|
||
#: library/stdtypes.rst:5085
|
||
msgid ""
|
||
"Documentation on how to implement generic classes that can be parameterized "
|
||
"at runtime and understood by static type-checkers."
|
||
msgstr ""
|
||
"Documentation sur la façon d'implémenter des classes génériques qui peuvent "
|
||
"être paramétrées à l'exécution et comprises par les vérificateurs de type "
|
||
"statiques."
|
||
|
||
#: library/stdtypes.rst:5094
|
||
msgid "Union Type"
|
||
msgstr "Type Union"
|
||
|
||
#: library/stdtypes.rst:5100
|
||
msgid ""
|
||
"A union object holds the value of the ``|`` (bitwise or) operation on "
|
||
"multiple :ref:`type objects <bltin-type-objects>`. These types are intended "
|
||
"primarily for :term:`type annotations <annotation>`. The union type "
|
||
"expression enables cleaner type hinting syntax compared to :data:`typing."
|
||
"Union`."
|
||
msgstr ""
|
||
"Un objet *union* contient la valeur de l'opération ``|`` (OU bit à bit) sur "
|
||
"plusieurs :ref:`objets types <bltin-type-objects>`. Ces types sont "
|
||
"principalement destinés aux :term:`annotations de types <annotation>`. "
|
||
"L'expression d'union de types permet une syntaxe plus claire pour les "
|
||
"indications de type par rapport à :data:`typing.Union`."
|
||
|
||
#: library/stdtypes.rst:5107
|
||
msgid ""
|
||
"Defines a union object which holds types *X*, *Y*, and so forth. ``X | Y`` "
|
||
"means either X or Y. It is equivalent to ``typing.Union[X, Y]``. For "
|
||
"example, the following function expects an argument of type :class:`int` or :"
|
||
"class:`float`::"
|
||
msgstr ""
|
||
"Définit un objet *union* qui contient les types *X*, *Y*, etc. ``X | Y`` "
|
||
"signifie X ou Y. Cela équivaut à ``typing.Union[X, Y]``. Par exemple, la "
|
||
"fonction suivante attend un argument de type :class:`int` ou :class:"
|
||
"`float` ::"
|
||
|
||
#: library/stdtypes.rst:5117
|
||
msgid ""
|
||
"The ``|`` operand cannot be used at runtime to define unions where one or "
|
||
"more members is a forward reference. For example, ``int | \"Foo\"``, where "
|
||
"``\"Foo\"`` is a reference to a class not yet defined, will fail at runtime. "
|
||
"For unions which include forward references, present the whole expression as "
|
||
"a string, e.g. ``\"int | Foo\"``."
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:5125
|
||
msgid ""
|
||
"Union objects can be tested for equality with other union objects. Details:"
|
||
msgstr ""
|
||
"Les objets *union* peuvent être testés pour savoir s'ils sont égaux à "
|
||
"d'autres objets *union*. Plus en détails :"
|
||
|
||
#: library/stdtypes.rst:5127
|
||
msgid "Unions of unions are flattened::"
|
||
msgstr "Les unions d'unions sont aplaties ::"
|
||
|
||
#: library/stdtypes.rst:5131
|
||
msgid "Redundant types are removed::"
|
||
msgstr "Les types redondants sont supprimés ::"
|
||
|
||
#: library/stdtypes.rst:5135
|
||
msgid "When comparing unions, the order is ignored::"
|
||
msgstr "Lors de la comparaison d'unions, l'ordre est ignoré ::"
|
||
|
||
#: library/stdtypes.rst:5139
|
||
msgid "It is compatible with :data:`typing.Union`::"
|
||
msgstr "Il est compatible avec :data:`typing.Union` ::"
|
||
|
||
#: library/stdtypes.rst:5143
|
||
msgid "Optional types can be spelled as a union with ``None``::"
|
||
msgstr ""
|
||
"Les types optionnels peuvent être orthographiés comme une union avec "
|
||
"``None`` ::"
|
||
|
||
#: library/stdtypes.rst:5150
|
||
msgid ""
|
||
"Calls to :func:`isinstance` and :func:`issubclass` are also supported with a "
|
||
"union object::"
|
||
msgstr ""
|
||
"Les appels à :func:`isinstance` et :func:`issubclass` sont également pris en "
|
||
"charge avec un objet *union* ::"
|
||
|
||
#: library/stdtypes.rst:5156
|
||
#, fuzzy
|
||
msgid ""
|
||
"However, :ref:`parameterized generics <types-genericalias>` in union objects "
|
||
"cannot be checked::"
|
||
msgstr ""
|
||
"Cependant, les objets *union* contenant des :ref:`types génériques acceptant "
|
||
"des paramètres <types-genericalias>` ne peuvent pas être utilisés ::"
|
||
|
||
#: library/stdtypes.rst:5166
|
||
msgid ""
|
||
"The user-exposed type for the union object can be accessed from :data:`types."
|
||
"UnionType` and used for :func:`isinstance` checks. An object cannot be "
|
||
"instantiated from the type::"
|
||
msgstr ""
|
||
"Le type indiqué à l'utilisateur pour l'objet *union* est accessible par :"
|
||
"data:`types.UnionType` et utilisé pour les vérifications :func:`isinstance`. "
|
||
"Un objet ne peut pas être instancié à partir du type ::"
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:5179
|
||
msgid ""
|
||
"The :meth:`__or__` method for type objects was added to support the syntax "
|
||
"``X | Y``. If a metaclass implements :meth:`__or__`, the Union may override "
|
||
"it::"
|
||
msgstr ""
|
||
"la méthode :meth:`__or__` pour les objets de type a été ajoutée pour prendre "
|
||
"en charge la syntaxe ``X | Y``. Si une métaclasse implémente :meth:`__or__`, "
|
||
"l'*union* peut la remplacer ::"
|
||
|
||
#: library/stdtypes.rst:5197
|
||
msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type."
|
||
msgstr ":pep:`604` – PEP proposant la syntaxe ``X | Y`` et le type *Union*."
|
||
|
||
#: library/stdtypes.rst:5205
|
||
msgid "Other Built-in Types"
|
||
msgstr "Autres types natifs"
|
||
|
||
#: library/stdtypes.rst:5207
|
||
msgid ""
|
||
"The interpreter supports several other kinds of objects. Most of these "
|
||
"support only one or two operations."
|
||
msgstr ""
|
||
"L'interpréteur gère aussi d'autres types d'objets, la plupart ne gèrent "
|
||
"cependant qu'une ou deux opérations."
|
||
|
||
#: library/stdtypes.rst:5214
|
||
msgid "Modules"
|
||
msgstr "Modules"
|
||
|
||
#: library/stdtypes.rst:5216
|
||
msgid ""
|
||
"The only special operation on a module is attribute access: ``m.name``, "
|
||
"where *m* is a module and *name* accesses a name defined in *m*'s symbol "
|
||
"table. Module attributes can be assigned to. (Note that the :keyword:"
|
||
"`import` statement is not, strictly speaking, an operation on a module "
|
||
"object; ``import foo`` does not require a module object named *foo* to "
|
||
"exist, rather it requires an (external) *definition* for a module named "
|
||
"*foo* somewhere.)"
|
||
msgstr ""
|
||
"La seule opération spéciale sur un module est l'accès à ses attributs : ``m."
|
||
"name``, où *m* est un module et *name* donne accès un nom défini dans la "
|
||
"table des symboles de *m*. Il est possible d'assigner un attribut de "
|
||
"module. (Notez que l'instruction :keyword:`import` n'est pas strictement "
|
||
"une opération sur un objet module. ``import foo`` ne nécessite pas qu'un "
|
||
"objet module nommé *foo* existe, il nécessite cependant une *définition* "
|
||
"(externe) d'un module nommé *foo* quelque part.)"
|
||
|
||
#: library/stdtypes.rst:5223
|
||
msgid ""
|
||
"A special attribute of every module is :attr:`~object.__dict__`. This is the "
|
||
"dictionary containing the module's symbol table. Modifying this dictionary "
|
||
"will actually change the module's symbol table, but direct assignment to "
|
||
"the :attr:`~object.__dict__` attribute is not possible (you can write ``m."
|
||
"__dict__['a'] = 1``, which defines ``m.a`` to be ``1``, but you can't write "
|
||
"``m.__dict__ = {}``). Modifying :attr:`~object.__dict__` directly is not "
|
||
"recommended."
|
||
msgstr ""
|
||
"Un attribut spécial à chaque module est :attr:`~object.__dict__`. C'est le "
|
||
"dictionnaire contenant la table des symboles du module. Modifier ce "
|
||
"dictionnaire change la table des symboles du module, mais assigner "
|
||
"directement :attr:`~object.__dict__` n'est pas possible (vous pouvez écrire "
|
||
"``m.__dict__['a'] = 1``, qui donne ``1`` comme valeur pour ``m.a``, mais "
|
||
"vous ne pouvez pas écrire ``m.__dict__ = {}``). Modifier :attr:`~object."
|
||
"__dict__` directement n'est pas recommandé."
|
||
|
||
#: library/stdtypes.rst:5231
|
||
msgid ""
|
||
"Modules built into the interpreter are written like this: ``<module "
|
||
"'sys' (built-in)>``. If loaded from a file, they are written as ``<module "
|
||
"'os' from '/usr/local/lib/pythonX.Y/os.pyc'>``."
|
||
msgstr ""
|
||
"Les modules natifs de l'interpréteur sont affichés comme ``<module "
|
||
"'sys' (built-in)>``. S'ils sont chargés depuis un fichier, ils sont "
|
||
"affichés sous la forme ``<module 'os' from '/usr/local/lib/pythonX.Y/os."
|
||
"pyc'>``."
|
||
|
||
#: library/stdtypes.rst:5239
|
||
msgid "Classes and Class Instances"
|
||
msgstr "Les classes et instances de classes"
|
||
|
||
#: library/stdtypes.rst:5241
|
||
msgid "See :ref:`objects` and :ref:`class` for these."
|
||
msgstr "Voir :ref:`objects` et :ref:`class`."
|
||
|
||
#: library/stdtypes.rst:5247
|
||
msgid "Functions"
|
||
msgstr "Fonctions"
|
||
|
||
#: library/stdtypes.rst:5249
|
||
msgid ""
|
||
"Function objects are created by function definitions. The only operation on "
|
||
"a function object is to call it: ``func(argument-list)``."
|
||
msgstr ""
|
||
"Les objets fonctions sont créés par les définitions de fonctions. La seule "
|
||
"opération applicable à un objet fonction est de l'appeler : ``func(argument-"
|
||
"list)``."
|
||
|
||
#: library/stdtypes.rst:5252
|
||
msgid ""
|
||
"There are really two flavors of function objects: built-in functions and "
|
||
"user-defined functions. Both support the same operation (to call the "
|
||
"function), but the implementation is different, hence the different object "
|
||
"types."
|
||
msgstr ""
|
||
"Il existe en fait deux catégories d'objets fonctions : les fonctions natives "
|
||
"et les fonctions définies par l'utilisateur. Les deux gèrent les mêmes "
|
||
"opérations (l'appel à la fonction), mais leur implémentation est différente, "
|
||
"d'où les deux types distincts."
|
||
|
||
#: library/stdtypes.rst:5256
|
||
msgid "See :ref:`function` for more information."
|
||
msgstr "Voir :ref:`function` pour plus d'information."
|
||
|
||
#: library/stdtypes.rst:5262
|
||
msgid "Methods"
|
||
msgstr "Méthodes"
|
||
|
||
#: library/stdtypes.rst:5266
|
||
msgid ""
|
||
"Methods are functions that are called using the attribute notation. There "
|
||
"are two flavors: built-in methods (such as :meth:`append` on lists) and "
|
||
"class instance methods. Built-in methods are described with the types that "
|
||
"support them."
|
||
msgstr ""
|
||
"Les méthodes sont des fonctions appelées *via* la notation d'attribut. Il en "
|
||
"existe deux variantes : les méthodes natives (tel que :meth:`append` sur les "
|
||
"listes) et les méthodes d'instances de classes. Les méthodes natives sont "
|
||
"décrites avec le type qui les gère."
|
||
|
||
#: library/stdtypes.rst:5271
|
||
msgid ""
|
||
"If you access a method (a function defined in a class namespace) through an "
|
||
"instance, you get a special object: a :dfn:`bound method` (also called :dfn:"
|
||
"`instance method`) object. When called, it will add the ``self`` argument to "
|
||
"the argument list. Bound methods have two special read-only attributes: ``m."
|
||
"__self__`` is the object on which the method operates, and ``m.__func__`` is "
|
||
"the function implementing the method. Calling ``m(arg-1, arg-2, ..., arg-"
|
||
"n)`` is completely equivalent to calling ``m.__func__(m.__self__, arg-1, "
|
||
"arg-2, ..., arg-n)``."
|
||
msgstr ""
|
||
"Si vous accédez à une méthode (une fonction définie dans l'espace de nommage "
|
||
"d'une classe) via une instance, vous obtenez un objet spécial, une :dfn:"
|
||
"`bound method` (aussi appelée :dfn:`instance method`). Lorsqu'elle est "
|
||
"appelée, elle ajoute l'argument ``self`` à la liste des arguments. Les "
|
||
"méthodes liées ont deux attributs spéciaux, en lecture seule : ``m."
|
||
"__self__`` est l'objet sur lequel la méthode travaille, et ``m.__func__`` "
|
||
"est la fonction implémentant la méthode. Appeler ``m(arg-1, arg-2, …, arg-"
|
||
"n)`` est tout à fait équivalent à appeler ``m.__func__(m.__self__, arg-1, "
|
||
"arg-2, …, arg-n)``."
|
||
|
||
#: library/stdtypes.rst:5280
|
||
msgid ""
|
||
"Like function objects, bound method objects support getting arbitrary "
|
||
"attributes. However, since method attributes are actually stored on the "
|
||
"underlying function object (``meth.__func__``), setting method attributes on "
|
||
"bound methods is disallowed. Attempting to set an attribute on a method "
|
||
"results in an :exc:`AttributeError` being raised. In order to set a method "
|
||
"attribute, you need to explicitly set it on the underlying function object::"
|
||
msgstr ""
|
||
"Comme les objets fonctions, les objets méthodes liées acceptent des "
|
||
"attributs arbitraires. Cependant, puisque les attributs de méthodes doivent "
|
||
"être stockés dans la fonction sous-jacente (``meth.__func__``), affecter des "
|
||
"attributs à des objets méthodes liées est interdit. Toute tentative "
|
||
"d'affecter un attribut sur un objet méthode liée lève une :exc:"
|
||
"`AttributeError`. Pour affecter l'attribut, vous devez explicitement "
|
||
"l'affecter à l'objet fonction sous-jacent ::"
|
||
|
||
#: library/stdtypes.rst:5331
|
||
msgid "See :ref:`types` for more information."
|
||
msgstr "Voir :ref:`types` pour plus d'information."
|
||
|
||
#: library/stdtypes.rst:5308
|
||
msgid "Code Objects"
|
||
msgstr "Objets code"
|
||
|
||
#: library/stdtypes.rst:5314
|
||
msgid ""
|
||
"Code objects are used by the implementation to represent \"pseudo-compiled\" "
|
||
"executable Python code such as a function body. They differ from function "
|
||
"objects because they don't contain a reference to their global execution "
|
||
"environment. Code objects are returned by the built-in :func:`compile` "
|
||
"function and can be extracted from function objects through their :attr:"
|
||
"`__code__` attribute. See also the :mod:`code` module."
|
||
msgstr ""
|
||
"Les objets code sont utilisés par l'implémentation pour représenter du code "
|
||
"Python « pseudo-compilé », comme un corps de fonction. Ils sont différents "
|
||
"des objets fonction dans le sens où ils ne contiennent pas de référence à "
|
||
"leur environnement global d'exécution. Les objets code sont renvoyés par la "
|
||
"fonction native :func:`compile` et peuvent être obtenus à partir des objets "
|
||
"fonction *via* l' attribut :attr:`__code__`. Voir aussi le module :mod:"
|
||
"`code`."
|
||
|
||
#: library/stdtypes.rst:5321
|
||
msgid ""
|
||
"Accessing ``__code__`` raises an :ref:`auditing event <auditing>` ``object."
|
||
"__getattr__`` with arguments ``obj`` and ``\"__code__\"``."
|
||
msgstr ""
|
||
"L'accès à ``__code__`` déclenche un :ref:`événement d'audit <auditing>` "
|
||
"``object.__getattr__`` avec les arguments ``obj`` et ``\"__code__\"``."
|
||
|
||
#: library/stdtypes.rst:5328
|
||
msgid ""
|
||
"A code object can be executed or evaluated by passing it (instead of a "
|
||
"source string) to the :func:`exec` or :func:`eval` built-in functions."
|
||
msgstr ""
|
||
"Les objets code peuvent être exécutés ou évalués en les passant (au lieu "
|
||
"d'une chaîne contenant du code) aux fonctions natives :func:`exec` ou :func:"
|
||
"`eval`."
|
||
|
||
#: library/stdtypes.rst:5337
|
||
msgid "Type Objects"
|
||
msgstr "Objets type"
|
||
|
||
#: library/stdtypes.rst:5343
|
||
msgid ""
|
||
"Type objects represent the various object types. An object's type is "
|
||
"accessed by the built-in function :func:`type`. There are no special "
|
||
"operations on types. The standard module :mod:`types` defines names for all "
|
||
"standard built-in types."
|
||
msgstr ""
|
||
"Les objets types représentent les différents types d'objets. Le type d'un "
|
||
"objet est obtenu via la fonction native :func:`type`. Il n'existe aucune "
|
||
"opération spéciale sur les types. Le module standard :mod:`types` définit "
|
||
"les noms de tous les types natifs."
|
||
|
||
#: library/stdtypes.rst:5348
|
||
msgid "Types are written like this: ``<class 'int'>``."
|
||
msgstr "Les types sont affichés comme suit : ``<class 'int'>``."
|
||
|
||
#: library/stdtypes.rst:5354
|
||
msgid "The Null Object"
|
||
msgstr "L'objet Null"
|
||
|
||
#: library/stdtypes.rst:5356
|
||
msgid ""
|
||
"This object is returned by functions that don't explicitly return a value. "
|
||
"It supports no special operations. There is exactly one null object, named "
|
||
"``None`` (a built-in name). ``type(None)()`` produces the same singleton."
|
||
msgstr ""
|
||
"Cet objet est renvoyé par les fonctions ne renvoyant pas explicitement une "
|
||
"valeur. Il ne gère aucune opération spéciale. Il existe exactement un seul "
|
||
"objet *null* nommé ``None`` (c'est un nom natif). ``type(None)()`` produit "
|
||
"ce singleton."
|
||
|
||
#: library/stdtypes.rst:5360
|
||
msgid "It is written as ``None``."
|
||
msgstr "Il s'écrit ``None``."
|
||
|
||
#: library/stdtypes.rst:5367
|
||
msgid "The Ellipsis Object"
|
||
msgstr "L'objet points de suspension (ou ellipse)"
|
||
|
||
#: library/stdtypes.rst:5369
|
||
msgid ""
|
||
"This object is commonly used by slicing (see :ref:`slicings`). It supports "
|
||
"no special operations. There is exactly one ellipsis object, named :const:"
|
||
"`Ellipsis` (a built-in name). ``type(Ellipsis)()`` produces the :const:"
|
||
"`Ellipsis` singleton."
|
||
msgstr ""
|
||
"Cet objet est utilisé classiquement lors des découpes (voir :ref:"
|
||
"`slicings`). Il ne gère aucune opération spéciale. Il n'y a qu'un seul objet "
|
||
"*points de suspension*, nommé :const:`Ellipsis` (un nom natif). "
|
||
"``type(Ellipsis)()`` produit le *singleton* :const:`Ellipsis`."
|
||
|
||
#: library/stdtypes.rst:5374
|
||
msgid "It is written as ``Ellipsis`` or ``...``."
|
||
msgstr "Il s'écrit ``Ellipsis`` ou ``...``."
|
||
|
||
#: library/stdtypes.rst:5380
|
||
msgid "The NotImplemented Object"
|
||
msgstr "L'objet *NotImplemented*"
|
||
|
||
#: library/stdtypes.rst:5382
|
||
msgid ""
|
||
"This object is returned from comparisons and binary operations when they are "
|
||
"asked to operate on types they don't support. See :ref:`comparisons` for "
|
||
"more information. There is exactly one ``NotImplemented`` object. "
|
||
"``type(NotImplemented)()`` produces the singleton instance."
|
||
msgstr ""
|
||
"Cet objet est renvoyé depuis des comparaisons ou des opérations binaires "
|
||
"effectuées sur des types qu'elles ne gèrent pas. Voir :ref:`comparisons` "
|
||
"pour plus d'informations. Il n'y a qu'un seul objet ``NotImplemented``. "
|
||
"``type(NotImplemented)()`` renvoie ce *singleton*."
|
||
|
||
#: library/stdtypes.rst:5387
|
||
msgid "It is written as ``NotImplemented``."
|
||
msgstr "Il s'écrit ``NotImplemented``."
|
||
|
||
#: library/stdtypes.rst:5393
|
||
msgid "Boolean Values"
|
||
msgstr "Valeurs booléennes"
|
||
|
||
#: library/stdtypes.rst:5395
|
||
msgid ""
|
||
"Boolean values are the two constant objects ``False`` and ``True``. They "
|
||
"are used to represent truth values (although other values can also be "
|
||
"considered false or true). In numeric contexts (for example when used as "
|
||
"the argument to an arithmetic operator), they behave like the integers 0 and "
|
||
"1, respectively. The built-in function :func:`bool` can be used to convert "
|
||
"any value to a Boolean, if the value can be interpreted as a truth value "
|
||
"(see section :ref:`truth` above)."
|
||
msgstr ""
|
||
"Les valeurs booléennes sont les deux objets constants ``False`` et ``True``. "
|
||
"Ils sont utilisés pour représenter les valeurs de vérité (bien que d'autres "
|
||
"valeurs peuvent être considérées vraies ou fausses). Dans des contextes "
|
||
"numériques (par exemple en argument d'un opérateur arithmétique), ils se "
|
||
"comportent comme les nombres entiers 0 et 1, respectivement. La fonction "
|
||
"native :func:`bool` peut être utilisée pour convertir n'importe quelle "
|
||
"valeur en booléen tant que la valeur peut être interprétée en une valeur de "
|
||
"vérité (voir :ref:`truth` au-dessus)."
|
||
|
||
#: library/stdtypes.rst:5408
|
||
msgid "They are written as ``False`` and ``True``, respectively."
|
||
msgstr "Ils s'écrivent ``False`` et ``True``, respectivement."
|
||
|
||
#: library/stdtypes.rst:5414
|
||
msgid "Internal Objects"
|
||
msgstr "Objets internes"
|
||
|
||
#: library/stdtypes.rst:5416
|
||
msgid ""
|
||
"See :ref:`types` for this information. It describes stack frame objects, "
|
||
"traceback objects, and slice objects."
|
||
msgstr ""
|
||
"Voir :ref:`types`. Ils décrivent les objets *stack frame*, *traceback* et "
|
||
"*slice*."
|
||
|
||
#: library/stdtypes.rst:5423
|
||
msgid "Special Attributes"
|
||
msgstr "Attributs spéciaux"
|
||
|
||
#: library/stdtypes.rst:5425
|
||
msgid ""
|
||
"The implementation adds a few special read-only attributes to several object "
|
||
"types, where they are relevant. Some of these are not reported by the :func:"
|
||
"`dir` built-in function."
|
||
msgstr ""
|
||
"L'implémentation ajoute quelques attributs spéciaux en lecture seule à "
|
||
"certains types, lorsque ça a du sens. Certains ne sont pas listés par la "
|
||
"fonction native :func:`dir`."
|
||
|
||
#: library/stdtypes.rst:5432
|
||
msgid ""
|
||
"A dictionary or other mapping object used to store an object's (writable) "
|
||
"attributes."
|
||
msgstr ""
|
||
"Dictionnaire ou autre objet tableau de correspondances utilisé pour stocker "
|
||
"les attributs (modifiables) de l'objet."
|
||
|
||
#: library/stdtypes.rst:5438
|
||
msgid "The class to which a class instance belongs."
|
||
msgstr "Classe de l'instance de classe."
|
||
|
||
#: library/stdtypes.rst:5443
|
||
msgid "The tuple of base classes of a class object."
|
||
msgstr "*n*-uplet des classes parentes d'un objet classe."
|
||
|
||
#: library/stdtypes.rst:5448
|
||
msgid ""
|
||
"The name of the class, function, method, descriptor, or generator instance."
|
||
msgstr ""
|
||
"Nom de la classe, fonction, méthode, descripteur ou instance du générateur."
|
||
|
||
#: library/stdtypes.rst:5454
|
||
msgid ""
|
||
"The :term:`qualified name` of the class, function, method, descriptor, or "
|
||
"generator instance."
|
||
msgstr ""
|
||
":term:`Nom qualifié <qualified name>` de la classe, fonction, méthode, "
|
||
"descripteur ou instance du générateur."
|
||
|
||
#: library/stdtypes.rst:5462
|
||
msgid ""
|
||
"This attribute is a tuple of classes that are considered when looking for "
|
||
"base classes during method resolution."
|
||
msgstr ""
|
||
"Cet attribut est un *n*-uplet contenant les classes mères prises en compte "
|
||
"lors de la résolution de méthode."
|
||
|
||
#: library/stdtypes.rst:5468
|
||
msgid ""
|
||
"This method can be overridden by a metaclass to customize the method "
|
||
"resolution order for its instances. It is called at class instantiation, "
|
||
"and its result is stored in :attr:`~class.__mro__`."
|
||
msgstr ""
|
||
"Cette méthode peut être surchargée par une méta-classe pour personnaliser "
|
||
"l'ordre de la recherche de méthode pour ses instances. Elle est appelée à "
|
||
"l'initialisation de la classe et son résultat est stocké dans l'attribut :"
|
||
"attr:`~class.__mro__`."
|
||
|
||
#: library/stdtypes.rst:5475
|
||
msgid ""
|
||
"Each class keeps a list of weak references to its immediate subclasses. "
|
||
"This method returns a list of all those references still alive. The list is "
|
||
"in definition order. Example::"
|
||
msgstr ""
|
||
"Chaque classe garde une liste de références faibles à ses classes filles "
|
||
"immédiates. Cette méthode renvoie la liste de toutes ces références encore "
|
||
"valables. La liste est classée par ordre de définition. Par exemple ::"
|
||
|
||
#: library/stdtypes.rst:5486
|
||
msgid "Integer string conversion length limitation"
|
||
msgstr "Limitation de longueur de conversion de chaîne vers un entier"
|
||
|
||
#: library/stdtypes.rst:5488
|
||
msgid ""
|
||
"CPython has a global limit for converting between :class:`int` and :class:"
|
||
"`str` to mitigate denial of service attacks. This limit *only* applies to "
|
||
"decimal or other non-power-of-two number bases. Hexadecimal, octal, and "
|
||
"binary conversions are unlimited. The limit can be configured."
|
||
msgstr ""
|
||
"CPython a une limite globale pour la conversion entre :class:`int` et :class:"
|
||
"`str` pour atténuer les attaques par déni de service. Cette limite "
|
||
"s'applique *uniquement* aux décimaux ou autres bases de nombres qui ne sont "
|
||
"pas des puissances de deux. Les conversions hexadécimales, octales et "
|
||
"binaires sont illimitées. La limite peut être configurée."
|
||
|
||
#: library/stdtypes.rst:5493
|
||
msgid ""
|
||
"The :class:`int` type in CPython is an arbitrary length number stored in "
|
||
"binary form (commonly known as a \"bignum\"). There exists no algorithm that "
|
||
"can convert a string to a binary integer or a binary integer to a string in "
|
||
"linear time, *unless* the base is a power of 2. Even the best known "
|
||
"algorithms for base 10 have sub-quadratic complexity. Converting a large "
|
||
"value such as ``int('1' * 500_000)`` can take over a second on a fast CPU."
|
||
msgstr ""
|
||
"Le type :class:`int` dans CPython stocke un nombre de longueur arbitraire "
|
||
"sous forme binaire (communément appelé « *bignum* »). Il n'existe aucun "
|
||
"algorithme capable de convertir une chaîne en un entier binaire ou un entier "
|
||
"binaire en une chaîne en temps linéaire, sauf si la base est une puissance "
|
||
"de 2. Même les meilleurs algorithmes connus pour la base 10 ont une "
|
||
"complexité sous-quadratique. La conversion d'une grande valeur telle que "
|
||
"``int('1' * 500_000)`` peut prendre plus d'une seconde sur un CPU rapide."
|
||
|
||
#: library/stdtypes.rst:5500
|
||
msgid ""
|
||
"Limiting conversion size offers a practical way to avoid `CVE-2020-10735 "
|
||
"<https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10735>`_."
|
||
msgstr ""
|
||
"Limiter la taille de la conversion offre un moyen pratique de limiter la "
|
||
"vulnérabilité `CVE-2020-10735 <https://cve.mitre.org/cgi-bin/cvename.cgi?"
|
||
"name=CVE-2020-10735>`_."
|
||
|
||
#: library/stdtypes.rst:5503
|
||
msgid ""
|
||
"The limit is applied to the number of digit characters in the input or "
|
||
"output string when a non-linear conversion algorithm would be involved. "
|
||
"Underscores and the sign are not counted towards the limit."
|
||
msgstr ""
|
||
"La limite est appliquée au nombre de caractères numériques dans la chaîne "
|
||
"d'entrée ou de sortie lorsqu'un algorithme de conversion non linéaire doit "
|
||
"être appliqué. Les traits de soulignement et le signe ne sont pas comptés "
|
||
"dans la limite."
|
||
|
||
#: library/stdtypes.rst:5507
|
||
msgid ""
|
||
"When an operation would exceed the limit, a :exc:`ValueError` is raised:"
|
||
msgstr ""
|
||
"Si une opération va dépasser la limite, une :exc:`ValueError` est levée :"
|
||
|
||
#: library/stdtypes.rst:5529
|
||
msgid ""
|
||
"The default limit is 4300 digits as provided in :data:`sys.int_info."
|
||
"default_max_str_digits <sys.int_info>`. The lowest limit that can be "
|
||
"configured is 640 digits as provided in :data:`sys.int_info."
|
||
"str_digits_check_threshold <sys.int_info>`."
|
||
msgstr ""
|
||
"La limite par défaut est de 4 300 chiffres comme indiqué dans :data:`sys."
|
||
"int_info.default_max_str_digits <sys.int_info>`. La limite la plus basse "
|
||
"pouvant être configurée est de 640 chiffres, comme indiqué dans :data:`sys."
|
||
"int_info.str_digits_check_threshold <sys.int_info>`."
|
||
|
||
#: library/stdtypes.rst:5534
|
||
msgid "Verification:"
|
||
msgstr "Vérification :"
|
||
|
||
#: library/stdtypes.rst:5549
|
||
msgid "Affected APIs"
|
||
msgstr "API concernées"
|
||
|
||
#: library/stdtypes.rst:5551
|
||
msgid ""
|
||
"The limitation only applies to potentially slow conversions between :class:"
|
||
"`int` and :class:`str` or :class:`bytes`:"
|
||
msgstr ""
|
||
"La limitation s'applique uniquement aux conversions potentiellement lentes "
|
||
"entre :class:`int` et :class:`str` ou :class:`bytes` :"
|
||
|
||
#: library/stdtypes.rst:5554
|
||
msgid "``int(string)`` with default base 10."
|
||
msgstr "``int(string)`` en base 10 (par défaut)."
|
||
|
||
#: library/stdtypes.rst:5555
|
||
msgid "``int(string, base)`` for all bases that are not a power of 2."
|
||
msgstr ""
|
||
"``int(string, base)`` pour toutes les bases qui ne sont pas des puissances "
|
||
"de 2."
|
||
|
||
#: library/stdtypes.rst:5556
|
||
msgid "``str(integer)``."
|
||
msgstr "``str(integer)``."
|
||
|
||
#: library/stdtypes.rst:5557
|
||
msgid "``repr(integer)``."
|
||
msgstr "``repr(integer)``."
|
||
|
||
#: library/stdtypes.rst:5558
|
||
msgid ""
|
||
"any other string conversion to base 10, for example ``f\"{integer}\"``, "
|
||
"``\"{}\".format(integer)``, or ``b\"%d\" % integer``."
|
||
msgstr ""
|
||
"toute autre conversion de chaîne en base 10, par exemple ``f\"{integer}\"``, "
|
||
"``\"{}\".format(integer)`` ou ``b\"%d\" % integer``."
|
||
|
||
#: library/stdtypes.rst:5561
|
||
msgid "The limitations do not apply to functions with a linear algorithm:"
|
||
msgstr ""
|
||
"Les limitations ne s'appliquent pas aux fonctions avec un algorithme "
|
||
"linéaire :"
|
||
|
||
#: library/stdtypes.rst:5563
|
||
msgid "``int(string, base)`` with base 2, 4, 8, 16, or 32."
|
||
msgstr "``int(chaîne, base)`` en base 2, 4, 8, 16 ou 32."
|
||
|
||
#: library/stdtypes.rst:5564
|
||
msgid ":func:`int.from_bytes` and :func:`int.to_bytes`."
|
||
msgstr ":func:`int.from_bytes` et :func:`int.to_bytes`."
|
||
|
||
#: library/stdtypes.rst:5565
|
||
msgid ":func:`hex`, :func:`oct`, :func:`bin`."
|
||
msgstr ":func:`hex`, :func:`oct`, :func:`bin`."
|
||
|
||
#: library/stdtypes.rst:5566
|
||
msgid ":ref:`formatspec` for hex, octal, and binary numbers."
|
||
msgstr ":ref:`formatspec` pour les nombres hexadécimaux, octaux et binaires."
|
||
|
||
#: library/stdtypes.rst:5567
|
||
msgid ":class:`str` to :class:`float`."
|
||
msgstr ":class:`str` vers :class:`float`."
|
||
|
||
#: library/stdtypes.rst:5568
|
||
msgid ":class:`str` to :class:`decimal.Decimal`."
|
||
msgstr ":class:`str` vers :class:`decimal.Decimal`."
|
||
|
||
#: library/stdtypes.rst:5571
|
||
msgid "Configuring the limit"
|
||
msgstr "Configuration de la limite"
|
||
|
||
#: library/stdtypes.rst:5573
|
||
msgid ""
|
||
"Before Python starts up you can use an environment variable or an "
|
||
"interpreter command line flag to configure the limit:"
|
||
msgstr ""
|
||
"Avant le démarrage de Python, vous pouvez utiliser une variable "
|
||
"d'environnement ou une option de ligne de commande d'interpréteur pour "
|
||
"configurer la limite :"
|
||
|
||
#: library/stdtypes.rst:5576
|
||
msgid ""
|
||
":envvar:`PYTHONINTMAXSTRDIGITS`, e.g. ``PYTHONINTMAXSTRDIGITS=640 python3`` "
|
||
"to set the limit to 640 or ``PYTHONINTMAXSTRDIGITS=0 python3`` to disable "
|
||
"the limitation."
|
||
msgstr ""
|
||
":envvar:`PYTHONINTMAXSTRDIGITS`, par exemple ``PYTHONINTMAXSTRDIGITS=640 "
|
||
"python3`` pour fixer la limite à 640 chiffres ou ``PYTHONINTMAXSTRDIGITS=0 "
|
||
"python3`` pour désactiver la limitation."
|
||
|
||
#: library/stdtypes.rst:5579
|
||
msgid ""
|
||
":option:`-X int_max_str_digits <-X>`, e.g. ``python3 -X "
|
||
"int_max_str_digits=640``"
|
||
msgstr ""
|
||
":option:`-X int_max_str_digits <-X>`, par exemple ``python3 -X "
|
||
"int_max_str_digits=640``"
|
||
|
||
#: library/stdtypes.rst:5581
|
||
msgid ""
|
||
":data:`sys.flags.int_max_str_digits` contains the value of :envvar:"
|
||
"`PYTHONINTMAXSTRDIGITS` or :option:`-X int_max_str_digits <-X>`. If both the "
|
||
"env var and the ``-X`` option are set, the ``-X`` option takes precedence. A "
|
||
"value of *-1* indicates that both were unset, thus a value of :data:`sys."
|
||
"int_info.default_max_str_digits` was used during initialization."
|
||
msgstr ""
|
||
":data:`sys.flags.int_max_str_digits` contient la valeur de :envvar:"
|
||
"`PYTHONINTMAXSTRDIGITS` ou :option:`-X int_max_str_digits <-X>`. Si la "
|
||
"variable d'environnement et l'option ``-X`` sont définies toutes les deux, "
|
||
"l'option ``-X`` est prioritaire. Une valeur de *-1* indique que les deux "
|
||
"n'étaient pas définies, donc qu'une valeur de :data:`sys.int_info."
|
||
"default_max_str_digits` a été utilisée lors de l'initialisation."
|
||
|
||
#: library/stdtypes.rst:5587
|
||
msgid ""
|
||
"From code, you can inspect the current limit and set a new one using these :"
|
||
"mod:`sys` APIs:"
|
||
msgstr ""
|
||
"Depuis le code, vous pouvez inspecter la limite actuelle et en définir une "
|
||
"nouvelle à l'aide de ces API :mod:`sys` :"
|
||
|
||
#: library/stdtypes.rst:5590
|
||
msgid ""
|
||
":func:`sys.get_int_max_str_digits` and :func:`sys.set_int_max_str_digits` "
|
||
"are a getter and setter for the interpreter-wide limit. Subinterpreters have "
|
||
"their own limit."
|
||
msgstr ""
|
||
":func:`sys.get_int_max_str_digits` et :func:`sys.set_int_max_str_digits` "
|
||
"sont un accesseur et un mutateur pour la limite relative à l'interpréteur. "
|
||
"Les sous-interprètes possèdent leur propre limite."
|
||
|
||
#: library/stdtypes.rst:5594
|
||
#, fuzzy
|
||
msgid ""
|
||
"Information about the default and minimum can be found in :data:`sys."
|
||
"int_info`:"
|
||
msgstr ""
|
||
"Des informations sur la valeur par défaut et le minimum peuvent être "
|
||
"trouvées dans :attr:`sys.int_info` :"
|
||
|
||
#: library/stdtypes.rst:5596
|
||
msgid ""
|
||
":data:`sys.int_info.default_max_str_digits <sys.int_info>` is the compiled-"
|
||
"in default limit."
|
||
msgstr ""
|
||
":data:`sys.int_info.default_max_str_digits <sys.int_info>` est la limite par "
|
||
"défaut pour la compilation."
|
||
|
||
#: library/stdtypes.rst:5598
|
||
msgid ""
|
||
":data:`sys.int_info.str_digits_check_threshold <sys.int_info>` is the lowest "
|
||
"accepted value for the limit (other than 0 which disables it)."
|
||
msgstr ""
|
||
":data:`sys.int_info.str_digits_check_threshold <sys.int_info>` est la valeur "
|
||
"la plus basse acceptée pour la limite (autre que 0 qui la désactive)."
|
||
|
||
# suit un :
|
||
#: library/stdtypes.rst:5605
|
||
msgid ""
|
||
"Setting a low limit *can* lead to problems. While rare, code exists that "
|
||
"contains integer constants in decimal in their source that exceed the "
|
||
"minimum threshold. A consequence of setting the limit is that Python source "
|
||
"code containing decimal integer literals longer than the limit will "
|
||
"encounter an error during parsing, usually at startup time or import time or "
|
||
"even at installation time - anytime an up to date ``.pyc`` does not already "
|
||
"exist for the code. A workaround for source that contains such large "
|
||
"constants is to convert them to ``0x`` hexadecimal form as it has no limit."
|
||
msgstr ""
|
||
"fixer une limite basse *peut* entraîner des problèmes. Bien que rare, du "
|
||
"code contenant des constantes entières en décimal dans la source qui dépasse "
|
||
"le seuil minimum peut exister. Une conséquence de la définition de la limite "
|
||
"est que le code source Python contenant des littéraux entiers décimaux plus "
|
||
"longs que la limite lèvera une erreur lors de l'analyse, généralement au "
|
||
"démarrage ou à l'importation ou même au moment de l'installation – dès qu'un "
|
||
"``.pyc`` à jour n'existe pas déjà pour le code. Une solution de "
|
||
"contournement pour les sources qui contiennent de si grandes constantes "
|
||
"consiste à les convertir au format hexadécimal ``0x`` car il n'y a pas de "
|
||
"limite."
|
||
|
||
#: library/stdtypes.rst:5614
|
||
msgid ""
|
||
"Test your application thoroughly if you use a low limit. Ensure your tests "
|
||
"run with the limit set early via the environment or flag so that it applies "
|
||
"during startup and even during any installation step that may invoke Python "
|
||
"to precompile ``.py`` sources to ``.pyc`` files."
|
||
msgstr ""
|
||
"Testez soigneusement votre application si vous utilisez une limite basse. "
|
||
"Assurez-vous que vos tests s'exécutent avec la limite définie au début *via* "
|
||
"l'environnement ou l'option de ligne de commande afin qu'elle s'applique au "
|
||
"démarrage et même lors de toute étape d'installation pouvant invoquer Python "
|
||
"pour compiler les sources ``.py`` en fichiers ``.pyc``."
|
||
|
||
#: library/stdtypes.rst:5620
|
||
msgid "Recommended configuration"
|
||
msgstr "Configuration recommandée"
|
||
|
||
#: library/stdtypes.rst:5622
|
||
msgid ""
|
||
"The default :data:`sys.int_info.default_max_str_digits` is expected to be "
|
||
"reasonable for most applications. If your application requires a different "
|
||
"limit, set it from your main entry point using Python version agnostic code "
|
||
"as these APIs were added in security patch releases in versions before 3.11."
|
||
msgstr ""
|
||
"La valeur par défaut :data:`sys.int_info.default_max_str_digits` devrait "
|
||
"être raisonnable pour la plupart des applications. Si votre application "
|
||
"nécessite une limite différente, définissez-la à partir de votre point "
|
||
"d'entrée principal à l'aide d'un code indépendant de la version Python, car "
|
||
"ces API ont été ajoutées dans des correctifs de sécurité des versions "
|
||
"antérieures à 3.11."
|
||
|
||
#: library/stdtypes.rst:5627
|
||
msgid "Example::"
|
||
msgstr "Par exemple ::"
|
||
|
||
#: library/stdtypes.rst:5639
|
||
msgid "If you need to disable it entirely, set it to ``0``."
|
||
msgstr "Pour la désactiver entièrement, réglez-la à ``0``."
|
||
|
||
#: library/stdtypes.rst:5643
|
||
msgid "Footnotes"
|
||
msgstr "Notes"
|
||
|
||
#: library/stdtypes.rst:5644
|
||
msgid ""
|
||
"Additional information on these special methods may be found in the Python "
|
||
"Reference Manual (:ref:`customization`)."
|
||
msgstr ""
|
||
"Plus d'informations sur ces méthodes spéciales peuvent être trouvées dans le "
|
||
"*Python Reference Manual* (:ref:`customization`)."
|
||
|
||
#: library/stdtypes.rst:5647
|
||
msgid ""
|
||
"As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, "
|
||
"and similarly for tuples."
|
||
msgstr ""
|
||
"Par conséquent, la liste ``[1, 2]`` est considérée égale à ``[1.0, 2.0]``. "
|
||
"Idem avec des *n*-uplets."
|
||
|
||
#: library/stdtypes.rst:5650
|
||
msgid "They must have since the parser can't tell the type of the operands."
|
||
msgstr ""
|
||
"Nécessairement, puisque l'analyseur ne peut pas discerner le type des "
|
||
"opérandes."
|
||
|
||
#: library/stdtypes.rst:5652
|
||
msgid ""
|
||
"Cased characters are those with general category property being one of "
|
||
"\"Lu\" (Letter, uppercase), \"Ll\" (Letter, lowercase), or \"Lt\" (Letter, "
|
||
"titlecase)."
|
||
msgstr ""
|
||
"Les caractères capitalisables sont ceux dont la propriété Unicode *general "
|
||
"category* est soit \"Lu\" (pour *Letter*, *uppercase*), soit \"Ll\" (pour "
|
||
"*Letter*, *lowercase*), soit \"Lt\" (pour *Letter*, *titlecase*)."
|
||
|
||
#: library/stdtypes.rst:5655
|
||
msgid ""
|
||
"To format only a tuple you should therefore provide a singleton tuple whose "
|
||
"only element is the tuple to be formatted."
|
||
msgstr ""
|
||
"Pour insérer un *n*-uplet, vous devez donc donner un *n*-uplet d'un seul "
|
||
"élément, contenant le *n*-uplet à insérer."
|
||
|
||
#: library/stdtypes.rst:13
|
||
#, fuzzy
|
||
msgid "built-in"
|
||
msgstr "Types natifs"
|
||
|
||
#: library/stdtypes.rst:315 library/stdtypes.rst:907 library/stdtypes.rst:1096
|
||
#: library/stdtypes.rst:4370 library/stdtypes.rst:5339
|
||
msgid "types"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1111 library/stdtypes.rst:4370
|
||
msgid "statement"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:34
|
||
msgid "if"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:34
|
||
msgid "while"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:34
|
||
msgid "truth"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:34
|
||
msgid "value"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:80 library/stdtypes.rst:5403
|
||
#, fuzzy
|
||
msgid "Boolean"
|
||
msgstr "Valeurs booléennes"
|
||
|
||
#: library/stdtypes.rst:80 library/stdtypes.rst:390
|
||
#, fuzzy
|
||
msgid "operations"
|
||
msgstr "Opération"
|
||
|
||
#: library/stdtypes.rst:34
|
||
msgid "false"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:44
|
||
msgid "true"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:51
|
||
msgid "None (Built-in object)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:51
|
||
msgid "False (Built-in object)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:97 library/stdtypes.rst:194 library/stdtypes.rst:390
|
||
#: library/stdtypes.rst:907
|
||
#, fuzzy
|
||
msgid "operator"
|
||
msgstr "Opération"
|
||
|
||
#: library/stdtypes.rst:97
|
||
msgid "or"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:97
|
||
#, fuzzy
|
||
msgid "and"
|
||
msgstr "et ::"
|
||
|
||
#: library/stdtypes.rst:5403
|
||
msgid "False"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:5403
|
||
msgid "True"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:97
|
||
msgid "not"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:122
|
||
#, fuzzy
|
||
msgid "chaining"
|
||
msgstr "Signification"
|
||
|
||
#: library/stdtypes.rst:122
|
||
#, fuzzy
|
||
msgid "comparisons"
|
||
msgstr "Comparaisons"
|
||
|
||
#: library/stdtypes.rst:122
|
||
#, fuzzy
|
||
msgid "comparison"
|
||
msgstr "Comparaisons"
|
||
|
||
#: library/stdtypes.rst:122
|
||
msgid "=="
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:122
|
||
msgid "< (less)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:122
|
||
msgid "<="
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:122
|
||
msgid "> (greater)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:122
|
||
msgid ">="
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:122
|
||
msgid "!="
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:122
|
||
msgid "is"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:122
|
||
#, fuzzy
|
||
msgid "is not"
|
||
msgstr "``is not``"
|
||
|
||
#: library/stdtypes.rst:207 library/stdtypes.rst:1074 library/stdtypes.rst:1216
|
||
#: library/stdtypes.rst:1339 library/stdtypes.rst:1497
|
||
#: library/stdtypes.rst:2485 library/stdtypes.rst:4169
|
||
#: library/stdtypes.rst:4841 library/stdtypes.rst:5264
|
||
#: library/stdtypes.rst:5303
|
||
#, fuzzy
|
||
msgid "object"
|
||
msgstr "Objets code"
|
||
|
||
#: library/stdtypes.rst:207 library/stdtypes.rst:315 library/stdtypes.rst:332
|
||
msgid "numeric"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:162
|
||
#, fuzzy
|
||
msgid "objects"
|
||
msgstr "Objets code"
|
||
|
||
#: library/stdtypes.rst:162
|
||
#, fuzzy
|
||
msgid "comparing"
|
||
msgstr "Comparaisons"
|
||
|
||
#: library/stdtypes.rst:172
|
||
msgid "__eq__() (instance method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:172
|
||
msgid "__ne__() (instance method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:172
|
||
msgid "__lt__() (instance method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:172
|
||
msgid "__le__() (instance method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:172
|
||
msgid "__gt__() (instance method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:172
|
||
msgid "__ge__() (instance method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:907
|
||
msgid "in"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:907
|
||
#, fuzzy
|
||
msgid "not in"
|
||
msgstr "``x not in s``"
|
||
|
||
#: library/stdtypes.rst:228 library/stdtypes.rst:390
|
||
msgid "integer"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:228
|
||
#, fuzzy
|
||
msgid "floating point"
|
||
msgstr "*x* converti en nombre à virgule flottante"
|
||
|
||
#: library/stdtypes.rst:228
|
||
msgid "complex number"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:207
|
||
msgid "C"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:207
|
||
msgid "language"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:228
|
||
msgid "literals"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:228
|
||
msgid "hexadecimal"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:228
|
||
msgid "octal"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:228
|
||
msgid "binary"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:245
|
||
msgid "arithmetic"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:907 library/stdtypes.rst:4370 library/stdtypes.rst:5324
|
||
#: library/stdtypes.rst:5339
|
||
msgid "built-in function"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:245
|
||
msgid "int"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:245
|
||
msgid "float"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:245
|
||
#, fuzzy
|
||
msgid "complex"
|
||
msgstr ":func:`complex`"
|
||
|
||
#: library/stdtypes.rst:2342 library/stdtypes.rst:3560
|
||
msgid "+ (plus)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:245
|
||
#, fuzzy
|
||
msgid "unary operator"
|
||
msgstr "Séparateur de groupes"
|
||
|
||
#: library/stdtypes.rst:245
|
||
#, fuzzy
|
||
msgid "binary operator"
|
||
msgstr "Séparateur de ligne"
|
||
|
||
#: library/stdtypes.rst:2342 library/stdtypes.rst:3560
|
||
msgid "- (minus)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:2299 library/stdtypes.rst:3517
|
||
msgid "* (asterisk)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:245
|
||
msgid "/ (slash)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:245
|
||
msgid "//"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:2269 library/stdtypes.rst:3485
|
||
msgid "% (percent)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:245
|
||
msgid "**"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:390 library/stdtypes.rst:1111 library/stdtypes.rst:4370
|
||
#, fuzzy
|
||
msgid "operations on"
|
||
msgstr "Opération"
|
||
|
||
#: library/stdtypes.rst:315
|
||
#, fuzzy
|
||
msgid "conjugate() (complex number method)"
|
||
msgstr "conjugué du nombre complexe *c*"
|
||
|
||
#: library/stdtypes.rst:1563 library/stdtypes.rst:5339
|
||
#, fuzzy
|
||
msgid "module"
|
||
msgstr "Modules"
|
||
|
||
#: library/stdtypes.rst:332
|
||
msgid "math"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:332
|
||
msgid "floor() (in module math)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:332
|
||
msgid "ceil() (in module math)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:332
|
||
msgid "trunc() (in module math)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:332
|
||
#, fuzzy
|
||
msgid "conversions"
|
||
msgstr "Conversion"
|
||
|
||
#: library/stdtypes.rst:390
|
||
msgid "bitwise"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:390
|
||
msgid "shifting"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:390
|
||
msgid "masking"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:390
|
||
msgid "| (vertical bar)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:390
|
||
msgid "^ (caret)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:390
|
||
msgid "& (ampersand)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:390
|
||
msgid "<<"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:390
|
||
msgid ">>"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:390
|
||
msgid "~ (tilde)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:804
|
||
msgid "iterator protocol"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:4756
|
||
msgid "protocol"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:804
|
||
#, fuzzy
|
||
msgid "iterator"
|
||
msgstr "Les types itérateurs"
|
||
|
||
#: library/stdtypes.rst:891 library/stdtypes.rst:1074 library/stdtypes.rst:1111
|
||
msgid "sequence"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:804
|
||
#, fuzzy
|
||
msgid "iteration"
|
||
msgstr "Opération"
|
||
|
||
#: library/stdtypes.rst:804
|
||
msgid "container"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:804
|
||
#, fuzzy
|
||
msgid "iteration over"
|
||
msgstr "Opération"
|
||
|
||
#: library/stdtypes.rst:4370
|
||
msgid "len"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:907
|
||
msgid "min"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:907
|
||
msgid "max"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:907
|
||
msgid "concatenation"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:907
|
||
#, fuzzy
|
||
msgid "operation"
|
||
msgstr "Opération"
|
||
|
||
#: library/stdtypes.rst:907
|
||
#, fuzzy
|
||
msgid "repetition"
|
||
msgstr "Représentation"
|
||
|
||
#: library/stdtypes.rst:1111
|
||
#, fuzzy
|
||
msgid "subscript"
|
||
msgstr "Description"
|
||
|
||
#: library/stdtypes.rst:1111
|
||
msgid "slice"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:907
|
||
msgid "count() (sequence method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:907
|
||
msgid "index() (sequence method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:963
|
||
msgid "loop"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:963
|
||
#, fuzzy
|
||
msgid "over mutable sequence"
|
||
msgstr "Types de séquences immuables"
|
||
|
||
#: library/stdtypes.rst:963
|
||
#, fuzzy
|
||
msgid "mutable sequence"
|
||
msgstr "Types de séquences immuables"
|
||
|
||
#: library/stdtypes.rst:963
|
||
msgid "loop over"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1074
|
||
msgid "immutable"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1295
|
||
#, fuzzy
|
||
msgid "tuple"
|
||
msgstr "*N*-uplets"
|
||
|
||
#: library/stdtypes.rst:1074
|
||
msgid "hash"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1096
|
||
msgid "mutable"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1111 library/stdtypes.rst:1216
|
||
msgid "list"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:2466 library/stdtypes.rst:2664
|
||
#: library/stdtypes.rst:3485
|
||
#, fuzzy
|
||
msgid "bytearray"
|
||
msgstr "Objets *bytearray*"
|
||
|
||
#: library/stdtypes.rst:4370 library/stdtypes.rst:5339
|
||
msgid "type"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1111
|
||
msgid "assignment"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:4370
|
||
msgid "del"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1111
|
||
msgid "append() (sequence method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1111
|
||
msgid "clear() (sequence method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1111
|
||
msgid "copy() (sequence method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1111
|
||
msgid "extend() (sequence method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1111
|
||
msgid "insert() (sequence method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1111
|
||
msgid "pop() (sequence method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1111
|
||
msgid "remove() (sequence method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1111
|
||
msgid "reverse() (sequence method)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1339
|
||
#, fuzzy
|
||
msgid "range"
|
||
msgstr "*Ranges*"
|
||
|
||
#: library/stdtypes.rst:1510 library/stdtypes.rst:2269
|
||
msgid "string"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1461
|
||
#, fuzzy
|
||
msgid "text sequence type"
|
||
msgstr "Types de séquences muables"
|
||
|
||
#: library/stdtypes.rst:1510 library/stdtypes.rst:1528
|
||
#, fuzzy
|
||
msgid "str (built-in class)"
|
||
msgstr "Autres types natifs"
|
||
|
||
#: library/stdtypes.rst:1461
|
||
msgid "(see also string)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:1497
|
||
msgid "io.StringIO"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:2458
|
||
msgid "buffer protocol"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:2466 library/stdtypes.rst:2664
|
||
#: library/stdtypes.rst:3485
|
||
msgid "bytes"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:2664
|
||
#, fuzzy
|
||
msgid "methods"
|
||
msgstr "Méthodes"
|
||
|
||
#: library/stdtypes.rst:1563
|
||
msgid "re"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:3339
|
||
msgid "universal newlines"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:2078
|
||
msgid "str.splitlines method"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:2269
|
||
msgid "formatting, string (%)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:2269
|
||
msgid "interpolation, string (%)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:2269
|
||
msgid "formatting, printf"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:2269
|
||
msgid "interpolation, printf"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:3485
|
||
#, fuzzy
|
||
msgid "printf-style formatting"
|
||
msgstr "Formatage de *bytes* a la ``printf``"
|
||
|
||
#: library/stdtypes.rst:3485
|
||
#, fuzzy
|
||
msgid "sprintf-style formatting"
|
||
msgstr "Formatage de *bytes* a la ``printf``"
|
||
|
||
#: library/stdtypes.rst:3517
|
||
msgid "() (parentheses)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:2342 library/stdtypes.rst:3560
|
||
#, fuzzy
|
||
msgid "in printf-style formatting"
|
||
msgstr "Formatage de *bytes* a la ``printf``"
|
||
|
||
#: library/stdtypes.rst:3517
|
||
msgid ". (dot)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:3560
|
||
msgid "# (hash)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:3560
|
||
msgid "space"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:2458
|
||
#, fuzzy
|
||
msgid "binary sequence types"
|
||
msgstr "Types de séquences muables"
|
||
|
||
#: library/stdtypes.rst:2466
|
||
#, fuzzy
|
||
msgid "memoryview"
|
||
msgstr "Vues mémoire"
|
||
|
||
#: library/stdtypes.rst:2466
|
||
msgid "array"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:3339
|
||
msgid "bytes.splitlines method"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:3339
|
||
msgid "bytearray.splitlines method"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:3485
|
||
msgid "formatting"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:3485
|
||
msgid "bytes (%)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:3485
|
||
#, fuzzy
|
||
msgid "bytearray (%)"
|
||
msgstr "Objets *bytearray*"
|
||
|
||
#: library/stdtypes.rst:3485
|
||
#, fuzzy
|
||
msgid "interpolation"
|
||
msgstr "Tabulation verticale"
|
||
|
||
#: library/stdtypes.rst:4169
|
||
msgid "set"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:4370
|
||
msgid "mapping"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:4370
|
||
msgid "dictionary"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:4453
|
||
msgid "__missing__()"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:4756
|
||
#, fuzzy
|
||
msgid "context manager"
|
||
msgstr "Le type gestionnaire de contexte"
|
||
|
||
#: library/stdtypes.rst:4756
|
||
msgid "context management protocol"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:4756
|
||
#, fuzzy
|
||
msgid "context management"
|
||
msgstr "Le type gestionnaire de contexte"
|
||
|
||
#: library/stdtypes.rst:4829
|
||
msgid "annotation"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:4829
|
||
msgid "type annotation; type hint"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:4841
|
||
#, fuzzy
|
||
msgid "GenericAlias"
|
||
msgstr "Type Alias générique"
|
||
|
||
#: library/stdtypes.rst:4841
|
||
msgid "Generic"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:4841
|
||
msgid "Alias"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:5096
|
||
#, fuzzy
|
||
msgid "Union"
|
||
msgstr "Type Union"
|
||
|
||
#: library/stdtypes.rst:5096
|
||
msgid "union"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:5264
|
||
#, fuzzy
|
||
msgid "method"
|
||
msgstr "Méthodes"
|
||
|
||
#: library/stdtypes.rst:5303
|
||
msgid "code"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:5303
|
||
#, fuzzy
|
||
msgid "code object"
|
||
msgstr "Objets code"
|
||
|
||
#: library/stdtypes.rst:5310
|
||
msgid "compile"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:5310
|
||
msgid "__code__ (function object attribute)"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:5324
|
||
msgid "exec"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:5324
|
||
msgid "eval"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:5363
|
||
msgid "..."
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:5363
|
||
msgid "ellipsis literal"
|
||
msgstr ""
|
||
|
||
#: library/stdtypes.rst:5403
|
||
msgid "values"
|
||
msgstr ""
|
||
|
||
#~ msgid "if *x* is false, then *y*, else *x*"
|
||
#~ msgstr "si *x* est faux, alors *y*, sinon *x*"
|
||
|
||
#~ msgid ""
|
||
#~ "By default, the *errors* argument is not checked for best performances, "
|
||
#~ "but only used at the first encoding error. Enable the :ref:`Python "
|
||
#~ "Development Mode <devmode>`, or use a :ref:`debug build <debug-build>` to "
|
||
#~ "check *errors*."
|
||
#~ msgstr ""
|
||
#~ "Par défaut, l'argument *errors* n'est pas testé, mais seulement utilisé à "
|
||
#~ "la première erreur d'encodage. Activez le :ref:`Python Development Mode "
|
||
#~ "<devmode>`, ou utilisez le :ref:`mode de débogage <debug-build>` pour "
|
||
#~ "vérifier *errors*."
|
||
|
||
#~ msgid "Support for keyword arguments added."
|
||
#~ msgstr "Gestion des arguments par mot-clé."
|
||
|
||
#~ msgid ""
|
||
#~ "By default, the *errors* argument is not checked for best performances, "
|
||
#~ "but only used at the first decoding error. Enable the :ref:`Python "
|
||
#~ "Development Mode <devmode>`, or use a :ref:`debug build <debug-build>` to "
|
||
#~ "check *errors*."
|
||
#~ msgstr ""
|
||
#~ "Par défaut, pour de meilleures performances, l'argument *errors* n'est "
|
||
#~ "pas testé, mais seulement utilisé à la première erreur d'encodage. "
|
||
#~ "Activez le :ref:`Python Development Mode <devmode>`, ou utilisez le :ref:"
|
||
#~ "`mode de débogage <debug-build>` pour vérifier *errors*."
|
||
|
||
#~ msgid ""
|
||
#~ "For Python 2.x users: In the Python 2.x series, a variety of implicit "
|
||
#~ "conversions between 8-bit strings (the closest thing 2.x offers to a "
|
||
#~ "built-in binary data type) and Unicode strings were permitted. This was a "
|
||
#~ "backwards compatibility workaround to account for the fact that Python "
|
||
#~ "originally only supported 8-bit text, and Unicode text was a later "
|
||
#~ "addition. In Python 3.x, those implicit conversions are gone - "
|
||
#~ "conversions between 8-bit binary data and Unicode text must be explicit, "
|
||
#~ "and bytes and string objects will always compare unequal."
|
||
#~ msgstr ""
|
||
#~ "Pour les utilisateurs de Python 2.x : Dans la série 2.x de Python, une "
|
||
#~ "variété de conversions implicites entre les chaînes 8-bit (la chose la "
|
||
#~ "plus proche d'un type natif de données binaires offert par Python 2) et "
|
||
#~ "des chaînes Unicode étaient permises. C'était une solution de "
|
||
#~ "contournement, pour garder la rétro-compatibilité, considérant que Python "
|
||
#~ "ne prenait initialement en charge que le texte 8 bits, le texte Unicode "
|
||
#~ "est un ajout ultérieur. En Python 3.x, ces conversions implicites ont "
|
||
#~ "disparues, les conversions entre les données binaires et texte Unicode "
|
||
#~ "doivent être explicites, et les *bytes* sont toujours différents des "
|
||
#~ "chaînes."
|
||
|
||
#~ msgid ""
|
||
#~ "Dictionaries can be created by placing a comma-separated list of ``key: "
|
||
#~ "value`` pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}"
|
||
#~ "`` or ``{4098: 'jack', 4127: 'sjoerd'}``, or by the :class:`dict` "
|
||
#~ "constructor."
|
||
#~ msgstr ""
|
||
#~ "Il est possible de créer des dictionnaires en plaçant entre accolades une "
|
||
#~ "liste de paires de ``key: value`` séparés par des virgules, par exemple: "
|
||
#~ "``{'jack': 4098, 'sjoerd': 4127}`` ou ``{4098: 'jack', 4127: 'sjoerd'}``, "
|
||
#~ "ou en utilisant le constructeur de :class:`dict`."
|
||
|
||
#~ msgid "``s.pop([i])``"
|
||
#~ msgstr "``s.pop([i])``"
|