1
0
Fork 0
python-docs-fr/library/stdtypes.po

6856 lines
298 KiB
Plaintext
Raw Normal View History

2018-07-04 09:06:45 +00:00
# Copyright (C) 2001-2018, Python Software Foundation
2018-07-04 09:08:42 +00:00
# For licence information, see README file.
2016-10-30 09:46:26 +00:00
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
2018-09-15 20:37:31 +00:00
"POT-Creation-Date: 2018-09-15 21:52+0200\n"
"PO-Revision-Date: 2018-09-15 22:32+0200\n"
2017-05-27 17:46:38 +00:00
"Last-Translator: Julien Palard <julien@palard.fr>\n"
2018-07-04 09:14:25 +00:00
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
2017-05-15 11:29:27 +00:00
"Language: fr\n"
2016-10-30 09:46:26 +00:00
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.5.4\n"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:8
msgid "Built-in Types"
msgstr "Types natifs"
#: ../Doc/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."
#: ../Doc/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."
#: ../Doc/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, "
2016-10-30 09:46:26 +00:00
"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``."
#: ../Doc/library/stdtypes.rst:22
msgid ""
"Some operations are supported by several object types; in particular, "
"practically all objects can be compared, 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, testés "
"(valeur booléenne), et convertis en une chaîne (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 écrit par la fonction :func:"
"`print`."
#: ../Doc/library/stdtypes.rst:32
msgid "Truth Value Testing"
msgstr "Valeurs booléennes"
#: ../Doc/library/stdtypes.rst:41
msgid ""
"Any object can be tested for truth value, for use in an :keyword:`if` or :"
2017-08-01 11:29:09 +00:00
"keyword:`while` condition or as operand of the Boolean operations below."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-08-01 12:16:10 +00:00
"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."
2016-10-30 09:46:26 +00:00
2017-08-01 11:29:09 +00:00
#: ../Doc/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 ""
2017-08-01 22:11:48 +00:00
"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 "
2017-09-22 08:05:00 +00:00
"la majorité des objets natifs considérés comme étant faux :"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:55
2017-08-01 11:29:09 +00:00
msgid "constants defined to be false: ``None`` and ``False``."
2017-08-01 22:11:48 +00:00
msgstr "les constantes définies comme étant fausses : ``None`` et ``False``."
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:57
msgid ""
2017-08-01 11:29:09 +00:00
"zero of any numeric type: ``0``, ``0.0``, ``0j``, ``Decimal(0)``, "
"``Fraction(0, 1)``"
2017-08-01 12:16:10 +00:00
msgstr ""
"zéro de tout type numérique: ``0``, ``0.0``, ``0j``, ``Decimal(0)``, "
"``Fraction(0, 1)``"
2016-10-30 09:46:26 +00:00
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:60
2016-10-30 09:46:26 +00:00
msgid ""
2017-08-01 11:29:09 +00:00
"empty sequences and collections: ``''``, ``()``, ``[]``, ``{}``, ``set()``, "
"``range(0)``"
2016-10-30 09:46:26 +00:00
msgstr ""
2017-08-01 22:11:48 +00:00
"Les chaînes et collections vides : ``''``, ``()``, ``[]``, ``{}``, "
"``set()``, ``range(0)``"
2016-10-30 09:46:26 +00:00
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:69
2016-10-30 09:46:26 +00:00
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 donnent "
"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.)"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:78
2016-10-30 09:46:26 +00:00
msgid "Boolean Operations --- :keyword:`and`, :keyword:`or`, :keyword:`not`"
msgstr ""
"Opérations booléennes --- :keyword:`and`, :keyword:`or`, :keyword:`not`"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:82
2016-10-30 09:46:26 +00:00
msgid "These are the Boolean operations, ordered by ascending priority:"
msgstr "Ce sont les opérations booléennes, classées par priorité ascendante :"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:85 ../Doc/library/stdtypes.rst:143
#: ../Doc/library/stdtypes.rst:271 ../Doc/library/stdtypes.rst:360
#: ../Doc/library/stdtypes.rst:410 ../Doc/library/stdtypes.rst:852
#: ../Doc/library/stdtypes.rst:1047
2016-10-30 09:46:26 +00:00
msgid "Operation"
msgstr "Opération"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:85 ../Doc/library/stdtypes.rst:271
#: ../Doc/library/stdtypes.rst:360 ../Doc/library/stdtypes.rst:410
#: ../Doc/library/stdtypes.rst:852 ../Doc/library/stdtypes.rst:1047
2016-10-30 09:46:26 +00:00
msgid "Result"
msgstr "Résultat"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:85 ../Doc/library/stdtypes.rst:271
#: ../Doc/library/stdtypes.rst:410 ../Doc/library/stdtypes.rst:852
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1047 ../Doc/library/stdtypes.rst:2185
#: ../Doc/library/stdtypes.rst:3307
2016-10-30 09:46:26 +00:00
msgid "Notes"
msgstr "Notes"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:87
2016-10-30 09:46:26 +00:00
msgid "``x or y``"
msgstr "``x or y``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:87
2016-10-30 09:46:26 +00:00
msgid "if *x* is false, then *y*, else *x*"
msgstr "si *x* est faux, alors *y*, sinon *x*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:87 ../Doc/library/stdtypes.rst:281
#: ../Doc/library/stdtypes.rst:854 ../Doc/library/stdtypes.rst:857
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1058 ../Doc/library/stdtypes.rst:2191
#: ../Doc/library/stdtypes.rst:3313
2016-10-30 09:46:26 +00:00
msgid "\\(1)"
msgstr "\\(1)"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:90
2016-10-30 09:46:26 +00:00
msgid "``x and y``"
msgstr "``x and y``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:90
2016-10-30 09:46:26 +00:00
msgid "if *x* is false, then *x*, else *y*"
msgstr "si *x* est faux, alors *x*, sinon *y*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:90 ../Doc/library/stdtypes.rst:284
#: ../Doc/library/stdtypes.rst:304 ../Doc/library/stdtypes.rst:1086
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2195 ../Doc/library/stdtypes.rst:2197
#: ../Doc/library/stdtypes.rst:3317 ../Doc/library/stdtypes.rst:3319
2016-10-30 09:46:26 +00:00
msgid "\\(2)"
msgstr "\\(2)"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:93
2016-10-30 09:46:26 +00:00
msgid "``not x``"
msgstr "``not x``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:93
2016-10-30 09:46:26 +00:00
msgid "if *x* is false, then ``True``, else ``False``"
msgstr "si *x* est faux, alors ``True``, sinon ``False``"
#: ../Doc/library/stdtypes.rst:93 ../Doc/library/stdtypes.rst:866
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1089 ../Doc/library/stdtypes.rst:2199
#: ../Doc/library/stdtypes.rst:2201 ../Doc/library/stdtypes.rst:2203
#: ../Doc/library/stdtypes.rst:2205 ../Doc/library/stdtypes.rst:3321
#: ../Doc/library/stdtypes.rst:3323 ../Doc/library/stdtypes.rst:3325
#: ../Doc/library/stdtypes.rst:3327
2016-10-30 09:46:26 +00:00
msgid "\\(3)"
msgstr "\\(3)"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:102 ../Doc/library/stdtypes.rst:315
#: ../Doc/library/stdtypes.rst:428 ../Doc/library/stdtypes.rst:893
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1097 ../Doc/library/stdtypes.rst:2231
#: ../Doc/library/stdtypes.rst:3357
2016-10-30 09:46:26 +00:00
msgid "Notes:"
msgstr "Notes :"
2016-10-30 09:46:26 +00:00
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:105
2016-10-30 09:46:26 +00:00
msgid ""
"This is a short-circuit operator, so it only evaluates the second argument "
2017-04-02 20:14:06 +00:00
"if the first one is false."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-15 11:29:27 +00:00
"Ceci est un opérateur court-circuit : il n'évalue le deuxième argument que "
"si le premier est faux."
2016-10-30 09:46:26 +00:00
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:109
2016-10-30 09:46:26 +00:00
msgid ""
"This is a short-circuit operator, so it only evaluates the second argument "
2017-04-02 20:14:06 +00:00
"if the first one is true."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-15 11:29:27 +00:00
"Ceci est un opérateur court-circuit, il n'évalue le deuxième argument si le "
"premier est vrai."
2016-10-30 09:46:26 +00:00
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:113
2016-10-30 09:46:26 +00:00
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."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:120
2016-10-30 09:46:26 +00:00
msgid "Comparisons"
msgstr "Comparaisons"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:134
2016-10-30 09:46:26 +00:00
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)."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:140
2016-10-30 09:46:26 +00:00
msgid "This table summarizes the comparison operations:"
msgstr "Ce tableau résume les opérations de comparaison :"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:143 ../Doc/library/stdtypes.rst:2162
#: ../Doc/library/stdtypes.rst:2185 ../Doc/library/stdtypes.rst:3284
#: ../Doc/library/stdtypes.rst:3307
2016-10-30 09:46:26 +00:00
msgid "Meaning"
msgstr "Signification"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:145
2016-10-30 09:46:26 +00:00
msgid "``<``"
msgstr "``<``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:145
2016-10-30 09:46:26 +00:00
msgid "strictly less than"
msgstr "strictement inférieur"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:147
2016-10-30 09:46:26 +00:00
msgid "``<=``"
msgstr "``<=``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:147
2016-10-30 09:46:26 +00:00
msgid "less than or equal"
msgstr "inférieur ou égal"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:149
2016-10-30 09:46:26 +00:00
msgid "``>``"
msgstr "``>``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:149
2016-10-30 09:46:26 +00:00
msgid "strictly greater than"
msgstr "strictement supérieur"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:151
2016-10-30 09:46:26 +00:00
msgid "``>=``"
msgstr "``>=``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:151
2016-10-30 09:46:26 +00:00
msgid "greater than or equal"
msgstr "supérieur ou égal"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:153
2016-10-30 09:46:26 +00:00
msgid "``==``"
msgstr "``==``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:153
2016-10-30 09:46:26 +00:00
msgid "equal"
msgstr "égal"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:155
2016-10-30 09:46:26 +00:00
msgid "``!=``"
msgstr "``!=``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:155
2016-10-30 09:46:26 +00:00
msgid "not equal"
msgstr "différent"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:157
2016-10-30 09:46:26 +00:00
msgid "``is``"
msgstr "``is``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:157
2016-10-30 09:46:26 +00:00
msgid "object identity"
msgstr "identité d'objet"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:159
2016-10-30 09:46:26 +00:00
msgid "``is not``"
msgstr "``is not``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:159
2016-10-30 09:46:26 +00:00
msgid "negated object identity"
msgstr "contraire de l'identité d'objet"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:166
2016-10-30 09:46:26 +00:00
msgid ""
"Objects of different types, except different numeric types, never compare "
"equal. Furthermore, some types (for example, function objects) support only "
"a degenerate notion of comparison where any two objects of that type are "
"unequal. The ``<``, ``<=``, ``>`` and ``>=`` operators will raise a :exc:"
"`TypeError` exception when comparing a complex number with another built-in "
"numeric type, when the objects are of different types that cannot be "
"compared, or in other cases where there is no defined ordering."
msgstr ""
"Les objets de différents types, à l'exception de différents types "
"numériques, ne peuvent en aucun cas être égaux. En outre, certains types "
"(par exemple, les objets fonction) ne gèrent qu'une une notion dégénérée de "
2017-09-22 08:30:36 +00:00
"la comparaison où deux objets de ce type sont inégaux. Les opérateurs ``<``, "
2016-10-30 09:46:26 +00:00
"``<=``, ``>`` et ``>=`` lèvent une exception :exc:`TypeError` lorsqu'on "
"compare un nombre complexe avec un autre type natif numérique, lorsque les "
"objets sont de différents types qui ne peuvent pas être comparés, ou dans "
"d'autres cas où il n'y a pas d'ordre défini."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:182
2016-10-30 09:46:26 +00:00
msgid ""
"Non-identical instances of a class normally compare as non-equal unless the "
"class defines the :meth:`__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:`__eq__`."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:185
2016-10-30 09:46:26 +00:00
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:`__lt__`, :meth:`__le__`, :meth:`__gt__`, and :meth:"
"`__ge__` (in general, :meth:`__lt__` and :meth:`__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:`__lt__`, :"
"meth:`__le__`, :meth:`__gt__` et :meth:`__ge__` (en général, :meth:`__lt__` "
"et :meth:`__eq__` sont suffisantes, si vous voulez les significations "
"classiques des opérateurs de comparaison)."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:191
2016-10-30 09:46:26 +00:00
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 "
2017-09-22 08:30:36 +00:00
"pas être personnalisé ; aussi ils peuvent être appliqués à deux objets "
2016-10-30 09:46:26 +00:00
"quelconques et ne soulèvent jamais d'exception."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:199
2016-10-30 09:46:26 +00:00
msgid ""
"Two more operations with the same syntactic priority, :keyword:`in` and :"
2018-09-15 20:37:31 +00:00
"keyword:`not in`, are supported by types that are :term:`iterable` or "
"implement the :meth:`__contains__` method."
2016-10-30 09:46:26 +00:00
msgstr ""
"Deux autres opérations avec la même priorité syntaxique, :keyword:`in` et :"
2018-09-15 20:37:31 +00:00
"keyword:`not in`, sont pris en charge par les types :term:`itérables "
"<iterable>` ou qui implémentent la méthode :meth:`__contains__`."
2016-10-30 09:46:26 +00:00
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:206
2016-10-30 09:46:26 +00:00
msgid "Numeric Types --- :class:`int`, :class:`float`, :class:`complex`"
msgstr "Types numériques --- :class:`int`, :class:`float`, :class:`complex`"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:216
2016-10-30 09:46:26 +00:00
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:type:`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 additional "
"numeric types, :mod:`fractions` that hold rationals, and :mod:`decimal` that "
"hold floating-point numbers with user-definable precision.)"
msgstr ""
2017-09-22 08:30:36 +00:00
"Il existe trois types numériques distincts: :dfn:`integers` (entiers), :dfn:"
"`floating point numbers` (nombres flottants) et :dfn:`complex numbers` "
"(nombres complexes). 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:type:`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 est disponible dans :data:`sys.float_info`. Les nombres "
"complexes ont une partie réelle et une partie imaginaire, qui sont chacunes "
"des nombres à virgule flottante. Pour extraire ces parties d'un nombre "
"complexe *z*, utilisez ``z.real`` et ``z.imag``. (La bibliothèque standard "
"comprend d'autres types numériques, :mod:`fractions` qui stocke des "
"rationnels et :mod:`decimal` qui stocke les nombres à virgule flottante avec "
"une précision définissable par l'utilisateur.)"
2016-10-30 09:46:26 +00:00
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:238
2016-10-30 09:46:26 +00:00
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 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 un à virgule flottante pour obtenir un "
"nombre complexe avec une partie réelle et une partie imaginaire."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:259
2016-10-30 09:46:26 +00:00
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. Comparisons between numbers "
"of mixed type use the same rule. [2]_ The constructors :func:`int`, :func:"
"`float`, and :func:`complex` can be used to produce numbers of a specific "
"type."
msgstr ""
"Python gère pleinement l'arithmétique mixte : quand un opérateur "
"arithmétique binaire a des opérandes de types numériques différents, "
"l'opérande avec le type \"le plus étroit\" est élargie au type de l'autre, "
"où l'entier est plus étroit que la virgule flottante, qui est plus étroite "
"que les complexes. Les comparaisons entre des nombres de type mixte "
"utilisent la même règle. [2]_ Les constructeurs :func:`int`, :func:`float` "
"et :func:`complex` peuvent être utilisé pour produire des nombres d'un type "
"spécifique."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:266
2016-10-30 09:46:26 +00:00
msgid ""
"All numeric types (except complex) support the following operations, sorted "
"by ascending priority (all numeric operations have a higher priority than "
"comparison operations):"
msgstr ""
"Tous les types numériques (sauf complexe) gèrent les opérations suivantes, "
"classées par priorité ascendante (toutes les opérations numériques ont une "
"priorité plus élevée que les opérations de comparaison) :"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:271
2016-10-30 09:46:26 +00:00
msgid "Full documentation"
msgstr "Documentation complète"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:273
2016-10-30 09:46:26 +00:00
msgid "``x + y``"
msgstr "``x + y``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:273
2016-10-30 09:46:26 +00:00
msgid "sum of *x* and *y*"
msgstr "somme de *x* et *y*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:275
2016-10-30 09:46:26 +00:00
msgid "``x - y``"
msgstr "``x - y``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:275
2016-10-30 09:46:26 +00:00
msgid "difference of *x* and *y*"
msgstr "différence de *x* et *y*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:277
2016-10-30 09:46:26 +00:00
msgid "``x * y``"
msgstr "``x * y``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:277
2016-10-30 09:46:26 +00:00
msgid "product of *x* and *y*"
msgstr "produit de *x* et *y*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:279
2016-10-30 09:46:26 +00:00
msgid "``x / y``"
msgstr "``x / y``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:279
2016-10-30 09:46:26 +00:00
msgid "quotient of *x* and *y*"
msgstr "quotient de *x* et *y*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:281
2016-10-30 09:46:26 +00:00
msgid "``x // y``"
msgstr "``x // y``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:281
2016-10-30 09:46:26 +00:00
msgid "floored quotient of *x* and *y*"
msgstr "quotient entier de *x* et *y*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:284
2016-10-30 09:46:26 +00:00
msgid "``x % y``"
msgstr "``x % y``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:284
2016-10-30 09:46:26 +00:00
msgid "remainder of ``x / y``"
msgstr "reste de ``x / y``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:286
2016-10-30 09:46:26 +00:00
msgid "``-x``"
msgstr "``-x``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:286
2016-10-30 09:46:26 +00:00
msgid "*x* negated"
msgstr "négatif de *x*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:288
2016-10-30 09:46:26 +00:00
msgid "``+x``"
msgstr "``+x``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:288
2016-10-30 09:46:26 +00:00
msgid "*x* unchanged"
msgstr "*x* inchangé"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:290
2016-10-30 09:46:26 +00:00
msgid "``abs(x)``"
msgstr "``abs(x)``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:290
2016-10-30 09:46:26 +00:00
msgid "absolute value or magnitude of *x*"
msgstr "valeur absolue de *x*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:290
2016-10-30 09:46:26 +00:00
msgid ":func:`abs`"
msgstr ":func:`abs`"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:293
2016-10-30 09:46:26 +00:00
msgid "``int(x)``"
msgstr "``int(x)``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:293
2016-10-30 09:46:26 +00:00
msgid "*x* converted to integer"
msgstr "*x* converti en nombre entier"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:293
2016-10-30 09:46:26 +00:00
msgid "\\(3)\\(6)"
msgstr "\\(3)\\(6)"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:293
2016-10-30 09:46:26 +00:00
msgid ":func:`int`"
msgstr ":func:`int`"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:295
2016-10-30 09:46:26 +00:00
msgid "``float(x)``"
msgstr "``float(x)``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:295
2016-10-30 09:46:26 +00:00
msgid "*x* converted to floating point"
msgstr "*x* converti en nombre à virgule flottante"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:295
2016-10-30 09:46:26 +00:00
msgid "\\(4)\\(6)"
msgstr "\\(4)\\(6)"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:295
2016-10-30 09:46:26 +00:00
msgid ":func:`float`"
msgstr ":func:`float`"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:297
2016-10-30 09:46:26 +00:00
msgid "``complex(re, im)``"
msgstr "``complex(re, im)``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:297
2016-10-30 09:46:26 +00:00
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."
#: ../Doc/library/stdtypes.rst:297 ../Doc/library/stdtypes.rst:1079
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2193 ../Doc/library/stdtypes.rst:3344
2016-10-30 09:46:26 +00:00
msgid "\\(6)"
msgstr "\\(6)"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:297
2016-10-30 09:46:26 +00:00
msgid ":func:`complex`"
msgstr ":func:`complex`"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:301
2016-10-30 09:46:26 +00:00
msgid "``c.conjugate()``"
msgstr "``c.conjugate()``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:301
2016-10-30 09:46:26 +00:00
msgid "conjugate of the complex number *c*"
msgstr "conjugué du nombre complexe *c*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:304
2016-10-30 09:46:26 +00:00
msgid "``divmod(x, y)``"
msgstr "``divmod(x, y)``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:304
2016-10-30 09:46:26 +00:00
msgid "the pair ``(x // y, x % y)``"
msgstr "la paire ``(x // y, x % y)``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:304
2016-10-30 09:46:26 +00:00
msgid ":func:`divmod`"
msgstr ":func:`divmod`"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:306
2016-10-30 09:46:26 +00:00
msgid "``pow(x, y)``"
msgstr "``pow(x, y)``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:306 ../Doc/library/stdtypes.rst:308
2016-10-30 09:46:26 +00:00
msgid "*x* to the power *y*"
msgstr "*x* à la puissance *y*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:306 ../Doc/library/stdtypes.rst:308
#: ../Doc/library/stdtypes.rst:1068 ../Doc/library/stdtypes.rst:1071
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2218 ../Doc/library/stdtypes.rst:2221
#: ../Doc/library/stdtypes.rst:2224 ../Doc/library/stdtypes.rst:3340
#: ../Doc/library/stdtypes.rst:3347
2016-10-30 09:46:26 +00:00
msgid "\\(5)"
msgstr "\\(5)"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:306
2016-10-30 09:46:26 +00:00
msgid ":func:`pow`"
msgstr ":func:`pow`"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:308
2016-10-30 09:46:26 +00:00
msgid "``x ** y``"
msgstr "``x ** y``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:318
2016-10-30 09:46:26 +00:00
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``."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:324
2016-10-30 09:46:26 +00:00
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é."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:336
2016-10-30 09:46:26 +00:00
msgid ""
"Conversion from floating point to integer may round or truncate as in C; see "
"functions :func:`math.floor` and :func:`math.ceil` for well-defined "
"conversions."
msgstr ""
"La conversion de virgule flottante en entier peut arrondir ou tronquer comme "
2017-09-22 08:30:36 +00:00
"en C ; voir les fonctions :func:`math.floor` et :func:`math.ceil` pour des "
2016-10-30 09:46:26 +00:00
"conversions bien définies."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:341
2016-10-30 09:46:26 +00:00
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."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:345
2016-10-30 09:46:26 +00:00
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 "
2016-10-30 09:46:26 +00:00
"courant pour les langages de programmation, et logique."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:349
2016-10-30 09:46:26 +00:00
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``)."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:352
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"See http://www.unicode.org/Public/10.0.0/ucd/extracted/DerivedNumericType."
"txt for a complete list of code points with the ``Nd`` property."
2016-10-30 09:46:26 +00:00
msgstr ""
2018-07-05 09:39:28 +00:00
"Voir http://www.unicode.org/Public/10.0.0/ucd/extracted/DerivedNumericType."
2016-10-30 09:46:26 +00:00
"txt pour une liste complète des caractères avec la propriété ``Nd``."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:356
2016-10-30 09:46:26 +00:00
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 :"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:362
2016-10-30 09:46:26 +00:00
msgid ":func:`math.trunc(\\ x) <math.trunc>`"
msgstr ":func:`math.trunc(\\ x) <math.trunc>`"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:362
2016-10-30 09:46:26 +00:00
msgid "*x* truncated to :class:`~numbers.Integral`"
msgstr "*x* tronqué à l':class:`~numbers.Integral`"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:365
2016-10-30 09:46:26 +00:00
msgid ":func:`round(x[, n]) <round>`"
msgstr ":func:`round(x[, n]) <round>`"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:365
2016-10-30 09:46:26 +00:00
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 à 0."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:369
2016-10-30 09:46:26 +00:00
msgid ":func:`math.floor(\\ x) <math.floor>`"
msgstr ":func:`math.floor(\\ x) <math.floor>`"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:369
2016-10-30 09:46:26 +00:00
msgid "the greatest :class:`~numbers.Integral` <= *x*"
msgstr "le plus grand :class:`~numbers.Integral` <= *x*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:372
2016-10-30 09:46:26 +00:00
msgid ":func:`math.ceil(x) <math.ceil>`"
msgstr ":func:`math.ceil(x) <math.ceil>`"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:372
2016-10-30 09:46:26 +00:00
msgid "the least :class:`~numbers.Integral` >= *x*"
msgstr "le plus petit :class:`~numbers.Integral` >= *x*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:376
2016-10-30 09:46:26 +00:00
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`."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:385
2016-10-30 09:46:26 +00:00
msgid "Bitwise Operations on Integer Types"
msgstr "Opérations sur les bits des nombres entiers"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:399
2016-10-30 09:46:26 +00:00
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."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:403
2016-10-30 09:46:26 +00:00
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ération à deux opérandes sur des bits sont "
2017-09-22 08:30:36 +00:00
"inférieures aux opérations numériques et plus élevées que les comparaisons ; "
2016-10-30 09:46:26 +00:00
"l'opération unaire ``~`` a la même priorité que les autres opérations "
"numériques unaires (``+`` et ``-``)."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:407
2016-10-30 09:46:26 +00:00
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 :"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:412
2016-10-30 09:46:26 +00:00
msgid "``x | y``"
msgstr "``x | y``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:412
2016-10-30 09:46:26 +00:00
msgid "bitwise :dfn:`or` of *x* and *y*"
msgstr ":dfn:`ou <or>` binaire de *x* et *y*"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:412 ../Doc/library/stdtypes.rst:415
#: ../Doc/library/stdtypes.rst:418 ../Doc/library/stdtypes.rst:1092
#: ../Doc/library/stdtypes.rst:2207 ../Doc/library/stdtypes.rst:2211
#: ../Doc/library/stdtypes.rst:3329 ../Doc/library/stdtypes.rst:3333
msgid "\\(4)"
msgstr "\\(4)"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:415
2016-10-30 09:46:26 +00:00
msgid "``x ^ y``"
msgstr "``x ^ y``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:415
2016-10-30 09:46:26 +00:00
msgid "bitwise :dfn:`exclusive or` of *x* and *y*"
msgstr ":dfn:`ou <or>` exclusive binaire de *x* et *y*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:418
2016-10-30 09:46:26 +00:00
msgid "``x & y``"
msgstr "``x & y``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:418
2016-10-30 09:46:26 +00:00
msgid "bitwise :dfn:`and` of *x* and *y*"
msgstr ":dfn:`et binaire <and>` de *x* et *y*"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:421
2016-10-30 09:46:26 +00:00
msgid "``x << n``"
msgstr "``x << n``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:421
2016-10-30 09:46:26 +00:00
msgid "*x* shifted left by *n* bits"
msgstr "*x* décalé vers la gauche de *n* bits"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:421
2016-10-30 09:46:26 +00:00
msgid "(1)(2)"
msgstr "(1)(2)"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:423
2016-10-30 09:46:26 +00:00
msgid "``x >> n``"
msgstr "``x >> n``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:423
2016-10-30 09:46:26 +00:00
msgid "*x* shifted right by *n* bits"
msgstr "*x* décalé vers la droite de *n* bits"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:423
2016-10-30 09:46:26 +00:00
msgid "(1)(3)"
msgstr "(1)(3)"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:425
2016-10-30 09:46:26 +00:00
msgid "``~x``"
msgstr "``~x``"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:425
2016-10-30 09:46:26 +00:00
msgid "the bits of *x* inverted"
msgstr "les bits de *x*, inversés"
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:431
2016-10-30 09:46:26 +00:00
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`."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:434
2016-10-30 09:46:26 +00:00
msgid ""
"A left shift by *n* bits is equivalent to multiplication by ``pow(2, n)`` "
"without overflow check."
msgstr ""
"Un décalage à gauche de *n* bits est équivalent à la multiplication par "
"``pow(2, n)`` sans vérification de débordement."
2017-08-01 11:29:09 +00:00
#: ../Doc/library/stdtypes.rst:438
2016-10-30 09:46:26 +00:00
msgid ""
"A right shift by *n* bits is equivalent to division by ``pow(2, n)`` without "
"overflow check."
msgstr ""
"Un décalage à droite de *n* les bits est équivalent à la division par "
"``pow(2, n)`` sans vérification de débordement."
#: ../Doc/library/stdtypes.rst:442
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 ""
#: ../Doc/library/stdtypes.rst:449
2016-10-30 09:46:26 +00:00
msgid "Additional Methods on Integer Types"
msgstr "Méthodes supplémentaires sur les entiers"
#: ../Doc/library/stdtypes.rst:451
2016-10-30 09:46:26 +00:00
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 de base abstraite <abstract base "
"class>` :class:`numbers.Integral`. Il fournit aussi quelques autres "
2017-09-22 08:30:36 +00:00
"méthodes :"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:456
2016-10-30 09:46:26 +00:00
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 : ::"
#: ../Doc/library/stdtypes.rst:465
2016-10-30 09:46:26 +00:00
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``."
#: ../Doc/library/stdtypes.rst:471
2016-10-30 09:46:26 +00:00
msgid "Equivalent to::"
msgstr "Équivalent à : ::"
#: ../Doc/library/stdtypes.rst:482
2016-10-30 09:46:26 +00:00
msgid "Return an array of bytes representing an integer."
msgstr "Renvoie un tableau d'octets représentant un nombre entier."
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:494
2016-10-30 09:46:26 +00:00
msgid ""
"The integer is represented using *length* bytes. An :exc:`OverflowError` is "
"raised if the integer is not representable with the given number of bytes."
msgstr ""
"L'entier est représenté par *length* octets. Une exception :exc:"
"`OverflowError` est levée s'il n'est pas possible de représenter l'entier "
"avec le nombre d'octets donnés."
#: ../Doc/library/stdtypes.rst:498 ../Doc/library/stdtypes.rst:530
2016-10-30 09:46:26 +00:00
msgid ""
"The *byteorder* argument determines the byte order used to represent the "
"integer. 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. 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*."
#: ../Doc/library/stdtypes.rst:505
2016-10-30 09:46:26 +00:00
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``."
#: ../Doc/library/stdtypes.rst:514
2016-10-30 09:46:26 +00:00
msgid "Return the integer represented by the given array of bytes."
msgstr "Done le nombre entier représenté par le tableau d'octets fourni."
#: ../Doc/library/stdtypes.rst:527
2016-10-30 09:46:26 +00:00
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:`bytes-like object` soit un "
"itérable produisant des *bytes*."
#: ../Doc/library/stdtypes.rst:537
2016-10-30 09:46:26 +00:00
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."
#: ../Doc/library/stdtypes.rst:544
2016-10-30 09:46:26 +00:00
msgid "Additional Methods on Float"
msgstr "Méthodes supplémentaires sur les nombres à virgule flottante"
#: ../Doc/library/stdtypes.rst:546
2016-10-30 09:46:26 +00:00
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 de base abstraite <abstract base "
"class>` :class:`numbers.Real` et a également les méthodes suivantes."
#: ../Doc/library/stdtypes.rst:551
2016-10-30 09:46:26 +00:00
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."
#: ../Doc/library/stdtypes.rst:558
2016-10-30 09:46:26 +00:00
msgid ""
"Return ``True`` if the float instance is finite with integral value, and "
"``False`` otherwise::"
msgstr ""
"Donne ``True`` si l'instance de *float* est finie avec une valeur entière, "
"et ``False`` autrement : ::"
#: ../Doc/library/stdtypes.rst:566
2016-10-30 09:46:26 +00:00
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."
#: ../Doc/library/stdtypes.rst:577
2016-10-30 09:46:26 +00:00
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 ""
"Donne 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."
#: ../Doc/library/stdtypes.rst:585
2016-10-30 09:46:26 +00:00
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 chiffre."
#: ../Doc/library/stdtypes.rst:590
2016-10-30 09:46:26 +00:00
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."
#: ../Doc/library/stdtypes.rst:593
2016-10-30 09:46:26 +00:00
msgid "A hexadecimal string takes the form::"
msgstr "Une chaîne hexadécimale prend la forme : ::"
#: ../Doc/library/stdtypes.rst:597
2016-10-30 09:46:26 +00:00
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écimales, 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`."
#: ../Doc/library/stdtypes.rst:610
2016-10-30 09:46:26 +00:00
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`` ::"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:620
2016-10-30 09:46:26 +00:00
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 ::"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:630
2016-10-30 09:46:26 +00:00
msgid "Hashing of numeric types"
msgstr "Hachage des types numériques"
#: ../Doc/library/stdtypes.rst:632
2016-10-30 09:46:26 +00:00
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:`__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`` (``x == y``), pouvant être de "
"différents types, il est une requis que ``hash(x) == hash(y)`` (voir la "
"documentation de :meth:`__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`."
#: ../Doc/library/stdtypes.rst:647
2016-10-30 09:46:26 +00:00
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."
#: ../Doc/library/stdtypes.rst:650
2016-10-30 09:46:26 +00:00
msgid "Here are the rules in detail:"
msgstr "Voici les règles en détail :"
#: ../Doc/library/stdtypes.rst:652
2016-10-30 09:46:26 +00:00
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``."
#: ../Doc/library/stdtypes.rst:656
2016-10-30 09:46:26 +00:00
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 "
2017-09-22 08:30:36 +00:00
"``P`` et la règle ci-dessus n'est pas applicable ; dans ce cas définir "
2016-10-30 09:46:26 +00:00
"``hash(x)`` comme étant la valeur de la constante ``sys.hash_info.inf``."
#: ../Doc/library/stdtypes.rst:661
2016-10-30 09:46:26 +00:00
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``."
#: ../Doc/library/stdtypes.rst:665
2016-10-30 09:46:26 +00:00
msgid ""
"The particular values ``sys.hash_info.inf``, ``-sys.hash_info.inf`` and "
"``sys.hash_info.nan`` are used as hash values for positive infinity, "
"negative infinity, or nans (respectively). (All hashable nans have the same "
"hash value.)"
msgstr ""
"Les valeurs particulières ``sys.hash_info.inf``, ``-sys.hash_info.inf`` et "
"``sys.hash_info.nan`` sont utilisées comme valeurs de hachage pour l'infini "
"positif, l'infini négatif, ou *nans* (respectivement). (Tous les *nans* "
"hachables ont la même valeur de hachage.)"
#: ../Doc/library/stdtypes.rst:670
2016-10-30 09:46:26 +00:00
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``."
#: ../Doc/library/stdtypes.rst:678
2016-10-30 09:46:26 +00:00
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` ::"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:733
2016-10-30 09:46:26 +00:00
msgid "Iterator Types"
msgstr "Les types itérateurs"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:741
2016-10-30 09:46:26 +00:00
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 supporte un concept d'itération sur les conteneurs. C'est implémenté "
"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, supportent toujours les méthodes d'itération."
#: ../Doc/library/stdtypes.rst:746
2016-10-30 09:46:26 +00:00
msgid ""
"One method needs to be defined for container objects to provide iteration "
"support:"
msgstr ""
"Une méthode doit être définie afin que les objets conteneurs supportent "
"l'itération :"
#: ../Doc/library/stdtypes.rst:753
2016-10-30 09:46:26 +00:00
msgid ""
"Return an 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 ""
"Donne un objet itérateur. 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 supportant 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."
#: ../Doc/library/stdtypes.rst:762
2016-10-30 09:46:26 +00:00
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érateur <iterator protocol>` :"
#: ../Doc/library/stdtypes.rst:768
2016-10-30 09:46:26 +00:00
msgid ""
"Return the 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 ""
"Donne l'objet itérateur lui-même. Cela 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."
#: ../Doc/library/stdtypes.rst:776
2016-10-30 09:46:26 +00:00
msgid ""
"Return the next item from the container. 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 ""
"Donne l'élément suivant du conteneur. 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."
#: ../Doc/library/stdtypes.rst:781
2016-10-30 09:46:26 +00:00
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."
#: ../Doc/library/stdtypes.rst:786
2016-10-30 09:46:26 +00:00
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."
"Implémentations qui ne respectent pas cette propriété sont considérées "
"cassées."
#: ../Doc/library/stdtypes.rst:794
2016-10-30 09:46:26 +00:00
msgid "Generator Types"
msgstr "Types générateurs"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:796
2016-10-30 09:46:26 +00:00
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:`generator`\\s 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és dans :ref:`la documentation de l'expression "
"yield <yieldexpr>`."
#: ../Doc/library/stdtypes.rst:808
2016-10-30 09:46:26 +00:00
msgid "Sequence Types --- :class:`list`, :class:`tuple`, :class:`range`"
msgstr "Types séquentiels --- :class:`list`, :class:`tuple`, :class:`range`"
#: ../Doc/library/stdtypes.rst:810
2016-10-30 09:46:26 +00:00
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 basiques: les *lists*, *tuples* et les "
"*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."
#: ../Doc/library/stdtypes.rst:819
2016-10-30 09:46:26 +00:00
msgid "Common Sequence Operations"
msgstr "Opérations communes sur les séquences"
#: ../Doc/library/stdtypes.rst:823
2016-10-30 09:46:26 +00:00
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 pris en charge par la plupart "
"des types séquentiels, variables et immuables. La classe de base abstraite :"
"class:`collections.abc.Sequence` est fournie pour aider à implémenter "
"correctement ces opérations sur les types séquentiels personnalisés."
#: ../Doc/library/stdtypes.rst:828
2016-10-30 09:46:26 +00:00
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*."
#: ../Doc/library/stdtypes.rst:833
2016-10-30 09:46:26 +00:00
msgid ""
"The ``in`` and ``not in`` operations have the same priorities as the "
"comparison operations. The ``+`` (concatenation) and ``*`` (repetition) "
2017-05-27 17:46:38 +00:00
"operations have the same priority as the corresponding numeric operations. "
"[3]_"
2016-10-30 09:46:26 +00:00
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 "
2017-05-27 21:39:44 +00:00
"correspondantes. [3]_"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:854
2016-10-30 09:46:26 +00:00
msgid "``x in s``"
msgstr "``x in s``"
#: ../Doc/library/stdtypes.rst:854
2016-10-30 09:46:26 +00:00
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``"
#: ../Doc/library/stdtypes.rst:857
2016-10-30 09:46:26 +00:00
msgid "``x not in s``"
msgstr "``x not in s``"
#: ../Doc/library/stdtypes.rst:857
2016-10-30 09:46:26 +00:00
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``"
#: ../Doc/library/stdtypes.rst:860
2016-10-30 09:46:26 +00:00
msgid "``s + t``"
msgstr "``s + t``"
#: ../Doc/library/stdtypes.rst:860
2016-10-30 09:46:26 +00:00
msgid "the concatenation of *s* and *t*"
msgstr "la concaténation de *s* et *t*"
#: ../Doc/library/stdtypes.rst:860
2016-10-30 09:46:26 +00:00
msgid "(6)(7)"
msgstr "(6)(7)"
#: ../Doc/library/stdtypes.rst:863
2016-10-30 09:46:26 +00:00
msgid "``s * n`` or ``n * s``"
msgstr "``s * n`` or ``n * s``"
#: ../Doc/library/stdtypes.rst:863
2016-10-30 09:46:26 +00:00
msgid "equivalent to adding *s* to itself *n* times"
msgstr "équivalent à ajouter *s* *n* fois à lui même"
#: ../Doc/library/stdtypes.rst:863
2016-10-30 09:46:26 +00:00
msgid "(2)(7)"
msgstr "(2)(7)"
#: ../Doc/library/stdtypes.rst:866
2016-10-30 09:46:26 +00:00
msgid "``s[i]``"
msgstr "``s[i]``"
#: ../Doc/library/stdtypes.rst:866
2016-10-30 09:46:26 +00:00
msgid "*i*\\ th item of *s*, origin 0"
msgstr "*i*\\ ème élément de *s* en commençant par 0"
#: ../Doc/library/stdtypes.rst:868
2016-10-30 09:46:26 +00:00
msgid "``s[i:j]``"
msgstr "``s[i:j]``"
#: ../Doc/library/stdtypes.rst:868
2016-10-30 09:46:26 +00:00
msgid "slice of *s* from *i* to *j*"
msgstr "tranche (*slice*) de *s* de *i* à *j*"
#: ../Doc/library/stdtypes.rst:868
2016-10-30 09:46:26 +00:00
msgid "(3)(4)"
msgstr "(3)(4)"
#: ../Doc/library/stdtypes.rst:870
2016-10-30 09:46:26 +00:00
msgid "``s[i:j:k]``"
msgstr "``s[i:j:k]``"
#: ../Doc/library/stdtypes.rst:870
2016-10-30 09:46:26 +00:00
msgid "slice of *s* from *i* to *j* with step *k*"
msgstr "tranche (*slice*) de *s* de *i* à *j* avec un pas de *k*"
#: ../Doc/library/stdtypes.rst:870
2016-10-30 09:46:26 +00:00
msgid "(3)(5)"
msgstr "(3)(5)"
#: ../Doc/library/stdtypes.rst:873
2016-10-30 09:46:26 +00:00
msgid "``len(s)``"
msgstr "``len(s)``"
#: ../Doc/library/stdtypes.rst:873
2016-10-30 09:46:26 +00:00
msgid "length of *s*"
msgstr "longueur de *s*"
#: ../Doc/library/stdtypes.rst:875
2016-10-30 09:46:26 +00:00
msgid "``min(s)``"
msgstr "``min(s)``"
#: ../Doc/library/stdtypes.rst:875
2016-10-30 09:46:26 +00:00
msgid "smallest item of *s*"
msgstr "plus petit élément de *s*"
#: ../Doc/library/stdtypes.rst:877
2016-10-30 09:46:26 +00:00
msgid "``max(s)``"
msgstr "``max(s)``"
#: ../Doc/library/stdtypes.rst:877
2016-10-30 09:46:26 +00:00
msgid "largest item of *s*"
msgstr "plus grand élément de *s*"
#: ../Doc/library/stdtypes.rst:879
2016-10-30 09:46:26 +00:00
msgid "``s.index(x[, i[, j]])``"
msgstr "``s.index(x[, i[, j]])``"
#: ../Doc/library/stdtypes.rst:879
2016-10-30 09:46:26 +00:00
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 indice *j*)"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:879 ../Doc/library/stdtypes.rst:3315
2016-10-30 09:46:26 +00:00
msgid "\\(8)"
msgstr "\\(8)"
#: ../Doc/library/stdtypes.rst:883
2016-10-30 09:46:26 +00:00
msgid "``s.count(x)``"
msgstr "``s.count(x)``"
#: ../Doc/library/stdtypes.rst:883
2016-10-30 09:46:26 +00:00
msgid "total number of occurrences of *x* in *s*"
msgstr "nombre total d'occurrences de *x* dans *s*"
#: ../Doc/library/stdtypes.rst:887
2016-10-30 09:46:26 +00:00
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 supportent également la comparaison. En "
"particulier, les *tuples* et les listes sont comparées lexicographiquement "
"en comparant les éléments correspondants. Cela signifie que pour être "
"égales, chaques éléments 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.)"
#: ../Doc/library/stdtypes.rst:896
2016-10-30 09:46:26 +00:00
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 : ::"
#: ../Doc/library/stdtypes.rst:905
2016-10-30 09:46:26 +00:00
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és comme ``0`` (ce qui "
"donne une séquence vide du même type que *s*). Notez que les éléments de *s* "
2017-09-22 08:30:36 +00:00
"ne sont pas copiés ; ils sont référencés plusieurs fois. Cela hante souvent "
2016-10-30 09:46:26 +00:00
"de nouveaux développeurs Python, typiquement : ::"
#: ../Doc/library/stdtypes.rst:917
2016-10-30 09:46:26 +00:00
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 : ::"
#: ../Doc/library/stdtypes.rst:929
2016-10-30 09:46:26 +00:00
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`."
#: ../Doc/library/stdtypes.rst:933
2016-10-30 09:46:26 +00:00
msgid ""
2017-04-02 20:14:06 +00:00
"If *i* or *j* is negative, the index is relative to the end of sequence *s*: "
2016-10-30 09:46:26 +00:00
"``len(s) + i`` or ``len(s) + j`` is substituted. But note that ``-0`` is "
"still ``0``."
msgstr ""
2017-05-15 11:29:27 +00:00
"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``."
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:938
2016-10-30 09:46:26 +00:00
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'indice *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érieure ou égale à *j*, la tranche est vide."
#: ../Doc/library/stdtypes.rst:945
2016-10-30 09:46:26 +00:00
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, "
2017-04-02 20:14:06 +00:00
"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``."
2016-10-30 09:46:26 +00:00
msgstr ""
"La tranche de *s* de *i* à *j* avec un pas de *k* est définie comme la "
"séquence d'éléments d'indice ``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 "
2017-05-15 11:29:27 +00:00
"*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 \"extrêmes\" (où l'ordre dépend du signe de *k*). "
"Remarquez, *k* ne peut pas valoir zéro. Si *k* est ``None``, il est traité "
"comme ``1``."
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:956
2016-10-30 09:46:26 +00:00
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 :"
#: ../Doc/library/stdtypes.rst:961
2016-10-30 09:46:26 +00:00
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 concatennez 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é"
#: ../Doc/library/stdtypes.rst:965
2016-10-30 09:46:26 +00:00
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 concatennez des :class:`bytes`, vous pouvez aussi utiliser :meth:"
"`bytes.join` ou :class:`io.BytesIO`, ou vous pouvez faire les concaténation "
"sur place avec un objet :class:`bytearray`. Les objets :class:`bytearray` "
"sont muables et ont un mécanisme de sur-allocation efficace"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:970
2016-10-30 09:46:26 +00:00
msgid "if concatenating :class:`tuple` objects, extend a :class:`list` instead"
msgstr ""
"si vous concatennez des :class:`tuple`, utilisez plutôt *extend* sur une :"
"class:`list`"
#: ../Doc/library/stdtypes.rst:972
2016-10-30 09:46:26 +00:00
msgid "for other types, investigate the relevant class documentation"
msgstr ""
"pour d'autres types, cherchez dans la documentation de la classe concernée"
#: ../Doc/library/stdtypes.rst:976
2016-10-30 09:46:26 +00:00
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équenciels (tels que :class:`range`) ne supportent 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."
#: ../Doc/library/stdtypes.rst:981
2018-01-04 14:57:05 +00:00
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."
2016-10-30 09:46:26 +00:00
msgstr ""
"``index`` lève une exception :exc:`ValueError` quand *x* ne se trouve pas "
2018-05-08 15:15:16 +00:00
"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 "
2018-05-11 17:37:20 +00:00
"plus ou moins équivalent à ``s[i:j].index(x)``, sans copier les données ; "
2018-05-08 15:15:16 +00:00
"l'indice renvoyé alors relatif au début de la séquence plutôt qu'au début de "
"la tranche."
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:992
2016-10-30 09:46:26 +00:00
msgid "Immutable Sequence Types"
msgstr "Types de séquences immuables"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:999
2016-10-30 09:46:26 +00:00
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 qui "
"n'est pas implémentée par les types de séquences muables est le support de "
2016-10-30 09:46:26 +00:00
"la fonction native :func:`hash`."
#: ../Doc/library/stdtypes.rst:1003
2016-10-30 09:46:26 +00:00
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 "
2016-10-30 09:46:26 +00:00
"instances de :class:`tuple`, en tant que clés de :class:`dict` et stockées "
"dans les instances de :class:`set` et :class:`frozenset`."
#: ../Doc/library/stdtypes.rst:1007
2016-10-30 09:46:26 +00:00
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èvera une :exc:`TypeError`."
#: ../Doc/library/stdtypes.rst:1014
2016-10-30 09:46:26 +00:00
msgid "Mutable Sequence Types"
msgstr "Types de séquences muables"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1021
2016-10-30 09:46:26 +00:00
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 de base abstraite :class:`collections.abc."
2016-10-30 09:46:26 +00:00
"MutableSequence` est prévue pour faciliter l'implémentation correcte de ces "
"opérations sur les types de séquence personnalisées."
#: ../Doc/library/stdtypes.rst:1025
2016-10-30 09:46:26 +00:00
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 *s* est une instance d'un type de séquence muable, *t* est "
2016-10-30 09:46:26 +00:00
"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``)."
#: ../Doc/library/stdtypes.rst:1049
2016-10-30 09:46:26 +00:00
msgid "``s[i] = x``"
msgstr "``s[i] = x``"
#: ../Doc/library/stdtypes.rst:1049
2016-10-30 09:46:26 +00:00
msgid "item *i* of *s* is replaced by *x*"
msgstr "element *i* de *s* est remplacé par *x*"
#: ../Doc/library/stdtypes.rst:1052
2016-10-30 09:46:26 +00:00
msgid "``s[i:j] = t``"
msgstr "``s[i:j] = t``"
#: ../Doc/library/stdtypes.rst:1052
2016-10-30 09:46:26 +00:00
msgid ""
"slice of *s* from *i* to *j* is replaced by the contents of the iterable *t*"
msgstr ""
"tranche de *s* de *i* à *j* est remplacée par le contenu de l'itérable *t*"
#: ../Doc/library/stdtypes.rst:1056
2016-10-30 09:46:26 +00:00
msgid "``del s[i:j]``"
msgstr "``del s[i:j]``"
#: ../Doc/library/stdtypes.rst:1056
2016-10-30 09:46:26 +00:00
msgid "same as ``s[i:j] = []``"
msgstr "identique à ``s[i:j] = []``"
#: ../Doc/library/stdtypes.rst:1058
2016-10-30 09:46:26 +00:00
msgid "``s[i:j:k] = t``"
msgstr "``s[i:j:k] = t``"
#: ../Doc/library/stdtypes.rst:1058
2016-10-30 09:46:26 +00:00
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*"
#: ../Doc/library/stdtypes.rst:1061
2016-10-30 09:46:26 +00:00
msgid "``del s[i:j:k]``"
msgstr "``del s[i:j:k]``"
#: ../Doc/library/stdtypes.rst:1061
2016-10-30 09:46:26 +00:00
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"
#: ../Doc/library/stdtypes.rst:1064
2016-10-30 09:46:26 +00:00
msgid "``s.append(x)``"
msgstr "``s.append(x)``"
#: ../Doc/library/stdtypes.rst:1064
2016-10-30 09:46:26 +00:00
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]``)"
#: ../Doc/library/stdtypes.rst:1068
2016-10-30 09:46:26 +00:00
msgid "``s.clear()``"
msgstr "``s.clear()``"
#: ../Doc/library/stdtypes.rst:1068
2018-09-15 20:37:31 +00:00
msgid "removes all items from *s* (same as ``del s[:]``)"
msgstr "supprime tous les éléments de *s* (identique à ``del s[:]``)"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1071
2016-10-30 09:46:26 +00:00
msgid "``s.copy()``"
msgstr "``s.copy()``"
#: ../Doc/library/stdtypes.rst:1071
2018-09-15 20:37:31 +00:00
msgid "creates a shallow copy of *s* (same as ``s[:]``)"
msgstr "crée une copie superficielle de *s* (identique à ``s[:]``)"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1074
2016-10-30 09:46:26 +00:00
msgid "``s.extend(t)`` or ``s += t``"
msgstr "``s.extend(t)`` or ``s += t``"
#: ../Doc/library/stdtypes.rst:1074
2016-10-30 09:46:26 +00:00
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``)"
#: ../Doc/library/stdtypes.rst:1079
2016-10-30 09:46:26 +00:00
msgid "``s *= n``"
msgstr "``s *= n``"
#: ../Doc/library/stdtypes.rst:1079
2016-10-30 09:46:26 +00:00
msgid "updates *s* with its contents repeated *n* times"
msgstr "met à jour *s* avec son contenu répété *n* fois"
#: ../Doc/library/stdtypes.rst:1082
2016-10-30 09:46:26 +00:00
msgid "``s.insert(i, x)``"
msgstr "``s.insert(i, x)``"
#: ../Doc/library/stdtypes.rst:1082
2016-10-30 09:46:26 +00:00
msgid ""
"inserts *x* into *s* at the index given by *i* (same as ``s[i:i] = [x]``)"
msgstr ""
"insère *x* dans *s* à l'index donné par *i* (identique à ``s[i:i] = [x]``)"
#: ../Doc/library/stdtypes.rst:1086
2016-10-30 09:46:26 +00:00
msgid "``s.pop([i])``"
msgstr "``s.pop([i])``"
#: ../Doc/library/stdtypes.rst:1086
2016-10-30 09:46:26 +00:00
msgid "retrieves the item at *i* and also removes it from *s*"
msgstr "récupère l'élément à *i* et le supprime de *s*"
#: ../Doc/library/stdtypes.rst:1089
2016-10-30 09:46:26 +00:00
msgid "``s.remove(x)``"
msgstr "``s.remove(x)``"
#: ../Doc/library/stdtypes.rst:1089
2018-06-28 13:32:56 +00:00
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*"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1092
2016-10-30 09:46:26 +00:00
msgid "``s.reverse()``"
msgstr "``s.reverse()``"
#: ../Doc/library/stdtypes.rst:1092
2016-10-30 09:46:26 +00:00
msgid "reverses the items of *s* in place"
msgstr "inverse sur place les éléments de *s*"
#: ../Doc/library/stdtypes.rst:1100
2016-10-30 09:46:26 +00:00
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."
#: ../Doc/library/stdtypes.rst:1103
2016-10-30 09:46:26 +00:00
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é."
#: ../Doc/library/stdtypes.rst:1107
2016-10-30 09:46:26 +00:00
msgid "``remove`` raises :exc:`ValueError` when *x* is not found in *s*."
msgstr ""
"``remove`` lève une exception :exc:`ValueError` si *x* ne se trouve pas dans "
"*s*."
#: ../Doc/library/stdtypes.rst:1110
2016-10-30 09:46:26 +00:00
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 les 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."
#: ../Doc/library/stdtypes.rst:1115
2016-10-30 09:46:26 +00:00
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`)"
msgstr ""
":meth:`clear` et :meth:`!copy` sont inclues pour la compatibilité avec les "
"interfaces des conteneurs muables qui ne supportent pas les opérations de "
2016-10-30 09:46:26 +00:00
"découpage (comme :class:`dict` et :class:`set`)"
#: ../Doc/library/stdtypes.rst:1119
2016-10-30 09:46:26 +00:00
msgid ":meth:`clear` and :meth:`!copy` methods."
msgstr "méthodes :meth:`clear` et :meth:`!copy`."
#: ../Doc/library/stdtypes.rst:1123
2016-10-30 09:46:26 +00:00
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 "
2017-09-22 08:30:36 +00:00
"séquence. Les éléments dans la séquence ne sont pas copiés ; ils sont "
2016-10-30 09:46:26 +00:00
"référencés plusieurs fois, comme expliqué pour ``s * n`` dans :ref:`typesseq-"
"common`."
#: ../Doc/library/stdtypes.rst:1132
2016-10-30 09:46:26 +00:00
msgid "Lists"
msgstr "Listes"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1136
2016-10-30 09:46:26 +00:00
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 "
2016-10-30 09:46:26 +00:00
"des collections d'éléments homogènes (où le degré de similitude variera "
"selon l'usage)."
#: ../Doc/library/stdtypes.rst:1142
2016-10-30 09:46:26 +00:00
msgid "Lists may be constructed in several ways:"
msgstr "Les listes peuvent être construites de différentes manières :"
#: ../Doc/library/stdtypes.rst:1144
2016-10-30 09:46:26 +00:00
msgid "Using a pair of square brackets to denote the empty list: ``[]``"
msgstr ""
"En utilisant une paire de crochets pour indiquer une liste vide : ``[]``"
#: ../Doc/library/stdtypes.rst:1145
2016-10-30 09:46:26 +00:00
msgid ""
"Using square brackets, separating items with commas: ``[a]``, ``[a, b, c]``"
msgstr ""
"Au moyen de crochets, séparant les éléments par des virgules : ``[a]``, "
"``[a, b, c]``"
#: ../Doc/library/stdtypes.rst:1146
2016-10-30 09:46:26 +00:00
msgid "Using a list comprehension: ``[x for x in iterable]``"
msgstr "En utilisant une liste en compréhension : ``[x for x in iterable]``"
#: ../Doc/library/stdtypes.rst:1147
2016-10-30 09:46:26 +00:00
msgid "Using the type constructor: ``list()`` or ``list(iterable)``"
msgstr ""
"En utilisant le constructeur du type : ``list()`` ou ``list(iterable)``"
#: ../Doc/library/stdtypes.rst:1149
2016-10-30 09:46:26 +00:00
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 soit une "
"séquence, un conteneur qui supporte l'itération, soit 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, ``[]``."
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1158
2016-10-30 09:46:26 +00:00
msgid ""
"Many other operations also produce lists, including the :func:`sorted` built-"
"in."
msgstr ""
"De nombreuses autres opérations produisent des listes, tel que la fonction "
"native :func:`sorted`."
#: ../Doc/library/stdtypes.rst:1161
2016-10-30 09:46:26 +00:00
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 supportent toutes les opérations des séquences :ref:`communes "
"<typesseq-common>` et :ref:`muables <typesseq-mutable>`. Les listes "
2017-09-22 08:30:36 +00:00
"fournissent également la méthode supplémentaire suivante :"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1167
2016-10-30 09:46:26 +00:00
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 échouera (et "
"la liste sera probablement laissée dans un état partiellement modifié)."
#: ../Doc/library/stdtypes.rst:1172
2016-10-30 09:46:26 +00:00
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 par mot-"
"clé (:ref:`keyword-only arguments <keyword-only_parameter>`):"
#: ../Doc/library/stdtypes.rst:1175
2016-10-30 09:46:26 +00:00
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 en calculer "
"une valeur \"clé\" séparée."
#: ../Doc/library/stdtypes.rst:1182
2016-10-30 09:46:26 +00:00
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*."
#: ../Doc/library/stdtypes.rst:1185
2016-10-30 09:46:26 +00:00
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."
#: ../Doc/library/stdtypes.rst:1188
2016-10-30 09:46:26 +00:00
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)."
#: ../Doc/library/stdtypes.rst:1193
2016-10-30 09:46:26 +00:00
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 département, puis par "
"niveau de salaire)."
#: ../Doc/library/stdtypes.rst:1200
2016-10-30 09:46:26 +00:00
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'elle se "
"fait trier est indéfini. L'implémentation C de Python fait apparaître la "
"liste comme vide pour la durée du traitement, et soulève :exc:`ValueError` "
"si elle détecte que la liste a été modifiée au cours du tri."
#: ../Doc/library/stdtypes.rst:1209
2016-10-30 09:46:26 +00:00
msgid "Tuples"
msgstr "Tuples"
#: ../Doc/library/stdtypes.rst:1213
2016-10-30 09:46:26 +00:00
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 ""
2017-09-22 14:07:50 +00:00
"Les tuples (*n-uplets* en français) sont des séquences immuables, "
"généralement utilisées pour stocker des collections de données hétérogènes "
"(tels que les tuples de deux éléments produits par la fonction native :func:"
"`enumerate`). Les tuples 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:`set` ou un :class:`dict`)."
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1221
2016-10-30 09:46:26 +00:00
msgid "Tuples may be constructed in a number of ways:"
msgstr "Les tuples peuvent être construits de différentes façons :"
#: ../Doc/library/stdtypes.rst:1223
2016-10-30 09:46:26 +00:00
msgid "Using a pair of parentheses to denote the empty tuple: ``()``"
msgstr ""
"En utilisant une paire de parenthèses pour désigner le tuple vide : ``()``"
#: ../Doc/library/stdtypes.rst:1224
2016-10-30 09:46:26 +00:00
msgid "Using a trailing comma for a singleton tuple: ``a,`` or ``(a,)``"
msgstr ""
"En utilisant une virgule, pour créer un tuple d'un élément : ``a,`` ou "
"``(a,)``"
#: ../Doc/library/stdtypes.rst:1225
2016-10-30 09:46:26 +00:00
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)``"
#: ../Doc/library/stdtypes.rst:1226
2016-10-30 09:46:26 +00:00
msgid "Using the :func:`tuple` built-in: ``tuple()`` or ``tuple(iterable)``"
msgstr ""
"En utilisant la fonction native :func:`tuple` : ``tuple()`` ou "
"``tuple(iterable)``"
#: ../Doc/library/stdtypes.rst:1228
2016-10-30 09:46:26 +00:00
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 tuple dont les éléments sont les mêmes et dans "
"le même ordre que les éléments de *iterable*. *iterable* peut être soit une "
"séquence, un conteneur qui supporte l'itération, soit un itérateur. Si "
"*iterable* est déjà un tuple, il est renvoyé inchangé. Par exemple, "
"``tuple('abc')`` renvoie ``('a', 'b', 'c')`` et ``tuple( [1, 2, 3] )`` "
"renvoie ``(1, 2, 3)``. Si aucun argument est donné, le constructeur crée un "
2016-10-30 09:46:26 +00:00
"nouveau tuple vide, ``()``."
#: ../Doc/library/stdtypes.rst:1236
2016-10-30 09:46:26 +00:00
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 ""
2017-09-22 08:30:36 +00:00
"Notez que c'est en fait la virgule qui fait un tuple et non les parenthèses. "
2016-10-30 09:46:26 +00:00
"Les parenthèses sont facultatives, sauf dans le cas du tuple 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 tuple de trois "
"éléments comme unique argument."
#: ../Doc/library/stdtypes.rst:1242
2016-10-30 09:46:26 +00:00
msgid ""
"Tuples implement all of the :ref:`common <typesseq-common>` sequence "
"operations."
msgstr ""
"Les tuples implémentent toutes les opérations :ref:`communes <typesseq-"
"common>` des séquences."
#: ../Doc/library/stdtypes.rst:1245
2016-10-30 09:46:26 +00:00
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 index, :func:`collections.namedtuple` peut être un "
"choix plus approprié qu'un simple tuple."
#: ../Doc/library/stdtypes.rst:1253
2016-10-30 09:46:26 +00:00
msgid "Ranges"
msgstr "*Ranges*"
#: ../Doc/library/stdtypes.rst:1257
2016-10-30 09:46:26 +00:00
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`."
#: ../Doc/library/stdtypes.rst:1264
2016-10-30 09:46:26 +00:00
msgid ""
"The arguments to the range constructor must be integers (either built-in :"
"class:`int` or any object that implements the ``__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 "
"``__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."
#: ../Doc/library/stdtypes.rst:1270
2016-10-30 09:46:26 +00:00
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``."
#: ../Doc/library/stdtypes.rst:1274
2016-10-30 09:46:26 +00:00
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``."
#: ../Doc/library/stdtypes.rst:1278
2016-10-30 09:46:26 +00:00
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 une indexation de la fin de la séquence déterminée "
"par les indices positifs."
#: ../Doc/library/stdtypes.rst:1283
2016-10-30 09:46:26 +00:00
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`."
#: ../Doc/library/stdtypes.rst:1287
2016-10-30 09:46:26 +00:00
msgid "Range examples::"
msgstr "Exemples avec *range* ::"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1304
2016-10-30 09:46:26 +00:00
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)."
#: ../Doc/library/stdtypes.rst:1311
2016-10-30 09:46:26 +00:00
msgid ""
"The value of the *start* parameter (or ``0`` if the parameter was not "
"supplied)"
msgstr ""
"La valeur du paramètre *start* (ou ``0`` si le paramètre n'a pas été fourni)"
#: ../Doc/library/stdtypes.rst:1316
2016-10-30 09:46:26 +00:00
msgid "The value of the *stop* parameter"
msgstr "La valeur du paramètre *stop*"
#: ../Doc/library/stdtypes.rst:1320
2016-10-30 09:46:26 +00:00
msgid ""
"The value of the *step* parameter (or ``1`` if the parameter was not "
"supplied)"
msgstr ""
"La valeur du paramètre *step* (ou ``1`` si le paramètre n'a pas été fourni)"
#: ../Doc/library/stdtypes.rst:1323
2016-10-30 09:46:26 +00:00
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:`list` classique ou :class:"
"`tuple` est qu'un objet :class:`range` prendra toujours la même (petite) "
"quantité de mémoire, peu importe la taille de la gamme qu'elle représente "
"(car elle ne stocke que les valeurs ``start``, ``stop`` et ``step`` , le "
"calcul des éléments individuels et les sous-*range* au besoin)."
#: ../Doc/library/stdtypes.rst:1329
2016-10-30 09:46:26 +00:00
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 de base abstraite :class:`collections.abc."
2017-09-22 08:30:36 +00:00
"Sequence` et offrent des fonctionnalités telles que les tests d'appartenance "
"(avec *in*), de recherche par index, le tranchage et ils gerent les indices "
"négatifs (voir :ref:`typesseq`):"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1349
2016-10-30 09:46:26 +00:00
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. "
"Soit deux objets *range* sont considérées comme égaux si 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)``.)"
#: ../Doc/library/stdtypes.rst:1356
2016-10-30 09:46:26 +00:00
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 de base abstraite *Sequence*. Supporte le *slicing* et "
"les indices négatifs. Tester l'appartenance d'un :class:`int` en temps "
"constant au lieu d'itérer tous les éléments."
#: ../Doc/library/stdtypes.rst:1362
2016-10-30 09:46:26 +00:00
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)."
#: ../Doc/library/stdtypes.rst:1367
2016-10-30 09:46:26 +00:00
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`."
#: ../Doc/library/stdtypes.rst:1373
2016-10-30 09:46:26 +00:00
msgid ""
"The `linspace recipe <http://code.activestate.com/recipes/579000/>`_ shows "
"how to implement a lazy version of range suitable for floating point "
2016-10-30 09:46:26 +00:00
"applications."
msgstr ""
2017-05-15 11:29:27 +00:00
"La `recette linspace <http://code.activestate.com/recipes/579000/>`_ montre "
"comment implémenter une version paresseuse de *range* adaptée aux nombres à "
"virgule flottante."
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1385
2016-10-30 09:46:26 +00:00
msgid "Text Sequence Type --- :class:`str`"
msgstr "Type Séquence de Texte --- :class:`str`"
#: ../Doc/library/stdtypes.rst:1387
2016-10-30 09:46:26 +00:00
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 est manipulé avec des objets :class:`str` "
"ou :dfn:`strings`. Les chaînes sont des :ref:`séquences <typesseq>` "
2017-09-22 08:30:36 +00:00
"immuables de points de code Unicode. Les chaînes littérales peuvent être "
"écrites de différentes manières :"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1392
2016-10-30 09:46:26 +00:00
msgid "Single quotes: ``'allows embedded \"double\" quotes'``"
msgstr "Les guillemets simples : ``'autorisent les \"guillemets\"'``"
#: ../Doc/library/stdtypes.rst:1393
2016-10-30 09:46:26 +00:00
msgid "Double quotes: ``\"allows embedded 'single' quotes\"``."
msgstr "Les guillemets : ``\"autorisent les guillemets 'simples'\"``."
#: ../Doc/library/stdtypes.rst:1394
2016-10-30 09:46:26 +00:00
msgid ""
"Triple quoted: ``'''Three single quotes'''``, ``\"\"\"Three double quotes"
"\"\"\"``"
msgstr ""
"Guillemets triples : ``'''Trois guillemets simples'''``, ``\"\"\"Trois "
"guillemets\"\"\"``"
#: ../Doc/library/stdtypes.rst:1396
2016-10-30 09:46:26 +00:00
msgid ""
"Triple quoted strings may span multiple lines - all associated whitespace "
"will be included in the string literal."
msgstr ""
"Les chaînes entre triple guillemets peuvent couvrir plusieurs lignes - tous "
"les espaces associés seront inclus dans la chaîne littérale."
#: ../Doc/library/stdtypes.rst:1399
2016-10-30 09:46:26 +00:00
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\"``."
#: ../Doc/library/stdtypes.rst:1403
2016-10-30 09:46:26 +00:00
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 des séquences d'échappement prises en charge, "
"et le préfixe ``r`` (*raw* (brut)) qui désactive la plupart des traitements "
"de séquence d'échappement."
#: ../Doc/library/stdtypes.rst:1407
2016-10-30 09:46:26 +00:00
msgid ""
"Strings may also be created from other objects using the :class:`str` "
"constructor."
msgstr ""
"Les chaînes peuvent également être créés à partir d'autres objets à l'aide "
"du constructeur :class:`str`."
#: ../Doc/library/stdtypes.rst:1410
2016-10-30 09:46:26 +00:00
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\" distinct, l'indexation d'une chaîne "
"produit des chaînes de longueur 1. Autrement dit, pour une chaîne non vide "
"*s*, ``s[0] == s[0:1]``."
#: ../Doc/library/stdtypes.rst:1416
2016-10-30 09:46:26 +00:00
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."
2016-10-30 09:46:26 +00:00
"StringIO` peuvent être utilisées pour construire efficacement des chaînes à "
"partir de plusieurs fragments."
#: ../Doc/library/stdtypes.rst:1420
2016-10-30 09:46:26 +00:00
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. Elle n'a aucun effet sur "
"le sens des chaînes littérales et ne peut être combiné avec le préfixe ``r``."
#: ../Doc/library/stdtypes.rst:1432
2016-10-30 09:46:26 +00:00
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 :ref:`string <textseq>` de *object*. Si *object* "
"n'est pas fourni, renvoie une chaîne vide. Sinon, le comportement de "
2016-10-30 09:46:26 +00:00
"``str()`` dépend de si *encoding* ou *errors* sont donnés, voir l'exemple."
#: ../Doc/library/stdtypes.rst:1436
2016-10-30 09:46:26 +00:00
msgid ""
"If neither *encoding* nor *errors* is given, ``str(object)`` returns :meth:"
"`object.__str__() <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:"
"`object.__str__() <object.__str__>`, qui est la représentation de chaîne "
"\"informelle\" ou bien 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>`."
#: ../Doc/library/stdtypes.rst:1447
2016-10-30 09:46:26 +00:00
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:`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* "
"du buffer est obtenu avant d'appeler :meth:`bytes.decode`. Voir :ref:"
"`binaryseq` et :ref:`bufferobjects` pour plus d'informations sur les buffers."
#: ../Doc/library/stdtypes.rst:1456
2016-10-30 09:46:26 +00:00
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 ni l'argument *encoding* "
"ni l'argument *errors* relève du premier cas, où la représentation "
"informelle de la chaîne est renvoyé (voir aussi l'option :option:`-b` de "
"Python). Par exemple : ::"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1464
2016-10-30 09:46:26 +00:00
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 ""
2017-05-15 11:29:27 +00:00
"Pour plus d'informations sur la classe ``str`` et ses méthodes, voir les "
"sections :ref:`textseq` et :ref:`string-methods`. Pour formatter des chaînes "
"de caractères, voir les sections :ref:`f-strings` et :ref:`formatstrings`. "
2017-09-22 08:30:36 +00:00
"La section :ref:`stringservices` contient aussi des informations."
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1476
2016-10-30 09:46:26 +00:00
msgid "String Methods"
msgstr "Méthodes de chaînes de caractères"
#: ../Doc/library/stdtypes.rst:1481
2016-10-30 09:46:26 +00:00
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."
#: ../Doc/library/stdtypes.rst:1484
2016-10-30 09:46:26 +00:00
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 ``printf`` "
"du C qui gère une gamme plus étroite des types et est légèrement plus "
"difficile à utiliser correctement, mais il est souvent plus rapide pour les "
"cas, il peut gérer (:ref:`old-string-formatting`)."
#: ../Doc/library/stdtypes.rst:1491
2016-10-30 09:46:26 +00:00
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 régulières dans le module :mod:`re`)."
#: ../Doc/library/stdtypes.rst:1497
2016-10-30 09:46:26 +00:00
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."
#: ../Doc/library/stdtypes.rst:1503
2016-10-30 09:46:26 +00:00
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 comparaison insensibles à la casse."
#: ../Doc/library/stdtypes.rst:1506
2016-10-30 09:46:26 +00:00
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` ferait rien à ``'ß'``; :meth:"
"`casefold` le convertit en ``\"ss\"``."
#: ../Doc/library/stdtypes.rst:1512
2016-10-30 09:46:26 +00:00
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."
#: ../Doc/library/stdtypes.rst:1520
2016-10-30 09:46:26 +00:00
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 ""
"Donne la chaîne au centre d'une chaîne de longueur *width*. Le remplissage "
"est fait enutilisant l'argument *fillchar* (qui par défaut est un espace "
"ASCII). La chaîne d'origine est renvoyée si *width* est inférieur ou égale à "
"``len(s)``."
#: ../Doc/library/stdtypes.rst:1528
2016-10-30 09:46:26 +00:00
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 ""
"Donne le nombre d'occurrences de *sub* ne se chevauchant pas dans le *range* "
"[*start*, *end*]. Les arguments facultatifs *start* et *end* sont "
"interprétés comme pour des *slices*."
#: ../Doc/library/stdtypes.rst:1535
2016-10-30 09:46:26 +00:00
msgid ""
"Return an encoded version of the string as a bytes object. Default encoding "
"is ``'utf-8'``. *errors* may be given to set a different error handling "
"scheme. The default for *errors* is ``'strict'``, meaning that encoding "
"errors raise a :exc:`UnicodeError`. Other possible values are ``'ignore'``, "
"``'replace'``, ``'xmlcharrefreplace'``, ``'backslashreplace'`` and any other "
"name registered via :func:`codecs.register_error`, see section :ref:`error-"
"handlers`. For a list of possible encodings, see section :ref:`standard-"
"encodings`."
msgstr ""
"Donne une version encodée de la chaîne sous la forme d'un objet *bytes*. "
"L'encodage par défaut est ``'utf-8'``. *errors* peut être donné pour choisir "
"un autre système de gestion d'erreur. La valeur par défaut pour *errors* est "
"``'strict'``, ce qui signifie que les erreurs d'encodage soulèvent une :exc:"
"`UnicodeError`. Les autres valeurs possibles sont ``'ignore'``, "
"``'replace'``, ``'xmlcharrefreplace'``, ``'backslashreplace'`` et tout autre "
2018-06-17 20:28:31 +00:00
"nom enregistré *via* :func:`codecs.register_error`, voir la section :ref:"
2016-10-30 09:46:26 +00:00
"`error-handlers`. Pour une liste des encodages possibles, voir la section :"
"ref:`standard-encodings`."
#: ../Doc/library/stdtypes.rst:1544
2016-10-30 09:46:26 +00:00
msgid "Support for keyword arguments added."
msgstr "Gestion des arguments par mot clef."
#: ../Doc/library/stdtypes.rst:1550
2016-10-30 09:46:26 +00:00
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 ""
"Donne ``True`` si la chaîne se termine par *suffix*, sinon ``False``. "
"*suffix* peut aussi être un tuple 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."
#: ../Doc/library/stdtypes.rst:1558
2016-10-30 09:46:26 +00:00
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 ""
"Donne une copie de la chaîne où toutes les tabulations sont remplacées par "
"un 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."
#: ../Doc/library/stdtypes.rst:1579
2016-10-30 09:46:26 +00:00
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 ""
"Donne la première la position dans la chaîne où *sub* est trouvé dans le "
"*slice* ``s[start:end]``. Les arguments facultatifs *start* et *end* sont "
"interprétés comme dans la notation des *slice*. Donne ``-1`` si *sub* n'est "
"pas trouvé."
#: ../Doc/library/stdtypes.rst:1585
2016-10-30 09:46:26 +00:00
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` ::"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/stdtypes.rst:1595
2016-10-30 09:46:26 +00:00
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 ""
"Formatte 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, ou le nom d'un argument donné par mot-"
"clé. Renvoie une copie de la chaîne où chaque champ de remplacement est "
"remplacé par la valeur de chaîne de l'argument correspondant."
#: ../Doc/library/stdtypes.rst:1605
2016-10-30 09:46:26 +00:00
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."
#: ../Doc/library/stdtypes.rst:1609
2018-02-08 09:02:29 +00:00
msgid ""
2018-09-15 20:37:31 +00:00
"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."
2018-02-08 09:02:29 +00:00
msgstr ""
"Lors du formatage avec le format ``n`` (comme ``'{:n}'.format(1234)``) d'un "
2018-09-15 20:37:31 +00:00
"nombre (:class:`int`, :class:`float`, :class:`complex`, :class:`decimal."
"Decimal` et 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."
2018-02-08 09:02:29 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1618
2018-02-08 09:02:29 +00:00
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 "
2018-06-10 15:15:10 +00:00
"temporairement ``LC_CTYPE`` par la valeur de ``LC_NUMERIC`` dans certains "
"cas."
2018-02-08 09:02:29 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1626
2016-10-30 09:46:26 +00:00
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 :"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1642
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1648
2016-10-30 09:46:26 +00:00
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 ""
"Donne ``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 est vrais : ``c.isalpha()``, ``c."
"isdecimal()``, ``c.isdigit()`` ou ``c.isnumeric()``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1656
2016-10-30 09:46:26 +00:00
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 ""
"Donne ``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 ceci est "
"différent de la propriété *Alphabetic* définie dans la norme Unicode."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1665
2018-06-28 13:32:56 +00:00
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 ""
"Donne ``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."
2018-06-28 13:32:56 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1674
2016-10-30 09:46:26 +00:00
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 "
2017-04-02 20:14:06 +00:00
"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\"."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-15 11:29:27 +00:00
"Renvoie vrai 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 faux. 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. Spécifiquement, un "
"caractère décimal est un caractère dans la catégorie unicode générale \"Nd\"."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1684
2016-10-30 09:46:26 +00:00
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 "
2017-04-02 20:14:06 +00:00
"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."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-15 11:29:27 +00:00
"Renvoie vrai si tous les caractères de la chaîne sont des chiffres et "
"qu'elle contient au moins un caractère, faux 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, tel que les nombres de Kharosthi. Spécifiquement, un chiffre est un "
"caractère dont la valeur de la propriété *Numeric_Type* est *Digit* ou "
"*Decimal*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1694
2016-10-30 09:46:26 +00:00
msgid ""
"Return true if the string is a valid identifier according to the language "
"definition, section :ref:`identifiers`."
msgstr ""
"Donne ``True`` si la chaîne est un identifiant valide selon la définition du "
"langage, section :ref:`identifiers`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1697
2016-10-30 09:46:26 +00:00
msgid ""
"Use :func:`keyword.iskeyword` to test for reserved identifiers such as :"
"keyword:`def` and :keyword:`class`."
msgstr ""
"Utilisez :func:`keyword.iskeyword` pour savoir si un identifiant est "
"réservé, tels que :keyword:`def` et :keyword:`class`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1702
2016-10-30 09:46:26 +00:00
msgid ""
"Return true if all cased characters [4]_ in the string are lowercase and "
"there is at least one cased character, false otherwise."
msgstr ""
"Donne ``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. Donne "
"``False`` dans le cas contraire."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1708
2016-10-30 09:46:26 +00:00
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 ""
"Donne ``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 priorités *Numeric_Type=Digit*, *Numeric_Type=Decimal*, ou "
"*Numeric_Type=Numeric*."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1718
2016-10-30 09:46:26 +00:00
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 ""
"Donne ``True`` si tous les caractères de la chaîne sont affichables ou "
"qu'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é comme affichable. (Notez que les caractères imprimables dans "
"ce contexte sont ceux qui ne devraient pas être protégé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`.)"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1729
2016-10-30 09:46:26 +00:00
msgid ""
"Return true if there are only whitespace characters in the string and there "
"is at least one character, false otherwise. Whitespace characters are "
"those characters defined in the Unicode character database as \"Other\" or "
"\"Separator\" and those with bidirectional property being one of \"WS\", \"B"
"\", or \"S\"."
msgstr ""
"Donne ``True`` s'il n'y a que des caractères blancs dans la chaîne et il y a "
"au moins un caractère, sinon ``False``. Les caractères blancs sont les "
"caractères définis dans la base de données de caractères Unicode comme *"
"\"Other\"* ou *\"Separator\"* ainsi que ceux ayant la propriété "
"bidirectionnelle valant \"WS\", \"B\" ou \"S\"."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1736
2016-10-30 09:46:26 +00:00
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 ""
"Donne ``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. Donne ``False`` dans le "
"cas contraire."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1743
2016-10-30 09:46:26 +00:00
msgid ""
"Return true if all cased characters [4]_ in the string are uppercase and "
"there is at least one cased character, false otherwise."
msgstr ""
"Donne ``True`` si tous les caractères différentiables sur la casse [4]_ de "
"la chaîne sont en majuscules et il y a au moins un caractère différentiable "
"sur la casse, sinon ``False``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1749
2016-10-30 09:46:26 +00:00
msgid ""
2017-08-01 11:29:09 +00:00
"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."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-08-01 12:16:10 +00:00
"Donne une chaîne qui est la concaténation des chaînes contenues dans "
"*iterable*. Une :exc:`TypeError` sera 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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1757
2016-10-30 09:46:26 +00:00
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 "
"rembourrage est fait en utilisant *fillchar* (qui par défaut est un espace "
"ASCII). La chaîne d'origine est renvoyée si *width* est inférieur ou égale à "
"``len(s)``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1764
2016-10-30 09:46:26 +00:00
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 capitalisables [4]_ "
"convertis en minuscules."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1767
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1773
2016-10-30 09:46:26 +00:00
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 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 espaces. L'argument *chars* n'est pas un préfixe, toutes les "
"combinaisons de ses valeurs sont supprimées ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1786
2016-10-30 09:46:26 +00:00
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`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1788
2016-10-30 09:46:26 +00:00
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 ""
2017-05-15 11:29:27 +00:00
"Si un seul argument est fourni, ce soit être un dictionnaire faisant "
"correspondre des points de code Unicode (nombres entiers) ou des caractères "
2018-03-20 23:16:43 +00:00
"(chaînes de longueur 1) à des points de code Unicode."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1793
2016-10-30 09:46:26 +00:00
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 ""
2017-05-15 11:29:27 +00:00
"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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1801
2016-10-30 09:46:26 +00:00
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 donne un *tuple* de "
"trois éléments 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 *tuple* contiendra la chaîne elle-même, suivie de deux chaînes vides."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1809
2016-10-30 09:46:26 +00:00
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és par *new*. Si l'argument optionnel *count* est "
"donné, seules les *count* premières occurrences sont remplacées."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1816
2016-10-30 09:46:26 +00:00
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 ""
"Donne 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 *slices*. Donne ``-1`` en cas d'échec."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1823
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1829
2016-10-30 09:46:26 +00:00
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é à droite dans une chaîne de longueur *width*. Le "
"rembourrage est fait en utilisant le caractère spécifié par *fillchar* (par "
"défaut est un espace ASCII). La chaîne d'origine est renvoyée si *width* est "
"inférieure ou égale à ``len(s)``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1836
2016-10-30 09:46:26 +00:00
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 donne un tuple de "
"trois éléments 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 tuple contindra deux chaînes vides, puis par la chaîne elle-même."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1844
2016-10-30 09:46:26 +00:00
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 \"à droite\". Si *sep* est pas spécifié ou "
"est ``None``, tout espace 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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1853
2016-10-30 09:46:26 +00:00
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 espaces sont supprimés. "
"L'argument *chars* n'est pas un suffixe : toutes les combinaisons de ses "
"valeurs sont retirées : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1866
2016-10-30 09:46:26 +00:00
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 divisionsqui "
"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)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1872
2016-10-30 09:46:26 +00:00
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(',')`` donne "
"``['1', '', '2']``). L'argument *sep* peut contenir plusieurs caractères "
"(par exemple, ``'1<>2<>3'.split('<>')`` renvoie ``['1', '2', '3']``). "
2016-10-30 09:46:26 +00:00
"Découper une chaîne vide en spécifiant *sep* donne ``['']``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1878 ../Doc/library/stdtypes.rst:1894
#: ../Doc/library/stdtypes.rst:1946 ../Doc/library/stdtypes.rst:2014
#: ../Doc/library/stdtypes.rst:2078 ../Doc/library/stdtypes.rst:2829
#: ../Doc/library/stdtypes.rst:2845 ../Doc/library/stdtypes.rst:2936
#: ../Doc/library/stdtypes.rst:2952 ../Doc/library/stdtypes.rst:2977
#: ../Doc/library/stdtypes.rst:2991 ../Doc/library/stdtypes.rst:3019
#: ../Doc/library/stdtypes.rst:3033 ../Doc/library/stdtypes.rst:3051
#: ../Doc/library/stdtypes.rst:3078 ../Doc/library/stdtypes.rst:3101
#: ../Doc/library/stdtypes.rst:3128 ../Doc/library/stdtypes.rst:3170
#: ../Doc/library/stdtypes.rst:3194
2016-10-30 09:46:26 +00:00
msgid "For example::"
msgstr "Par exemple ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1887
2016-10-30 09:46:26 +00:00
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 espaces 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 chaîne vide ou une chaîne composée d'espaces avec un séparateur "
"``None`` renvoie ``[]``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1909
2016-10-30 09:46:26 +00:00
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 fait au "
"niveau deslimites des lignes. Les sauts de ligne ne sont pas inclus dans la "
"liste des résultats, sauf si *keepends* est donné, et est vrai."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1913
2016-10-30 09:46:26 +00:00
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`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1917
2016-10-30 09:46:26 +00:00
msgid "Representation"
msgstr "Représentation"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1917
2016-10-30 09:46:26 +00:00
msgid "Description"
msgstr "Description"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1919
2016-10-30 09:46:26 +00:00
msgid "``\\n``"
msgstr "``\\n``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1919
2016-10-30 09:46:26 +00:00
msgid "Line Feed"
msgstr "Saut de ligne"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1921
2016-10-30 09:46:26 +00:00
msgid "``\\r``"
msgstr "``\\r``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1921
2016-10-30 09:46:26 +00:00
msgid "Carriage Return"
msgstr "Retour chariot"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1923
2016-10-30 09:46:26 +00:00
msgid "``\\r\\n``"
msgstr "``\\r\\n``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1923
2016-10-30 09:46:26 +00:00
msgid "Carriage Return + Line Feed"
msgstr "Retour chariot + saut de ligne"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1925
2016-10-30 09:46:26 +00:00
msgid "``\\v`` or ``\\x0b``"
msgstr "``\\v`` or ``\\x0b``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1925
2016-10-30 09:46:26 +00:00
msgid "Line Tabulation"
msgstr "Tabulation verticale"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1927
2016-10-30 09:46:26 +00:00
msgid "``\\f`` or ``\\x0c``"
msgstr "``\\f`` or ``\\x0c``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1927
2016-10-30 09:46:26 +00:00
msgid "Form Feed"
msgstr "Saut de page"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1929
2016-10-30 09:46:26 +00:00
msgid "``\\x1c``"
msgstr "``\\x1c``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1929
2016-10-30 09:46:26 +00:00
msgid "File Separator"
msgstr "Séparateur de fichiers"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1931
2016-10-30 09:46:26 +00:00
msgid "``\\x1d``"
msgstr "``\\x1d``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1931
2016-10-30 09:46:26 +00:00
msgid "Group Separator"
msgstr "Séparateur de groupes"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1933
2016-10-30 09:46:26 +00:00
msgid "``\\x1e``"
msgstr "``\\x1e``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1933
2016-10-30 09:46:26 +00:00
msgid "Record Separator"
msgstr "Séparateur d'enregistrements"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1935
2016-10-30 09:46:26 +00:00
msgid "``\\x85``"
msgstr "``\\x85``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1935
2016-10-30 09:46:26 +00:00
msgid "Next Line (C1 Control Code)"
msgstr "Ligne suivante (code de contrôle C1)"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1937
2016-10-30 09:46:26 +00:00
msgid "``\\u2028``"
msgstr "``\\u2028``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1937
2016-10-30 09:46:26 +00:00
msgid "Line Separator"
msgstr "Séparateur de ligne"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1939
2016-10-30 09:46:26 +00:00
msgid "``\\u2029``"
msgstr "``\\u2029``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1939
2016-10-30 09:46:26 +00:00
msgid "Paragraph Separator"
msgstr "Séparateur de paragraphe"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1944
2016-10-30 09:46:26 +00:00
msgid "``\\v`` and ``\\f`` added to list of line boundaries."
msgstr "``\\v`` et ``\\f`` ajoutés à la liste des limites de lignes."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1953
2016-10-30 09:46:26 +00:00
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 : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1962
2016-10-30 09:46:26 +00:00
msgid "For comparison, ``split('\\n')`` gives::"
msgstr "À titre de comparaison, ``split('\\n')`` donne : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1972
2016-10-30 09:46:26 +00:00
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 ""
"Donne ``True`` si la chaîne commence par *prefix*, sinon ``False``. "
"*prefix* peut aussi être un tuple 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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1980
2016-10-30 09:46:26 +00:00
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 ""
"Donne 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 espaces sont supprimés. "
"L'argument *chars* est pas un préfixe ni un suffixe, toutes les combinaisons "
"de ses valeurs sont supprimées : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:1991
2016-10-30 09:46:26 +00:00
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 à "
"lieu par la droite. Par exemple : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2004
2016-10-30 09:46:26 +00:00
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``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2011
2016-10-30 09:46:26 +00:00
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 en initiales majuscules de la chaîne où les mots "
"commencent par une capitale et les caractères restants sont en minuscules."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2019 ../Doc/library/stdtypes.rst:3138
2016-10-30 09:46:26 +00:00
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 "
"fonctionnedans de nombreux contextes, mais cela signifie que les apostrophes "
"(typiquement dela forme possessive en Anglais) forment les limites de mot, "
"ce qui n'est pas toujours le résultat souhaité : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2027 ../Doc/library/stdtypes.rst:3146
2016-10-30 09:46:26 +00:00
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 : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2042
2016-10-30 09:46:26 +00:00
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:"
"`mapping` ou une :term:`sequence`. Pour un ordinal Unicode (un entier), la "
"table peut donner soit un ordinal Unicode ou une chaîne pour faire "
"correspondre un ou plusieurs caractère au caractère donné, soit ``None`` "
"pour supprimer le caractère de la chaîne de renvoyée soit lever une "
"exception :exc:`LookupError` pour ne pas changer le caractère."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2051
2016-10-30 09:46:26 +00:00
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érentsformats."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2054
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2060
2016-10-30 09:46:26 +00:00
msgid ""
"Return a copy of the string with all the cased characters [4]_ converted to "
2018-06-28 13:32:56 +00:00
"uppercase. Note that ``s.upper().isupper()`` might be ``False`` if ``s`` "
2016-10-30 09:46:26 +00:00
"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 "
2018-07-05 09:39:28 +00:00
"``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*)."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2066
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2072
2016-10-30 09:46:26 +00:00
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 "
"rembourrage *après* le caractère designe plutôt qu'avant. La chaîne "
"d'origine est renvoyée si *width* est inférieur ou égale à ``len(s)``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2090
2016-10-30 09:46:26 +00:00
msgid "``printf``-style String Formatting"
2018-06-17 20:28:31 +00:00
msgstr "Formatage de chaines à la ``printf``"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2104
2016-10-30 09:46:26 +00:00
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-"
2018-06-28 13:32:56 +00:00
"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."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-15 11:29:27 +00:00
"Ces opérations de mise en forme contiennent des bizarreries menant à de "
2018-07-21 09:50:56 +00:00
"nombreuses erreurs classiques (telles que ne pas réussir à afficher des "
2017-05-15 11:29:27 +00:00
"*tuples* ou des dictionnaires correctement). Utiliser les :ref:`formatted "
2018-07-05 09:39:28 +00:00
"string literals <f-strings>`, la méthode :meth:`str.format` ou les :ref:"
2018-07-27 07:25:53 +00:00
"`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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2112
2016-10-30 09:46:26 +00:00
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 *formatting* ouopé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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2118
2016-10-30 09:46:26 +00:00
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 "
2017-09-21 11:06:21 +00:00
"unique. [5]_ Si *values* est un tuple, il doit contenir exactement le nombre "
2016-10-30 09:46:26 +00:00
"d'éléments spécifiés par la chaîne de format, ou un seul objet de "
"correspondances ( *mapping object*, par exemple, un dictionnaire)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2123 ../Doc/library/stdtypes.rst:3245
2016-10-30 09:46:26 +00:00
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 :"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2126 ../Doc/library/stdtypes.rst:3248
2016-10-30 09:46:26 +00:00
msgid "The ``'%'`` character, which marks the start of the specifier."
msgstr "Le caractère ``'%'``, qui marque le début du marqueur."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2128 ../Doc/library/stdtypes.rst:3250
2016-10-30 09:46:26 +00:00
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èse (par exemple, ``(somename)``)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2131 ../Doc/library/stdtypes.rst:3253
2016-10-30 09:46:26 +00:00
msgid ""
"Conversion flags (optional), which affect the result of some conversion "
"types."
msgstr ""
"Des options de conversion, facultatives, qui affectent le résultat de "
"certains types de conversion."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2134 ../Doc/library/stdtypes.rst:3256
2016-10-30 09:46:26 +00:00
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 tuple *values*, et l'objet à convertir vient "
"après la largeur de champ minimale et la précision facultative."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2138 ../Doc/library/stdtypes.rst:3260
2016-10-30 09:46:26 +00:00
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 tuple *values* et la valeur à convertir "
"vient ensuite."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2143 ../Doc/library/stdtypes.rst:3265
2016-10-30 09:46:26 +00:00
msgid "Length modifier (optional)."
msgstr "Modificateur de longueur (facultatif)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2145 ../Doc/library/stdtypes.rst:3267
2016-10-30 09:46:26 +00:00
msgid "Conversion type."
msgstr "Type de conversion."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2147
2016-10-30 09:46:26 +00:00
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 "
"*mapping*), 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 :"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2156 ../Doc/library/stdtypes.rst:3278
2016-10-30 09:46:26 +00:00
msgid ""
"In this case no ``*`` specifiers may occur in a format (since they require a "
"sequential parameter list)."
msgstr ""
"Dans ce cas, aucune ``*`` ne peuvent se trouver dans le format (car ces "
"``*`` nécessitent une liste (accès séquentiel) de paramètres)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2159 ../Doc/library/stdtypes.rst:3281
2016-10-30 09:46:26 +00:00
msgid "The conversion flag characters are:"
msgstr "Les caractères indicateurs de conversion sont :"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2162 ../Doc/library/stdtypes.rst:3284
2016-10-30 09:46:26 +00:00
msgid "Flag"
msgstr "Option"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2164 ../Doc/library/stdtypes.rst:3286
2016-10-30 09:46:26 +00:00
msgid "``'#'``"
msgstr "``'#'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2164 ../Doc/library/stdtypes.rst:3286
2016-10-30 09:46:26 +00:00
msgid ""
"The value conversion will use the \"alternate form\" (where defined below)."
msgstr "La conversion utilisera la \"forme alternative\" (définie ci-dessous)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2167 ../Doc/library/stdtypes.rst:3289
2016-10-30 09:46:26 +00:00
msgid "``'0'``"
msgstr "``'0'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2167 ../Doc/library/stdtypes.rst:3289
2016-10-30 09:46:26 +00:00
msgid "The conversion will be zero padded for numeric values."
msgstr "Les valeurs numériques converties seront complétée de zéros."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2169 ../Doc/library/stdtypes.rst:3291
2016-10-30 09:46:26 +00:00
msgid "``'-'``"
msgstr "``'-'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2169 ../Doc/library/stdtypes.rst:3291
2016-10-30 09:46:26 +00:00
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)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2172 ../Doc/library/stdtypes.rst:3294
2016-10-30 09:46:26 +00:00
msgid "``' '``"
msgstr "``' '``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2172 ../Doc/library/stdtypes.rst:3294
2016-10-30 09:46:26 +00:00
msgid ""
"(a space) A blank should be left before a positive number (or empty string) "
"produced by a signed conversion."
msgstr ""
"(un espace) Un espace doit être laissé avant un nombre positif (ou chaîne "
"vide) produite par la conversion d'une valeur signée."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2175 ../Doc/library/stdtypes.rst:3297
2016-10-30 09:46:26 +00:00
msgid "``'+'``"
msgstr "``'+'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2175 ../Doc/library/stdtypes.rst:3297
2016-10-30 09:46:26 +00:00
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\")."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2179 ../Doc/library/stdtypes.rst:3301
2016-10-30 09:46:26 +00:00
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``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2182 ../Doc/library/stdtypes.rst:3304
2016-10-30 09:46:26 +00:00
msgid "The conversion types are:"
msgstr "Les types utilisables dans les conversion sont :"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2185 ../Doc/library/stdtypes.rst:3307
2016-10-30 09:46:26 +00:00
msgid "Conversion"
msgstr "Conversion"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2187 ../Doc/library/stdtypes.rst:3309
2016-10-30 09:46:26 +00:00
msgid "``'d'``"
msgstr "``'d'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2187 ../Doc/library/stdtypes.rst:2189
#: ../Doc/library/stdtypes.rst:3309 ../Doc/library/stdtypes.rst:3311
2016-10-30 09:46:26 +00:00
msgid "Signed integer decimal."
msgstr "Entier décimal signé."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2189 ../Doc/library/stdtypes.rst:3311
2016-10-30 09:46:26 +00:00
msgid "``'i'``"
msgstr "``'i'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2191 ../Doc/library/stdtypes.rst:3313
2016-10-30 09:46:26 +00:00
msgid "``'o'``"
msgstr "``'o'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2191 ../Doc/library/stdtypes.rst:3313
2016-10-30 09:46:26 +00:00
msgid "Signed octal value."
msgstr "Valeur octale signée."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2193 ../Doc/library/stdtypes.rst:3315
2016-10-30 09:46:26 +00:00
msgid "``'u'``"
msgstr "``'u'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2193 ../Doc/library/stdtypes.rst:3315
2016-10-30 09:46:26 +00:00
msgid "Obsolete type -- it is identical to ``'d'``."
msgstr "Type obsolète - identique à ``'d'``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2195 ../Doc/library/stdtypes.rst:3317
2016-10-30 09:46:26 +00:00
msgid "``'x'``"
msgstr "``'x'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2195 ../Doc/library/stdtypes.rst:3317
2016-10-30 09:46:26 +00:00
msgid "Signed hexadecimal (lowercase)."
msgstr "Hexadécimal signé (en minuscules)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2197 ../Doc/library/stdtypes.rst:3319
2016-10-30 09:46:26 +00:00
msgid "``'X'``"
msgstr "``'X'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2197 ../Doc/library/stdtypes.rst:3319
2016-10-30 09:46:26 +00:00
msgid "Signed hexadecimal (uppercase)."
msgstr "Hexadécimal signé (capitales)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2199 ../Doc/library/stdtypes.rst:3321
2016-10-30 09:46:26 +00:00
msgid "``'e'``"
msgstr "``'e'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2199 ../Doc/library/stdtypes.rst:3321
2016-10-30 09:46:26 +00:00
msgid "Floating point exponential format (lowercase)."
msgstr "Format exponentiel pour un *float* (minuscule)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2201 ../Doc/library/stdtypes.rst:3323
2016-10-30 09:46:26 +00:00
msgid "``'E'``"
msgstr "``'E'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2201 ../Doc/library/stdtypes.rst:3323
2016-10-30 09:46:26 +00:00
msgid "Floating point exponential format (uppercase)."
msgstr "Format exponentiel pour un *float* (en capitales)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2203 ../Doc/library/stdtypes.rst:3325
2016-10-30 09:46:26 +00:00
msgid "``'f'``"
msgstr "``'f'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2203 ../Doc/library/stdtypes.rst:2205
#: ../Doc/library/stdtypes.rst:3325 ../Doc/library/stdtypes.rst:3327
2016-10-30 09:46:26 +00:00
msgid "Floating point decimal format."
msgstr "Format décimal pour un *float*."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2205 ../Doc/library/stdtypes.rst:3327
2016-10-30 09:46:26 +00:00
msgid "``'F'``"
msgstr "``'F'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2207 ../Doc/library/stdtypes.rst:3329
2016-10-30 09:46:26 +00:00
msgid "``'g'``"
msgstr "``'g'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2207 ../Doc/library/stdtypes.rst:3329
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2211 ../Doc/library/stdtypes.rst:3333
2016-10-30 09:46:26 +00:00
msgid "``'G'``"
msgstr "``'G'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2211 ../Doc/library/stdtypes.rst:3333
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2215 ../Doc/library/stdtypes.rst:3337
2016-10-30 09:46:26 +00:00
msgid "``'c'``"
msgstr "``'c'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2215
2016-10-30 09:46:26 +00:00
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)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2218 ../Doc/library/stdtypes.rst:3350
2016-10-30 09:46:26 +00:00
msgid "``'r'``"
msgstr "``'r'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2218
2016-10-30 09:46:26 +00:00
msgid "String (converts any Python object using :func:`repr`)."
msgstr "String (convertit n'importe quel objet Python avec :func:`repr`)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2221 ../Doc/library/stdtypes.rst:3344
2016-10-30 09:46:26 +00:00
msgid "``'s'``"
msgstr "``'s'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2221
2016-10-30 09:46:26 +00:00
msgid "String (converts any Python object using :func:`str`)."
msgstr "String (convertit n'importe quel objet Python avec :func:`str`)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2224 ../Doc/library/stdtypes.rst:3347
2016-10-30 09:46:26 +00:00
msgid "``'a'``"
msgstr "``'a'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2224
2016-10-30 09:46:26 +00:00
msgid "String (converts any Python object using :func:`ascii`)."
msgstr ""
"String (convertit n'importe quel objet Python en utilisant :func:`ascii`)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2227 ../Doc/library/stdtypes.rst:3353
2016-10-30 09:46:26 +00:00
msgid "``'%'``"
msgstr "``'%'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2227 ../Doc/library/stdtypes.rst:3353
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2234 ../Doc/library/stdtypes.rst:3360
2016-10-30 09:46:26 +00:00
msgid ""
2017-04-02 20:14:06 +00:00
"The alternate form causes a leading octal specifier (``'0o'``) to be "
"inserted before the first digit."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-15 11:29:27 +00:00
"La forme alternative entraîne l'insertion d'un préfix octal (``'0o'``) avant "
"le premier chiffre."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2238 ../Doc/library/stdtypes.rst:3364
2016-10-30 09:46:26 +00:00
msgid ""
"The alternate form causes a leading ``'0x'`` or ``'0X'`` (depending on "
2017-04-02 20:14:06 +00:00
"whether the ``'x'`` or ``'X'`` format was used) to be inserted before the "
"first digit."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-15 11:29:27 +00:00
"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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2242 ../Doc/library/stdtypes.rst:3368
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2245 ../Doc/library/stdtypes.rst:3371
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2249 ../Doc/library/stdtypes.rst:3375
2016-10-30 09:46:26 +00:00
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)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2252 ../Doc/library/stdtypes.rst:3378
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2256 ../Doc/library/stdtypes.rst:3382
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2259 ../Doc/library/stdtypes.rst:3391
2016-10-30 09:46:26 +00:00
msgid "See :pep:`237`."
msgstr "Voir la :pep:`237`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2261
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2266
2016-10-30 09:46:26 +00:00
msgid ""
"``%f`` conversions for numbers whose absolute value is over 1e50 are no "
"longer replaced by ``%g`` conversions."
msgstr ""
"Les conversions ``%f`` pour nombres dont la valeur absolue est supérieure à "
"1e50 ne sont plus remplacés par des conversions ``%g``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2277
2016-10-30 09:46:26 +00:00
msgid ""
"Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, :class:"
"`memoryview`"
msgstr ""
"Séquences Binaires --- :class:`bytes`, :class:`bytearray`, :class:"
"`memoryview`"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2285
2016-10-30 09:46:26 +00:00
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 supportés par :class:`memoryview` "
"qui utilise le :ref:`buffer protocol <bufferobjects>` pour accéder à la "
"mémoire d'autres objets binaires sans avoir besoin d'en faire une copie."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2290
2016-10-30 09:46:26 +00:00
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 precision IEEE754."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2296
2017-08-01 11:29:09 +00:00
msgid "Bytes Objects"
msgstr "Objets *bytes*"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2300
2016-10-30 09:46:26 +00:00
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 moulte autres aspects."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2307
2016-10-30 09:46:26 +00:00
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`` :"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2310
2016-10-30 09:46:26 +00:00
msgid "Single quotes: ``b'still allows embedded \"double\" quotes'``"
msgstr ""
"Les guillemets simples : ``b'autorisent aussi les guillemets \"doubles\"'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2311
2016-10-30 09:46:26 +00:00
msgid "Double quotes: ``b\"still allows embedded 'single' quotes\"``."
msgstr ""
"Les guillemets doubles : ``b\"permettent aussi les guillemets 'simples'\"``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2312
2016-10-30 09:46:26 +00:00
msgid ""
"Triple quoted: ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes\"\"\"``"
msgstr ""
"Les guillemets triples : ``b'''3 single quotes'''``, ``b\"\"\"3 double quotes"
"\"\"\"``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2314
2016-10-30 09:46:26 +00:00
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 entrés dans littéraux de *bytes* en utilisant une "
"séquence d'échappement appropriée."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2318
2016-10-30 09:46:26 +00:00
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 supportées."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2322
2016-10-30 09:46:26 +00:00
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 "
2016-10-30 09:46:26 +00:00
"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 leurs 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 ``0 <= x < 256`` "
"(ne pas respecter cette restriction lève une :exc:`ValueError`. Ceci est "
"fait délibérément 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)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2332
2016-10-30 09:46:26 +00:00
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 :"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2335
2016-10-30 09:46:26 +00:00
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)``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2336
2016-10-30 09:46:26 +00:00
msgid "From an iterable of integers: ``bytes(range(20))``"
msgstr "D'un itérable d'entiers : ``bytes(range(20))``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2337
2016-10-30 09:46:26 +00:00
msgid "Copying existing binary data via the buffer protocol: ``bytes(obj)``"
msgstr ""
"Copier des données binaires existantes via le *buffer protocol* : "
"``bytes(obj)``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2339
2016-10-30 09:46:26 +00:00
msgid "Also see the :ref:`bytes <func-bytes>` built-in."
msgstr "Voir aussi la fonction native :ref:`bytes <func-bytes>`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2341
2016-10-30 09:46:26 +00:00
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 :"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2347
2016-10-30 09:46:26 +00:00
msgid ""
"This :class:`bytes` class method returns a bytes object, decoding the given "
"string object. The string must contain two hexadecimal digits per byte, "
2017-08-01 11:29:09 +00:00
"with ASCII whitespace being ignored."
2016-10-30 09:46:26 +00:00
msgstr ""
"Cette méthode de la classe :class:`bytes` renvoie un objet *bytes*, décodant "
2017-08-01 12:16:10 +00:00
"la chaîne donnée. La chaîne doit contenir deux chiffres hexadécimaux par "
2016-10-30 09:46:26 +00:00
"octet, les espaces ASCII sont ignorés."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2354
2018-06-28 13:32:56 +00:00
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 \"blancs\", pas seulement les espaces."
2018-06-28 13:32:56 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2358
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2363 ../Doc/library/stdtypes.rst:2439
2016-10-30 09:46:26 +00:00
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 du "
"*byte*."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2371
2016-10-30 09:46:26 +00:00
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 "
"tuple), pour une instance de *bytes* *b*, ``b[0]`` sera un entier, tandis "
"que``b[0:1]`` sera un objet *bytes* de longueur 1. (Cela contraste avec les "
"chaînes, où l'indexation et le *slicing* donne une chaîne de longueur 1)"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2376
2016-10-30 09:46:26 +00:00
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)``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2381
2016-10-30 09:46:26 +00:00
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 solution de contournement, pour "
"garder la rétro-compatibilité, par rapport au fait 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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2394
2016-10-30 09:46:26 +00:00
msgid "Bytearray Objects"
msgstr "Objets *bytearray*"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2398
2016-10-30 09:46:26 +00:00
msgid ""
":class:`bytearray` objects are a mutable counterpart to :class:`bytes` "
2017-08-01 11:29:09 +00:00
"objects."
msgstr ""
"Les objets :class:`bytearray` sont l'équivalent muable des objets :class:"
2017-08-01 22:11:48 +00:00
"`bytes`."
2017-08-01 11:29:09 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2403
2017-08-01 11:29:09 +00:00
msgid ""
"There is no dedicated literal syntax for bytearray objects, instead they are "
"always created by calling the constructor:"
2016-10-30 09:46:26 +00:00
msgstr ""
2017-08-01 12:16:10 +00:00
"Il n'y a pas de syntaxe littérale dédiée aux *bytearray*, ils sont toujours "
"créés en appelant le constructeur :"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2406
2016-10-30 09:46:26 +00:00
msgid "Creating an empty instance: ``bytearray()``"
msgstr "Créer une instance vide: ``bytearray()``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2407
2016-10-30 09:46:26 +00:00
msgid "Creating a zero-filled instance with a given length: ``bytearray(10)``"
msgstr ""
"Créer une instance remplie de zéros d'une longueur donnée : ``bytearray(10)``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2408
2016-10-30 09:46:26 +00:00
msgid "From an iterable of integers: ``bytearray(range(20))``"
msgstr "À partir d'un itérable d'entiers : ``bytearray(range(20))``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2409
2016-10-30 09:46:26 +00:00
msgid ""
"Copying existing binary data via the buffer protocol: ``bytearray(b'Hi!')``"
msgstr ""
"Copie des données binaires existantes via le *buffer protocol* : "
"``bytearray(b'Hi!')``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2411
2016-10-30 09:46:26 +00:00
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équence :ref:`muables <typesseq-mutable>` en plus des opérations communes "
"de *bytes* et *bytearray* décrites dans :ref:`bytes-methods`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2415
2016-10-30 09:46:26 +00:00
msgid "Also see the :ref:`bytearray <func-bytearray>` built-in."
msgstr "Voir aussi la fonction native :ref:`bytearray <func-bytearray>`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2417
2016-10-30 09:46:26 +00:00
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 :"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2423
2016-10-30 09:46:26 +00:00
msgid ""
"This :class:`bytearray` class method returns bytearray object, decoding the "
"given string object. The string must contain two hexadecimal digits per "
2017-08-01 11:29:09 +00:00
"byte, with ASCII whitespace being ignored."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-08-01 12:16:10 +00:00
"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 "
2016-10-30 09:46:26 +00:00
"hexadécimaux par octet, les espaces ASCII sont ignorés."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2430
2018-06-28 13:32:56 +00:00
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 \"blancs\" "
"ASCII dans la chaîne, pas seulement les espaces."
2018-06-28 13:32:56 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2434
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2447
2016-10-30 09:46:26 +00:00
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]`` sera un entier, tandis que "
"``b[0:1]`` sera un objet *bytearray* de longueur 1. (Ceci contraste avec les "
"chaînes de texte, où l'indexation et le *slicing* produit une chaîne de "
"longueur 1)"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2452
2016-10-30 09:46:26 +00:00
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)``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2461
2016-10-30 09:46:26 +00:00
msgid "Bytes and Bytearray Operations"
msgstr "Opérations sur les *bytes* et *bytearray*"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2466
2016-10-30 09:46:26 +00:00
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:`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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2474
2016-10-30 09:46:26 +00:00
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 ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2481
2016-10-30 09:46:26 +00:00
msgid "and::"
msgstr "et  : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2486
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2491
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2494
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2500
2016-10-30 09:46:26 +00:00
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 pour un *slice*."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2504 ../Doc/library/stdtypes.rst:2551
#: ../Doc/library/stdtypes.rst:2573 ../Doc/library/stdtypes.rst:2639
#: ../Doc/library/stdtypes.rst:2652
2016-10-30 09:46:26 +00:00
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:`bytes-like "
"object` ou un nombre entier compris entre 0 et 255."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2507 ../Doc/library/stdtypes.rst:2563
#: ../Doc/library/stdtypes.rst:2576 ../Doc/library/stdtypes.rst:2642
#: ../Doc/library/stdtypes.rst:2655
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2514
2016-10-30 09:46:26 +00:00
msgid ""
"Return a string decoded from the given bytes. Default encoding is "
"``'utf-8'``. *errors* may be given to set a different error handling "
"scheme. The default for *errors* is ``'strict'``, meaning that encoding "
"errors raise a :exc:`UnicodeError`. Other possible values are ``'ignore'``, "
"``'replace'`` and any other name registered via :func:`codecs."
"register_error`, see section :ref:`error-handlers`. For a list of possible "
"encodings, see section :ref:`standard-encodings`."
msgstr ""
"Décode les octets donnés, et le renvoie sous forme d'une chaîne de "
"caractères. L'encodage par défaut est ``'utf-8'``. *errors* peut être donné "
"pour changer de système de gestion des 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 une liste des "
"encodages possibles, voir la section :ref:`standard-encodings`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2524
2016-10-30 09:46:26 +00:00
msgid ""
"Passing the *encoding* argument to :class:`str` allows decoding any :term:"
"`bytes-like object` directly, without needing to make a temporary bytes or "
"bytearray object."
msgstr ""
"Passer l'argument *encoding* à :class:`str` permet de décoder tout :term:"
"`bytes-like object` directement, sans avoir besoin d'utiliser un *bytes* ou "
"*bytearray* temporaire."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2528
2016-10-30 09:46:26 +00:00
msgid "Added support for keyword arguments."
msgstr "Gère les arguments nommés."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2535
2016-10-30 09:46:26 +00:00
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 ""
"Donne ``True`` si les octets se terminent par *suffix*, sinon ``False``. "
"*suffix* peut aussi être un tuple 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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2540
2016-10-30 09:46:26 +00:00
msgid "The suffix(es) to search for may be any :term:`bytes-like object`."
msgstr ""
"Les suffixes à rechercher peuvent être n'importe quel :term:`bytes-like "
"object`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2546
2016-10-30 09:46:26 +00:00
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 ""
"Donne 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 "
"*slices*. Donne ``-1`` si *sub* n'est pas trouvé."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2556
2016-10-30 09:46:26 +00:00
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` ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2570
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2583
2016-10-30 09:46:26 +00:00
msgid ""
"Return a bytes or bytearray object which is the concatenation of the binary "
2017-08-01 11:29:09 +00:00
"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."
2016-10-30 09:46:26 +00:00
msgstr ""
"Donne un *bytes* ou *bytearray* qui est la concaténation des séquences de "
2017-08-01 12:16:10 +00:00
"données binaires dans *iterable*. Une exception :exc:`TypeError` est levée "
"si une valeur d'*iterable* n'est pas un :term:`bytes-like objects <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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2594
2016-10-30 09:46:26 +00:00
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:`bytes-like objects <bytes-like object>` et avoir la même "
"longueur."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2605
2016-10-30 09:46:26 +00:00
msgid ""
"Split the sequence at the first occurrence of *sep*, and return a 3-tuple "
2017-12-01 06:48:13 +00:00
"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 3-tuple "
"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 "
"est pas trouvé, le 3-tuple renvoyé contiendra une copie de la séquence "
"d'origine, suivi de deux *bytes* ou *bytearray* vides."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2612 ../Doc/library/stdtypes.rst:2669
2016-10-30 09:46:26 +00:00
msgid "The separator to search for may be any :term:`bytes-like object`."
msgstr "Le séparateur à rechercher peut être tout :term:`bytes-like object`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2618
2016-10-30 09:46:26 +00:00
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 de sont remplacés."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2622
2016-10-30 09:46:26 +00:00
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:`bytes-like object`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2627 ../Doc/library/stdtypes.rst:2720
#: ../Doc/library/stdtypes.rst:2734 ../Doc/library/stdtypes.rst:2758
#: ../Doc/library/stdtypes.rst:2772 ../Doc/library/stdtypes.rst:2807
#: ../Doc/library/stdtypes.rst:2877 ../Doc/library/stdtypes.rst:2895
#: ../Doc/library/stdtypes.rst:2923 ../Doc/library/stdtypes.rst:3062
#: ../Doc/library/stdtypes.rst:3117 ../Doc/library/stdtypes.rst:3160
#: ../Doc/library/stdtypes.rst:3181 ../Doc/library/stdtypes.rst:3203
#: ../Doc/library/stdtypes.rst:3395
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2634
2016-10-30 09:46:26 +00:00
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 ""
"Donne 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 lanotation des *slices*. Donne ``-1`` si *sub* "
"n'est pas trouvable."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2649
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2662
2016-10-30 09:46:26 +00:00
msgid ""
"Split the sequence at the last occurrence of *sep*, and return a 3-tuple "
2017-12-01 06:48:13 +00:00
"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 ""
"Coupe la séquence à la dernière occurrence de *sep*, et renvoie un tuple de "
"trois elements contenant la partie précédent 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 tuple contiendra une copie de la "
"séquence d'origine, suivi de deux *bytes* ou *bytesarray* vides."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2675
2016-10-30 09:46:26 +00:00
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 ""
"Donne ``True`` si les données binaires commencent par le *prefix* spécifié, "
"sinon ``False``. *prefix* peut aussi être un tuple 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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2680
2016-10-30 09:46:26 +00:00
msgid "The prefix(es) to search for may be any :term:`bytes-like object`."
msgstr ""
"Le préfixe(s) à rechercher peuvent être n'importe quel :term:`bytes-like "
"object`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2686
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2691
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2694
2016-10-30 09:46:26 +00:00
msgid ""
"Set the *table* argument to ``None`` for translations that only delete "
"characters::"
msgstr ""
"Donnez ``None`` comme *table* pour seulement supprimer des caractères : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2700
2016-10-30 09:46:26 +00:00
msgid "*delete* is now supported as a keyword argument."
2018-03-20 23:16:43 +00:00
msgstr "*delete* est maintenant accepté comme argument nommé."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2704
2016-10-30 09:46:26 +00:00
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 compatible 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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2713
2016-10-30 09:46:26 +00:00
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 un "
"espace ASCII). Pour les objets :class:`bytes`, la séquence initiale est "
"renvoyée si *width* est inférieur ou égal à ``len(s)``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2727
2016-10-30 09:46:26 +00:00
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)``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2741
2016-10-30 09:46:26 +00:00
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. "
"Largument *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 domission ou ``None``, la valeur "
"par défaut de *chars* permet de supprimer des espaces ASCII. Largument "
"*chars* nest pas un préfixe, toutes les combinaisons de ses valeurs sont "
"supprimées ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2753 ../Doc/library/stdtypes.rst:2802
#: ../Doc/library/stdtypes.rst:2872
2016-10-30 09:46:26 +00:00
msgid ""
"The binary sequence of byte values to remove may be any :term:`bytes-like "
"object`."
msgstr ""
"La séquence de valeurs à supprimer peut être tout :term:`bytes-like object`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2765
2016-10-30 09:46:26 +00:00
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)``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2779
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2790
2016-10-30 09:46:26 +00:00
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és. L'argument *chars* n'est pas un suffixe : toutes les combinaisons "
"de ses valeurs sont retirées : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2814
2016-10-30 09:46:26 +00:00
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)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2820
2016-10-30 09:46:26 +00:00
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',')`` donne ``[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* donne "
"``[b'']`` ou ``[bytearray(b'')]`` en fonction du type de l'objet découpé. "
2017-05-15 11:29:27 +00:00
"L'argument *sep* peut être n'importe quel :term:`bytes-like object`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2838
2016-10-30 09:46:26 +00:00
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 ``[]``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2859
2016-10-30 09:46:26 +00:00
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 : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2881
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2889
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2902
2016-10-30 09:46:26 +00:00
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 nest 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 laffichage : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2930
2016-10-30 09:46:26 +00:00
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 ""
"Donne ``True`` si tous les caractères de la chaîne sont des caractères ASCII "
"alphabetiques ou chiffres. et que la séquence n'est pas vide, sinon "
"``False``. Les caractères ASCII alphabétiques sont les suivants "
"``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'`` et les "
"chiffres : ``b'0123456789'``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2947
2016-10-30 09:46:26 +00:00
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 ""
"Donne ``True`` si tous les octets dans la séquence sont des caractères "
"alphabétiques ASCII et la que la séquence n'est pas vide, sinon ``False``. "
"Les caractères ASCIIalphabétiques sont : "
"``b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2963
2018-06-28 13:32:56 +00:00
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 ""
2018-07-27 07:25:53 +00:00
"Renvoie ``True`` si la séquence est vide, ou si tous ses octets sont des "
"octets ASCII, renvoie faux dans le cas contraire. Les octets ASCII dans "
2018-07-05 09:39:28 +00:00
"l'intervalle 0-0x7F."
2018-06-28 13:32:56 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2973
2016-10-30 09:46:26 +00:00
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 ""
"Donne ``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 "
"``b'0123456789'``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2988
2016-10-30 09:46:26 +00:00
msgid ""
"Return true if there is at least one lowercase ASCII character in the "
"sequence and no uppercase ASCII characters, false otherwise."
msgstr ""
"Donne ``True`` s'il y a au moins un caractère ASCII minuscule dans la "
"séquence et aucune capitale, sinon ``False``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:2998 ../Doc/library/stdtypes.rst:3040
#: ../Doc/library/stdtypes.rst:3056 ../Doc/library/stdtypes.rst:3106
#: ../Doc/library/stdtypes.rst:3175
2016-10-30 09:46:26 +00:00
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 ""
"Lea caractères ASCII minuscules sont ``b'abcdefghijklmnopqrstuvwxyz'``. Les "
"capitales ASCII sont ``b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3006
2016-10-30 09:46:26 +00:00
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 ""
"Donne ``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, *form feed*)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3015
2016-10-30 09:46:26 +00:00
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 ""
"Donne ``True`` si la séquence ASCII est *titlecased*, et qu'elle ne soit pas "
"vide, sinon ``False``. Voir :meth:`bytes.title` pour plus de détails sur "
"ladéfinition de *titlecase*."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3030
2016-10-30 09:46:26 +00:00
msgid ""
"Return true if there is at least one uppercase alphabetic ASCII character in "
"the sequence and no lowercase ASCII characters, false otherwise."
msgstr ""
"Donne ``True`` s'il y a au moins un caractère alphabétique majuscule ASCII "
"dans la séquence et aucun caractères ASCII minuscules, sinon ``False``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3048
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3073
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3085
2016-10-30 09:46:26 +00:00
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 : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3098
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3110
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3124
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3133
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3167
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3188
2016-10-30 09:46:26 +00:00
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)``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3210
2016-10-30 09:46:26 +00:00
msgid "``printf``-style Bytes Formatting"
msgstr "Formatage de *bytes* a la ``printf``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3228
2016-10-30 09:46:26 +00:00
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 derreurs classiques "
"(typiquement, échouer à afficher des tuples ou des dictionnaires "
"correctement). Si la valeur à afficher peut être un tuple ou un "
"dictionnaire, mettez le a l'intérieur d'un autre tuple."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3233
2016-10-30 09:46:26 +00:00
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 ""
2017-05-15 11:29:27 +00:00
"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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3240
2016-10-30 09:46:26 +00:00
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 tuple, 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)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3269
2016-10-30 09:46:26 +00:00
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 :"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3337
2016-10-30 09:46:26 +00:00
msgid "Single byte (accepts integer or single byte objects)."
2017-05-15 11:29:27 +00:00
msgstr "Octet simple (Accepte un nombre entier ou un seul objet *byte*)."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3340
2016-10-30 09:46:26 +00:00
msgid "``'b'``"
msgstr "``'b'``"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3340
2016-10-30 09:46:26 +00:00
msgid ""
"Bytes (any object that follows the :ref:`buffer protocol <bufferobjects>` or "
"has :meth:`__bytes__`)."
msgstr ""
2017-05-15 11:29:27 +00:00
"*Bytes* (tout objet respectant le :ref:`buffer protocol <bufferobjects>` ou "
"ayant la méthode :meth:`__bytes__`)."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3344
2016-10-30 09:46:26 +00:00
msgid ""
"``'s'`` is an alias for ``'b'`` and should only be used for Python2/3 code "
"bases."
msgstr ""
2017-05-15 11:29:27 +00:00
"``'s'`` est un alias de ``'b'`` et ne devrait être utilisé que pour du code "
"Python2/3."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3347
2016-10-30 09:46:26 +00:00
msgid ""
"Bytes (converts any Python object using ``repr(obj)."
"encode('ascii','backslashreplace)``)."
msgstr ""
2017-05-15 11:29:27 +00:00
"*Bytes* (convertis n'importe quel objet Python en utilisant ``repr(obj)."
"encode('ascii', 'backslashreplace)``)."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3350
2016-10-30 09:46:26 +00:00
msgid ""
"``'r'`` is an alias for ``'a'`` and should only be used for Python2/3 code "
"bases."
msgstr ""
2017-05-15 11:29:27 +00:00
"``'r'`` est un alias de ``'a'`` et ne devrait être utilise que dans du code "
"Python2/3."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3350
2017-04-02 20:14:06 +00:00
msgid "\\(7)"
msgstr "\\(7)"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3385
2016-10-30 09:46:26 +00:00
msgid "``b'%s'`` is deprecated, but will not be removed during the 3.x series."
2018-06-10 22:04:53 +00:00
msgstr "``b'%s'`` est obsolète, mais ne sera pas retiré des version 3.x."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3388
2016-10-30 09:46:26 +00:00
msgid "``b'%r'`` is deprecated, but will not be removed during the 3.x series."
2018-06-10 22:04:53 +00:00
msgstr "``b'%r'`` est obsolète mais ne sera pas retiré dans Python 3.x."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3400
2018-06-17 08:43:33 +00:00
msgid ":pep:`461` - Adding % formatting to bytes and bytearray"
2018-06-17 20:28:31 +00:00
msgstr ":pep:`461` - Ajout du formatage via % aux *bytes* et *bytesarray*"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3407
2016-10-30 09:46:26 +00:00
msgid "Memory Views"
msgstr "Memory Views"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3409
2016-10-30 09:46:26 +00:00
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:`memoryview` permettent a du code Python d'accéder sans copie aux "
"données internes d'un objet pendant en charge le :ref:`buffer protocol "
"<bufferobjects>`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3415
2016-10-30 09:46:26 +00:00
msgid ""
"Create a :class:`memoryview` that references *obj*. *obj* must support the "
"buffer protocol. Built-in objects that support the buffer protocol include :"
"class:`bytes` and :class:`bytearray`."
msgstr ""
"Crée une :class:`memoryview` faisant référence à *obj*. *obj* doit supporter "
"le *buffer protocol*. Les objets natifs pendant en charge le *buffer "
"protocol* sont :class:`bytes` et :class:`bytearray`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3419
2016-10-30 09:46:26 +00:00
msgid ""
"A :class:`memoryview` has the notion of an *element*, which is the atomic "
"memory unit handled by the originating object *obj*. 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:`memoryview` a la notion d'*element*, qui est l'unité de mémoire "
"atomique géré par l'objet *obj* 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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3425
2016-10-30 09:46:26 +00:00
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 donnera la taille en octets "
"d'un élément."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3432
2016-10-30 09:46:26 +00:00
msgid ""
"A :class:`memoryview` supports slicing and indexing to expose its data. One-"
"dimensional slicing will result in a subview::"
msgstr ""
"Une :class:`memoryview` autorise le découpage et l'indicage de ses données. "
"Découper sur une dimension donnera une sous-vue ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3445
2016-10-30 09:46:26 +00:00
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 *tuple* de nombres entiers est "
"aussi autorisé et renvoie un seul *element* du bon type. Les *memoryview* à "
"une dimension peuvent être indexées avec un nombre entier ou un *tuple* d'un "
"entier. Les *memoryview* multi-dimensionnelles peuvent être indexées avec "
"des *tuples* d'exactement *ndim* entiers où *ndim* est le nombre de "
"dimensions. Les *memoryviews* à zéro dimension peuvent être indexées avec "
"un *tuple* vide."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3454
2016-10-30 09:46:26 +00:00
msgid "Here is an example with a non-byte format::"
msgstr "Voici un exemple avec un autre format que *byte* ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3466
2016-10-30 09:46:26 +00:00
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 *memoryview* "
"autorisera les assignations de tranches à une dimension. Redimensionner "
"n'est cependant pas autorisé ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3487
2016-10-30 09:46:26 +00:00
msgid ""
"One-dimensional memoryviews of 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 *memoryviews* à une dimension de types hachables (lecture seule) avec "
"les formats 'B', 'b', ou 'c' sont aussi hachables. La fonction de hachage "
"est définie tel que ``hash(m) == hash(m.tobytes())`` ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3499
2016-10-30 09:46:26 +00:00
msgid ""
"One-dimensional memoryviews can now be sliced. One-dimensional memoryviews "
"with formats 'B', 'b' or 'c' are now hashable."
msgstr ""
"Les *memoryviews* à une dimension peuvent aussi être découpées. Les "
"*memoryviews* à une dimension avec les formats 'B', 'b', ou 'c' sont "
"mainteannt hachables."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3503
2016-10-30 09:46:26 +00:00
msgid ""
"memoryview is now registered automatically with :class:`collections.abc."
"Sequence`"
msgstr ""
"*memoryview* est maintenant enregistrée automatiquement avec :class:"
"`collections.abc.Sequence`"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3507
2016-10-30 09:46:26 +00:00
msgid "memoryviews can now be indexed with tuple of integers."
msgstr ""
"Les *memoryviews* peut maintenant être indexées par un tuple d'entiers."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3510
2016-10-30 09:46:26 +00:00
msgid ":class:`memoryview` has several methods:"
msgstr "La :class:`memoryview` dispose de plusieurs méthodes :"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3514
2016-10-30 09:46:26 +00:00
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 *memoryview* et un *exporter* de la :pep:`3118` sont égaux si leurs "
"formes sont équivalentes et si toutes les valeurs correspondantes sont "
"égales, le format respectifs des opérandes étant interprétés en utilisant la "
"syntaxe de :mod:`struct`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3518
2016-10-30 09:46:26 +00:00
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` supportés par :meth:"
"`tolist`, ``v`` et ``w`` sont égaux si ``v.tolist() ==w.tolist()`` ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3537
2016-10-30 09:46:26 +00:00
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 format n'est pas supporté par le module de :mod:`struct`, les "
"objets seront toujours considérés différents (même si les formats et les "
"valeurs contenues sont identiques) : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3553
2016-10-30 09:46:26 +00:00
msgid ""
"Note that, as with floating point numbers, ``v is w`` does *not* imply ``v "
"== w`` for memoryview objects."
msgstr ""
"Notez que pour les *memoryview*, comme pour les nombres à virgule flottante, "
"``v is w`` *n'implique pas* ``v == w``."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3556
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3562
2016-10-30 09:46:26 +00:00
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 du *buffer* sous forme de *bytes*. Cela équivaut à "
"appeler le constructeur :class:`bytes` sur le memoryview. ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3571
2016-10-30 09:46:26 +00:00
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 arrays non contigus le résultat est égal à la représentation en "
"liste aplatie dont tous les éléments sont convertis en octets. :meth:"
"`tobytes` supporte toutes les chaînes de format, y compris celles qui ne "
"sont pas connues du module :mod:`struct`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3578
2016-10-30 09:46:26 +00:00
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 du "
"buffer. ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3589
2016-10-30 09:46:26 +00:00
msgid "Return the data in the buffer as a list of elements. ::"
msgstr ""
"Renvoie les données du buffer suus la forme d'une liste d'éléments. ::::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3599
2016-10-30 09:46:26 +00:00
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ésentationsmultidimensionnelles."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3606
2016-10-30 09:46:26 +00:00
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 prennent des initiatives particulières 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 en libérer les resources liées) aussi tôt que "
"possible."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3612
2016-10-30 09:46:26 +00:00
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 "
"*view* léve une :class:`ValueError` (sauf :meth:`release()` elle-même qui "
"peut être appelée plusieurs fois) : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3623
2016-10-30 09:46:26 +00:00
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`` : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3639
2016-10-30 09:46:26 +00:00
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 *memoryview*. Par défaut *shape* vaut "
"``[byte_length//new_itemsize]``, ce qui signifie que la vue résultante "
"n'aura qu'une dimension. La valeur renvoyee est une nouvelle *memoryview*, "
"mais buffer lui-même est pas copié. Les changements supportés sont 1D -> C-:"
"term:`contiguous` et *C-contiguous* -> 1D."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3645
2016-10-30 09:46:26 +00:00
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."
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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3650
2016-10-30 09:46:26 +00:00
msgid "Cast 1D/long to 1D/unsigned bytes::"
msgstr "Transforme *1D/long* en *1D/unsigned bytes* : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3673
2016-10-30 09:46:26 +00:00
msgid "Cast 1D/unsigned bytes to 1D/char::"
msgstr "Transforme *1D/unsigned bytes* en *1D/char* : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3686
2016-10-30 09:46:26 +00:00
msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::"
msgstr "Transforme *1D/bytes* en *3D/ints* en *1D/signed char* : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3712
2016-10-30 09:46:26 +00:00
msgid "Cast 1D/unsigned char to 2D/unsigned long::"
msgstr "Transforme *1D/unsigned char* en *2D/unsigned long* : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3726
2016-10-30 09:46:26 +00:00
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."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3729
2016-10-30 09:46:26 +00:00
msgid "There are also several readonly attributes available:"
msgstr "Plusieurs attributs en lecture seule sont également disponibles :"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3733
2016-10-30 09:46:26 +00:00
msgid "The underlying object of the memoryview::"
msgstr "L'objet sous-jacent de la *memoryview* : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3744
2016-10-30 09:46:26 +00:00
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())``. Ceci est "
"l'espace que l'array utiliserait en octets, dans unereprésentation contiguë. "
"Ce n'est pas nécessairement égale à ``len(m)`` : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3763
2016-10-30 09:46:26 +00:00
msgid "Multi-dimensional arrays::"
msgstr "Tableaux multidimensionnels : ::"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3780
2016-10-30 09:46:26 +00:00
msgid "A bool indicating whether the memory is read only."
msgstr "Un booléen indiquant si la mémoire est en lecture seule."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3784
2016-10-30 09:46:26 +00:00
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 ""
"Une chaîne contenant le format (dans le style de :mod:`struct`) pour chaque "
"élément de la vue. Une *memoryview* 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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3789
2016-10-30 09:46:26 +00:00
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``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3795
2016-10-30 09:46:26 +00:00
msgid "The size in bytes of each element of the memoryview::"
msgstr "La taille en octets de chaque élément d'une *memoryview* ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3808
2016-10-30 09:46:26 +00:00
msgid ""
"An integer indicating how many dimensions of a multi-dimensional array the "
"memory represents."
msgstr ""
"Un nombre entier indiquant le nombre de dimensions d'un tableau multi-"
"dimensionnel représenté par la *memoryview*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3813
2016-10-30 09:46:26 +00:00
msgid ""
"A tuple of integers the length of :attr:`ndim` giving the shape of the "
"memory as an N-dimensional array."
msgstr ""
"Un *tuple* d'entiers de longueur :attr:`ndim` donnant la forme de la "
"*memoryview* sous forme d'un tableau à N dimensions."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3816 ../Doc/library/stdtypes.rst:3824
2016-10-30 09:46:26 +00:00
msgid "An empty tuple instead of ``None`` when ndim = 0."
msgstr "Un *tuple* vide au lieu de ``None`` lorsque *ndim = 0*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3821
2016-10-30 09:46:26 +00:00
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 ""
"Un *tuple* d'entiers de longueur :attr:`ndim` donnant la taille en octets "
"permettant d'accéder à chaque dimensions du tableau."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3829
2016-10-30 09:46:26 +00:00
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é "
"qu'a titre d'information."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3833
2016-10-30 09:46:26 +00:00
msgid "A bool indicating whether the memory is C-:term:`contiguous`."
msgstr "Un booléen indiquant si la mémoire est C-:term:`contiguous`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3839
2016-10-30 09:46:26 +00:00
msgid "A bool indicating whether the memory is Fortran :term:`contiguous`."
msgstr "Un booléen indiquant si la mémoire est Fortran :term:`contiguous`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3845
2016-10-30 09:46:26 +00:00
msgid "A bool indicating whether the memory is :term:`contiguous`."
msgstr "Un booléen indiquant si la mémoire est :term:`contiguous`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3853
2016-10-30 09:46:26 +00:00
msgid "Set Types --- :class:`set`, :class:`frozenset`"
msgstr "Types d'ensembles --- :class:`set`, :class:`frozenset`"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3857
2016-10-30 09:46:26 +00:00
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 objet :dfn:`set` est une collection non-triée d'objets :term:`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:"
"`list`, et :class:`tuple`, ainsi que le module :mod:`collections`.)"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3864
2016-10-30 09:46:26 +00:00
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 supportent ``x in set``, "
"``len(set)``, et ``for x in set``. En temps que collection non-triée, les "
"ensembles n'enregistrent pas la position des éléments ou leur ordre "
"d'insertion. En conséquence, les *sets* n'autorisent ni l'indexation, ni le "
"découpage, ou tout autre comportement de séquence."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3869
2016-10-30 09:46:26 +00:00
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 ""
2017-05-16 12:01:57 +00:00
"Il existe actuellement deux types natifs pour les ensembles, :class:`set` "
"et :class:`fronzenset`. 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 "
2017-05-16 12:01:57 +00:00
"donc pas être utilisé ni comme clef de dictionnaire ni comme élément d'un "
"autre ensemble. Le type :class:`frozenset` est immuable et :term:`hashable` "
"--- son contenu ne peut être modifié après sa création, il peut ainsi être "
"utilisé comme clef de dictionnaire ou élément d'un autre *set*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3877
2016-10-30 09:46:26 +00:00
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 ""
2017-05-16 22:07:16 +00:00
"Des *sets* (mais pas des *frozensets*) peuvent être crées 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`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3881
2016-10-30 09:46:26 +00:00
msgid "The constructors for both classes work the same:"
2017-05-16 22:07:16 +00:00
msgstr "Les constructeurs des deux classes fonctionnent pareil :"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3886
2016-10-30 09:46:26 +00:00
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 ""
2017-05-16 22:07:16 +00:00
"Renvoie un nouveau *set* ou *frozenset* dont les éléments viennent "
"d'*iterable*. Les éléments d'un *set* doivent être :term:`hashable`. Pour "
"représenter des *sets* de *sets* les *sets* intérieurs doivent être des :"
"class:`frozenset`. Si *iterable* n'est pas spécifié, un nouveau *set* vide "
"est renvoyé."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3892
2016-10-30 09:46:26 +00:00
msgid ""
"Instances of :class:`set` and :class:`frozenset` provide the following "
"operations:"
msgstr ""
2017-05-16 22:07:16 +00:00
"Les instances de :class:`set` et :class:`frozenset` fournissent les "
"opérations suivantes :"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3897
2016-10-30 09:46:26 +00:00
msgid "Return the number of elements in set *s* (cardinality of *s*)."
msgstr "Donne le nombre d'éléments dans le *set* *s* (cardinalité de *s*)."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3901
2016-10-30 09:46:26 +00:00
msgid "Test *x* for membership in *s*."
2017-05-16 22:07:16 +00:00
msgstr "Test d'appartenance de *x* dans *s*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3905
2016-10-30 09:46:26 +00:00
msgid "Test *x* for non-membership in *s*."
2017-05-16 22:07:16 +00:00
msgstr "Test de non-appartenance de *x* dans *s*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3909
2016-10-30 09:46:26 +00:00
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 ""
2017-05-16 22:07:16 +00:00
"Renvoie ``True`` si l'ensemble n'a aucun élément en commun avec *other*. "
"Les ensembles sont disjoints si et seulement si leurs intersection est un "
"ensemble vide."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3915
2016-10-30 09:46:26 +00:00
msgid "Test whether every element in the set is in *other*."
2017-05-16 22:07:16 +00:00
msgstr "Teste si tous les éléments du set sont dans *other*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3919
2016-10-30 09:46:26 +00:00
msgid ""
"Test whether the set is a proper subset of *other*, that is, ``set <= other "
"and set != other``."
msgstr ""
2017-05-16 22:07:16 +00:00
"Teste si l'ensemble est un sous-ensemble de *other*, c'est-à-dire, ``set <= "
"other and set != other``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3925
2016-10-30 09:46:26 +00:00
msgid "Test whether every element in *other* is in the set."
2017-05-16 22:07:16 +00:00
msgstr "Teste si tous les éléments de *other* sont dans l'ensemble."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3929
2016-10-30 09:46:26 +00:00
msgid ""
"Test whether the set is a proper superset of *other*, that is, ``set >= "
"other and set != other``."
msgstr ""
2017-05-16 22:07:16 +00:00
"Teste si l'ensemble est un sur-ensemble de *other*, c'est-à-dire, ``set >= "
"other and set != other``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3935
2016-10-30 09:46:26 +00:00
msgid "Return a new set with elements from the set and all others."
msgstr ""
2017-05-16 22:07:16 +00:00
"Renvoie un nouvel ensemble dont les éléments viennent de l'ensemble et de "
"tous les autres."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3940
2016-10-30 09:46:26 +00:00
msgid "Return a new set with elements common to the set and all others."
msgstr ""
2017-05-16 22:07:16 +00:00
"Renvoie un nouvel ensemble dont les éléments sont commun à l'ensemble et à "
"tous les autres."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3945
2016-10-30 09:46:26 +00:00
msgid "Return a new set with elements in the set that are not in the others."
msgstr ""
2017-05-16 22:07:16 +00:00
"Renvoie un nouvel ensemble dont les éléments sont dans l'ensemble mais ne "
"sont dans aucun des autres."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3950
2016-10-30 09:46:26 +00:00
msgid ""
"Return a new set with elements in either the set or *other* but not both."
msgstr ""
2017-05-16 22:07:16 +00:00
"Renvoie un nouvel ensemble dont les éléments sont soit dans l'ensemble, soit "
"dans les autres, mais pas dans les deux."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3954
2016-10-30 09:46:26 +00:00
msgid "Return a new set with a shallow copy of *s*."
2017-05-16 22:07:16 +00:00
msgstr "Renvoie un nouvel ensemble, copie de surface de *s*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3957
2016-10-30 09:46:26 +00:00
msgid ""
"Note, the non-operator versions of :meth:`union`, :meth:`intersection`, :"
"meth:`difference`, and :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 ""
2017-05-25 14:24:27 +00:00
"Remarque : Les méthodes :meth:`union`, :meth:`intersection`, :meth:"
"`difference`, et :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 *sets*. 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')``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3964
2016-10-30 09:46:26 +00:00
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 ""
2017-05-28 21:45:20 +00:00
"Les classes :class:`set` et :class:`frozenset` supportent les comparaisons "
"d'ensemble à ensemble. Deux ensembles sont égaux si et seulement si chaque "
"éléments 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 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 du second "
"(est un sur-ensemble mais n'est pas égal)."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3971
2016-10-30 09:46:26 +00:00
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 ""
2017-05-28 21:45:20 +00:00
"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')])``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3975
2016-10-30 09:46:26 +00:00
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 ""
2017-05-28 21:45:20 +00:00
"Les comparaisons de sous-ensemble et d'égalité ne se généralisent pas en une "
"fonction donnant un ordre total. Par exemple, deux ensemble 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``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3980
2016-10-30 09:46:26 +00:00
msgid ""
"Since sets only define partial ordering (subset relationships), the output "
"of the :meth:`list.sort` method is undefined for lists of sets."
msgstr ""
2017-05-28 21:45:20 +00:00
"Puisque les *sets* 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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3983
2016-10-30 09:46:26 +00:00
msgid "Set elements, like dictionary keys, must be :term:`hashable`."
msgstr ""
2017-05-28 21:45:20 +00:00
"Les éléments des *sets*, comme les clefs de dictionnaires, doivent être :"
"term:`hashable`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3985
2016-10-30 09:46:26 +00:00
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 ""
2017-05-28 21:45:20 +00:00
"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`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3989
2016-10-30 09:46:26 +00:00
msgid ""
"The following table lists operations available for :class:`set` that do not "
"apply to immutable instances of :class:`frozenset`:"
msgstr ""
2017-05-28 21:45:20 +00:00
"La table suivante liste les opérations disponibles pour les :class:`set` "
"mais qui ne s'appliquent pas aux instances de :class:`frozenset` :"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:3995
2016-10-30 09:46:26 +00:00
msgid "Update the set, adding elements from all others."
2017-05-28 21:45:20 +00:00
msgstr "Met à jour l'ensemble, ajoutant les éléments de tous les autres."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4000
2016-10-30 09:46:26 +00:00
msgid "Update the set, keeping only elements found in it and all others."
msgstr ""
2017-05-28 21:45:20 +00:00
"Met à jour l'ensemble, ne gardant que les éléments trouvés dans tous les "
"autres."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4005
2016-10-30 09:46:26 +00:00
msgid "Update the set, removing elements found in others."
2017-05-28 21:45:20 +00:00
msgstr "Met à jour l'ensemble, retirant les éléments trouvés dans les autres."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4010
2016-10-30 09:46:26 +00:00
msgid ""
"Update the set, keeping only elements found in either set, but not in both."
msgstr ""
2017-05-28 21:45:20 +00:00
"Met à jour le set, ne gardant que les éléments trouvés dans un des ensembles "
"mais pas dans les deux."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4014
2016-10-30 09:46:26 +00:00
msgid "Add element *elem* to the set."
2017-05-28 21:45:20 +00:00
msgstr "Ajoute l'élément *elem* au set."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4018
2016-10-30 09:46:26 +00:00
msgid ""
"Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not "
"contained in the set."
msgstr ""
2017-05-28 21:45:20 +00:00
"Retire l'élément *elem* de l'ensemble. Lève une exception :exc:`KeyError` si "
"*elem* n'est pas dans l'ensemble."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4023
2016-10-30 09:46:26 +00:00
msgid "Remove element *elem* from the set if it is present."
2017-05-28 21:45:20 +00:00
msgstr "Retire l'élément *elem* de l'ensemble s'il y est."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4027
2016-10-30 09:46:26 +00:00
msgid ""
"Remove and return an arbitrary element from the set. Raises :exc:`KeyError` "
"if the set is empty."
msgstr ""
2017-05-28 21:45:20 +00:00
"Retire et renvoie un élément arbitraire de l'ensemble. Lève une exception :"
"exc:`KeyError` si l'ensemble est vide."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4032
2016-10-30 09:46:26 +00:00
msgid "Remove all elements from the set."
2017-05-28 21:45:20 +00:00
msgstr "Supprime tous les éléments du *set*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4035
2016-10-30 09:46:26 +00:00
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 ""
2017-05-28 21:45:20 +00:00
"Notez que les versions non-opérateurs des méthodes :meth:`update`, :meth:"
"`intersection_update`, :meth:`difference_update`, et :meth:"
"`symmetric_difference_update` acceptent n'importe quel itérable comme "
"argument."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4040
2016-10-30 09:46:26 +00:00
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 "
2017-08-01 11:29:09 +00:00
"frozenset, a temporary one is created from *elem*."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-28 21:45:20 +00:00
"Notez que l'argument *elem* des méthodes :meth:`__contains__`, :meth:"
2017-08-01 12:16:10 +00:00
"`remove`, et :meth:`discard` peut être un ensemble. Pour supporter la "
"recherche d'un *frozenset* équivalent, un *frozenset* temporaire est crée "
"depuis *elem*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4048
2016-10-30 09:46:26 +00:00
msgid "Mapping Types --- :class:`dict`"
2017-05-28 21:45:20 +00:00
msgstr "Les types de correspondances --- :class:`dict`"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4058
2016-10-30 09:46:26 +00:00
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 ""
2017-05-27 21:39:44 +00:00
"Un objet :term:`mapping` fait correspondre des valeurs :term:`hashable` à "
"des objets arbitraires. Les *mappings* sont des objets muables. Il n'existe "
"pour le moment qu'un type de *mapping* standard, le :dfn:`dictionary`. "
"(Pour les autres conteneurs, voir les types natifs :class:`list`, :class:"
"`set`, and :class:`tuple`, et le module :mod:`collections`.)"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4064
2016-10-30 09:46:26 +00:00
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. Numeric types used for keys obey the normal rules "
"for numeric comparison: if two numbers compare equal (such as ``1`` and "
"``1.0``) then they can be used interchangeably to index the same dictionary "
"entry. (Note however, that since computers store floating-point numbers as "
"approximations it is usually unwise to use them as dictionary keys.)"
msgstr ""
2017-05-28 21:45:20 +00:00
"Les clefs d'un dictionnaire sont *presque* des données arbitraires. Les "
"valeurs qui ne sont pas :term:`hashable`, c'est-à-dire qui contiennent les "
"listes, des dictionnaires ou autre type muable (qui sont comparés par valeur "
"plutôt que par leur identité) ne peuvent pas être utilisées comme clef de "
"dictionnaire. Les types numériques utilisés comme clef obéissent aux règles "
"classiques en ce qui concerne les comparaisons : si deux nombres sont égaux "
"(comme ``1`` et ``1.0``) ils peuvent tous les deux être utilisés pour "
2017-05-28 21:45:20 +00:00
"obtenir la même entrée d'un dictionnaire. (Notez cependant que puisque les "
"ordinateurs stockent les nombres à virgule flottante sous forme "
"d'approximations, il est généralement imprudent de les utiliser comme clefs "
"de dictionnaires.)"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4073
2016-10-30 09:46:26 +00:00
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 ""
2017-05-28 21:45:20 +00:00
"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`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4081
2016-10-30 09:46:26 +00:00
msgid ""
"Return a new dictionary initialized from an optional positional argument and "
"a possibly empty set of keyword arguments."
msgstr ""
2017-05-28 21:45:20 +00:00
"Renvoie un nouveau dictionnaire initialisé depuis un argument positionnel "
"optionnel, et un ensemble (vide ou non) d'arguments par mot clef."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4084
2016-10-30 09:46:26 +00:00
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 ""
2017-05-28 21:45:20 +00:00
"Si aucun arument 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 clef-valeurs que le *mapping* "
"donné. Autrement, l'argument positionnel doit être un objet :term:"
"`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 la une clef du nouveau dictionnaire, et le second devient sa valeur "
"correspondante. Si une clef apparaît plus d'une fois, la dernière valeur "
"pour cette clef devient la valeur correspondante à cette clef dans le "
"nouveau dictionnaire."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4094
2016-10-30 09:46:26 +00:00
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 ""
2017-05-28 21:45:20 +00:00
"Si des arguments nommés sont donnés, ils sont ajoutés au dictionnaire crée "
"depuis l'argument positionnel. Si une clef est déjà présente, la valeur de "
"l'argument nommé remplace la valeur reçue par l'argument positionnel."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4099
2016-10-30 09:46:26 +00:00
msgid ""
"To illustrate, the following examples all return a dictionary equal to "
"``{\"one\": 1, \"two\": 2, \"three\": 3}``::"
msgstr ""
2017-06-05 19:57:45 +00:00
"Typiquement, les exemples suivants renvoient tous un dictionnaire valant "
"``{\"one\": 1, \"two\": 2, \"three\": 3}`` : ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4110
2016-10-30 09:46:26 +00:00
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 ""
2017-06-05 19:57:45 +00:00
"Fournir les arguments nommés comme dans le premier exemple en fonctionne que "
"pour des clefs qui sont des identifiants valide en Python. Dans les autres "
"cas, toutes les clefs valides sont utilisables."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4114
2016-10-30 09:46:26 +00:00
msgid ""
"These are the operations that dictionaries support (and therefore, custom "
"mapping types should support too):"
msgstr ""
2017-06-05 19:57:45 +00:00
"Voici les opérations gérées par les dictionnaires, (par conséquent, d'autres "
"types de *mapping* peuvent les gérer aussi) :"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4119
2016-10-30 09:46:26 +00:00
msgid "Return the number of items in the dictionary *d*."
2017-06-05 19:57:45 +00:00
msgstr "Renvoie le nombre d'éléments dans le dictionnaire *d*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4123
2016-10-30 09:46:26 +00:00
msgid ""
"Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is "
"not in the map."
msgstr ""
2017-06-05 19:57:45 +00:00
"Donne l'élément de *d* dont la clef est *key*. Lève une exception :exc:"
"`KeyError` si *key* n'est pas dans le dictionnaire."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4128
2016-10-30 09:46:26 +00:00
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 ""
2017-06-06 21:45:34 +00:00
"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 clef "
"*key* en argument. L'opération ``d[key]`` renverra la valeur, ou lèvera "
"l'exception renvoyée ou levée par l'appel à ``__missing__(key)``. Aucune "
"autre opération ni méthode n'appellent :meth:`__missing__`. If :meth:"
"`__missing__` n'est pas définie, une exception :exc:`KeyError` est levée. :"
"meth:`__missing__` doit être une méthode; ça ne peut être une variable "
"d'instance ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4146
2016-10-30 09:46:26 +00:00
msgid ""
"The example above shows part of the implementation of :class:`collections."
"Counter`. A different ``__missing__`` method is used by :class:`collections."
"defaultdict`."
msgstr ""
2017-06-06 21:45:34 +00:00
"L'exemple ci-dessus montre une partie de l'implémentation de :class:"
"`collections.Counter`. :class:`collections.defaultdict` implémente aussi "
"``__missing__``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4152
2016-10-30 09:46:26 +00:00
msgid "Set ``d[key]`` to *value*."
2017-06-06 21:45:34 +00:00
msgstr "Assigne ``d[key]`` à *value*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4156
2016-10-30 09:46:26 +00:00
msgid ""
"Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the "
"map."
msgstr ""
2017-06-06 21:45:34 +00:00
"Supprime ``d[key]`` de *d*. Lève une exception :exc:`KeyError` si *key* "
"n'est pas dans le dictionnaire."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4161
2016-10-30 09:46:26 +00:00
msgid "Return ``True`` if *d* has a key *key*, else ``False``."
2017-06-06 21:45:34 +00:00
msgstr "Renvoie ``True`` si *d* a la clef *key*, sinon ``False``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4165
2016-10-30 09:46:26 +00:00
msgid "Equivalent to ``not key in d``."
2017-06-06 21:45:34 +00:00
msgstr "Équivalent à ``not key in d``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4169
2016-10-30 09:46:26 +00:00
msgid ""
"Return an iterator over the keys of the dictionary. This is a shortcut for "
"``iter(d.keys())``."
msgstr ""
2017-06-06 21:45:34 +00:00
"Renvoie un itérateur sur les clefs du dictionnaire. C'est un raccourci pour "
"``iter(d.keys())``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4174
2016-10-30 09:46:26 +00:00
msgid "Remove all items from the dictionary."
2017-05-28 21:45:20 +00:00
msgstr "Supprime tous les éléments du dictionnaire."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4178
2016-10-30 09:46:26 +00:00
msgid "Return a shallow copy of the dictionary."
2017-06-06 21:45:34 +00:00
msgstr "Renvoie une copie de surface du dictionnaire."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4182
2016-10-30 09:46:26 +00:00
msgid "Create a new dictionary with keys from *seq* and values set to *value*."
msgstr ""
2017-06-06 21:45:34 +00:00
"Crée un nouveau dictionnaire avec les clefs de *seq* et les valeurs à "
"*value*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4184
2016-10-30 09:46:26 +00:00
msgid ""
":meth:`fromkeys` is a class method that returns a new dictionary. *value* "
"defaults to ``None``."
msgstr ""
2017-05-27 21:39:44 +00:00
":meth:`fromkeys` est une *class method* qui renvoie un nouveau dictionnaire. "
"*value* vaut ``None`` par défaut."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4189
2016-10-30 09:46:26 +00:00
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 ""
2017-06-06 21:45:34 +00:00
"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`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4195
2016-10-30 09:46:26 +00:00
msgid ""
"Return a new view of the dictionary's items (``(key, value)`` pairs). See "
"the :ref:`documentation of view objects <dict-views>`."
msgstr ""
2017-08-01 22:11:48 +00:00
"Renvoie une nouvelle vue des éléments du dictionnaire (paires de ``(key, "
2017-08-08 08:45:02 +00:00
"value)``). Voir la :ref:`documentation des vues <dict-views>`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4200
2016-10-30 09:46:26 +00:00
msgid ""
"Return a new view of the dictionary's keys. See the :ref:`documentation of "
"view objects <dict-views>`."
msgstr ""
2017-08-01 22:11:48 +00:00
"Renvoie une nouvelle vue des clefs du dictionnaire. Voir la :ref:"
"`documentation des vues <dict-views>`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4205
2016-10-30 09:46:26 +00:00
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 ""
2017-08-01 22:11:48 +00:00
"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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4211
2016-10-30 09:46:26 +00:00
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 (dernière entrée, prenière sortie)`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4214
2016-10-30 09:46:26 +00:00
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 ""
2017-05-27 21:39:44 +00:00
":meth:`popitem` est pratique pour itérer un dictionnaire de manière "
"destrictive, comme souvent dans les algorithmes sur les ensembles. Si le "
"dictionnaire est vide, appeler :meth:`popitem` lève une :exc:`KeyError`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4218
msgid ""
"LIFO order is now guaranteed. In prior versions, :meth:`popitem` would "
"return an arbitrary key/value pair."
msgstr ""
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4224
2016-10-30 09:46:26 +00:00
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 ""
2017-08-01 22:11:48 +00:00
"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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4230
2016-10-30 09:46:26 +00:00
msgid ""
"Update the dictionary with the key/value pairs from *other*, overwriting "
"existing keys. Return ``None``."
msgstr ""
2017-08-01 22:11:48 +00:00
"Met à jour le dictionnaire avec les paires de clef/valeur d'*other*, "
"écrasant les clefs existantes. Renvoie ``None``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4233
2016-10-30 09:46:26 +00:00
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 ""
2017-05-27 21:39:44 +00:00
":meth:`update` accepte aussi bien un autre dictionnaire qu'un itérable de "
"clef/valeurs (sous forme de *tuples* ou autre itérables de longueur deux). "
"Si des paramètres par mot-clef sont donnés, le dictionnaire et ensuite mis à "
"jour avec ces pairs de clef/valeurs : ``d.update(red=1, blue=2)``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4240
2016-10-30 09:46:26 +00:00
msgid ""
"Return a new view of the dictionary's values. See the :ref:`documentation "
"of view objects <dict-views>`."
msgstr ""
2017-08-01 22:11:48 +00:00
"Renvoie une nouvelle vue des valeurs du dictionnaire. Voir la :ref:"
"`documentation des vues <dict-views>`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4243
2016-10-30 09:46:26 +00:00
msgid ""
"Dictionaries compare equal if and only if they have the same ``(key, "
"value)`` pairs. Order comparisons ('<', '<=', '>=', '>') raise :exc:"
"`TypeError`."
msgstr ""
2017-08-01 22:11:48 +00:00
"Deux dictionnaires sont égaux si et seulement si ils ont les mêmes paires de "
"clef-valeur. Les comparaisons d'ordre ('<', '<=', '>=', '>') lèvent une :"
"exc:`TypeError`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4247
2018-06-28 13:32:56 +00:00
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. ::"
2018-06-28 13:32:56 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4265
2018-06-28 13:32:56 +00:00
msgid ""
"Dictionary order is guaranteed to be insertion order. This behavior was "
"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."
2018-06-28 13:32:56 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4270
2016-10-30 09:46:26 +00:00
msgid ""
":class:`types.MappingProxyType` can be used to create a read-only view of a :"
"class:`dict`."
msgstr ""
2017-05-27 21:39:44 +00:00
":class:`types.MappingProxyType` peut être utilisé pour créer une vue en "
"lecture seule d'un :class:`dict`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4277
2016-10-30 09:46:26 +00:00
msgid "Dictionary view objects"
2017-08-01 22:11:48 +00:00
msgstr "Les vues de dictionnaires"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4279
2016-10-30 09:46:26 +00:00
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 ""
2017-08-01 22:11:48 +00:00
"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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4284
2016-10-30 09:46:26 +00:00
msgid ""
"Dictionary views can be iterated over to yield their respective data, and "
"support membership tests:"
msgstr ""
2017-08-01 22:11:48 +00:00
"Les vues de dictonnaires peuvent être itérées et ainsi renvoyer les données "
"du dictionnaire, elle gèrent aussi les tests de présence :"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4289
2016-10-30 09:46:26 +00:00
msgid "Return the number of entries in the dictionary."
2017-08-01 22:11:48 +00:00
msgstr "Renvoie le nombre d'entrées du dictionnaire."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4293
2016-10-30 09:46:26 +00:00
msgid ""
"Return an iterator over the keys, values or items (represented as tuples of "
"``(key, value)``) in the dictionary."
msgstr ""
2017-08-01 22:11:48 +00:00
"Renvoie un itérateur sur les clefs, les valeurs, ou les éléments "
"(représentés par des *tuples* de ``(key, value)`` du dictionnaire."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4296
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"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()]``."
2016-10-30 09:46:26 +00:00
msgstr ""
2018-07-05 09:39:28 +00:00
"Les clefs 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()]``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4301
2016-10-30 09:46:26 +00:00
msgid ""
"Iterating views while adding or deleting entries in the dictionary may raise "
"a :exc:`RuntimeError` or fail to iterate over all entries."
msgstr ""
2017-08-01 22:11:48 +00:00
"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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4304
2018-06-28 13:32:56 +00:00
msgid "Dictionary order is guaranteed to be insertion order."
msgstr "L'ordre d'un dictionnaire est toujours l'ordre des insertions."
2018-06-28 13:32:56 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4309
2016-10-30 09:46:26 +00:00
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 ""
2017-08-01 22:11:48 +00:00
"Renvioie ``True`` si *x* est dans les clefs, les valeurs, ou les éléments du "
"dictionnaire sous-jacent (dans le dernier cas, *x* doit être un *tuple* "
"``(key, value)``)."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4313
2016-10-30 09:46:26 +00:00
msgid ""
"Keys views are set-like since their entries are unique and 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 ""
2017-08-13 22:08:36 +00:00
"Les vues de clefs sont semblables à des ensembles puisque leurs entrées sont "
"uniques et hachables. Si toutes les valeurs sont hachables, et qu'ainsi "
"toutes les paires de ``(key, value`` sont uniques et hachables, alors la vue "
"donnée par *items()* est aussi semblable à un ensemble. (Les vues données "
"par *items()* ne sont généralement pas traitées comme des ensembles, car "
"leurs valeurs ne sont généralement pas uniques.) Pour les vues semblables "
"aux ensembles, toutes les opérations définies dans la classe de base "
"abstraite :class:`collections.abc.Set` sont disponibles (comme ``==``, "
2017-08-13 22:08:36 +00:00
"``<``, ou ``^``)."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4320
2016-10-30 09:46:26 +00:00
msgid "An example of dictionary view usage::"
2017-05-28 21:45:20 +00:00
msgstr "Exemple d'utilisation de vue de dictionnaire : ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4355
2016-10-30 09:46:26 +00:00
msgid "Context Manager Types"
msgstr "Le type gestionnaire de contexte"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4362
2016-10-30 09:46:26 +00:00
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 ""
2017-08-13 22:08:36 +00:00
"L'instruction :keyword:`with` permet l'existance de contextes définis à "
"l'exécution par des gestionnaires de contextes. C'est implémenté via une "
"paire de méthodes permettant de définir un contexte, à l'exécution, qui est "
"entré avant l'exécution du corps de l'instruction, et qui est quitté lorsque "
"l'instruction se termine :"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4370
2016-10-30 09:46:26 +00:00
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 ""
2017-08-13 22:08:36 +00:00
"Entre dans le contexte à l'exécution, soit se renvoyant lui-même, soit en "
"renvoyant un autre objet en lien avec ce contexte. La valeur renvoyée par "
2018-05-12 14:00:27 +00:00
"cette méthode est liée à l'identifiant donné au :keyword:`as` de "
2017-08-13 22:08:36 +00:00
"l'instruction :keyword:`with` utilisant ce gestionnaire de contexte."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4375
2016-10-30 09:46:26 +00:00
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 ""
2017-05-28 21:45:20 +00:00
"Un exemple de gestionnaire de contexte se renvoyant lui-même est :term:`file "
"object`. Les *file objects* se renvoient eux-même depuis __enter__() et "
"autorisent :func:`open` à être utilisé comme contexte à une instruction :"
"keyword:`with`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4379
2016-10-30 09:46:26 +00:00
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 ""
2017-05-28 21:45:20 +00:00
"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:"
2017-08-08 07:50:04 +00:00
"`with` sans affecter le code en dehors de l'instruction :keyword:`with`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4389
2016-10-30 09:46:26 +00:00
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 ""
2017-08-13 22:08:36 +00:00
"Sort du contexte et renvoie un booléen indiquant si une exception survenue "
"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``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4394
2016-10-30 09:46:26 +00:00
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 ""
2017-09-12 11:36:14 +00:00
"L'instruction :keyword:`with` inhibera l'exception si cette méthode renvoie "
"une valeur vraie, l'execution continura ainsi à l'instruction suivant "
"immédiatement l'instruction :keyword:`with`. Sinon, l'exception continura de "
"se propager après la fin de cette méthode. Les exceptions se produiseant "
"pendant l'exécution de cette méthode remplaceront toute exception qui s'est "
"produite dans le corps du :keyword:`with`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4401
2016-10-30 09:46:26 +00:00
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 ""
2017-09-12 11:36:14 +00:00
"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 :"
2017-09-24 21:19:43 +00:00
"meth:`__exit__` a échoué."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4407
2016-10-30 09:46:26 +00:00
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 ""
2017-09-12 11:36:14 +00:00
"Python définit plusieurs gestionnaires de contexte pour faciliter la "
2017-12-08 11:58:06 +00:00
"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érement, ils respectement simplement le "
"protocole de gestion du contexte. Voir les examples dans la documentation du "
"module :mod:`contextlib`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4413
2016-10-30 09:46:26 +00:00
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:"
"`__enter__` and :meth:`__exit__` methods, rather than the iterator produced "
"by an undecorated generator function."
msgstr ""
2017-09-12 11:36:14 +00:00
"Les :term:`generator`\\s de 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`, elle "
"renverra un gestionnaire de contexte implémentant les méthodes :meth:"
"`__enter__` et :meth:`__exit__`, plutôt que l'itérateur produit par un "
"générateur non décoré."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4420
2016-10-30 09:46:26 +00:00
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 ""
2017-09-12 11:36:14 +00:00
"Notez qu'il n'y a pas de slot 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, les le "
"coût d'un accès au dictionnaire d'une classe unique est négligeable."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4430
2016-10-30 09:46:26 +00:00
msgid "Other Built-in Types"
2017-05-28 21:45:20 +00:00
msgstr "Autres types natifs"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4432
2016-10-30 09:46:26 +00:00
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 supportant "
2017-09-21 11:06:21 +00:00
"cependant qu'une ou deux opérations."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4439
2016-10-30 09:46:26 +00:00
msgid "Modules"
msgstr "Modules"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4441
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 11:06:21 +00:00
"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.)"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4448
2016-10-30 09:46:26 +00:00
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 ""
2017-05-28 21:45:20 +00:00
"Un attribut spécial à chaque module est :attr:`~object.__dict__`. C'est le "
"dictionnaire contenant la table des symbole du module. Modifier ce "
"dictionnaire changera 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é."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4456
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 11:06:21 +00:00
"Les modules natifs à l'interpréteur sont représentés ``<module 'sys' (built-"
"in)>``. S'ils sont chargés depuis un fichier, ils sont représentés "
"``<module 'os' from '/usr/local/lib/pythonX.Y/os.pyc'>``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4464
2016-10-30 09:46:26 +00:00
msgid "Classes and Class Instances"
msgstr "Les classes et instances de classes"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4466
2016-10-30 09:46:26 +00:00
msgid "See :ref:`objects` and :ref:`class` for these."
msgstr "Voir :ref:`objects` et :ref:`class`."
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4472
2016-10-30 09:46:26 +00:00
msgid "Functions"
msgstr "Fonctions"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4474
2016-10-30 09:46:26 +00:00
msgid ""
"Function objects are created by function definitions. The only operation on "
"a function object is to call it: ``func(argument-list)``."
msgstr ""
2017-09-21 11:06:21 +00:00
"Les objets fonctions sont crées par les définitions de fonctions. La seule "
"opération applicable à un objet fonction est de l'appeler : ``func(argument-"
"list)``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4477
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 11:06:21 +00:00
"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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4481
2016-10-30 09:46:26 +00:00
msgid "See :ref:`function` for more information."
2017-09-21 11:06:21 +00:00
msgstr "Voir :ref:`function` pour plus d'information."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4487
2016-10-30 09:46:26 +00:00
msgid "Methods"
msgstr "Méthodes"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4491
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 11:06:21 +00:00
"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 "
"représentées avec le type qui les supporte."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4496
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 11:06:21 +00:00
"Si vous accédez à une méthode (une fonction définie dans l'espace de nom "
"d'une classe) via une instance, vous obtenez un objet spécial, une :dfn:"
"`bound method` (aussi appellé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)``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4505
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 11:06:21 +00:00
"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 *bound method* est interdit. Toute tentative "
"d'affecter un attribut sur un objet *bound method* lèvera une :exc:"
"`AttributeError`. Pour affecter l'attribut, vous devrez explicitement "
"l'affecter à sa fonction sous-jascente ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4525 ../Doc/library/stdtypes.rst:4553
2016-10-30 09:46:26 +00:00
msgid "See :ref:`types` for more information."
2017-09-21 11:06:21 +00:00
msgstr "Voir :ref:`types` pour plus d'information."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4533
2016-10-30 09:46:26 +00:00
msgid "Code Objects"
msgstr "Objets code"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4539
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 11:06:21 +00:00
"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 des objets fonction "
"via leur attribut :attr:`__code__`. Voir aussi le module :mod:`code`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4550
2016-10-30 09:46:26 +00:00
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 ""
2017-05-28 21:45:20 +00:00
"Les objets code peuvent être exécutés ou évalués en les passant (au lieu "
"d'une chaîne contenant du code) aux fonction natives :func:`exec` ou :func:"
"`eval`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4559
2016-10-30 09:46:26 +00:00
msgid "Type Objects"
msgstr "Objets type"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4565
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 11:06:21 +00:00
"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."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4570
2016-10-30 09:46:26 +00:00
msgid "Types are written like this: ``<class 'int'>``."
2017-09-21 11:06:21 +00:00
msgstr "Les types sont représentés : ``<class 'int'>``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4576
2016-10-30 09:46:26 +00:00
msgid "The Null Object"
2017-09-21 11:06:21 +00:00
msgstr "L'objet Null"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4578
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 11:06:21 +00:00
"Cet objet est renvoyé par les fonctions ne renvoyant pas explicitement une "
"valeur. Il ne supporte aucune opération spéciale. Il existe exactement un "
"objet *null* nommé ``None`` (c'est un nom natif). ``type(None)()``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4582
2016-10-30 09:46:26 +00:00
msgid "It is written as ``None``."
2017-05-28 21:45:20 +00:00
msgstr "C'est écrit ``None``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4588
2016-10-30 09:46:26 +00:00
msgid "The Ellipsis Object"
msgstr "L'objet points de suspension"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4590
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 11:06:21 +00:00
"Cet objet est utilisé classiquement lors des découpes (voir :ref:"
"`slicings`). Il ne supporte aucune opération spéciale. Il n'y a qu'un seul "
"objet *ellipsis*, nommé :const:`Ellipsis` (un nom natif). ``type(Ellipsis)"
"()`` produit le *singleton* :const:`Ellipsis`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4595
2016-10-30 09:46:26 +00:00
msgid "It is written as ``Ellipsis`` or ``...``."
2017-05-28 21:45:20 +00:00
msgstr "C'est écrit ``Ellipsis`` ou ``...``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4601
2016-10-30 09:46:26 +00:00
msgid "The NotImplemented Object"
2017-09-21 11:06:21 +00:00
msgstr "L'objet *NotImplemented*"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4603
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 11:06:21 +00:00
"Cet objet est renvoyé depuis des comparaisons ou des opérations binaires "
"effectées sur des types qu'elles ne supportent pas. Voir :ref:`comparisons` "
"pour plus d'informations. Il n'y a qu'un seul objet ``NotImplemented``. "
"``type(NotImplemented)()`` renvoit un *singleton*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4608
2016-10-30 09:46:26 +00:00
msgid "It is written as ``NotImplemented``."
2017-05-28 21:45:20 +00:00
msgstr "C'est écrit ``NotImplemented``."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4614
2016-10-30 09:46:26 +00:00
msgid "Boolean Values"
2017-05-28 21:45:20 +00:00
msgstr "Valeurs Booléennes"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4616
2016-10-30 09:46:26 +00:00
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 ""
2017-05-28 21:45:20 +00:00
"Les valeurs booléennes sont les deux objet constants ``False`` et ``True``. "
"Ils son 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)."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4629
2016-10-30 09:46:26 +00:00
msgid "They are written as ``False`` and ``True``, respectively."
2017-09-21 11:06:21 +00:00
msgstr "Ils s'écrivent ``False`` et ``True``, respectivement."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4635
2016-10-30 09:46:26 +00:00
msgid "Internal Objects"
2017-05-28 21:45:20 +00:00
msgstr "Objets Internes"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4637
2016-10-30 09:46:26 +00:00
msgid ""
"See :ref:`types` for this information. It describes stack frame objects, "
"traceback objects, and slice objects."
msgstr ""
2017-09-21 11:06:21 +00:00
"Voir :ref:`types`. Ils décrivent les objets *stack frame*, *traceback*, et "
"*slice*."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4644
2016-10-30 09:46:26 +00:00
msgid "Special Attributes"
2017-09-21 11:06:21 +00:00
msgstr "Attributs Spéciaux"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4646
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 11:06:21 +00:00
"L'implémentation ajoute quelques attributs spéciaux et en lecture seule, à "
"certains types, lorsque ça a du sens. Certains ne sont *pas* listés par la "
"fonction native :func:`dir`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4653
2016-10-30 09:46:26 +00:00
msgid ""
"A dictionary or other mapping object used to store an object's (writable) "
"attributes."
msgstr ""
2017-05-28 21:45:20 +00:00
"Un dictionnaire ou un autre *mapping object* utilisé pour stocker les "
"attributs (modifiables) de l'objet."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4659
2016-10-30 09:46:26 +00:00
msgid "The class to which a class instance belongs."
2017-09-21 11:06:21 +00:00
msgstr "La classe de l'instance de classe."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4664
2016-10-30 09:46:26 +00:00
msgid "The tuple of base classes of a class object."
2017-09-21 11:06:21 +00:00
msgstr "Le *tuple* des classes parentes d'un objet classe."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4669
2016-10-30 09:46:26 +00:00
msgid ""
"The name of the class, function, method, descriptor, or generator instance."
2017-09-21 11:06:21 +00:00
msgstr "Le nom de la classe, fonction, méthode, descripteur, ou générateur."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4675
2016-10-30 09:46:26 +00:00
msgid ""
"The :term:`qualified name` of the class, function, method, descriptor, or "
"generator instance."
msgstr ""
2017-09-21 11:06:21 +00:00
"Le :term:`qualified name` de la classe, fonction, méthode, descripteur, ou "
"générateur."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4683
2016-10-30 09:46:26 +00:00
msgid ""
"This attribute is a tuple of classes that are considered when looking for "
"base classes during method resolution."
msgstr ""
2017-09-21 11:06:21 +00:00
"Cet attribut est un *tuple* contenant les classes parents prises en compte "
"lors de la résolution de méthode."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4689
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 11:06:21 +00:00
"Cette méthode peut être surchargée par une meta-classe pour personnaliser "
"l'ordre de la recherche de méthode pour ses instances. Elle est appelée à "
"la l'initialisation de la classe, et son résultat est stocké dans "
"l'attribut :attr:`~class.__mro__`."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4696
2016-10-30 09:46:26 +00:00
msgid ""
"Each class keeps a list of weak references to its immediate subclasses. "
"This method returns a list of all those references still alive. Example::"
msgstr ""
2017-09-21 11:06:21 +00:00
"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. Exemple : ::"
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4705
2016-10-30 09:46:26 +00:00
msgid "Footnotes"
msgstr "Notes"
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4706
2016-10-30 09:46:26 +00:00
msgid ""
"Additional information on these special methods may be found in the Python "
"Reference Manual (:ref:`customization`)."
msgstr ""
2017-05-28 21:45:20 +00:00
"Plus d'informations sur ces méthodes spéciales peuvent être trouvées dans le "
2018-03-20 23:16:43 +00:00
"*Python Reference Manual* (:ref:`customization`)."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4709
2016-10-30 09:46:26 +00:00
msgid ""
"As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, "
"and similarly for tuples."
msgstr ""
2017-05-28 21:45:20 +00:00
"Par conséquent, la liste ``[1, 2]`` est considérée égale à ``[1.0, 2.0]``. "
"Idem avec des tuples."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4712
2016-10-30 09:46:26 +00:00
msgid "They must have since the parser can't tell the type of the operands."
msgstr ""
2017-09-21 11:06:21 +00:00
"Nécessairement, puisque le parseur ne peut pas discerner le type des "
"opérandes."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4714
2016-10-30 09:46:26 +00:00
msgid ""
"Cased characters are those with general category property being one of \"Lu"
"\" (Letter, uppercase), \"Ll\" (Letter, lowercase), or \"Lt\" (Letter, "
"titlecase)."
msgstr ""
2017-09-21 11:06:21 +00:00
"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*)."
2016-10-30 09:46:26 +00:00
2018-09-15 20:37:31 +00:00
#: ../Doc/library/stdtypes.rst:4717
2016-10-30 09:46:26 +00:00
msgid ""
"To format only a tuple you should therefore provide a singleton tuple whose "
"only element is the tuple to be formatted."
msgstr ""
2017-09-21 11:06:21 +00:00
"Pour insérer un *tuple*, vous devez donc donner un *tuple* d'un seul "
"élément, contenant le *tuple* à insérer."
2017-04-02 20:14:06 +00:00
#~ msgid ""
#~ "Bitwise operations only make sense for integers. Negative numbers are "
#~ "treated as their 2's complement value (this assumes that there are enough "
#~ "bits so that no overflow occurs during the operation)."
#~ msgstr ""
#~ "Les opérations sur les bits n'ont de sens que pour les entiers. Les "
#~ "nombres négatifs sont traités comme leur complément à 2 (ce qui suppose "
#~ "un assez grand nombre de bits afin qu'aucun débordement ne se produise "
#~ "pendant l'opération)."
2018-06-17 08:43:33 +00:00
#~ msgid ":pep:`461`."
#~ msgstr ":pep:`461`."
2017-08-01 11:29:09 +00:00
#~ msgid "``None``"
#~ msgstr "``None``"
#~ msgid "``False``"
#~ msgstr "``False``"
#~ msgid "any empty sequence, for example, ``''``, ``()``, ``[]``."
#~ msgstr "toute séquence vide, par exemple, ``''``, ``()``, ``[]``."
#~ msgid "any empty mapping, for example, ``{}``."
#~ msgstr "toute dictionnaire vide, par exemple, ``{}``."
#~ msgid ""
#~ "instances of user-defined classes, if the class defines a :meth:"
#~ "`__bool__` or :meth:`__len__` method, when that method returns the "
#~ "integer zero or :class:`bool` value ``False``. [1]_"
#~ msgstr ""
#~ "pour les instances de classes définies par l'utilisateur, si la classe "
#~ "définit une méthode :meth:`__bool__` ou :meth:`__len__`, lorsque cette "
#~ "méthode renvoie le nombre entier zéro ou la valeur ``False`` de la "
#~ "classe :class:`bool`. [1]_"
#~ msgid ""
#~ "All other values are considered true --- so objects of many types are "
#~ "always true."
#~ msgstr ""
#~ "Toutes les autres valeurs sont considérées comme vraies --- donc des "
#~ "objets de beaucoup de types sont toujours vrais."
#~ msgid "Bytes"
#~ msgstr "Bytes"
2017-04-02 20:14:06 +00:00
#~ msgid ""
#~ "The alternate form causes a leading zero (``'0'``) to be inserted between "
#~ "left-hand padding and the formatting of the number if the leading "
#~ "character of the result is not already a zero."
#~ msgstr ""
#~ "La forme alternative insère un zéro (``'0'``) entre le rembourrage gauche "
#~ "et le formatage du nombre si son premier caractère n'est pas déjà un zéro."