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

1542 lines
66 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 ""
2019-12-05 22:15:54 +00:00
"Project-Id-Version: Python 3\n"
2016-10-30 09:46:26 +00:00
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-01-15 22:33+0100\n"
2022-11-14 15:08:57 +00:00
"PO-Revision-Date: 2022-10-18 15:56+0200\n"
"Last-Translator: Jean Abou Samra <jean@abou-samra.fr>\n"
2018-07-04 09:14:25 +00:00
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
2017-05-23 22:40:56 +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 2.4.1\n"
2016-10-30 09:46:26 +00:00
#: library/string.rst:2
2016-10-30 09:46:26 +00:00
msgid ":mod:`string` --- Common string operations"
msgstr ":mod:`string` — Opérations usuelles sur des chaînes"
2016-10-30 09:46:26 +00:00
#: library/string.rst:7
2016-10-30 09:46:26 +00:00
msgid "**Source code:** :source:`Lib/string.py`"
msgstr "**Code source :** :source:`Lib/string.py`"
2016-10-30 09:46:26 +00:00
#: library/string.rst:14
2016-10-30 09:46:26 +00:00
msgid ":ref:`textseq`"
msgstr ":ref:`textseq`"
#: library/string.rst:16
2016-10-30 09:46:26 +00:00
msgid ":ref:`string-methods`"
msgstr ":ref:`string-methods`"
#: library/string.rst:19
2016-10-30 09:46:26 +00:00
msgid "String constants"
msgstr "Chaînes constantes"
#: library/string.rst:21
2016-10-30 09:46:26 +00:00
msgid "The constants defined in this module are:"
2017-05-27 12:32:46 +00:00
msgstr "Les constantes définies dans ce module sont :"
2016-10-30 09:46:26 +00:00
#: library/string.rst:26
2016-10-30 09:46:26 +00:00
msgid ""
"The concatenation of the :const:`ascii_lowercase` and :const:"
"`ascii_uppercase` constants described below. This value is not locale-"
"dependent."
msgstr ""
"La concaténation des constantes :const:`ascii_lowercase` et :const:"
"`ascii_uppercase` décrites ci-dessous. Cette valeur n'est pas dépendante de "
2021-03-15 22:52:56 +00:00
"la configuration de la localisation."
2016-10-30 09:46:26 +00:00
#: library/string.rst:32
2016-10-30 09:46:26 +00:00
msgid ""
"The lowercase letters ``'abcdefghijklmnopqrstuvwxyz'``. This value is not "
"locale-dependent and will not change."
msgstr ""
2020-05-28 20:03:40 +00:00
"Les lettres minuscules ``'abcdefghijklmnopqrstuvwxyz'``. Cette valeur ne "
2021-03-15 22:52:56 +00:00
"dépend pas de la configuration de localisation et ne changera pas."
2016-10-30 09:46:26 +00:00
#: library/string.rst:38
2016-10-30 09:46:26 +00:00
msgid ""
"The uppercase letters ``'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. This value is not "
"locale-dependent and will not change."
msgstr ""
2020-05-28 20:03:40 +00:00
"Les lettres majuscules ``'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. Cette valeur ne "
2021-03-15 22:52:56 +00:00
"dépend pas de la configuration de la localisation et ne changera pas."
2016-10-30 09:46:26 +00:00
#: library/string.rst:44
2016-10-30 09:46:26 +00:00
msgid "The string ``'0123456789'``."
msgstr "La chaîne ``'0123456789'``."
#: library/string.rst:49
2016-10-30 09:46:26 +00:00
msgid "The string ``'0123456789abcdefABCDEF'``."
msgstr "La chaîne ``'0123456789abcdefABCDEF'``."
#: library/string.rst:54
2016-10-30 09:46:26 +00:00
msgid "The string ``'01234567'``."
msgstr "La chaîne ``'01234567``."
#: library/string.rst:59
2016-10-30 09:46:26 +00:00
msgid ""
"String of ASCII characters which are considered punctuation characters in "
2019-09-04 09:35:23 +00:00
"the ``C`` locale: ``!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~``."
2016-10-30 09:46:26 +00:00
msgstr ""
2021-03-15 22:52:56 +00:00
"Chaîne de caractères ASCII considérés comme ponctuation dans la "
"configuration de localisation ``C`` : ``!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~``."
2016-10-30 09:46:26 +00:00
#: library/string.rst:64
2016-10-30 09:46:26 +00:00
msgid ""
"String of ASCII characters which are considered printable. This is a "
"combination of :const:`digits`, :const:`ascii_letters`, :const:"
"`punctuation`, and :const:`whitespace`."
msgstr ""
"Chaîne de caractères ASCII considérés comme affichables. C'est une "
"combinaison de :const:`digits`, :const:`ascii_letters`, :const:"
"`punctuation`, et :const:`whitespace`."
#: library/string.rst:71
2016-10-30 09:46:26 +00:00
msgid ""
"A string containing all ASCII characters that are considered whitespace. "
"This includes the characters space, tab, linefeed, return, formfeed, and "
"vertical tab."
msgstr ""
"Une chaîne comprenant tous les caractères ASCII considérés comme espaces. "
"Sont inclus les caractères espace, tabulations, saut de ligne, retour du "
"chariot, saut de page, et tabulation verticale."
2016-10-30 09:46:26 +00:00
#: library/string.rst:79
2016-10-30 09:46:26 +00:00
msgid "Custom String Formatting"
msgstr "Formatage personnalisé de chaîne"
#: library/string.rst:81
2016-10-30 09:46:26 +00:00
msgid ""
"The built-in string class provides the ability to do complex variable "
"substitutions and value formatting via the :meth:`~str.format` method "
"described in :pep:`3101`. The :class:`Formatter` class in the :mod:`string` "
"module allows you to create and customize your own string formatting "
"behaviors using the same implementation as the built-in :meth:`~str.format` "
"method."
msgstr ""
"La classe primitive ``str`` fournit la possibilité de faire des "
2016-10-30 09:46:26 +00:00
"substitutions de variables complexes et du formatage de valeurs via la "
"méthode :meth:`~str.format` décrite par :pep:`3101`. La classe :class:"
"`Formatter` dans le module :mod:`string` permet de créer et personnaliser "
"vos propres comportements de formatage de chaînes en utilisant la même "
"implémentation que la méthode primitive :meth:`~str.format`."
#: library/string.rst:90
2016-10-30 09:46:26 +00:00
msgid "The :class:`Formatter` class has the following public methods:"
msgstr "La classe :class:`Formatter` a les méthodes publiques suivantes :"
2016-10-30 09:46:26 +00:00
#: library/string.rst:94
2016-10-30 09:46:26 +00:00
msgid ""
"The primary API method. It takes a format string and an arbitrary set of "
"positional and keyword arguments. It is just a wrapper that calls :meth:"
"`vformat`."
msgstr ""
"La méthode principale de l'API. Elle prend une chaîne de format et un "
"ensemble arbitraire d'arguments positions et mot-clefs. C'est uniquement un "
"conteneur qui appelle :meth:`vformat`."
#: library/string.rst:98
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"A format string argument is now :ref:`positional-only <positional-"
"only_parameter>`."
2016-10-30 09:46:26 +00:00
msgstr ""
"L'argument *format_string* est maintenant :ref:`obligatoirement un paramètre "
"positionnel <positional-only_parameter>`."
2016-10-30 09:46:26 +00:00
#: library/string.rst:104
2016-10-30 09:46:26 +00:00
msgid ""
"This function does the actual work of formatting. It is exposed as a "
"separate function for cases where you want to pass in a predefined "
"dictionary of arguments, rather than unpacking and repacking the dictionary "
"as individual arguments using the ``*args`` and ``**kwargs`` syntax. :meth:"
"`vformat` does the work of breaking up the format string into character data "
"and replacement fields. It calls the various methods described below."
msgstr ""
"Cette fonction fait le travail effectif du formatage. Elle existe comme "
"méthode séparée au cas où vous voudriez passer un dictionnaire d'arguments "
"prédéfini plutôt que décompresser et recompresser le dictionnaire en "
2016-10-30 09:46:26 +00:00
"arguments individuels en utilisant la syntaxe ``*args`` et ``**kwargs``. :"
"meth:`vformat` s'occupe de découper la chaîne de format en données de "
"caractères et champs de remplacement. Elle appelle les différentes méthodes "
"décrites ci-dessous."
#: library/string.rst:112
2016-10-30 09:46:26 +00:00
msgid ""
"In addition, the :class:`Formatter` defines a number of methods that are "
"intended to be replaced by subclasses:"
msgstr ""
"De plus, la classe :class:`Formatter` définit un certain nombre de méthodes "
2021-03-15 22:52:56 +00:00
"qui ont pour vocation d'être remplacées par des sous-classes :"
2016-10-30 09:46:26 +00:00
#: library/string.rst:117
2016-10-30 09:46:26 +00:00
msgid ""
"Loop over the format_string and return an iterable of tuples "
"(*literal_text*, *field_name*, *format_spec*, *conversion*). This is used "
"by :meth:`vformat` to break the string into either literal text, or "
"replacement fields."
msgstr ""
"Boucle sur la chaîne de format et renvoie un itérable de quadruplets "
2016-10-30 09:46:26 +00:00
"(*literal_text*, *field_name*, *format_spec*, *conversion*). Ceci est "
"utilisé par :meth:`vformat` pour découper la chaîne de format en littéraux "
"ou en champs de remplacement."
#: library/string.rst:122
2016-10-30 09:46:26 +00:00
msgid ""
"The values in the tuple conceptually represent a span of literal text "
"followed by a single replacement field. If there is no literal text (which "
"can happen if two replacement fields occur consecutively), then "
"*literal_text* will be a zero-length string. If there is no replacement "
"field, then the values of *field_name*, *format_spec* and *conversion* will "
"be ``None``."
msgstr ""
"Les valeurs dans le *n*-uplet représentent conceptuellement un ensemble de "
2016-10-30 09:46:26 +00:00
"littéraux suivis d'un unique champ de remplacement. S'il n'y a pas de "
"littéral, (ce qui peut arriver si deux champs de remplacement sont placés "
"côte à côte), alors *literal_text* est une chaîne vide. S'il n'y a pas de "
"champ de remplacement, les valeurs *field_name*, *format_spec* et "
"*conversion* sont mises à ``None``."
#: library/string.rst:131
2016-10-30 09:46:26 +00:00
msgid ""
"Given *field_name* as returned by :meth:`parse` (see above), convert it to "
"an object to be formatted. Returns a tuple (obj, used_key). The default "
"version takes strings of the form defined in :pep:`3101`, such as "
"\"0[name]\" or \"label.title\". *args* and *kwargs* are as passed in to :"
"meth:`vformat`. The return value *used_key* has the same meaning as the "
"*key* parameter to :meth:`get_value`."
msgstr ""
"Récupère le champ *field_name* du *n*-uplet renvoyé par :meth:`parse` (voir "
"ci-dessus), le convertit en un objet à formater. Renvoie une paire (*obj*, "
2016-10-30 09:46:26 +00:00
"*used_key*). La version par défaut prend une chaîne de la forme définie par :"
2022-11-14 15:08:57 +00:00
"pep:`3101`, telle que ``\"0[name]\"`` ou ``\"label.title\"``. *args* et "
"*kwargs* sont tels que ceux passés à :meth:`vformat`. La valeur renvoyée "
"*used_key* a le même sens que le paramètre *key* de :meth:`get_value`."
2016-10-30 09:46:26 +00:00
#: library/string.rst:140
2016-10-30 09:46:26 +00:00
msgid ""
"Retrieve a given field value. The *key* argument will be either an integer "
"or a string. If it is an integer, it represents the index of the positional "
"argument in *args*; if it is a string, then it represents a named argument "
"in *kwargs*."
msgstr ""
"Récupère la valeur d'un champ donné. L'argument *key* est soit un entier, "
2021-03-15 22:52:56 +00:00
"soit une chaîne. Si c'est un entier, il représente l'indice de l'argument "
2016-10-30 09:46:26 +00:00
"dans *args*. Si c'est une chaîne de caractères, elle représente le nom de "
"l'argument dans *kwargs*."
#: library/string.rst:145
2016-10-30 09:46:26 +00:00
msgid ""
"The *args* parameter is set to the list of positional arguments to :meth:"
"`vformat`, and the *kwargs* parameter is set to the dictionary of keyword "
"arguments."
msgstr ""
"Le paramètre *args* est défini par la liste des arguments positionnels de :"
"meth:`vformat`, et le paramètre *kwargs* est défini par le dictionnaire des "
"arguments mot-clefs."
#: library/string.rst:149
2016-10-30 09:46:26 +00:00
msgid ""
"For compound field names, these functions are only called for the first "
2019-09-04 09:35:23 +00:00
"component of the field name; subsequent components are handled through "
2016-10-30 09:46:26 +00:00
"normal attribute and indexing operations."
msgstr ""
"Pour les noms de champs composés, ces fonctions sont uniquement appelées sur "
"la première composante du nom. Les composantes suivantes sont manipulées au "
"travers des attributs normaux et des opérations sur les indices."
#: library/string.rst:153
2016-10-30 09:46:26 +00:00
msgid ""
"So for example, the field expression '0.name' would cause :meth:`get_value` "
"to be called with a *key* argument of 0. The ``name`` attribute will be "
"looked up after :meth:`get_value` returns by calling the built-in :func:"
"`getattr` function."
msgstr ""
"Donc par exemple, le champ-expression ``0.name`` amènerait :meth:`get_value` "
"à être appelée avec un argument *key* valant 0. L'attribut ``name`` sera "
2016-10-30 09:46:26 +00:00
"recherché après l'appel :meth:`get_value` en faisant appel à la primitive :"
"func:`getattr`."
#: library/string.rst:158
2016-10-30 09:46:26 +00:00
msgid ""
"If the index or keyword refers to an item that does not exist, then an :exc:"
"`IndexError` or :exc:`KeyError` should be raised."
msgstr ""
"Si l'indice ou le mot-clef fait référence à un objet qui n'existe pas, alors "
"une exception :exc:`IndexError` ou :exc:`KeyError` doit être levée."
#: library/string.rst:163
2016-10-30 09:46:26 +00:00
msgid ""
"Implement checking for unused arguments if desired. The arguments to this "
"function is the set of all argument keys that were actually referred to in "
"the format string (integers for positional arguments, and strings for named "
"arguments), and a reference to the *args* and *kwargs* that was passed to "
"vformat. The set of unused args can be calculated from these parameters. :"
"meth:`check_unused_args` is assumed to raise an exception if the check fails."
msgstr ""
"Implémente une vérification pour les arguments non utilisés si désiré. "
"L'argument de cette fonction est l'ensemble des clefs qui ont été "
"effectivement référencées dans la chaîne de format (des entiers pour les "
"indices et des chaînes de caractères pour les arguments nommés), et une "
"référence vers les arguments *args* et *kwargs* qui ont été passés à "
2022-11-14 15:08:57 +00:00
"``vformat``. L'ensemble des arguments non utilisés peut être calculé sur "
"base de ces paramètres. :meth:`check_unused_args` est censée lever une "
"exception si la vérification échoue."
2016-10-30 09:46:26 +00:00
#: library/string.rst:173
2016-10-30 09:46:26 +00:00
msgid ""
":meth:`format_field` simply calls the global :func:`format` built-in. The "
"method is provided so that subclasses can override it."
msgstr ""
"La méthode :meth:`format_field` fait simplement appel à la primitive "
"globale :func:`format`. Cette méthode est fournie afin que les sous-classes "
2021-03-15 22:52:56 +00:00
"puissent la redéfinir."
2016-10-30 09:46:26 +00:00
#: library/string.rst:178
2016-10-30 09:46:26 +00:00
msgid ""
"Converts the value (returned by :meth:`get_field`) given a conversion type "
"(as in the tuple returned by the :meth:`parse` method). The default version "
"understands 's' (str), 'r' (repr) and 'a' (ascii) conversion types."
msgstr ""
"Convertit la valeur (renvoyée par :meth:`get_field`) selon un type de "
"conversion donné (comme dans le *n*-uplet renvoyé par la méthode :meth:"
2022-11-14 15:08:57 +00:00
"`parse`). La version par défaut comprend 's' (``str``), 'r' (``repr``) et "
"'a' (ASCII) comme types de conversion."
2016-10-30 09:46:26 +00:00
#: library/string.rst:187
2016-10-30 09:46:26 +00:00
msgid "Format String Syntax"
msgstr "Syntaxe de formatage de chaîne"
#: library/string.rst:189
2016-10-30 09:46:26 +00:00
msgid ""
"The :meth:`str.format` method and the :class:`Formatter` class share the "
"same syntax for format strings (although in the case of :class:`Formatter`, "
"subclasses can define their own format string syntax). The syntax is "
"related to that of :ref:`formatted string literals <f-strings>`, but it is "
"less sophisticated and, in particular, does not support arbitrary "
"expressions."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-27 12:32:46 +00:00
"La méthode :meth:`str.format` et la classe :class:`Formatter` partagent la "
"même syntaxe pour les chaînes de formatage (bien que dans le cas de :class:"
"`Formatter` les sous-classes puissent définir leur propre syntaxe). La "
"syntaxe est liée à celle des :ref:`chaînes de formatage littérales <f-"
"strings>`, mais elle est moins sophistiquée, et surtout ne permet pas "
"d'inclure des expressions arbitraires."
2016-10-30 09:46:26 +00:00
#: library/string.rst:202
2016-10-30 09:46:26 +00:00
msgid ""
"Format strings contain \"replacement fields\" surrounded by curly braces ``{}"
"``. Anything that is not contained in braces is considered literal text, "
"which is copied unchanged to the output. If you need to include a brace "
"character in the literal text, it can be escaped by doubling: ``{{`` and ``}}"
"``."
msgstr ""
"Les chaînes de formatage contiennent des \"champs de remplacement\" entourés "
"d'accolades ``{}``. Tout ce qui n'est pas placé entre deux accolades est "
"considéré comme littéral, qui est copié tel quel dans le résultat. Si vous "
"avez besoin d'inclure une accolade en littéral, elles peuvent être échappées "
2021-03-15 22:52:56 +00:00
"en les doublant : ``{{`` et ``}}``."
2016-10-30 09:46:26 +00:00
#: library/string.rst:207
2016-10-30 09:46:26 +00:00
msgid "The grammar for a replacement field is as follows:"
2021-03-15 22:52:56 +00:00
msgstr "La grammaire pour un champ de remplacement est définie comme suit :"
2016-10-30 09:46:26 +00:00
#: library/string.rst:219
2016-10-30 09:46:26 +00:00
msgid ""
"In less formal terms, the replacement field can start with a *field_name* "
"that specifies the object whose value is to be formatted and inserted into "
"the output instead of the replacement field. The *field_name* is optionally "
"followed by a *conversion* field, which is preceded by an exclamation point "
"``'!'``, and a *format_spec*, which is preceded by a colon ``':'``. These "
"specify a non-default format for the replacement value."
msgstr ""
"En termes moins formels, un champ de remplacement peut débuter par un "
"*field_name* qui spécifie l'objet dont la valeur va être formatée et insérée "
"dans le résultat à l'endroit du champ de remplacement Le *field_name* peut "
"éventuellement être suivi d'un champ *conversion* qui est précédé d'un point "
"d'exclamation ``'!'``, et d'un *format_spec* qui est précédé par deux-points "
"``':'``. Cela définit un format personnalisé pour le remplacement d'une "
"valeur."
#: library/string.rst:226
2016-10-30 09:46:26 +00:00
msgid "See also the :ref:`formatspec` section."
msgstr "Voir également la section :ref:`formatspec`."
#: library/string.rst:228
2016-10-30 09:46:26 +00:00
msgid ""
"The *field_name* itself begins with an *arg_name* that is either a number or "
"a keyword. If it's a number, it refers to a positional argument, and if "
"it's a keyword, it refers to a named keyword argument. If the numerical "
"arg_names in a format string are 0, 1, 2, ... in sequence, they can all be "
"omitted (not just some) and the numbers 0, 1, 2, ... will be automatically "
"inserted in that order. Because *arg_name* is not quote-delimited, it is not "
"possible to specify arbitrary dictionary keys (e.g., the strings ``'10'`` or "
"``':-]'``) within a format string. The *arg_name* can be followed by any "
"number of index or attribute expressions. An expression of the form ``'."
"name'`` selects the named attribute using :func:`getattr`, while an "
"expression of the form ``'[index]'`` does an index lookup using :func:"
"`__getitem__`."
msgstr ""
"Le champ *field_name* débute par un *arg_name* qui est soit un nombre, soit "
"un mot-clef. Si c'est un nombre, il fait référence à un des arguments "
"positionnels et si c'est un mot-clef, il fait référence à un des arguments "
"nommés. Si les valeurs numériques de *arg_name* dans une chaîne de format "
2021-03-15 22:52:56 +00:00
"sont 0, 1, 2… dans l'ordre, elles peuvent être omises (toutes ou aucune), et "
"les nombres 0, 1, 2… seront automatiquement insérés dans cet ordre. Puisque "
"*arg_name* n'est pas délimité par des guillemets, il n'est pas possible de "
"spécifier des clefs de dictionnaire arbitraires (par exemple les chaînes "
"``'10'`` ou ``':-]'``) dans une chaîne de format. La valeur *arg_name* peut "
"être suivie par un nombre d'indices ou d'expressions quelconque. Une "
"expression de la forme ``'.name'`` sélectionne l'attribut nommé en "
"utilisant :func:`getattr` alors qu'une expression de la forme ``'[index]'`` "
"recherche l'indice en utilisant :func:`__getitem__`."
2016-10-30 09:46:26 +00:00
#: library/string.rst:240
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-17 08:43:33 +00:00
"The positional argument specifiers can be omitted for :meth:`str.format`, so "
"``'{} {}'.format(a, b)`` is equivalent to ``'{0} {1}'.format(a, b)``."
2016-10-30 09:46:26 +00:00
msgstr ""
2018-06-17 08:55:50 +00:00
"Les spécificateurs de position d'argument peuvent être omis dans les appels "
"à :meth:`str.format`. Donc ``'{} {}'.format(a, b)`` est équivalent à ``'{0} "
"{1}'.format(a, b)``."
2016-10-30 09:46:26 +00:00
#: library/string.rst:244
2018-06-17 08:43:33 +00:00
msgid ""
"The positional argument specifiers can be omitted for :class:`Formatter`."
msgstr ""
2018-06-17 08:55:50 +00:00
"Les spécificateurs de position d'argument peuvent être omis pour :class:"
"`Formatter`."
2018-06-17 08:43:33 +00:00
#: library/string.rst:247
2016-10-30 09:46:26 +00:00
msgid "Some simple format string examples::"
msgstr "Quelques exemples simples de formatage de chaînes ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:256
2016-10-30 09:46:26 +00:00
msgid ""
"The *conversion* field causes a type coercion before formatting. Normally, "
"the job of formatting a value is done by the :meth:`__format__` method of "
"the value itself. However, in some cases it is desirable to force a type to "
"be formatted as a string, overriding its own definition of formatting. By "
"converting the value to a string before calling :meth:`__format__`, the "
"normal formatting logic is bypassed."
msgstr ""
"Le champ *conversion* crée une contrainte de type avant de formater. "
"Normalement, le travail de formatage d'une valeur est fait par la méthode :"
"meth:`__format__` de la valeur elle-même. Cependant, dans certains cas, il "
"est désirable de forcer un type à être formaté en une chaîne, en ré-"
"définissant sa propre définition de formatage. En convertissant une valeur "
"en chaîne de caractère avant d'appeler la méthode :meth:`__format__`, on "
"outrepasse la logique usuelle de formatage."
#: library/string.rst:263
2016-10-30 09:46:26 +00:00
msgid ""
"Three conversion flags are currently supported: ``'!s'`` which calls :func:"
"`str` on the value, ``'!r'`` which calls :func:`repr` and ``'!a'`` which "
"calls :func:`ascii`."
msgstr ""
2021-03-15 22:52:56 +00:00
"Actuellement, trois indicateurs sont gérés : ``'!s'`` qui appelle la "
2016-10-30 09:46:26 +00:00
"fonction :func:`str` sur la valeur, ``'!r'`` qui appelle la fonction :func:"
"`repr` et ``!a`` qui appelle la fonction :func:`ascii`."
#: library/string.rst:267
2016-10-30 09:46:26 +00:00
msgid "Some examples::"
msgstr "Quelques exemples ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:273
2016-10-30 09:46:26 +00:00
msgid ""
"The *format_spec* field contains a specification of how the value should be "
"presented, including such details as field width, alignment, padding, "
"decimal precision and so on. Each value type can define its own "
"\"formatting mini-language\" or interpretation of the *format_spec*."
msgstr ""
"Le champ *format_spec* contient une spécification sur la manière selon "
2021-03-15 22:52:56 +00:00
"laquelle la valeur devrait être représentée : des informations telles que la "
2016-10-30 09:46:26 +00:00
"longueur du champ, l'alignement, le remplissage, la précision décimale, etc. "
"Chaque type peut définir son propre \"mini-langage de formatage\" ou sa "
"propre interprétation de *format_spec*."
#: library/string.rst:278
2016-10-30 09:46:26 +00:00
msgid ""
"Most built-in types support a common formatting mini-language, which is "
"described in the next section."
msgstr ""
"La plupart des types natifs gèrent un mini-langage de formatage usuel qui "
"est décrit dans la section suivante."
2016-10-30 09:46:26 +00:00
#: library/string.rst:281
2016-10-30 09:46:26 +00:00
msgid ""
"A *format_spec* field can also include nested replacement fields within it. "
"These nested replacement fields may contain a field name, conversion flag "
"and format specification, but deeper nesting is not allowed. The "
"replacement fields within the format_spec are substituted before the "
"*format_spec* string is interpreted. This allows the formatting of a value "
"to be dynamically specified."
msgstr ""
"Un champ *format_spec* peut contenir un champ de remplacement imbriqué. Ces "
"champs de remplacement imbriqués peuvent contenir un nom de champ, un "
"indicateur de conversion, mais une imbrication récursive plus profonde n'est "
"pas permise. Les champs de remplacement au sein de *format_spec* sont "
"substitués avant que la chaîne *format_spec* ne soit interprétée. Cela "
"permet que le formatage d'une valeur soit dynamiquement spécifié."
#: library/string.rst:288
2016-10-30 09:46:26 +00:00
msgid "See the :ref:`formatexamples` section for some examples."
msgstr "Voir la section :ref:`formatexamples` pour des exemples."
#: library/string.rst:294
2016-10-30 09:46:26 +00:00
msgid "Format Specification Mini-Language"
msgstr "Mini-langage de spécification de format"
#: library/string.rst:296
2016-10-30 09:46:26 +00:00
msgid ""
"\"Format specifications\" are used within replacement fields contained "
"within a format string to define how individual values are presented (see :"
"ref:`formatstrings` and :ref:`f-strings`). They can also be passed directly "
"to the built-in :func:`format` function. Each formattable type may define "
"how the format specification is to be interpreted."
msgstr ""
2017-05-27 12:32:46 +00:00
"Les \"Spécifications de format\" sont utilisées avec les champs de "
"remplacement contenus dans les chaînes de formatage, pour définir comment "
"les valeurs doivent être représentées (voir :ref:`formatstrings` et :ref:`f-"
"strings`). Elles peuvent aussi être passées directement à la fonction "
"native :func:`format`. Chaque type *formatable* peut définir comment les "
"spécifications sur les valeurs de ce type doivent être interprétées."
2016-10-30 09:46:26 +00:00
#: library/string.rst:303
2016-10-30 09:46:26 +00:00
msgid ""
"Most built-in types implement the following options for format "
"specifications, although some of the formatting options are only supported "
"by the numeric types."
msgstr ""
2021-03-15 22:52:56 +00:00
"La plupart des primitives implémentent les options suivantes, même si "
"certaines options de formatage ne sont prises en charge que pour les types "
2016-10-30 09:46:26 +00:00
"numériques."
#: library/string.rst:306
2016-10-30 09:46:26 +00:00
msgid ""
2020-05-24 14:31:50 +00:00
"A general convention is that an empty format specification produces the same "
"result as if you had called :func:`str` on the value. A non-empty format "
"specification typically modifies the result."
2016-10-30 09:46:26 +00:00
msgstr ""
2021-03-15 22:52:56 +00:00
"Une convention généralement admise est qu'une chaîne vide produit le même "
"résultat que si vous aviez appelé :func:`str` sur la valeur. Une chaîne de "
"format non vide modifie habituellement le résultat."
2016-10-30 09:46:26 +00:00
#: library/string.rst:310
2016-10-30 09:46:26 +00:00
msgid "The general form of a *standard format specifier* is:"
msgstr "La forme générale d'un *spécificateur de format standard* est :"
2016-10-30 09:46:26 +00:00
#: library/string.rst:322
2016-10-30 09:46:26 +00:00
msgid ""
"If a valid *align* value is specified, it can be preceded by a *fill* "
"character that can be any character and defaults to a space if omitted. It "
"is not possible to use a literal curly brace (\"``{``\" or \"``}``\") as the "
"*fill* character in a :ref:`formatted string literal <f-strings>` or when "
"using the :meth:`str.format` method. However, it is possible to insert a "
"curly brace with a nested replacement field. This limitation doesn't affect "
"the :func:`format` function."
msgstr ""
2017-05-27 12:32:46 +00:00
"Si une valeur valide est spécifiée pour *align*, elle peut être précédée par "
"un caractère *fill*, qui peut être n'importe quel caractère (espace par "
"défaut si la valeur est omise). Il n'est pas possible d'utiliser une "
"accolade littérale (\"``{``\" ou \"``}``\") comme caractère *fill* dans une :"
"ref:`chaîne de formatage littérale <f-strings>` ou avec la méthode :meth:"
"`str.format`. Cependant, il est possible d'insérer une accolade à l'aide "
"d'un champ de remplacement imbriqué. Cette limitation n'affecte pas la "
"fonction :func:`format`."
2016-10-30 09:46:26 +00:00
#: library/string.rst:331
2016-10-30 09:46:26 +00:00
msgid "The meaning of the various alignment options is as follows:"
2021-03-15 22:52:56 +00:00
msgstr "Le sens des différentes options d'alignement est donné comme suit :"
2016-10-30 09:46:26 +00:00
#: library/string.rst:371
2016-10-30 09:46:26 +00:00
msgid "Option"
msgstr "Option"
#: library/string.rst:371 library/string.rst:465 library/string.rst:500
2016-10-30 09:46:26 +00:00
msgid "Meaning"
msgstr "Signification"
#: library/string.rst:342
2016-10-30 09:46:26 +00:00
msgid "``'<'``"
msgstr "``'<'``"
#: library/string.rst:342
2016-10-30 09:46:26 +00:00
msgid ""
"Forces the field to be left-aligned within the available space (this is the "
"default for most objects)."
msgstr ""
"Force le champ à être aligné à gauche dans l'espace disponible (c'est le "
"spécificateur par défaut pour la plupart des objets)."
#: library/string.rst:345
2016-10-30 09:46:26 +00:00
msgid "``'>'``"
msgstr "``'>'``"
#: library/string.rst:345
2016-10-30 09:46:26 +00:00
msgid ""
"Forces the field to be right-aligned within the available space (this is the "
"default for numbers)."
msgstr ""
"Force le champ à être aligné à droite dans l'espace disponible (c'est le "
"spécificateur par défaut pour les nombres)."
#: library/string.rst:348
2016-10-30 09:46:26 +00:00
msgid "``'='``"
msgstr "``'='``"
#: library/string.rst:348
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
"Forces the padding to be placed after the sign (if any) but before the "
"digits. This is used for printing fields in the form '+000000120'. This "
"alignment option is only valid for numeric types. It becomes the default "
"for numbers when '0' immediately precedes the field width."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-05-27 12:32:46 +00:00
"Force le remplissage (*padding*) à être placé après le signe (si signe il y "
"a) mais avant les chiffres. L'option est utilisée pour afficher les champs "
"sous la forme \"+000000120\". Cette option d'alignement est valide "
"uniquement pour les types numériques. Elle devient activée par défaut quand "
"\"0\" précède directement la largeur de champ."
2016-10-30 09:46:26 +00:00
#: library/string.rst:354
2016-10-30 09:46:26 +00:00
msgid "``'^'``"
msgstr "``'^'``"
#: library/string.rst:354
2016-10-30 09:46:26 +00:00
msgid "Forces the field to be centered within the available space."
msgstr "Force le champ à être centré dans l'espace disponible."
#: library/string.rst:358
2016-10-30 09:46:26 +00:00
msgid ""
"Note that unless a minimum field width is defined, the field width will "
"always be the same size as the data to fill it, so that the alignment option "
"has no meaning in this case."
msgstr ""
2021-03-15 22:52:56 +00:00
"Notons que la longueur du champ est toujours égale à la taille nécessaire "
2016-10-30 09:46:26 +00:00
"pour remplir le champ avec l'objet à moins que la valeur minimum ne soit "
"précisée. Ainsi, si aucune valeur n'est précisée, l'option d'alignement n'a "
"aucun sens."
#: library/string.rst:362
2016-10-30 09:46:26 +00:00
msgid ""
"The *sign* option is only valid for number types, and can be one of the "
"following:"
msgstr ""
2021-03-15 22:52:56 +00:00
"L'option *sign* est uniquement valide pour les types numériques, et peut "
"valoir :"
2016-10-30 09:46:26 +00:00
#: library/string.rst:373
2016-10-30 09:46:26 +00:00
msgid "``'+'``"
msgstr "``'+'``"
#: library/string.rst:373
2016-10-30 09:46:26 +00:00
msgid ""
"indicates that a sign should be used for both positive as well as negative "
"numbers."
msgstr ""
"indique que le signe doit être affiché pour les nombres tant positifs que "
2016-10-30 09:46:26 +00:00
"négatifs."
#: library/string.rst:376
2016-10-30 09:46:26 +00:00
msgid "``'-'``"
msgstr "``'-'``"
#: library/string.rst:376
2016-10-30 09:46:26 +00:00
msgid ""
"indicates that a sign should be used only for negative numbers (this is the "
"default behavior)."
msgstr ""
"indique que le signe doit être affiché uniquement pour les nombres négatifs "
2016-10-30 09:46:26 +00:00
"(c'est le comportement par défaut)."
#: library/string.rst:379
2016-10-30 09:46:26 +00:00
msgid "space"
msgstr "espace"
#: library/string.rst:379
2016-10-30 09:46:26 +00:00
msgid ""
"indicates that a leading space should be used on positive numbers, and a "
"minus sign on negative numbers."
msgstr ""
"indique qu'un espace doit précéder les nombres positifs et qu'un signe moins "
2016-10-30 09:46:26 +00:00
"doit précéder les nombres négatifs."
#: library/string.rst:386
2016-10-30 09:46:26 +00:00
msgid ""
2022-05-22 21:15:02 +00:00
"The ``'z'`` option coerces negative zero floating-point values to positive "
"zero after rounding to the format precision. This option is only valid for "
"floating-point presentation types."
msgstr ""
#: library/string.rst:390
2022-05-22 21:15:02 +00:00
#, fuzzy
msgid "Added the ``'z'`` option (see also :pep:`682`)."
msgstr "Ajout de l'option ``','`` (voir :pep:`378`)."
#: library/string.rst:395
2022-05-22 21:15:02 +00:00
msgid ""
2016-10-30 09:46:26 +00:00
"The ``'#'`` option causes the \"alternate form\" to be used for the "
"conversion. The alternate form is defined differently for different types. "
2020-12-18 06:09:57 +00:00
"This option is only valid for integer, float and complex types. For "
2016-10-30 09:46:26 +00:00
"integers, when binary, octal, or hexadecimal output is used, this option "
"adds the respective prefix ``'0b'``, ``'0o'``, ``'0x'``, or ``'0X'`` to the "
"output value. For float and complex the alternate form causes the result of "
"the conversion to always contain a decimal-point character, even if no "
"digits follow it. Normally, a decimal-point character appears in the result "
"of these conversions only if a digit follows it. In addition, for ``'g'`` "
"and ``'G'`` conversions, trailing zeros are not removed from the result."
2016-10-30 09:46:26 +00:00
msgstr ""
"L'option ``'#'`` impose l'utilisation de la \"forme alternative\" pour la "
"conversion. La forme alternative est définie différemment pour différent "
"types. Cette option est uniquement valide pour les types entiers, flottants "
2021-03-15 22:52:56 +00:00
"et complexes. Pour les entiers, quand l'affichage binaire, octal ou "
"hexadécimal est utilisé, cette option ajoute le préfixe ``'0b'``, ``'0o'``, "
"``'0x'`` ou ``'0X'`` à la valeur affichée. Pour les flottants et les "
"complexes, la forme alternative impose que le résultat de la conversion "
"contienne toujours une virgule, même si aucun chiffre ne vient après. "
"Normalement, une virgule apparaît dans le résultat de ces conversions "
"seulement si un chiffre le suit. De plus, pour les conversions ``'g'`` et "
"``'G'``, les zéros finaux ne sont pas retirés du résultat."
2016-10-30 09:46:26 +00:00
#: library/string.rst:409
2016-10-30 09:46:26 +00:00
msgid ""
"The ``','`` option signals the use of a comma for a thousands separator. For "
"a locale aware separator, use the ``'n'`` integer presentation type instead."
msgstr ""
"L'option ``','`` signale l'utilisation d'une virgule comme séparateur des "
2021-03-15 22:52:56 +00:00
"milliers. Pour un séparateur prenant en compte la configuration de "
"localisation, utilisez plutôt le type de présentation entière ``'n'``."
2016-10-30 09:46:26 +00:00
#: library/string.rst:413
2016-10-30 09:46:26 +00:00
msgid "Added the ``','`` option (see also :pep:`378`)."
msgstr "Ajout de l'option ``','`` (voir :pep:`378`)."
#: library/string.rst:418
2016-10-30 09:46:26 +00:00
msgid ""
"The ``'_'`` option signals the use of an underscore for a thousands "
"separator for floating point presentation types and for integer presentation "
"type ``'d'``. For integer presentation types ``'b'``, ``'o'``, ``'x'``, and "
"``'X'``, underscores will be inserted every 4 digits. For other "
"presentation types, specifying this option is an error."
msgstr ""
2017-05-27 12:32:46 +00:00
"L'option ``'_'`` demande l'utilisation d'un tiret bas comme séparateur des "
"milliers pour les représentations de nombres flottants et pour les entiers "
"représentés par le type ``'d'``. Pour les types de représentation d'entiers "
"``'b'``, ``'o'``, ``'x'`` et ``'X'``, les tirets bas seront insérés tous les "
2017-05-27 12:32:46 +00:00
"4 chiffres. Pour les autres types de représentation, spécifier cette option "
"est une erreur."
2016-10-30 09:46:26 +00:00
#: library/string.rst:425
2016-10-30 09:46:26 +00:00
msgid "Added the ``'_'`` option (see also :pep:`515`)."
msgstr "Ajout de l'option ``'_'`` (voir aussi :pep:`515`)."
2016-10-30 09:46:26 +00:00
#: library/string.rst:428
2016-10-30 09:46:26 +00:00
msgid ""
2020-05-24 14:31:50 +00:00
"*width* is a decimal integer defining the minimum total field width, "
"including any prefixes, separators, and other formatting characters. If not "
2016-10-30 09:46:26 +00:00
"specified, then the field width will be determined by the content."
msgstr ""
2021-03-15 22:52:56 +00:00
"*width* est un entier en base 10 qui définit la longueur minimale de tout le "
"champ, y compris les préfixes, séparateurs et autres caractères de "
"formatage. Si elle n'est pas spécifiée, alors le champ *width* est déterminé "
"par le contenu."
2016-10-30 09:46:26 +00:00
#: library/string.rst:432
2016-10-30 09:46:26 +00:00
msgid ""
"When no explicit alignment is given, preceding the *width* field by a zero "
"(``'0'``) character enables sign-aware zero-padding for numeric types. This "
"is equivalent to a *fill* character of ``'0'`` with an *alignment* type of "
"``'='``."
msgstr ""
2021-03-15 22:52:56 +00:00
"Quand aucun alignement explicite n'est donné, précéder le champ *width* d'un "
"caractère zéro (``'0'``) active le remplissage par zéro des types numériques "
"selon leur signe. Cela est équivalent à un caractère de remplissage *fill* "
"valant ``'0'`` avec le type d'alignement *alignment* valant ``'='``."
2016-10-30 09:46:26 +00:00
#: library/string.rst:437
2016-10-30 09:46:26 +00:00
msgid ""
"Preceding the *width* field by ``'0'`` no longer affects the default "
"alignment for strings."
msgstr ""
#: library/string.rst:441
2022-03-23 17:40:12 +00:00
#, fuzzy
msgid ""
2022-03-23 17:40:12 +00:00
"The *precision* is a decimal integer indicating how many digits should be "
"displayed after the decimal point for presentation types ``'f'`` and "
"``'F'``, or before and after the decimal point for presentation types "
"``'g'`` or ``'G'``. For string presentation types the field indicates the "
"maximum field size - in other words, how many characters will be used from "
"the field content. The *precision* is not allowed for integer presentation "
"types."
2016-10-30 09:46:26 +00:00
msgstr ""
"La valeur *precision* est un nombre en base 10 indiquant combien de chiffres "
"doivent être affichés après la virgule pour une valeur à virgule flottante "
"formatée avec ``'f'`` ou ``'F'``, ou avant et après le point-décimal pour "
"une valeur à virgule flottante formatée avec ``'g'`` ou ``'G'``. Pour les "
"types non numériques, ce champ indique la taille maximale du champ, "
2016-10-30 09:46:26 +00:00
"autrement dit, combien de caractères du champ sont utilisés. Le "
"spécificateur *precision* n'est pas autorisé sur les entiers."
#: library/string.rst:449
2016-10-30 09:46:26 +00:00
msgid "Finally, the *type* determines how the data should be presented."
msgstr ""
"Finalement, le spécificateur *type* détermine comment la donnée doit être "
"représentée."
#: library/string.rst:451
2016-10-30 09:46:26 +00:00
msgid "The available string presentation types are:"
2021-03-15 22:52:56 +00:00
msgstr "Les types disponibles de représentation de chaîne sont :"
2016-10-30 09:46:26 +00:00
#: library/string.rst:465 library/string.rst:500
2016-10-30 09:46:26 +00:00
msgid "Type"
2017-05-27 12:32:46 +00:00
msgstr "Type"
2016-10-30 09:46:26 +00:00
#: library/string.rst:456
2016-10-30 09:46:26 +00:00
msgid "``'s'``"
msgstr "``'s'``"
#: library/string.rst:456
2016-10-30 09:46:26 +00:00
msgid "String format. This is the default type for strings and may be omitted."
msgstr ""
"Format de chaîne. C'est le type par défaut pour les chaînes de caractères et "
"peut être omis."
#: library/string.rst:488 library/string.rst:575
2016-10-30 09:46:26 +00:00
msgid "None"
msgstr "``None``"
2016-10-30 09:46:26 +00:00
#: library/string.rst:459
2016-10-30 09:46:26 +00:00
msgid "The same as ``'s'``."
msgstr "Pareil que ``'s'``."
2016-10-30 09:46:26 +00:00
#: library/string.rst:462
2016-10-30 09:46:26 +00:00
msgid "The available integer presentation types are:"
2021-03-15 22:52:56 +00:00
msgstr "Les types disponibles de représentation d'entier sont :"
2016-10-30 09:46:26 +00:00
#: library/string.rst:467
2016-10-30 09:46:26 +00:00
msgid "``'b'``"
msgstr "``'b'``"
#: library/string.rst:467
2016-10-30 09:46:26 +00:00
msgid "Binary format. Outputs the number in base 2."
msgstr "Format binaire. Affiche le nombre en base 2."
#: library/string.rst:469
2016-10-30 09:46:26 +00:00
msgid "``'c'``"
msgstr "``'c'``"
#: library/string.rst:469
2016-10-30 09:46:26 +00:00
msgid ""
"Character. Converts the integer to the corresponding unicode character "
"before printing."
msgstr ""
2021-03-15 22:52:56 +00:00
"Caractère. Convertit l'entier en caractère Unicode associé avant de "
2016-10-30 09:46:26 +00:00
"l'afficher."
#: library/string.rst:472
2016-10-30 09:46:26 +00:00
msgid "``'d'``"
msgstr "``'d'``"
#: library/string.rst:472
2016-10-30 09:46:26 +00:00
msgid "Decimal Integer. Outputs the number in base 10."
msgstr "Entier décimal. Affiche le nombre en base 10."
#: library/string.rst:474
2016-10-30 09:46:26 +00:00
msgid "``'o'``"
msgstr "``'o'``"
#: library/string.rst:474
2016-10-30 09:46:26 +00:00
msgid "Octal format. Outputs the number in base 8."
msgstr "Format octal. Affiche le nombre en base 8."
#: library/string.rst:476
2016-10-30 09:46:26 +00:00
msgid "``'x'``"
msgstr "``'x'``"
#: library/string.rst:476
2016-10-30 09:46:26 +00:00
msgid ""
2018-11-29 15:13:39 +00:00
"Hex format. Outputs the number in base 16, using lower-case letters for the "
2016-10-30 09:46:26 +00:00
"digits above 9."
msgstr ""
"Format hexadécimal. Affiche le nombre en base 16 en utilisant les lettres "
2016-10-30 09:46:26 +00:00
"minuscules pour les chiffres au-dessus de 9."
#: library/string.rst:479
2016-10-30 09:46:26 +00:00
msgid "``'X'``"
msgstr "``'X'``"
#: library/string.rst:479
2016-10-30 09:46:26 +00:00
msgid ""
2018-11-29 15:13:39 +00:00
"Hex format. Outputs the number in base 16, using upper-case letters for the "
"digits above 9. In case ``'#'`` is specified, the prefix ``'0x'`` will be "
"upper-cased to ``'0X'`` as well."
2016-10-30 09:46:26 +00:00
msgstr ""
"Format hexadécimal. Affiche le nombre en base 16 en utilisant les lettres "
"majuscules pour les chiffres au-dessus de 9. Si ``'#'`` est présent, le "
"préfixe ``'0x'`` est également passé en majuscules pour devenir ``'0X'``."
2016-10-30 09:46:26 +00:00
#: library/string.rst:568
2016-10-30 09:46:26 +00:00
msgid "``'n'``"
msgstr "``'n'``"
#: library/string.rst:484
2016-10-30 09:46:26 +00:00
msgid ""
"Number. This is the same as ``'d'``, except that it uses the current locale "
"setting to insert the appropriate number separator characters."
msgstr ""
2021-03-15 22:52:56 +00:00
"Nombre. Pareil que ``'d'`` si ce n'est que ce sont les paramètres de "
"localisation qui sont utilisés afin de déterminer le séparateur de nombres "
"approprié."
2016-10-30 09:46:26 +00:00
#: library/string.rst:488
2016-10-30 09:46:26 +00:00
msgid "The same as ``'d'``."
msgstr "Pareil que ``'d'``."
#: library/string.rst:491
2016-10-30 09:46:26 +00:00
msgid ""
"In addition to the above presentation types, integers can be formatted with "
"the floating point presentation types listed below (except ``'n'`` and "
"``None``). When doing so, :func:`float` is used to convert the integer to a "
"floating point number before formatting."
msgstr ""
2017-05-27 12:32:46 +00:00
"En plus des types de représentation ci-dessus, les entiers peuvent aussi "
"être formatés avec les types de représentation des flottants listés ci-"
"dessous (à l'exception de ``'n'`` et ``None``). Dans ce cas, la fonction :"
2017-05-27 12:32:46 +00:00
"func:`float` est utilisée pour convertir l'entier en flottant avant le "
"formatage."
2016-10-30 09:46:26 +00:00
#: library/string.rst:496
2016-10-30 09:46:26 +00:00
msgid ""
2020-12-18 06:09:57 +00:00
"The available presentation types for :class:`float` and :class:`~decimal."
"Decimal` values are:"
2016-10-30 09:46:26 +00:00
msgstr ""
2021-03-15 22:52:56 +00:00
"Les représentations possibles pour les :class:`float` et les :class:"
"`~decimal.Decimal` sont :"
2016-10-30 09:46:26 +00:00
#: library/string.rst:502
2016-10-30 09:46:26 +00:00
msgid "``'e'``"
msgstr "``'e'``"
#: library/string.rst:502
2016-10-30 09:46:26 +00:00
msgid ""
2020-12-18 06:09:57 +00:00
"Scientific notation. For a given precision ``p``, formats the number in "
"scientific notation with the letter 'e' separating the coefficient from the "
"exponent. The coefficient has one digit before and ``p`` digits after the "
"decimal point, for a total of ``p + 1`` significant digits. With no "
"precision given, uses a precision of ``6`` digits after the decimal point "
"for :class:`float`, and shows all coefficient digits for :class:`~decimal."
"Decimal`. If no digits follow the decimal point, the decimal point is also "
"removed unless the ``#`` option is used."
2016-10-30 09:46:26 +00:00
msgstr ""
2021-03-15 22:52:56 +00:00
"Notation scientifique. Pour une précision donnée ``p``, formate le nombre en "
2022-11-14 15:08:57 +00:00
"notation scientifique avec la lettre ``'e'`` séparant la mantisse de "
2021-03-15 22:52:56 +00:00
"l'exposant. La mantisse possède un chiffre devant et ``p`` chiffres après la "
"virgule (représentée par un point en Python, conformément à la convention "
"anglo-saxonne), ce qui donne ``p+1`` chiffres significatifs. Si la précision "
"n'est pas donnée, utilise une précision de ``6`` chiffres après la virgule "
"pour les :class:`float` et affiche tous les chiffres de la mantisse pour "
"les :class:`~decimal.Decimal`. S'il n'y a pas de chiffre après la virgule, "
"la virgule (c.-à-d. le point décimal en Python) n'est pas affichée à moins "
"que l'option ``#`` ne soit utilisée."
2016-10-30 09:46:26 +00:00
#: library/string.rst:514
2016-10-30 09:46:26 +00:00
msgid "``'E'``"
msgstr "``'E'``"
#: library/string.rst:514
2016-10-30 09:46:26 +00:00
msgid ""
2020-12-18 06:09:57 +00:00
"Scientific notation. Same as ``'e'`` except it uses an upper case 'E' as the "
2016-10-30 09:46:26 +00:00
"separator character."
msgstr ""
2021-03-15 22:52:56 +00:00
"Notation scientifique. Pareil que ``'e'`` sauf que Python utilise la lettre "
2016-10-30 09:46:26 +00:00
"majuscule 'E' comme séparateur."
#: library/string.rst:517
2016-10-30 09:46:26 +00:00
msgid "``'f'``"
msgstr "``'f'``"
#: library/string.rst:517
2016-10-30 09:46:26 +00:00
msgid ""
2020-12-18 06:09:57 +00:00
"Fixed-point notation. For a given precision ``p``, formats the number as a "
"decimal number with exactly ``p`` digits following the decimal point. With "
"no precision given, uses a precision of ``6`` digits after the decimal point "
"for :class:`float`, and uses a precision large enough to show all "
"coefficient digits for :class:`~decimal.Decimal`. If no digits follow the "
"decimal point, the decimal point is also removed unless the ``#`` option is "
"used."
2016-10-30 09:46:26 +00:00
msgstr ""
2021-03-15 22:52:56 +00:00
"Notation en virgule fixe. Pour une précision donnée ``p``, formate le nombre "
"sous la forme décimale avec exactement ``p`` chiffres après la virgule "
"(représentée par un point en Python, conformément à la convention anglo-"
"saxonne). Si la précision n'est pas donnée, utilise une précision de ``6`` "
"chiffres après la virgule pour les :class:`float` et affiche tous les "
"chiffres pour les :class:`~decimal.Decimal`. S'il n'y a pas de chiffre après "
"la virgule, la virgule (c.-à-d. le point décimal en Python) n'est pas "
"affichée à moins que l'option ``#`` ne soit utilisée."
2016-10-30 09:46:26 +00:00
#: library/string.rst:527
2016-10-30 09:46:26 +00:00
msgid "``'F'``"
msgstr "``'F'``"
#: library/string.rst:527
2016-10-30 09:46:26 +00:00
msgid ""
2018-09-15 19:51:48 +00:00
"Fixed-point notation. Same as ``'f'``, but converts ``nan`` to ``NAN`` and "
"``inf`` to ``INF``."
2016-10-30 09:46:26 +00:00
msgstr ""
"Virgule fixe. Pareil que ``'f'`` à part ``nan`` qui devient ``NAN`` et "
"``inf`` qui devient ``INF``."
#: library/string.rst:530
2016-10-30 09:46:26 +00:00
msgid "``'g'``"
msgstr "``'g'``"
#: library/string.rst:530
2016-10-30 09:46:26 +00:00
msgid ""
"General format. For a given precision ``p >= 1``, this rounds the number to "
"``p`` significant digits and then formats the result in either fixed-point "
2021-01-27 19:42:04 +00:00
"format or in scientific notation, depending on its magnitude. A precision of "
"``0`` is treated as equivalent to a precision of ``1``."
2016-10-30 09:46:26 +00:00
msgstr ""
2021-03-15 22:52:56 +00:00
"Format général. Pour une précision donnée ``p >= 1``, Python arrondit le "
2016-10-30 09:46:26 +00:00
"nombre à ``p`` chiffres significatifs et puis formate le résultat soit en "
2021-03-15 22:52:56 +00:00
"virgule fixe soit en notation scientifique, en fonction de la magnitude. Une "
"précision de ``0`` est considérée équivalente à une précision de ``1``."
2016-10-30 09:46:26 +00:00
#: library/string.rst:537
2016-10-30 09:46:26 +00:00
msgid ""
"The precise rules are as follows: suppose that the result formatted with "
"presentation type ``'e'`` and precision ``p-1`` would have exponent "
2019-10-09 16:10:12 +00:00
"``exp``. Then, if ``m <= exp < p``, where ``m`` is -4 for floats and -6 "
"for :class:`Decimals <decimal.Decimal>`, the number is formatted with "
2016-10-30 09:46:26 +00:00
"presentation type ``'f'`` and precision ``p-1-exp``. Otherwise, the number "
"is formatted with presentation type ``'e'`` and precision ``p-1``. In both "
"cases insignificant trailing zeros are removed from the significand, and the "
2019-10-09 16:10:12 +00:00
"decimal point is also removed if there are no remaining digits following it, "
"unless the ``'#'`` option is used."
2016-10-30 09:46:26 +00:00
msgstr ""
"Les règles précises sont les suivantes : supposons que le résultat formaté "
"avec le type de représentation ``'e'`` et une précision ``p-1`` ait un "
2022-11-14 15:08:57 +00:00
"exposant ``exp``. Alors, si ``m <= exp <= p`` où ``m`` vaut ``4`` pour les "
"nombres à virgule flottante et ``6`` pour les :class:`Decimals <decimal."
"Decimal>`, le nombre est formaté avec le type de représentation ``'f'`` et "
"une précision ``p-1-exp``. Sinon, le nombre est formaté avec le type de "
"représentation ``'e'`` et une précision ``p-1``. Dans les deux cas, les "
"zéros finaux et non significatifs sont retirés, et la virgule est également "
"retirée s'il n'y a aucun chiffre la suivant, sauf si l'option ``'#'`` est "
"utilisée."
2016-10-30 09:46:26 +00:00
#: library/string.rst:550
2021-01-27 19:42:04 +00:00
msgid ""
"With no precision given, uses a precision of ``6`` significant digits for :"
"class:`float`. For :class:`~decimal.Decimal`, the coefficient of the result "
"is formed from the coefficient digits of the value; scientific notation is "
"used for values smaller than ``1e-6`` in absolute value and values where the "
"place value of the least significant digit is larger than 1, and fixed-point "
"notation is used otherwise."
msgstr ""
2021-03-15 22:52:56 +00:00
"Si la précision n'est pas donnée, utilise une précision de ``6`` chiffres "
"significatifs pour les :class:`float`. Pour les :class:`~decimal.Decimal`, "
"la mantisse du résultat dépend de la valeur : la notation scientifique est "
"utilisée pour les valeurs inférieures à ``1e-6`` en valeur absolue et pour "
"celles dont le dernier chiffre significatif a une position supérieure à 1 ; "
"dans les autres cas, la notation en virgule fixe est utilisée."
2021-01-27 19:42:04 +00:00
#: library/string.rst:559
2016-10-30 09:46:26 +00:00
msgid ""
"Positive and negative infinity, positive and negative zero, and nans, are "
"formatted as ``inf``, ``-inf``, ``0``, ``-0`` and ``nan`` respectively, "
"regardless of the precision."
msgstr ""
2021-03-15 22:52:56 +00:00
"Les valeurs suivantes : infini négatif, infini positif, zéro positif, zéro "
"négatif, *not a number* sont formatées respectivement par ``inf``, ``-inf``, "
"``0``, ``-0`` et ``nan``, peu importe la précision."
2016-10-30 09:46:26 +00:00
#: library/string.rst:564
2016-10-30 09:46:26 +00:00
msgid "``'G'``"
msgstr "``'G'``"
#: library/string.rst:564
2016-10-30 09:46:26 +00:00
msgid ""
"General format. Same as ``'g'`` except switches to ``'E'`` if the number "
"gets too large. The representations of infinity and NaN are uppercased, too."
msgstr ""
"Format général. Pareil que ``'G'`` si ce n'est que ``'E'`` est utilisé si le "
"nombre est trop grand. La représentation des infinis et de *NaN* sont en "
"majuscules également."
2016-10-30 09:46:26 +00:00
#: library/string.rst:568
2016-10-30 09:46:26 +00:00
msgid ""
"Number. This is the same as ``'g'``, except that it uses the current locale "
"setting to insert the appropriate number separator characters."
msgstr ""
2021-03-15 22:52:56 +00:00
"Nombre. Pareil que ``'g'``, si ce n'est que la configuration de localisation "
"est prise en compte pour insérer le séparateur approprié."
2016-10-30 09:46:26 +00:00
#: library/string.rst:572
2016-10-30 09:46:26 +00:00
msgid "``'%'``"
msgstr "``'%'``"
#: library/string.rst:572
2016-10-30 09:46:26 +00:00
msgid ""
"Percentage. Multiplies the number by 100 and displays in fixed (``'f'``) "
"format, followed by a percent sign."
msgstr ""
"Pourcentage. Multiplie le nombre par 100 et l'affiche en virgule fixe "
"(``'f'``), suivi d'un symbole pourcent ``'%'``."
#: library/string.rst:575
2016-10-30 09:46:26 +00:00
msgid ""
2021-01-27 19:42:04 +00:00
"For :class:`float` this is the same as ``'g'``, except that when fixed-point "
"notation is used to format the result, it always includes at least one digit "
"past the decimal point. The precision used is as large as needed to "
"represent the given value faithfully."
2016-10-30 09:46:26 +00:00
msgstr ""
2021-03-15 22:52:56 +00:00
"Pour les :class:`float`, c'est identique à ``'g'``, si ce n'est que lorsque "
"la notation en virgule fixe est utilisée, il y a toujours au moins un "
"chiffre après la virgule. La précision utilisée est celle nécessaire pour "
"afficher la valeur donnée fidèlement."
2016-10-30 09:46:26 +00:00
#: library/string.rst:581
2021-01-27 19:42:04 +00:00
msgid ""
"For :class:`~decimal.Decimal`, this is the same as either ``'g'`` or ``'G'`` "
"depending on the value of ``context.capitals`` for the current decimal "
"context."
msgstr ""
2021-03-15 22:52:56 +00:00
"Pour les :class:`~decimal.Decimal`, c'est identique à ``'g'`` ou ``'G'`` en "
"fonction de la valeur de ``context.capitals`` du contexte décimal courant."
2021-01-27 19:42:04 +00:00
#: library/string.rst:585
2021-01-27 19:42:04 +00:00
msgid ""
"The overall effect is to match the output of :func:`str` as altered by the "
"other format modifiers."
msgstr ""
2021-03-15 22:52:56 +00:00
"L'effet visé est de coller à la valeur renvoyée par :func:`str` telle que "
"modifiée par les autres modificateurs de format."
2021-01-27 19:42:04 +00:00
#: library/string.rst:593
2016-10-30 09:46:26 +00:00
msgid "Format examples"
msgstr "Exemples de formats"
#: library/string.rst:595
2016-10-30 09:46:26 +00:00
msgid ""
"This section contains examples of the :meth:`str.format` syntax and "
"comparison with the old ``%``-formatting."
msgstr ""
"Cette section contient des exemples de la syntaxe de :meth:`str.format` et "
"des comparaisons avec l'ancien formatage par ``%``."
#: library/string.rst:598
2016-10-30 09:46:26 +00:00
msgid ""
"In most of the cases the syntax is similar to the old ``%``-formatting, with "
"the addition of the ``{}`` and with ``:`` used instead of ``%``. For "
"example, ``'%03.2f'`` can be translated to ``'{:03.2f}'``."
msgstr ""
2022-03-23 17:40:12 +00:00
"Dans la plupart des cas, la syntaxe est similaire à l'ancien formatage par "
"``%``, avec l'ajout de ``{}`` et avec ``:`` au lieu de ``%``. Par exemple : "
2016-10-30 09:46:26 +00:00
"``'%03.2f'`` peut être changé en ``'{03.2f}'``."
#: library/string.rst:602
2016-10-30 09:46:26 +00:00
msgid ""
"The new format syntax also supports new and different options, shown in the "
2018-11-29 15:13:39 +00:00
"following examples."
2016-10-30 09:46:26 +00:00
msgstr ""
"La nouvelle syntaxe de formatage gère également de nouvelles options et des "
"options différentes, montrées dans les exemples qui suivent."
2016-10-30 09:46:26 +00:00
#: library/string.rst:605
2016-10-30 09:46:26 +00:00
msgid "Accessing arguments by position::"
msgstr "Accéder à un argument par sa position ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:618
2016-10-30 09:46:26 +00:00
msgid "Accessing arguments by name::"
msgstr "Accéder à un argument par son nom ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:626
2016-10-30 09:46:26 +00:00
msgid "Accessing arguments' attributes::"
msgstr "Accéder aux attributs d'un argument ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:641
2016-10-30 09:46:26 +00:00
msgid "Accessing arguments' items::"
msgstr "Accéder aux éléments d'un argument ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:647
2016-10-30 09:46:26 +00:00
msgid "Replacing ``%s`` and ``%r``::"
msgstr "Remplacer ``%s`` et ``%r`` ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:652
2016-10-30 09:46:26 +00:00
msgid "Aligning the text and specifying a width::"
msgstr "Aligner le texte et spécifier une longueur minimale ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:663
2016-10-30 09:46:26 +00:00
msgid "Replacing ``%+f``, ``%-f``, and ``% f`` and specifying a sign::"
msgstr "Remplacer ``%+f``, ``%-f``, et ``%f`` et spécifier un signe ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:672
2016-10-30 09:46:26 +00:00
msgid ""
"Replacing ``%x`` and ``%o`` and converting the value to different bases::"
msgstr ""
"Remplacer ``%x`` et ``%o`` et convertir la valeur dans différentes bases ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:681
2016-10-30 09:46:26 +00:00
msgid "Using the comma as a thousands separator::"
msgstr "Utiliser une virgule comme séparateur des milliers ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:686
2016-10-30 09:46:26 +00:00
msgid "Expressing a percentage::"
msgstr "Exprimer un pourcentage ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:693
2016-10-30 09:46:26 +00:00
msgid "Using type-specific formatting::"
msgstr "Utiliser un formatage propre au type ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:700
2016-10-30 09:46:26 +00:00
msgid "Nesting arguments and more complex examples::"
msgstr "Arguments imbriqués et des exemples plus complexes ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:734
2016-10-30 09:46:26 +00:00
msgid "Template strings"
msgstr "Chaînes modèles"
#: library/string.rst:736
#, fuzzy
2016-10-30 09:46:26 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"Template strings provide simpler string substitutions as described in :pep:"
"`292`. A primary use case for template strings is for internationalization "
"(i18n) since in that context, the simpler syntax and functionality makes it "
"easier to translate than other built-in string formatting facilities in "
"Python. As an example of a library built on template strings for i18n, see "
"the `flufl.i18n <https://flufli18n.readthedocs.io/en/latest/>`_ package."
2016-10-30 09:46:26 +00:00
msgstr ""
2018-09-20 18:07:00 +00:00
"Les chaînes modèles fournissent des substitutions de chaînes plus simples, "
2021-03-15 22:52:56 +00:00
"comme décrit dans :pep:`292`. Linternationalisation (*i18n*) est un cas "
"dutilisation principale pour les chaînes modèles car, dans ce contexte, la "
2018-09-20 18:07:00 +00:00
"syntaxe et les fonctionnalités simplifiées facilitent la traduction par "
"rapport aux autres fonctions de formatage de chaînes intégrées en Python. "
"Comme exemple de bibliothèque construite sur des chaînes modèles pour "
"l'internationalisation, voir le paquet `flufl.i18n <http://flufli18n."
2021-03-15 22:52:56 +00:00
"readthedocs.io/en/latest/>`_ (ressource en anglais)."
2016-10-30 09:46:26 +00:00
#: library/string.rst:746
2018-06-28 13:32:56 +00:00
msgid ""
"Template strings support ``$``-based substitutions, using the following "
"rules:"
msgstr ""
2018-09-20 18:07:00 +00:00
"Les chaînes modèles prennent en charge les substitutions basées sur ``$`` en "
"utilisant les règles suivantes :"
2018-06-28 13:32:56 +00:00
#: library/string.rst:748
2016-10-30 09:46:26 +00:00
msgid "``$$`` is an escape; it is replaced with a single ``$``."
2021-03-15 22:52:56 +00:00
msgstr "``$$`` est un échappement ; il est remplacé par un simple ``$``."
2016-10-30 09:46:26 +00:00
#: library/string.rst:750
2016-10-30 09:46:26 +00:00
msgid ""
2022-03-23 17:40:12 +00:00
"``$identifier`` names a substitution placeholder matching a mapping key of "
"``\"identifier\"``. By default, ``\"identifier\"`` is restricted to any "
"case-insensitive ASCII alphanumeric string (including underscores) that "
"starts with an underscore or ASCII letter. The first non-identifier "
"character after the ``$`` character terminates this placeholder "
"specification."
2016-10-30 09:46:26 +00:00
msgstr ""
"``$identifier`` dénomme un substituant lié à la clef ``\"identifier\"``. Par "
"défaut, ``\"identifier\"`` est restreint à toute chaîne de caractères ASCII "
"alphanumériques sensibles à la casse (avec les *underscores*) commençant "
"avec un *underscore* ou un caractère alphanumérique. Le premier caractère "
"n'étant pas un identifieur après le ``$`` termine la spécification du "
"substituant."
#: library/string.rst:757
2016-10-30 09:46:26 +00:00
msgid ""
"``${identifier}`` is equivalent to ``$identifier``. It is required when "
"valid identifier characters follow the placeholder but are not part of the "
"placeholder, such as ``\"${noun}ification\"``."
msgstr ""
"``${identifier}`` est équivalent à ``$identifier``. Cette notation est "
"requise quand un caractère valide pour une clef de substituant suit "
2022-03-23 17:40:12 +00:00
"directement le substituant mais ne fait pas partie du substituant, comme "
"``\"${noun}ification\"``."
2016-10-30 09:46:26 +00:00
#: library/string.rst:761
2016-10-30 09:46:26 +00:00
msgid ""
"Any other appearance of ``$`` in the string will result in a :exc:"
"`ValueError` being raised."
msgstr ""
"Tout autre présence du symbole ``$`` dans une chaîne résultera en la levée "
"d'une :exc:`ValueError`."
#: library/string.rst:764
2016-10-30 09:46:26 +00:00
msgid ""
"The :mod:`string` module provides a :class:`Template` class that implements "
"these rules. The methods of :class:`Template` are:"
msgstr ""
"Le module :mod:`string` fournit une classe :class:`Template` qui implémente "
2021-03-15 22:52:56 +00:00
"ces règles. Les méthodes de :class:`Template` sont :"
2016-10-30 09:46:26 +00:00
#: library/string.rst:770
2016-10-30 09:46:26 +00:00
msgid "The constructor takes a single argument which is the template string."
msgstr ""
"Le constructeur prend un seul argument qui est la chaîne du *template*."
#: library/string.rst:775
2016-10-30 09:46:26 +00:00
msgid ""
"Performs the template substitution, returning a new string. *mapping* is "
"any dictionary-like object with keys that match the placeholders in the "
"template. Alternatively, you can provide keyword arguments, where the "
"keywords are the placeholders. When both *mapping* and *kwds* are given and "
"there are duplicates, the placeholders from *kwds* take precedence."
msgstr ""
"Applique les substitutions du *template*, et la renvoie dans une nouvelle "
2016-10-30 09:46:26 +00:00
"chaîne. *mapping* est un objet dictionnaire-compatible qui lie les "
"substituants dans le *template*. De même, vous pouvez fournir des arguments "
"mot-clefs tels que les mot-clefs sont les substituants. Quand à la fois "
"*mapping* et *kwds* sont donnés et qu'il y a des doublons, les substituants "
"de *kwds* sont prioritaires."
#: library/string.rst:784
2016-10-30 09:46:26 +00:00
msgid ""
"Like :meth:`substitute`, except that if placeholders are missing from "
"*mapping* and *kwds*, instead of raising a :exc:`KeyError` exception, the "
"original placeholder will appear in the resulting string intact. Also, "
"unlike with :meth:`substitute`, any other appearances of the ``$`` will "
"simply return ``$`` instead of raising :exc:`ValueError`."
msgstr ""
"Comme :meth:`substitute`, si ce n'est qu'au lieu de lever une :exc:"
"`KeyError` si un substituant n'est ni dans *mapping*, ni dans *kwds*, c'est "
"le nom du substituant inchangé qui apparaît dans la chaîne finale. "
2022-03-23 17:40:12 +00:00
"Également, à l'inverse de :meth:`substitute`, toute autre apparition de "
"``$`` renverra simplement ``$`` au lieu de lever une exception :exc:"
2016-10-30 09:46:26 +00:00
"`ValueError`."
#: library/string.rst:790
2016-10-30 09:46:26 +00:00
msgid ""
"While other exceptions may still occur, this method is called \"safe\" "
2018-11-29 15:13:39 +00:00
"because it always tries to return a usable string instead of raising an "
"exception. In another sense, :meth:`safe_substitute` may be anything other "
"than safe, since it will silently ignore malformed templates containing "
"dangling delimiters, unmatched braces, or placeholders that are not valid "
"Python identifiers."
2016-10-30 09:46:26 +00:00
msgstr ""
"Bien que d'autres exceptions peuvent toujours être levées, cette méthode est "
"dite sûre car elle tente de toujours renvoyer une chaîne utilisable au lieu "
"de lever une exception. Ceci dit, :meth:`safe_substitute` est tout sauf sûre "
"car elle ignore silencieusement toute malformation dans le *template* qui "
"contient des délimiteurs fantômes, des accolades non fermées, ou des "
"substituants qui ne sont pas des identificateurs Python valides."
2016-10-30 09:46:26 +00:00
#: library/string.rst:800
2022-03-23 17:40:12 +00:00
msgid ""
"Returns false if the template has invalid placeholders that will cause :meth:"
"`substitute` to raise :exc:`ValueError`."
msgstr ""
#: library/string.rst:808
2022-03-23 17:40:12 +00:00
msgid ""
"Returns a list of the valid identifiers in the template, in the order they "
"first appear, ignoring any invalid identifiers."
msgstr ""
#: library/string.rst:813
2016-10-30 09:46:26 +00:00
msgid ":class:`Template` instances also provide one public data attribute:"
msgstr ""
"Les instances de la classe :class:`Template` fournissent également un "
2021-03-15 22:52:56 +00:00
"attribut public :"
2016-10-30 09:46:26 +00:00
#: library/string.rst:817
2016-10-30 09:46:26 +00:00
msgid ""
"This is the object passed to the constructor's *template* argument. In "
"general, you shouldn't change it, but read-only access is not enforced."
msgstr ""
"C'est l'objet *template* passé comme argument au constructeur. En général, "
"vous ne devriez pas le changer, mais un accès en lecture-seule n'est pas "
"possible à fournir."
#: library/string.rst:820
2016-10-30 09:46:26 +00:00
msgid "Here is an example of how to use a Template::"
msgstr "Voici un exemple de comment utiliser un *Template* ::"
2016-10-30 09:46:26 +00:00
#: library/string.rst:838
2016-10-30 09:46:26 +00:00
msgid ""
"Advanced usage: you can derive subclasses of :class:`Template` to customize "
"the placeholder syntax, delimiter character, or the entire regular "
"expression used to parse template strings. To do this, you can override "
"these class attributes:"
msgstr ""
2021-03-15 22:52:56 +00:00
"Usage avancé : vous pouvez faire dériver vos sous-classes de :class:"
2016-10-30 09:46:26 +00:00
"`Template` pour personnaliser la syntaxe des substituants, les caractères "
"délimiteurs, ou l'entièreté de l'expression rationnelle utilisée pour "
"analyser les chaînes *templates*. Pour faire cela, vous pouvez redéfinir les "
2021-03-15 22:52:56 +00:00
"attributs suivants :"
2016-10-30 09:46:26 +00:00
#: library/string.rst:843
2016-10-30 09:46:26 +00:00
msgid ""
"*delimiter* -- This is the literal string describing a placeholder "
"introducing delimiter. The default value is ``$``. Note that this should "
"*not* be a regular expression, as the implementation will call :meth:`re."
2018-06-28 13:32:56 +00:00
"escape` on this string as needed. Note further that you cannot change the "
"delimiter after class creation (i.e. a different delimiter must be set in "
"the subclass's class namespace)."
2016-10-30 09:46:26 +00:00
msgstr ""
2021-03-15 22:52:56 +00:00
"*delimiter* — La chaîne littérale décrivant le délimiteur pour introduire un "
"substituant. Sa valeur par défaut est ``$``. Notez qu'elle ne doit *pas* "
2018-07-21 09:50:56 +00:00
"être une expression rationnelle, puisque l'implémentation appelle :meth:`re."
"escape` sur cette chaîne si nécessaire. Notez aussi que le délimiteur ne "
2018-07-05 09:39:28 +00:00
"peut pas être changé après la création de la classe."
2016-10-30 09:46:26 +00:00
#: library/string.rst:850
2016-10-30 09:46:26 +00:00
msgid ""
"*idpattern* -- This is the regular expression describing the pattern for non-"
2018-06-28 13:32:56 +00:00
"braced placeholders. The default value is the regular expression ``(?a:[_a-"
"z][_a-z0-9]*)``. If this is given and *braceidpattern* is ``None`` this "
"pattern will also apply to braced placeholders."
msgstr ""
2021-03-15 22:52:56 +00:00
"*idpattern* — L'expression rationnelle décrivant le motif pour les "
2018-07-05 09:39:28 +00:00
"substituants non entourés d'accolades. La valeur par défaut de cette "
2021-03-15 22:52:56 +00:00
"expression rationnelle est ``(?a:[_a-z][_a-z0-9]*)``. Si *idpattern* est "
2018-07-21 09:50:56 +00:00
"donné et *braceidpattern* est ``None``, ce motif est aussi utilisé pour les "
2018-07-05 09:39:28 +00:00
"marqueurs entre accolades."
2016-10-30 09:46:26 +00:00
#: library/string.rst:857
2017-12-01 06:48:13 +00:00
msgid ""
"Since default *flags* is ``re.IGNORECASE``, pattern ``[a-z]`` can match with "
2018-06-28 13:32:56 +00:00
"some non-ASCII characters. That's why we use the local ``a`` flag here."
2017-12-26 08:08:56 +00:00
msgstr ""
"Puisque par défaut *flags* vaut ``re.IGNORECASE``, des caractères *non-"
"ASCII* peuvent correspondre au motif ``[a-z]``. C'est pourquoi on utilise "
"une option locale ``a`` ici."
2017-12-01 06:48:13 +00:00
#: library/string.rst:861
2017-12-01 06:48:13 +00:00
msgid ""
2018-06-28 13:32:56 +00:00
"*braceidpattern* can be used to define separate patterns used inside and "
"outside the braces."
2017-12-26 08:08:56 +00:00
msgstr ""
2018-09-21 12:16:24 +00:00
"*braceidpattern* peut être utilisé pour définir des motifs des motifs "
"différents suivant quils sont à lintérieur ou à lextérieur des accolades."
2017-12-01 06:48:13 +00:00
#: library/string.rst:865
2018-06-28 13:32:56 +00:00
msgid ""
"*braceidpattern* -- This is like *idpattern* but describes the pattern for "
"braced placeholders. Defaults to ``None`` which means to fall back to "
"*idpattern* (i.e. the same pattern is used both inside and outside braces). "
"If given, this allows you to define different patterns for braced and "
"unbraced placeholders."
msgstr ""
2018-09-21 12:16:24 +00:00
"*braceidpattern* — Similaire à *idpattern* mais décrit le motif quand il est "
"placé entre accolades. La valeur par défaut est ``None`` ce qui signifie "
2018-09-21 12:16:24 +00:00
"que seul *idpattern* est pris en compte (le motif est le même, quil soit à "
"lintérieur daccolades ou non). Sil est donné, cela vous permet de définir "
2021-03-15 22:52:56 +00:00
"des motifs entre accolades différents des motifs sans accolades."
2018-06-28 13:32:56 +00:00
#: library/string.rst:873
2016-10-30 09:46:26 +00:00
msgid ""
"*flags* -- The regular expression flags that will be applied when compiling "
"the regular expression used for recognizing substitutions. The default "
"value is ``re.IGNORECASE``. Note that ``re.VERBOSE`` will always be added "
"to the flags, so custom *idpattern*\\ s must follow conventions for verbose "
"regular expressions."
msgstr ""
2021-03-15 22:52:56 +00:00
"*flags* — L'indicateur d'expression rationnelle qui sera appliqué lors de "
2016-10-30 09:46:26 +00:00
"la compilation de l'expression rationnelle pour reconnaître les "
"substitutions. La valeur par défaut est ``re.IGNORECASE``. Notez que ``re."
"VERBOSE`` sera toujours ajouté à l'indicateur. Donc, un *idpattern* "
"personnalisé doit suivre les conventions des expressions rationnelles "
"*verbose*."
#: library/string.rst:881
2016-10-30 09:46:26 +00:00
msgid ""
"Alternatively, you can provide the entire regular expression pattern by "
"overriding the class attribute *pattern*. If you do this, the value must be "
"a regular expression object with four named capturing groups. The capturing "
"groups correspond to the rules given above, along with the invalid "
"placeholder rule:"
msgstr ""
"Également, vous pouvez fournir le motif d'expression rationnelle en entier "
"en redéfinissant l'attribut *pattern*. Si vous faites cela, la valeur doit "
"être un objet 'expression rationnelle' avec quatre groupes de capture de "
"noms. Les groupes de capture correspondent aux règles données au-dessus, "
2021-03-15 22:52:56 +00:00
"ainsi qu'à la règle du substituant invalide :"
2016-10-30 09:46:26 +00:00
#: library/string.rst:887
2016-10-30 09:46:26 +00:00
msgid ""
"*escaped* -- This group matches the escape sequence, e.g. ``$$``, in the "
"default pattern."
msgstr ""
2021-03-15 22:52:56 +00:00
"*escaped* — Ce groupe lie les séquences échappées (par exemple ``$$``) dans "
2016-10-30 09:46:26 +00:00
"le motif par défaut."
#: library/string.rst:890
2016-10-30 09:46:26 +00:00
msgid ""
"*named* -- This group matches the unbraced placeholder name; it should not "
"include the delimiter in capturing group."
msgstr ""
2021-03-15 22:52:56 +00:00
"*named* — Ce groupe lie les substituants non entourés d'accolades ; il ne "
2016-10-30 09:46:26 +00:00
"devrait pas inclure le délimiteur dans le groupe de capture."
#: library/string.rst:893
2016-10-30 09:46:26 +00:00
msgid ""
"*braced* -- This group matches the brace enclosed placeholder name; it "
"should not include either the delimiter or braces in the capturing group."
msgstr ""
2021-03-15 22:52:56 +00:00
"*braced* — Ce groupe lie le nom entouré d'accolades ; il ne devrait inclure "
2016-10-30 09:46:26 +00:00
"ni le délimiteur, ni les accolades dans le groupe de capture."
#: library/string.rst:896
2016-10-30 09:46:26 +00:00
msgid ""
"*invalid* -- This group matches any other delimiter pattern (usually a "
"single delimiter), and it should appear last in the regular expression."
msgstr ""
2021-03-15 22:52:56 +00:00
"*invalid* — Ce groupe lie tout autre motif de délimitation (habituellement, "
2018-09-20 18:07:00 +00:00
"un seul délimiteur) et il devrait apparaître en dernier dans l'expression "
2016-10-30 09:46:26 +00:00
"rationnelle."
#: library/string.rst:899
2022-03-23 17:40:12 +00:00
msgid ""
"The methods on this class will raise :exc:`ValueError` if the pattern "
"matches the template without one of these named groups matching."
msgstr ""
#: library/string.rst:904
2016-10-30 09:46:26 +00:00
msgid "Helper functions"
msgstr "Fonctions d'assistance"
#: library/string.rst:908
2016-10-30 09:46:26 +00:00
msgid ""
"Split the argument into words using :meth:`str.split`, capitalize each word "
"using :meth:`str.capitalize`, and join the capitalized words using :meth:"
"`str.join`. If the optional second argument *sep* is absent or ``None``, "
"runs of whitespace characters are replaced by a single space and leading and "
"trailing whitespace are removed, otherwise *sep* is used to split and join "
"the words."
msgstr ""
2018-03-20 23:16:43 +00:00
"Divise l'argument en mots en utilisant :meth:`str.split`, capitalise chaque "
2016-10-30 09:46:26 +00:00
"mot en utilisant :meth:`str.capitalize` et assemble les mots capitalisés en "
"utilisant :meth:`str.join`. Si le second argument optionnel *sep* est absent "
"ou vaut ``None``, les séquences de caractères blancs sont remplacées par un "
"seul espace et les espaces débutant et finissant la chaîne sont retirés. "
"Sinon, *sep* et utilisé pour séparer et ré-assembler les mots."
2020-12-18 06:09:57 +00:00
#~ msgid ""
#~ "Exponent notation. Prints the number in scientific notation using the "
#~ "letter 'e' to indicate the exponent. The default precision is ``6``."
#~ msgstr ""
#~ "Notation par exposant. Affiche le nombre dans sa notation scientifique en "
#~ "utilisant la lettre 'e' pour indiquer l'exposant. La précision par défaut "
#~ "est ``6``."
#~ msgid ""
#~ "Fixed-point notation. Displays the number as a fixed-point number. The "
#~ "default precision is ``6``."
#~ msgstr ""
#~ "Virgule fixe. Affiche le nombre comme un nombre à virgule fixe. La "
#~ "précision par défaut est ``6``."
#~ msgid ""
#~ "A precision of ``0`` is treated as equivalent to a precision of ``1``. "
#~ "The default precision is ``6``."
#~ msgstr ""
#~ "Une précision de ``0`` est interprétée comme une précision de ``1``. La "
#~ "précision par défaut est ``6``."