python-docs-fr/library/tokenize.po

284 lines
9.9 KiB
Plaintext
Raw Normal View History

2016-10-30 09:46:26 +00:00
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-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 3.6\n"
"Report-Msgid-Bugs-To: \n"
2017-09-21 07:23:18 +00:00
"POT-Creation-Date: 2017-09-21 09:15+0200\n"
2018-01-21 22:53:31 +00:00
"PO-Revision-Date: 2018-01-21 23:50+0100\n"
2016-10-30 09:46:26 +00:00
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.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"
#: ../Doc/library/tokenize.rst:2
msgid ":mod:`tokenize` --- Tokenizer for Python source"
2018-01-21 22:53:31 +00:00
msgstr ":mod:`tokenize` --- Analyseur lexical de Python"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/tokenize.rst:10
msgid "**Source code:** :source:`Lib/tokenize.py`"
2018-01-21 22:53:31 +00:00
msgstr "**Code source :** :source:`Lib/tokenize.py`"
2016-10-30 09:46:26 +00:00
#: ../Doc/library/tokenize.rst:14
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 ""
2018-01-21 22:53:31 +00:00
"Le module :mod:`tokenize` fournit un analyseur lexical pour Python, "
"implementé en Python. L'analyseur de ce module renvoie les commentaire sous "
"forme de *token*, se qui le rend intéressant pour implementer des *pretty-"
"printers*, typiquement pour faire de la coloration syntaxique."
2016-10-30 09:46:26 +00:00
#: ../Doc/library/tokenize.rst:19
msgid ""
2017-09-21 07:23:18 +00:00
"To simplify token stream handling, all :ref:`operator <operators>` and :ref:"
"`delimiter <delimiters>` 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`."
2016-10-30 09:46:26 +00:00
msgstr ""
2018-01-21 22:53:31 +00:00
"Pour simplifier la gestion de flux de *tokens*, tous les *tokens* :ref:"
"`operator <operators>` et :ref:`delimiter <delimiters>`, 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`."
2016-10-30 09:46:26 +00:00
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:26
2016-10-30 09:46:26 +00:00
msgid "Tokenizing Input"
2018-01-21 22:53:31 +00:00
msgstr "Analyse Lexicale"
2016-10-30 09:46:26 +00:00
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:28
2016-10-30 09:46:26 +00:00
msgid "The primary entry point is a :term:`generator`:"
2018-01-21 22:53:31 +00:00
msgstr "Le point d'entrée principal est un :term:`générateur <generator>` :"
2016-10-30 09:46:26 +00:00
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:32
2016-10-30 09:46:26 +00:00
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 ""
2018-01-21 22:53:31 +00:00
"Le générateur :func:`.tokenize` prend un argument *readline* qui doit être "
"un objet appelable exposant la meme 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*."
2016-10-30 09:46:26 +00:00
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:37
2016-10-30 09:46:26 +00:00
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 *logical* line; continuation lines are included. The 5 tuple is "
"returned as a :term:`named tuple` with the field names: ``type string start "
"end line``."
msgstr ""
2018-01-21 22:53:31 +00:00
"Le générateur fournit des 5-uplets contenants : le type du *token*, sa "
"chaîne, un 2-uplet d'entiers ``(srow, scol)`` indiquant la ligne et la "
"colonne où le *token* commence, un 2-uplet 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 *tuple*) "
"est la ligne \"logique\", les *continuation lines* étant incluses. Le "
"*tuple* est renvoyé sous forme de :term:`named tuple` dont les noms sont : "
"``type string start end line``."
2016-10-30 09:46:26 +00:00
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:46
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:51
2016-10-30 09:46:26 +00:00
msgid "Added support for named tuples."
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:54
2016-10-30 09:46:26 +00:00
msgid "Added support for ``exact_type``."
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:57
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:61
2016-10-30 09:46:26 +00:00
msgid ""
"All constants from the :mod:`token` module are also exported from :mod:"
"`tokenize`, as are three additional token type values:"
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:66
2016-10-30 09:46:26 +00:00
msgid "Token value used to indicate a comment."
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:71
2016-10-30 09:46:26 +00:00
msgid ""
"Token value used to indicate a non-terminating newline. The NEWLINE token "
"indicates the end of a logical line of Python code; NL tokens are generated "
"when a logical line of code is continued over multiple physical lines."
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:78
2016-10-30 09:46:26 +00:00
msgid ""
"Token value that indicates the encoding used to decode the source bytes into "
"text. The first token returned by :func:`.tokenize` will always be an "
"ENCODING token."
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:83
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:90
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:94
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:100
2016-10-30 09:46:26 +00:00
msgid ""
"It returns bytes, encoded using the ENCODING token, which is the first token "
"sequence output by :func:`.tokenize`."
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:104
2016-10-30 09:46:26 +00:00
msgid ""
":func:`.tokenize` needs to detect the encoding of source files it tokenizes. "
"The function it uses to do this is available:"
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:109
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:113
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:117
2016-10-30 09:46:26 +00:00
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 SyntaxError will be raised. Note that if the BOM is found, "
"``'utf-8-sig'`` will be returned as an encoding."
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:122
2016-10-30 09:46:26 +00:00
msgid ""
"If no encoding is specified, then the default of ``'utf-8'`` will be "
"returned."
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:125
2016-10-30 09:46:26 +00:00
msgid ""
"Use :func:`.open` to open Python source files: it uses :func:"
"`detect_encoding` to detect the file encoding."
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:131
2016-10-30 09:46:26 +00:00
msgid ""
"Open a file in read only mode using the encoding detected by :func:"
"`detect_encoding`."
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:138
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:144
2016-10-30 09:46:26 +00:00
msgid "or::"
msgstr "ou : ::"
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:150
2016-10-30 09:46:26 +00:00
msgid ""
"Note that unclosed single-quoted strings do not cause an error to be raised. "
"They are tokenized as ``ERRORTOKEN``, followed by the tokenization of their "
"contents."
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:158
2016-10-30 09:46:26 +00:00
msgid "Command-Line Usage"
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:162
2016-10-30 09:46:26 +00:00
msgid ""
"The :mod:`tokenize` module can be executed as a script from the command "
"line. It is as simple as:"
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:169
2016-10-30 09:46:26 +00:00
msgid "The following options are accepted:"
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:175
2016-10-30 09:46:26 +00:00
msgid "show this help message and exit"
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:179
2016-10-30 09:46:26 +00:00
msgid "display token names using the exact type"
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:181
2016-10-30 09:46:26 +00:00
msgid ""
"If :file:`filename.py` is specified its contents are tokenized to stdout. "
"Otherwise, tokenization is performed on stdin."
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:185
2016-10-30 09:46:26 +00:00
msgid "Examples"
msgstr "Exemples"
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:187
2016-10-30 09:46:26 +00:00
msgid ""
"Example of a script rewriter that transforms float literals into Decimal "
"objects::"
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:229
2016-10-30 09:46:26 +00:00
msgid "Example of tokenizing from the command line. The script::"
msgstr ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:236
2016-10-30 09:46:26 +00:00
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 ""
2017-09-21 07:23:18 +00:00
#: ../Doc/library/tokenize.rst:264
2016-10-30 09:46:26 +00:00
msgid "The exact token type names can be displayed using the ``-e`` option:"
msgstr ""