# Copyright (C) 2001-2018, Python Software Foundation # For licence information, see README file. # msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-08-24 09:01+0200\n" "PO-Revision-Date: 2018-09-28 10:08+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" #: library/tokenize.rst:2 msgid ":mod:`tokenize` --- Tokenizer for Python source" msgstr ":mod:`tokenize` — Analyseur lexical de Python" #: library/tokenize.rst:10 msgid "**Source code:** :source:`Lib/tokenize.py`" msgstr "**Code source :** :source:`Lib/tokenize.py`" #: library/tokenize.rst:14 #, fuzzy msgid "" "The :mod:`tokenize` module provides a lexical scanner for Python source " "code, implemented in Python. The scanner in this module returns comments as " "tokens as well, making it useful for implementing \"pretty-printers\", " "including colorizers for on-screen displays." msgstr "" "Le module :mod:`tokenize` fournit un analyseur lexical pour Python, " "implémenté en Python. L'analyseur de ce module renvoie les commentaire sous " "forme de *token*, se qui le rend intéressant pour implémenter des *pretty-" "printers*, typiquement pour faire de la coloration syntaxique." #: library/tokenize.rst:19 msgid "" "To simplify token stream handling, all :ref:`operator ` and :ref:" "`delimiter ` tokens and :data:`Ellipsis` are returned using the " "generic :data:`~token.OP` token type. The exact type can be determined by " "checking the ``exact_type`` property on the :term:`named tuple` returned " "from :func:`tokenize.tokenize`." msgstr "" "Pour simplifier la gestion de flux de *tokens*, tous les *tokens* :ref:" "`operator ` et :ref:`delimiter `, ainsi que les :data:" "`Ellipsis*` sont renvoyés en utilisant le *token* générique :data:`~token." "OP`. Le type exact peut être déterminé en vérifiant la propriété " "``exact_type`` du :term:`named tuple` renvoyé par :func:`tokenize.tokenize`." #: library/tokenize.rst:26 msgid "Tokenizing Input" msgstr "Analyse Lexicale" #: library/tokenize.rst:28 msgid "The primary entry point is a :term:`generator`:" msgstr "Le point d'entrée principal est un :term:`générateur ` :" #: library/tokenize.rst:32 msgid "" "The :func:`.tokenize` generator requires one argument, *readline*, which " "must be a callable object which provides the same interface as the :meth:`io." "IOBase.readline` method of file objects. Each call to the function should " "return one line of input as bytes." msgstr "" "Le générateur :func:`.tokenize` prend un argument *readline* qui doit être " "un objet appelable exposant la même interface que la méthode :meth:`io." "IOBase.readline` des objets fichiers. Chaque appel a la fonction doit " "renvoyer une ligne sous forme de *bytes*." #: library/tokenize.rst:37 #, fuzzy msgid "" "The generator produces 5-tuples with these members: the token type; the " "token string; a 2-tuple ``(srow, scol)`` of ints specifying the row and " "column where the token begins in the source; a 2-tuple ``(erow, ecol)`` of " "ints specifying the row and column where the token ends in the source; and " "the line on which the token was found. The line passed (the last tuple item) " "is the *physical* line. The 5 tuple is returned as a :term:`named tuple` " "with the field names: ``type string start end line``." msgstr "" "Le générateur fournit des quintuplet contenants : le type du *token*, sa " "chaîne, un couple d'entiers ``(srow, scol)`` indiquant la ligne et la " "colonne où le *token* commence, un couple d'entiers ``(erow, ecol)`` " "indiquant la ligne et la colonne où il se termine, puis la ligne dans " "laquelle il a été trouvé. La ligne donnée (le dernier élément du *n*-uplet) " "est la ligne \"logique\", les *continuation lines* étant incluses. Le " "quintuplet est renvoyé sous forme d'un :term:`n-uplet nommé` " "dont les noms des 5 champs sont : ``type string start end line``." #: library/tokenize.rst:46 msgid "" "The returned :term:`named tuple` has an additional property named " "``exact_type`` that contains the exact operator type for :data:`~token.OP` " "tokens. For all other token types ``exact_type`` equals the named tuple " "``type`` field." msgstr "" "Le :term:`n-uplet nommé` a une propriété additionnelle appelée " "``exact_type`` qui contient le type exact de l'opérateur pour les jetons :" "data:`~token.OP`. Pour tous les autres types de jetons, ``exact_type`` est " "égal au champ ``type`` du *n*-uplet nommé." #: library/tokenize.rst:51 msgid "Added support for named tuples." msgstr "prise en charge des *n*-uplets nommés." #: library/tokenize.rst:54 msgid "Added support for ``exact_type``." msgstr "prise en charge de ``exact_type``." #: library/tokenize.rst:57 msgid "" ":func:`.tokenize` determines the source encoding of the file by looking for " "a UTF-8 BOM or encoding cookie, according to :pep:`263`." msgstr "" ":func:`.tokenize` détermine le codage source du fichier en recherchant une " "nomenclature UTF-8 ou un cookie d'encodage, selon la :pep:`263`." #: library/tokenize.rst:62 msgid "Tokenize a source reading unicode strings instead of bytes." msgstr "" #: library/tokenize.rst:64 msgid "" "Like :func:`.tokenize`, the *readline* argument is a callable returning a " "single line of input. However, :func:`generate_tokens` expects *readline* to " "return a str object rather than bytes." msgstr "" #: library/tokenize.rst:68 msgid "" "The result is an iterator yielding named tuples, exactly like :func:`." "tokenize`. It does not yield an :data:`~token.ENCODING` token." msgstr "" #: library/tokenize.rst:71 msgid "" "All constants from the :mod:`token` module are also exported from :mod:" "`tokenize`." msgstr "" "Toutes les constantes du module :mod:`token` sont également exportées depuis " "module :mod:`tokenize`." #: library/tokenize.rst:74 msgid "" "Another function is provided to reverse the tokenization process. This is " "useful for creating tools that tokenize a script, modify the token stream, " "and write back the modified script." msgstr "" "Une autre fonction est fournie pour inverser le processus de tokenisation. " "Ceci est utile pour créer des outils permettant de codifier un script, de " "modifier le flux de jetons et de réécrire le script modifié." #: library/tokenize.rst:81 msgid "" "Converts tokens back into Python source code. The *iterable* must return " "sequences with at least two elements, the token type and the token string. " "Any additional sequence elements are ignored." msgstr "" "Convertit les jetons en code source Python. L'*iterable* doit renvoyer des " "séquences avec au moins deux éléments, le type de jeton et la chaîne de " "caractères associée. Tout élément de séquence supplémentaire est ignoré." #: library/tokenize.rst:85 msgid "" "The reconstructed script is returned as a single string. The result is " "guaranteed to tokenize back to match the input so that the conversion is " "lossless and round-trips are assured. The guarantee applies only to the " "token type and token string as the spacing between tokens (column positions) " "may change." msgstr "" "Le script reconstruit est renvoyé sous la forme d'une chaîne unique. Le " "résultat est garanti pour que le jeton corresponde à l'entrée afin que la " "conversion soit sans perte et que les allers et retours soient assurés. La " "garantie ne s'applique qu'au type de jeton et à la chaîne de jetons car " "l'espacement entre les jetons (positions des colonnes) peut changer." #: library/tokenize.rst:91 #, fuzzy msgid "" "It returns bytes, encoded using the :data:`~token.ENCODING` token, which is " "the first token sequence output by :func:`.tokenize`. If there is no " "encoding token in the input, it returns a str instead." msgstr "" "Il retourne des *bytes*, codés en utilisant le jeton :data:`~ token." "ENCODING`, qui est la première séquence de jetons sortie par :func:`." "tokenize`." #: library/tokenize.rst:96 msgid "" ":func:`.tokenize` needs to detect the encoding of source files it tokenizes. " "The function it uses to do this is available:" msgstr "" ":func:`.tokenize` a besoin de détecter le codage des fichiers sources qu'il " "code. La fonction utilisée pour cela est disponible :" #: library/tokenize.rst:101 msgid "" "The :func:`detect_encoding` function is used to detect the encoding that " "should be used to decode a Python source file. It requires one argument, " "readline, in the same way as the :func:`.tokenize` generator." msgstr "" "La fonction :func:`detect_encoding` est utilisée pour détecter l'encodage à " "utiliser pour décoder un fichier source Python. Il nécessite un seul " "argument, *readline*, de la même manière que le générateur :func:`.tokenize`." #: library/tokenize.rst:105 msgid "" "It will call readline a maximum of twice, and return the encoding used (as a " "string) and a list of any lines (not decoded from bytes) it has read in." msgstr "" "Il appelle *readline* au maximum deux fois et renvoie le codage utilisé " "(sous forme de chaîne) et une liste de toutes les lignes (non décodées à " "partir des octets) dans lesquelles il a été lu." #: library/tokenize.rst:109 msgid "" "It detects the encoding from the presence of a UTF-8 BOM or an encoding " "cookie as specified in :pep:`263`. If both a BOM and a cookie are present, " "but disagree, a :exc:`SyntaxError` will be raised. Note that if the BOM is " "found, ``'utf-8-sig'`` will be returned as an encoding." msgstr "" "Il détecte l'encodage par la présence d'une marqueur UTF-8 (*BOM*) ou d'un " "cookie de codage, comme spécifié dans la :pep:`263`. Si un *BOM* et un " "cookie sont présents, mais en désaccord, un :exc:`SyntaxError` sera levée. " "Notez que si le *BOM* est trouvé, ``'utf-8-sig'`` sera renvoyé comme " "encodage." #: library/tokenize.rst:114 msgid "" "If no encoding is specified, then the default of ``'utf-8'`` will be " "returned." msgstr "" "Si aucun codage n'est spécifié, la valeur par défaut, ``'utf-8'``, sera " "renvoyée." #: library/tokenize.rst:117 msgid "" "Use :func:`.open` to open Python source files: it uses :func:" "`detect_encoding` to detect the file encoding." msgstr "" "Utilisez :func:`.open` pour ouvrir les fichiers source Python : ça utilise :" "func:`detect_encoding` pour détecter le codage du fichier." #: library/tokenize.rst:123 msgid "" "Open a file in read only mode using the encoding detected by :func:" "`detect_encoding`." msgstr "" "Ouvre un fichier en mode lecture seule en utilisant l'encodage détecté par :" "func:`dectect_encoding`." #: library/tokenize.rst:130 msgid "" "Raised when either a docstring or expression that may be split over several " "lines is not completed anywhere in the file, for example::" msgstr "" "Déclenché lorsque soit une *docstring* soit une expression qui pourrait être " "divisée sur plusieurs lignes n'est pas complété dans le fichier, par " "exemple ::" #: library/tokenize.rst:136 msgid "or::" msgstr "ou ::" #: library/tokenize.rst:142 msgid "" "Note that unclosed single-quoted strings do not cause an error to be raised. " "They are tokenized as :data:`~token.ERRORTOKEN`, followed by the " "tokenization of their contents." msgstr "" "Notez que les chaînes à simple guillemet non fermés ne provoquent pas le " "déclenchement d'une erreur. Ils sont tokenisés comme :data:`~token." "ERRORTOKEN`, suivi de la tokenisation de leur contenu." #: library/tokenize.rst:150 msgid "Command-Line Usage" msgstr "Utilisation en ligne de commande." #: library/tokenize.rst:154 msgid "" "The :mod:`tokenize` module can be executed as a script from the command " "line. It is as simple as:" msgstr "" "Le module :mod:`tokenize` peut être exécuté en tant que script à partir de " "la ligne de commande. C'est aussi simple que :" #: library/tokenize.rst:161 msgid "The following options are accepted:" msgstr "Les options suivantes sont acceptées :" #: library/tokenize.rst:167 msgid "show this help message and exit" msgstr "Montre ce message d'aide et quitte" #: library/tokenize.rst:171 msgid "display token names using the exact type" msgstr "Affiche les noms de jetons en utilisant le même type." #: library/tokenize.rst:173 msgid "" "If :file:`filename.py` is specified its contents are tokenized to stdout. " "Otherwise, tokenization is performed on stdin." msgstr "" "Si :file:`filename.py` est spécifié, son contenu est tokenisé vers *stdout*. " "Sinon, la tokenisation est effectuée sur ce qui est fourni sur *stdin*." #: library/tokenize.rst:177 msgid "Examples" msgstr "Exemples" #: library/tokenize.rst:179 msgid "" "Example of a script rewriter that transforms float literals into Decimal " "objects::" msgstr "" "Exemple d'un script qui transforme les littéraux de type *float* en type " "*Decimal* ::" #: library/tokenize.rst:221 msgid "Example of tokenizing from the command line. The script::" msgstr "Exemple de tokenisation à partir de la ligne de commande. Le script ::" #: library/tokenize.rst:228 msgid "" "will be tokenized to the following output where the first column is the " "range of the line/column coordinates where the token is found, the second " "column is the name of the token, and the final column is the value of the " "token (if any)" msgstr "" "sera tokenisé à la sortie suivante où la première colonne est la plage des " "coordonnées de la ligne/colonne où se trouve le jeton, la deuxième colonne " "est le nom du jeton, et la dernière colonne est la valeur du jeton (le cas " "échéant)" #: library/tokenize.rst:256 msgid "" "The exact token type names can be displayed using the :option:`-e` option:" msgstr "" "Les noms exacts des types de jeton peuvent être affichés en utilisant " "l’option : :option:`-e` :" #: library/tokenize.rst:282 msgid "" "Example of tokenizing a file programmatically, reading unicode strings " "instead of bytes with :func:`generate_tokens`::" msgstr "" #: library/tokenize.rst:292 msgid "Or reading bytes directly with :func:`.tokenize`::" msgstr ""