python-docs-fr/library/string.po

1542 lines
62 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

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

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 1990-2016, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 2.7\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-10-30 10:44+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../Doc/library/string.rst:2
msgid ":mod:`string` --- Common string operations"
msgstr ":mod:`string` --- Opérations usuelles sur des chaînes"
#: ../Doc/library/string.rst:10
msgid "**Source code:** :source:`Lib/string.py`"
msgstr "**Code source :** :source:`Lib/string.py`"
#: ../Doc/library/string.rst:14
msgid ""
"The :mod:`string` module contains a number of useful constants and classes, "
"as well as some deprecated legacy functions that are also available as "
"methods on strings. In addition, Python's built-in string classes support "
"the sequence type methods described in the :ref:`typesseq` section, and also "
"the string-specific methods described in the :ref:`string-methods` section. "
"To output formatted strings use template strings or the ``%`` operator "
"described in the :ref:`string-formatting` section. Also, see the :mod:`re` "
"module for string functions based on regular expressions."
msgstr ""
#: ../Doc/library/string.rst:25
msgid "String constants"
msgstr "Chaînes constantes"
#: ../Doc/library/string.rst:27
msgid "The constants defined in this module are:"
msgstr "Les constantes définies dans ce module sont :"
#: ../Doc/library/string.rst:32
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 "
"l'environnement linguistique."
#: ../Doc/library/string.rst:38
msgid ""
"The lowercase letters ``'abcdefghijklmnopqrstuvwxyz'``. This value is not "
"locale-dependent and will not change."
msgstr ""
"Les lettres minuscules ``'abcdefghijklmnopqrstuvwxyz``. Cette valeur de "
"dépend pas de l'environnement linguistique et ne changera pas."
#: ../Doc/library/string.rst:44
msgid ""
"The uppercase letters ``'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. This value is not "
"locale-dependent and will not change."
msgstr ""
"Les lettres majuscules ``'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. Cette valeur de "
"dépend pas de l'environnement linguistique et ne changera pas."
#: ../Doc/library/string.rst:50
msgid "The string ``'0123456789'``."
msgstr "La chaîne ``'0123456789'``."
#: ../Doc/library/string.rst:55
msgid "The string ``'0123456789abcdefABCDEF'``."
msgstr "La chaîne ``'0123456789abcdefABCDEF'``."
#: ../Doc/library/string.rst:60
msgid ""
"The concatenation of the strings :const:`lowercase` and :const:`uppercase` "
"described below. The specific value is locale-dependent, and will be "
"updated when :func:`locale.setlocale` is called."
msgstr ""
#: ../Doc/library/string.rst:67
msgid ""
"A string containing all the characters that are considered lowercase "
"letters. On most systems this is the string "
"``'abcdefghijklmnopqrstuvwxyz'``. The specific value is locale-dependent, "
"and will be updated when :func:`locale.setlocale` is called."
msgstr ""
#: ../Doc/library/string.rst:75
msgid "The string ``'01234567'``."
msgstr "La chaîne ``'01234567``."
#: ../Doc/library/string.rst:80
msgid ""
"String of ASCII characters which are considered punctuation characters in "
"the ``C`` locale."
msgstr ""
"Chaîne de caractères ASCII considérés comme ponctuation dans l'environnement "
"linguistique ``C``."
#: ../Doc/library/string.rst:86
msgid ""
"String of characters which are considered printable. This is a combination "
"of :const:`digits`, :const:`letters`, :const:`punctuation`, and :const:"
"`whitespace`."
msgstr ""
#: ../Doc/library/string.rst:93
msgid ""
"A string containing all the characters that are considered uppercase "
"letters. On most systems this is the string "
"``'ABCDEFGHIJKLMNOPQRSTUVWXYZ'``. The specific value is locale-dependent, "
"and will be updated when :func:`locale.setlocale` is called."
msgstr ""
#: ../Doc/library/string.rst:101
msgid ""
"A string containing all characters that are considered whitespace. On most "
"systems this includes the characters space, tab, linefeed, return, formfeed, "
"and vertical tab."
msgstr ""
#: ../Doc/library/string.rst:109
msgid "Custom String Formatting"
msgstr "Formatage personnalisé de chaîne"
#: ../Doc/library/string.rst:113
msgid ""
"The built-in str and unicode classes provide 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 ""
#: ../Doc/library/string.rst:122
msgid "The :class:`Formatter` class has the following public methods:"
msgstr "La classe :class:`Formatter` a les méthodes publiques suivantes : ::"
#: ../Doc/library/string.rst:126
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`."
#: ../Doc/library/string.rst:132
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 "
"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."
#: ../Doc/library/string.rst:140
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 "
"qui ont pour vocation d'être remplacées par des sous-classes :"
#: ../Doc/library/string.rst:145
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 *tuples* "
"(*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."
#: ../Doc/library/string.rst:150
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 *tuple* représentent conceptuellement un ensemble de "
"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``."
#: ../Doc/library/string.rst:159
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 *tuple* renvoyé par :meth:`parse` (voir ci-"
"dessus), le convertit en un objet à formater. Renvoie un *tuple* (*obj*, "
"*used_key*). La version par défaut prend une chaîne de la forme définie par :"
"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`."
#: ../Doc/library/string.rst:168
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, "
"soit une chaîne. Si c'est un entier, il représente l'indice de la l'argument "
"dans *args*. Si c'est une chaîne de caractères, elle représente le nom de "
"l'argument dans *kwargs*."
#: ../Doc/library/string.rst:173
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."
#: ../Doc/library/string.rst:177
msgid ""
"For compound field names, these functions are only called for the first "
"component of the field name; Subsequent components are handled through "
"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."
#: ../Doc/library/string.rst:181
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 "
"recherché après l'appel :meth:`get_value` en faisant appel à la primitive :"
"func:`getattr`."
#: ../Doc/library/string.rst:186
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."
#: ../Doc/library/string.rst:191
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 à "
"`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."
#: ../Doc/library/string.rst:201
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 "
"puisse la redéfinir."
#: ../Doc/library/string.rst:206
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 tuple renvoyé par la méthode :meth:`parse`). "
"La version par défaut comprend 's' (`str`), 'r' (`repr`) et 'a' (ASCII) "
"comme types de conversion."
#: ../Doc/library/string.rst:215
msgid "Format String Syntax"
msgstr "Syntaxe de formatage de chaîne"
#: ../Doc/library/string.rst:217
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)."
msgstr ""
"La méthode :meth:`str.format` et la classe :class:`Formatter` utilisent la "
"même syntaxe pour le formatage de chaînes (même si pour :class:`Formatter`, "
"les sous-classes peuvent définir leur propre syntaxe de chaînes de format)."
#: ../Doc/library/string.rst:221
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 "
"en les doublant : ``{{`` et ``}}``."
#: ../Doc/library/string.rst:226
msgid "The grammar for a replacement field is as follows:"
msgstr "La grammaire pour un champ de remplacement est défini comme suit :"
#: ../Doc/library/string.rst:238
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."
#: ../Doc/library/string.rst:245
msgid "See also the :ref:`formatspec` section."
msgstr "Voir également la section :ref:`formatspec`."
#: ../Doc/library/string.rst:247
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 "
"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__`."
#: ../Doc/library/string.rst:259
msgid ""
"The positional argument specifiers can be omitted, so ``'{} {}'`` is "
"equivalent to ``'{0} {1}'``."
msgstr ""
"Les spécificateurs de position d'argument peuvent être omis. Donc ``'{} "
"{}'`` est équivalent à ``'{0} {1}'``."
#: ../Doc/library/string.rst:263
msgid "Some simple format string examples::"
msgstr "Quelques exemples simples de formatage de chaînes : ::"
#: ../Doc/library/string.rst:272
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."
#: ../Doc/library/string.rst:279
msgid ""
"Two conversion flags are currently supported: ``'!s'`` which calls :func:"
"`str` on the value, and ``'!r'`` which calls :func:`repr`."
msgstr ""
#: ../Doc/library/string.rst:282
msgid "Some examples::"
msgstr "Quelques exemples : ::"
#: ../Doc/library/string.rst:287
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 "
"laquelle la valeur devrait être représentée : des informations telles que la "
"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*."
#: ../Doc/library/string.rst:292
msgid ""
"Most built-in types support a common formatting mini-language, which is "
"described in the next section."
msgstr ""
"La plupart des types natifs supportent un mini-langage de formatage usuel "
"qui est décrit dans la section suivante."
#: ../Doc/library/string.rst:295
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é."
#: ../Doc/library/string.rst:302
msgid "See the :ref:`formatexamples` section for some examples."
msgstr "Voir la section :ref:`formatexamples` pour des exemples."
#: ../Doc/library/string.rst:308
msgid "Format Specification Mini-Language"
msgstr "Mini-langage de spécification de format"
#: ../Doc/library/string.rst:310
msgid ""
"\"Format specifications\" are used within replacement fields contained "
"within a format string to define how individual values are presented (see :"
"ref:`formatstrings`). 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 ""
"Les \"spécifications de format\" sont utilisées pour les champs de "
"remplacement contenus dans une chaîne de format pour définir comment la "
"valeur doit être représentée (voir :ref:`formatstrings`). Elles peuvent "
"également être passées directement à la primitive :func:`format`. Chaque "
"type formatable peut définir comment interpréter la spécification de format."
#: ../Doc/library/string.rst:316
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 ""
"La plupart des primitives implémentent les les options suivantes, même si "
"certaines options de formatage ne sont supportées que pour les types "
"numériques."
#: ../Doc/library/string.rst:319
msgid ""
"A general convention is that an empty format string (``\"\"``) produces the "
"same result as if you had called :func:`str` on the value. A non-empty "
"format string typically modifies the result."
msgstr ""
"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 typiquement le résultat."
#: ../Doc/library/string.rst:323
msgid "The general form of a *standard format specifier* is:"
msgstr "La forme générale d'un *spécificateur de format standard* est : ::"
#: ../Doc/library/string.rst:334
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 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 ""
"Si une valeur *align* valide est spécifiée, la valeur peut être représentée "
"par un caractère *fill* de remplissage qui peut être n'importe quel "
"caractère et qui vaut espace par défaut si il est omis. Il est impossible "
"d'utiliser un littéral 'accolade' (\"``{``\" ou \"``}``\") en tant que "
"caractère *fill* quand la méthode :meth:`str.format` est utilisée. "
"Cependant, il est possible d'insérer une accolade avec un champ de "
"remplacement imbriqué. Cette limite n'affecte pas la fonction :func:`format`."
#: ../Doc/library/string.rst:342
msgid "The meaning of the various alignment options is as follows:"
msgstr "Le sens des différentes options d'alignement est donné comme suit :"
#: ../Doc/library/string.rst:345 ../Doc/library/string.rst:371
msgid "Option"
msgstr "Option"
#: ../Doc/library/string.rst:345 ../Doc/library/string.rst:371
#: ../Doc/library/string.rst:414 ../Doc/library/string.rst:425
#: ../Doc/library/string.rst:457
msgid "Meaning"
msgstr "Signification"
#: ../Doc/library/string.rst:347
msgid "``'<'``"
msgstr "``'<'``"
#: ../Doc/library/string.rst:347
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)."
#: ../Doc/library/string.rst:350
msgid "``'>'``"
msgstr "``'>'``"
#: ../Doc/library/string.rst:350
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)."
#: ../Doc/library/string.rst:353
msgid "``'='``"
msgstr "``'='``"
#: ../Doc/library/string.rst:353
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 "
"when '0' immediately precedes the field width."
msgstr ""
"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."
#: ../Doc/library/string.rst:359
msgid "``'^'``"
msgstr "``'^'``"
#: ../Doc/library/string.rst:359
msgid "Forces the field to be centered within the available space."
msgstr "Force le champ à être centré dans l'espace disponible."
#: ../Doc/library/string.rst:363
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 ""
"Notons que la longueur du champ est toujours égale à la la taille nécessaire "
"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."
#: ../Doc/library/string.rst:367
msgid ""
"The *sign* option is only valid for number types, and can be one of the "
"following:"
msgstr ""
"L'option *sign* est uniquement valide pour les type numériques, et peut "
"valoir :"
#: ../Doc/library/string.rst:373
msgid "``'+'``"
msgstr "``'+'``"
#: ../Doc/library/string.rst:373
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 "
"négatifs."
#: ../Doc/library/string.rst:376
msgid "``'-'``"
msgstr "``'-'``"
#: ../Doc/library/string.rst:376
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 "
"(c'est le comportement par défaut)."
#: ../Doc/library/string.rst:379
msgid "space"
msgstr "espace"
#: ../Doc/library/string.rst:379
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 "
"doit précéder les nombres négatifs."
#: ../Doc/library/string.rst:383
msgid ""
"The ``'#'`` option is only valid for integers, and only for binary, octal, "
"or hexadecimal output. If present, it specifies that the output will be "
"prefixed by ``'0b'``, ``'0o'``, or ``'0x'``, respectively."
msgstr ""
#: ../Doc/library/string.rst:387
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 "
"milliers. Pour un séparateur conscient de l'environnement linguistique, "
"utilisez plutôt le type de présentation entière ``'n'``."
#: ../Doc/library/string.rst:391
msgid "Added the ``','`` option (see also :pep:`378`)."
msgstr "Ajout de l'option ``','`` (voir :pep:`378`)."
#: ../Doc/library/string.rst:394
msgid ""
"*width* is a decimal integer defining the minimum field width. If not "
"specified, then the field width will be determined by the content."
msgstr ""
"*width* est un entier en base 10 qui définit la longueur minimale du champ. "
"Si elle n'est pas spécifiée, alors le champ *width* est déterminé par le "
"contenu."
#: ../Doc/library/string.rst:397
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 ""
"Quand aucun alignement explicite n'est donné, précéder le champs *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 ``'='``."
#: ../Doc/library/string.rst:402
msgid ""
"The *precision* is a decimal number indicating how many digits should be "
"displayed after the decimal point for a floating point value formatted with "
"``'f'`` and ``'F'``, or before and after the decimal point for a floating "
"point value formatted with ``'g'`` or ``'G'``. For non-number 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 values."
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, "
"autrement dit, combien de caractères du champ sont utilisés. Le "
"spécificateur *precision* n'est pas autorisé sur les entiers."
#: ../Doc/library/string.rst:409
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."
#: ../Doc/library/string.rst:411
msgid "The available string presentation types are:"
msgstr "Les types disponibles de représentation de chaîne sont :"
#: ../Doc/library/string.rst:414 ../Doc/library/string.rst:425
#: ../Doc/library/string.rst:457
msgid "Type"
msgstr "Type"
#: ../Doc/library/string.rst:416
msgid "``'s'``"
msgstr "``'s'``"
#: ../Doc/library/string.rst:416
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."
#: ../Doc/library/string.rst:419 ../Doc/library/string.rst:446
#: ../Doc/library/string.rst:506
msgid "None"
msgstr "*None*"
#: ../Doc/library/string.rst:419
msgid "The same as ``'s'``."
msgstr "Pareil que ``'s'``."
#: ../Doc/library/string.rst:422
msgid "The available integer presentation types are:"
msgstr "Les types disponibles de représentation d'entier sont :"
#: ../Doc/library/string.rst:427
msgid "``'b'``"
msgstr "``'b'``"
#: ../Doc/library/string.rst:427
msgid "Binary format. Outputs the number in base 2."
msgstr "Format binaire. Affiche le nombre en base 2."
#: ../Doc/library/string.rst:429
msgid "``'c'``"
msgstr "``'c'``"
#: ../Doc/library/string.rst:429
msgid ""
"Character. Converts the integer to the corresponding unicode character "
"before printing."
msgstr ""
"Caractère. Convertit l'entier en le caractère Unicode associé avant de "
"l'afficher."
#: ../Doc/library/string.rst:432
msgid "``'d'``"
msgstr "``'d'``"
#: ../Doc/library/string.rst:432
msgid "Decimal Integer. Outputs the number in base 10."
msgstr "Entier décimal. Affiche le nombre en base 10."
#: ../Doc/library/string.rst:434
msgid "``'o'``"
msgstr "``'o'``"
#: ../Doc/library/string.rst:434
msgid "Octal format. Outputs the number in base 8."
msgstr "Format octal. Affiche le nombre en base 8."
#: ../Doc/library/string.rst:436
msgid "``'x'``"
msgstr "``'x'``"
#: ../Doc/library/string.rst:436
msgid ""
"Hex format. Outputs the number in base 16, using lower- case letters for the "
"digits above 9."
msgstr ""
"Format hexadécimal. Affiche le nombre en base 16 en utilisant les lettres "
"minuscules pour les chiffres au-dessus de 9."
#: ../Doc/library/string.rst:439
msgid "``'X'``"
msgstr "``'X'``"
#: ../Doc/library/string.rst:439
msgid ""
"Hex format. Outputs the number in base 16, using upper- case letters for the "
"digits above 9."
msgstr ""
"Format hexadécimal. Affiche le nombre en base 16 en utilisant les lettres "
"majuscules pour les chiffres au-dessus de 9."
#: ../Doc/library/string.rst:442 ../Doc/library/string.rst:499
msgid "``'n'``"
msgstr "``'n'``"
#: ../Doc/library/string.rst:442
msgid ""
"Number. This is the same as ``'d'``, except that it uses the current locale "
"setting to insert the appropriate number separator characters."
msgstr ""
"Nombre. Pareil que ``'d'`` si ce n'est que l'environnement linguistique est "
"utilisé afin de déterminer le séparateur de nombres approprié."
#: ../Doc/library/string.rst:446
msgid "The same as ``'d'``."
msgstr "Pareil que ``'d'``."
#: ../Doc/library/string.rst:449
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 ""
"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 :"
"func:`float` est utilisée pour convertir l'entier en flottant avant le "
"formatage."
#: ../Doc/library/string.rst:454
msgid ""
"The available presentation types for floating point and decimal values are:"
msgstr ""
"les types de représentation pour les nombres flottants et les valeurs "
"décimales sont :"
#: ../Doc/library/string.rst:459
msgid "``'e'``"
msgstr "``'e'``"
#: ../Doc/library/string.rst:459
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``."
#: ../Doc/library/string.rst:463
msgid "``'E'``"
msgstr "``'E'``"
#: ../Doc/library/string.rst:463
msgid ""
"Exponent notation. Same as ``'e'`` except it uses an upper case 'E' as the "
"separator character."
msgstr ""
"Notation par exposant. Pareil que ``'e'`` sauf l'utilisation de la lettre "
"majuscule 'E' comme séparateur."
#: ../Doc/library/string.rst:466
msgid "``'f'``"
msgstr "``'f'``"
#: ../Doc/library/string.rst:466
msgid ""
"Fixed point. 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``."
#: ../Doc/library/string.rst:469
msgid "``'F'``"
msgstr "``'F'``"
#: ../Doc/library/string.rst:469
msgid "Fixed point. Same as ``'f'``."
msgstr ""
#: ../Doc/library/string.rst:471
msgid "``'g'``"
msgstr "``'g'``"
#: ../Doc/library/string.rst:471
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 "
"format or in scientific notation, depending on its magnitude."
msgstr ""
"Format général. Pour une précision donnée ``p >= 1``, ceci arrondit le "
"nombre à ``p`` chiffres significatifs et puis formate le résultat soit en "
"virgule fixe soit en notation scientifique, en fonction de la magnitude."
#: ../Doc/library/string.rst:476
msgid ""
"The precise rules are as follows: suppose that the result formatted with "
"presentation type ``'e'`` and precision ``p-1`` would have exponent "
"``exp``. Then if ``-4 <= exp < p``, the number is formatted with "
"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 "
"decimal point is also removed if there are no remaining digits following it."
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 ``1`` ait un "
"exposant ``exp``. Alors, si ``-4 <= exp <= p``, 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."
#: ../Doc/library/string.rst:487
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 ""
"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."
#: ../Doc/library/string.rst:492
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``."
#: ../Doc/library/string.rst:495
msgid "``'G'``"
msgstr "``'G'``"
#: ../Doc/library/string.rst:495
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. Également, la représentation des infinis et de Nan "
"sont en majuscules également."
#: ../Doc/library/string.rst:499
msgid ""
"Number. This is the same as ``'g'``, except that it uses the current locale "
"setting to insert the appropriate number separator characters."
msgstr ""
"Nombre. Pareil que ``'g'``, si ce n'est que l'environnement linguistique est "
"pris en compte pour insérer le séparateur approprié."
#: ../Doc/library/string.rst:503
msgid "``'%'``"
msgstr "``'%'``"
#: ../Doc/library/string.rst:503
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 ``'%'``."
#: ../Doc/library/string.rst:506
msgid "The same as ``'g'``."
msgstr ""
#: ../Doc/library/string.rst:514
msgid "Format examples"
msgstr "Exemples de formats"
#: ../Doc/library/string.rst:516
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 ``%``."
#: ../Doc/library/string.rst:519
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 ""
"Dans la plupart des cases, la syntaxe est similaire à l'ancien formatage par "
"``%``, avec l'ajout de ``{}`` et avec ``:`` au lieu de ``%``. Par exemple : "
"``'%03.2f'`` peut être changé en ``'{03.2f}'``."
#: ../Doc/library/string.rst:523
msgid ""
"The new format syntax also supports new and different options, shown in the "
"follow examples."
msgstr ""
"La nouvelle syntaxe de formatage supporte également de nouvelles options et "
"des options différentes, montrées dans les exemples qui suivent."
#: ../Doc/library/string.rst:526
msgid "Accessing arguments by position::"
msgstr "Accéder à un argument par sa position : ::"
#: ../Doc/library/string.rst:539
msgid "Accessing arguments by name::"
msgstr "Accéder à un argument par son nom : ::"
#: ../Doc/library/string.rst:547
msgid "Accessing arguments' attributes::"
msgstr "Accéder aux attributs d'un argument : ::"
#: ../Doc/library/string.rst:563
msgid "Accessing arguments' items::"
msgstr "Accéder aux éléments d'un argument : ::"
#: ../Doc/library/string.rst:569
msgid "Replacing ``%s`` and ``%r``::"
msgstr "Remplacer ``%s`` et ``%r`` : ::"
#: ../Doc/library/string.rst:574
msgid "Aligning the text and specifying a width::"
msgstr "Aligner le texte et spécifier une longueur minimale : ::"
#: ../Doc/library/string.rst:585
msgid "Replacing ``%+f``, ``%-f``, and ``% f`` and specifying a sign::"
msgstr "Remplacer ``%+f``, ``%-f``, et ``%f`` et spécifier un signe : ::"
#: ../Doc/library/string.rst:594
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 : ::"
#: ../Doc/library/string.rst:603
msgid "Using the comma as a thousands separator::"
msgstr "Utiliser une virgule comme séparateur des milliers : ::"
#: ../Doc/library/string.rst:608
msgid "Expressing a percentage::"
msgstr "Exprimer un pourcentage : ::"
#: ../Doc/library/string.rst:615
msgid "Using type-specific formatting::"
msgstr "Utiliser un formatage propre au type : ::"
#: ../Doc/library/string.rst:622
msgid "Nesting arguments and more complex examples::"
msgstr "Arguments imbriqués et des exemples plus complexes : ::"
#: ../Doc/library/string.rst:654
msgid "Template strings"
msgstr "Chaînes modèles"
#: ../Doc/library/string.rst:658
msgid ""
"Templates provide simpler string substitutions as described in :pep:`292`. "
"Instead of the normal ``%``\\ -based substitutions, Templates support ``$``"
"\\ -based substitutions, using the following rules:"
msgstr ""
"Les modèles (*templates*) fournissent des substitutions de chaînes plus "
"simples comme décrit dans :pep:`292`. À la place des substitutions "
"habituelles basées sur ``%``, les *Templates* supportent les substitutions "
"basées sur ``$`` en utilisant les règles suivantes :"
#: ../Doc/library/string.rst:662
msgid "``$$`` is an escape; it is replaced with a single ``$``."
msgstr "``$$`` est un échappement ; il est remplacé par un simple ``$``."
#: ../Doc/library/string.rst:664
msgid ""
"``$identifier`` names a substitution placeholder matching a mapping key of ``"
"\"identifier\"``. By default, ``\"identifier\"`` must spell a Python "
"identifier. The first non-identifier character after the ``$`` character "
"terminates this placeholder specification."
msgstr ""
#: ../Doc/library/string.rst:669
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 "
"directement le substituant mais ne fait pas partie du substituant, comme ``"
"\"${noun}ification\"``."
#: ../Doc/library/string.rst:673
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`."
#: ../Doc/library/string.rst:676
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 "
"ces règles. Les méthodes de :class:`Template` sont :"
#: ../Doc/library/string.rst:682
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*."
#: ../Doc/library/string.rst:687
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 *kws* are given and "
"there are duplicates, the placeholders from *kws* take precedence."
msgstr ""
#: ../Doc/library/string.rst:696
msgid ""
"Like :meth:`substitute`, except that if placeholders are missing from "
"*mapping* and *kws*, 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 ""
#: ../Doc/library/string.rst:702
msgid ""
"While other exceptions may still occur, this method is called \"safe\" "
"because substitutions 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."
msgstr ""
"Bien que d'autres exceptions peuvent toujours être levées, cette méthode est "
"dite *safe* (sûre) car les substitutions tentent toujours de renvoyer une "
"chaîne utilisable au lieu de lever une exception. Dans un autre sens, :meth:"
"`safe_substitute` est tout sauf sûre du fait qu'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."
#: ../Doc/library/string.rst:709
msgid ":class:`Template` instances also provide one public data attribute:"
msgstr ""
"Les instances de la classe :class:`Template` fournissent également un "
"attribut public :"
#: ../Doc/library/string.rst:713
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."
#: ../Doc/library/string.rst:716
msgid "Here is an example of how to use a Template::"
msgstr "Voici un exemple de comment utiliser un *Template* : ::"
#: ../Doc/library/string.rst:734
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 ""
"Usage avancé : vous pouvez faire dériver vos sous-classes de :class:"
"`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 "
"attributs suivants :"
#: ../Doc/library/string.rst:738
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."
"escape` on this string as needed."
msgstr ""
"*delimiter* -- La chaîne littérale décrivant le délimiteur pour introduire "
"un substituant. Sa valeur par défaut ests ``$``. Notez qu'il ne doit *pas* "
"être une expression rationnelle, puisque l'implémentation appellera :meth:"
"`re.escape` sur cette chaîne si nécessaire."
#: ../Doc/library/string.rst:743
msgid ""
"*idpattern* -- This is the regular expression describing the pattern for non-"
"braced placeholders (the braces will be added automatically as "
"appropriate). The default value is the regular expression ``[_a-z][_a-"
"z0-9]*``."
msgstr ""
"*idpattern* -- L'expression rationnelle décrivant le motif pour les "
"substituants non entourés d'accolades (les accolades sont ajoutées "
"automatiquement si c'est approprié). La valeur par défaut de cette "
"expression rationnelle est ``[_a-z][_a-z0-9]*``."
#: ../Doc/library/string.rst:748
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, "
"ainsi qu'à la règle du substituant invalide :"
#: ../Doc/library/string.rst:754
msgid ""
"*escaped* -- This group matches the escape sequence, e.g. ``$$``, in the "
"default pattern."
msgstr ""
"*escaped* -- Ce groupe lie les séquences échappées (par exemple ``$$``) dans "
"le motif par défaut."
#: ../Doc/library/string.rst:757
msgid ""
"*named* -- This group matches the unbraced placeholder name; it should not "
"include the delimiter in capturing group."
msgstr ""
"*named* -- Ce groupe lie les substituants non entourés d'accolades ; il ne "
"devrait pas inclure le délimiteur dans le groupe de capture."
#: ../Doc/library/string.rst:760
msgid ""
"*braced* -- This group matches the brace enclosed placeholder name; it "
"should not include either the delimiter or braces in the capturing group."
msgstr ""
"*braced* -- Ce groupe lie le nom entouré d'accolades ; il ne devrait inclure "
"ni le délimiteur, ni les accolades dans le groupe de capture."
#: ../Doc/library/string.rst:763
msgid ""
"*invalid* -- This group matches any other delimiter pattern (usually a "
"single delimiter), and it should appear last in the regular expression."
msgstr ""
"*invalid* -- Ce groupe lie tout autre motif de délimitation (habituellement, "
"un seul délimiteur) et il devrait apparaître en dernier dans l'expression "
"rationnelle."
#: ../Doc/library/string.rst:768
msgid "String functions"
msgstr ""
#: ../Doc/library/string.rst:770
msgid ""
"The following functions are available to operate on string and Unicode "
"objects. They are not available as string methods."
msgstr ""
#: ../Doc/library/string.rst:776
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 ""
"Divise l'argument en mots en utilisant :meth:`str.split`, capitalise chaque "
"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."
#: ../Doc/library/string.rst:786
msgid ""
"Return a translation table suitable for passing to :func:`translate`, that "
"will map each character in *from* into the character at the same position in "
"*to*; *from* and *to* must have the same length."
msgstr ""
#: ../Doc/library/string.rst:792
msgid ""
"Don't use strings derived from :const:`lowercase` and :const:`uppercase` as "
"arguments; in some locales, these don't have the same length. For case "
"conversions, always use :meth:`str.lower` and :meth:`str.upper`."
msgstr ""
#: ../Doc/library/string.rst:798
msgid "Deprecated string functions"
msgstr ""
#: ../Doc/library/string.rst:800
msgid ""
"The following list of functions are also defined as methods of string and "
"Unicode objects; see section :ref:`string-methods` for more information on "
"those. You should consider these functions as deprecated, although they "
"will not be removed until Python 3. The functions defined in this module "
"are:"
msgstr ""
#: ../Doc/library/string.rst:808
msgid "Use the :func:`float` built-in function."
msgstr ""
#: ../Doc/library/string.rst:813
msgid ""
"Convert a string to a floating point number. The string must have the "
"standard syntax for a floating point literal in Python, optionally preceded "
"by a sign (``+`` or ``-``). Note that this behaves identical to the built-"
"in function :func:`float` when passed a string."
msgstr ""
#: ../Doc/library/string.rst:824
msgid ""
"When passing in a string, values for NaN and Infinity may be returned, "
"depending on the underlying C library. The specific set of strings accepted "
"which cause these values to be returned depends entirely on the C library "
"and is known to vary."
msgstr ""
#: ../Doc/library/string.rst:832
msgid "Use the :func:`int` built-in function."
msgstr ""
#: ../Doc/library/string.rst:837
msgid ""
"Convert string *s* to an integer in the given *base*. The string must "
"consist of one or more digits, optionally preceded by a sign (``+`` or ``-"
"``). The *base* defaults to 10. If it is 0, a default base is chosen "
"depending on the leading characters of the string (after stripping the "
"sign): ``0x`` or ``0X`` means 16, ``0`` means 8, anything else means 10. If "
"*base* is 16, a leading ``0x`` or ``0X`` is always accepted, though not "
"required. This behaves identically to the built-in function :func:`int` "
"when passed a string. (Also note: for a more flexible interpretation of "
"numeric literals, use the built-in function :func:`eval`.)"
msgstr ""
#: ../Doc/library/string.rst:850
msgid "Use the :func:`long` built-in function."
msgstr ""
#: ../Doc/library/string.rst:855
msgid ""
"Convert string *s* to a long integer in the given *base*. The string must "
"consist of one or more digits, optionally preceded by a sign (``+`` or ``-"
"``). The *base* argument has the same meaning as for :func:`atoi`. A "
"trailing ``l`` or ``L`` is not allowed, except if the base is 0. Note that "
"when invoked without *base* or with *base* set to 10, this behaves identical "
"to the built-in function :func:`long` when passed a string."
msgstr ""
#: ../Doc/library/string.rst:865
msgid "Return a copy of *word* with only its first character capitalized."
msgstr ""
#: ../Doc/library/string.rst:870
msgid ""
"Expand tabs in a string replacing them by one or more spaces, depending on "
"the current column and the given tab size. The column number is reset to "
"zero after each newline occurring in the string. This doesn't understand "
"other non-printing characters or escape sequences. The tab size defaults to "
"8."
msgstr ""
#: ../Doc/library/string.rst:878
msgid ""
"Return the lowest index in *s* where the substring *sub* is found such that "
"*sub* is wholly contained in ``s[start:end]``. Return ``-1`` on failure. "
"Defaults for *start* and *end* and interpretation of negative values is the "
"same as for slices."
msgstr ""
#: ../Doc/library/string.rst:886
msgid "Like :func:`find` but find the highest index."
msgstr ""
#: ../Doc/library/string.rst:891
msgid ""
"Like :func:`find` but raise :exc:`ValueError` when the substring is not "
"found."
msgstr ""
#: ../Doc/library/string.rst:896
msgid ""
"Like :func:`rfind` but raise :exc:`ValueError` when the substring is not "
"found."
msgstr ""
#: ../Doc/library/string.rst:901
msgid ""
"Return the number of (non-overlapping) occurrences of substring *sub* in "
"string ``s[start:end]``. Defaults for *start* and *end* and interpretation "
"of negative values are the same as for slices."
msgstr ""
#: ../Doc/library/string.rst:908
msgid ""
"Return a copy of *s*, but with upper case letters converted to lower case."
msgstr ""
#: ../Doc/library/string.rst:913
msgid ""
"Return a list of the words of the string *s*. If the optional second "
"argument *sep* is absent or ``None``, the words are separated by arbitrary "
"strings of whitespace characters (space, tab, newline, return, formfeed). "
"If the second argument *sep* is present and not ``None``, it specifies a "
"string to be used as the word separator. The returned list will then have "
"one more item than the number of non-overlapping occurrences of the "
"separator in the string. If *maxsplit* is given, at most *maxsplit* number "
"of splits occur, and the remainder of the string is returned as the final "
"element of the list (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 ""
#: ../Doc/library/string.rst:925
msgid ""
"The behavior of split on an empty string depends on the value of *sep*. If "
"*sep* is not specified, or specified as ``None``, the result will be an "
"empty list. If *sep* is specified as any string, the result will be a list "
"containing one element which is an empty string."
msgstr ""
#: ../Doc/library/string.rst:933
msgid ""
"Return a list of the words of the string *s*, scanning *s* from the end. To "
"all intents and purposes, the resulting list of words is the same as "
"returned by :func:`split`, except when the optional third argument "
"*maxsplit* is explicitly specified and nonzero. If *maxsplit* is given, at "
"most *maxsplit* number of splits -- the *rightmost* ones -- occur, and the "
"remainder of the string is returned as the first element of the list (thus, "
"the list will have at most ``maxsplit+1`` elements)."
msgstr ""
#: ../Doc/library/string.rst:946
msgid ""
"This function behaves identically to :func:`split`. (In the past, :func:"
"`split` was only used with one argument, while :func:`splitfields` was only "
"used with two arguments.)"
msgstr ""
#: ../Doc/library/string.rst:953
msgid ""
"Concatenate a list or tuple of words with intervening occurrences of *sep*. "
"The default value for *sep* is a single space character. It is always true "
"that ``string.join(string.split(s, sep), sep)`` equals *s*."
msgstr ""
#: ../Doc/library/string.rst:960
msgid ""
"This function behaves identically to :func:`join`. (In the past, :func:"
"`join` was only used with one argument, while :func:`joinfields` was only "
"used with two arguments.) Note that there is no :meth:`joinfields` method on "
"string objects; use the :meth:`join` method instead."
msgstr ""
#: ../Doc/library/string.rst:968
msgid ""
"Return a copy of the string with leading characters removed. If *chars* is "
"omitted or ``None``, whitespace characters are removed. If given and not "
"``None``, *chars* must be a string; the characters in the string will be "
"stripped from the beginning of the string this method is called on."
msgstr ""
#: ../Doc/library/string.rst:973 ../Doc/library/string.rst:985
#: ../Doc/library/string.rst:997
msgid ""
"The *chars* parameter was added. The *chars* parameter cannot be passed in "
"earlier 2.2 versions."
msgstr ""
#: ../Doc/library/string.rst:980
msgid ""
"Return a copy of the string with trailing characters removed. If *chars* is "
"omitted or ``None``, whitespace characters are removed. If given and not "
"``None``, *chars* must be a string; the characters in the string will be "
"stripped from the end of the string this method is called on."
msgstr ""
#: ../Doc/library/string.rst:992
msgid ""
"Return a copy of the string with leading and trailing characters removed. "
"If *chars* is omitted or ``None``, whitespace characters are removed. If "
"given and not ``None``, *chars* must be a string; the characters in the "
"string will be stripped from the both ends of the string this method is "
"called on."
msgstr ""
#: ../Doc/library/string.rst:1004
msgid ""
"Return a copy of *s*, but with lower case letters converted to upper case "
"and vice versa."
msgstr ""
#: ../Doc/library/string.rst:1010
msgid ""
"Delete all characters from *s* that are in *deletechars* (if present), and "
"then translate the characters using *table*, which must be a 256-character "
"string giving the translation for each character value, indexed by its "
"ordinal. If *table* is ``None``, then only the character deletion step is "
"performed."
msgstr ""
#: ../Doc/library/string.rst:1018
msgid ""
"Return a copy of *s*, but with lower case letters converted to upper case."
msgstr ""
#: ../Doc/library/string.rst:1025
msgid ""
"These functions respectively left-justify, right-justify and center a string "
"in a field of given width. They return a string that is at least *width* "
"characters wide, created by padding the string *s* with the character "
"*fillchar* (default is a space) until the given width on the right, left or "
"both sides. The string is never truncated."
msgstr ""
#: ../Doc/library/string.rst:1034
msgid ""
"Pad a numeric string *s* on the left with zero digits until the given "
"*width* is reached. Strings starting with a sign are handled correctly."
msgstr ""
#: ../Doc/library/string.rst:1041
msgid ""
"Return a copy of string *s* with all occurrences of substring *old* replaced "
"by *new*. If the optional argument *maxreplace* is given, the first "
"*maxreplace* occurrences are replaced."
msgstr ""