* Make merge * Move merge to its own script. * No longer needed. * Use git ls-files.
This commit is contained in:
Julien Palard 2021-10-22 14:56:00 +02:00 committed by GitHub
commit 2afee90322
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-23 16:16+0200\n"
"POT-Creation-Date: 2021-10-21 15:04+0200\n"
"PO-Revision-Date: 2020-04-27 22:51+0200\n"
"Last-Translator: pierre choffe <choffepierre@gmail.com>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -38,6 +38,14 @@ msgstr ""
#: tutorial/introduction.rst:16
msgid ""
"You can toggle the display of prompts and output by clicking on ``>>>`` in "
"the upper-right corner of an example box. If you hide the prompts and "
"output for an example, then you can easily copy and paste the input lines "
"into your interpreter."
msgstr ""
#: tutorial/introduction.rst:23
msgid ""
"Many of the examples in this manual, even those entered at the interactive "
"prompt, include comments. Comments in Python start with the hash character, "
"``#``, and extend to the end of the physical line. A comment may appear at "
@ -56,15 +64,15 @@ msgstr ""
"servent qu'à expliquer le code et ne sont pas interprétés par Python, ils "
"peuvent être ignorés lorsque vous tapez les exemples."
#: tutorial/introduction.rst:24
#: tutorial/introduction.rst:31
msgid "Some examples::"
msgstr "Quelques exemples ::"
#: tutorial/introduction.rst:35
#: tutorial/introduction.rst:42
msgid "Using Python as a Calculator"
msgstr "Utilisation de Python comme une calculatrice"
#: tutorial/introduction.rst:37
#: tutorial/introduction.rst:44
msgid ""
"Let's try some simple Python commands. Start the interpreter and wait for "
"the primary prompt, ``>>>``. (It shouldn't take long.)"
@ -72,11 +80,11 @@ msgstr ""
"Essayons quelques commandes Python simples. Démarrez l'interpréteur et "
"attendez l'invite primaire, ``>>>``. Ça ne devrait pas être long."
#: tutorial/introduction.rst:44
#: tutorial/introduction.rst:51
msgid "Numbers"
msgstr "Les nombres"
#: tutorial/introduction.rst:46
#: tutorial/introduction.rst:53
msgid ""
"The interpreter acts as a simple calculator: you can type an expression at "
"it and it will write the value. Expression syntax is straightforward: the "
@ -90,7 +98,7 @@ msgstr ""
"la plupart des langages (par exemple, Pascal ou C) ; les parenthèses peuvent "
"être utilisées pour faire des regroupements. Par exemple ::"
#: tutorial/introduction.rst:61
#: tutorial/introduction.rst:68
msgid ""
"The integer numbers (e.g. ``2``, ``4``, ``20``) have type :class:`int`, the "
"ones with a fractional part (e.g. ``5.0``, ``1.6``) have type :class:"
@ -101,7 +109,7 @@ msgstr ""
"Vous trouvez plus de détails sur les types numériques plus loin dans ce "
"tutoriel."
#: tutorial/introduction.rst:65
#: tutorial/introduction.rst:72
msgid ""
"Division (``/``) always returns a float. To do :term:`floor division` and "
"get an integer result (discarding any fractional result) you can use the ``//"
@ -112,7 +120,7 @@ msgstr ""
"résultat entier. Pour obtenir le reste d'une division entière, utilisez "
"l'opérateur ``%`` ::"
#: tutorial/introduction.rst:79
#: tutorial/introduction.rst:86
msgid ""
"With Python, it is possible to use the ``**`` operator to calculate powers "
"[#]_::"
@ -120,7 +128,7 @@ msgstr ""
"En Python, il est possible de calculer des puissances avec l'opérateur "
"``**`` [#]_ ::"
#: tutorial/introduction.rst:86
#: tutorial/introduction.rst:93
msgid ""
"The equal sign (``=``) is used to assign a value to a variable. Afterwards, "
"no result is displayed before the next interactive prompt::"
@ -128,7 +136,7 @@ msgstr ""
"Le signe égal (``=``) est utilisé pour affecter une valeur à une variable. "
"Dans ce cas, aucun résultat n'est affiché avant l'invite suivante ::"
#: tutorial/introduction.rst:94
#: tutorial/introduction.rst:101
msgid ""
"If a variable is not \"defined\" (assigned a value), trying to use it will "
"give you an error::"
@ -136,7 +144,7 @@ msgstr ""
"Si une variable n'est pas « définie » (si aucune valeur ne lui a été "
"affectée), son utilisation produit une erreur ::"
#: tutorial/introduction.rst:102
#: tutorial/introduction.rst:109
msgid ""
"There is full support for floating point; operators with mixed type operands "
"convert the integer operand to floating point::"
@ -147,7 +155,7 @@ msgstr ""
"opérandes de types différents convertissent l'opérande de type entier en "
"type virgule flottante ::"
#: tutorial/introduction.rst:108
#: tutorial/introduction.rst:115
msgid ""
"In interactive mode, the last printed expression is assigned to the variable "
"``_``. This means that when you are using Python as a desk calculator, it "
@ -157,7 +165,7 @@ msgstr ""
"variable ``_``. Ainsi, lorsque vous utilisez Python comme calculatrice, cela "
"vous permet de continuer des calculs facilement, par exemple ::"
#: tutorial/introduction.rst:121
#: tutorial/introduction.rst:128
msgid ""
"This variable should be treated as read-only by the user. Don't explicitly "
"assign a value to it --- you would create an independent local variable with "
@ -168,7 +176,7 @@ msgstr ""
"ainsi une variable locale indépendante, avec le même nom, qui masquerait la "
"variable native et son fonctionnement magique."
#: tutorial/introduction.rst:125
#: tutorial/introduction.rst:132
msgid ""
"In addition to :class:`int` and :class:`float`, Python supports other types "
"of numbers, such as :class:`~decimal.Decimal` and :class:`~fractions."
@ -181,11 +189,11 @@ msgstr ""
"les :ref:`nombres complexes <typesnumeric>`, en utilisant le suffixe ``j`` "
"ou ``J`` pour indiquer la partie imaginaire (tel que ``3+5j``)."
#: tutorial/introduction.rst:135
#: tutorial/introduction.rst:142
msgid "Strings"
msgstr "Chaînes de caractères"
#: tutorial/introduction.rst:137
#: tutorial/introduction.rst:144
msgid ""
"Besides numbers, Python can also manipulate strings, which can be expressed "
"in several ways. They can be enclosed in single quotes (``'...'``) or "
@ -198,7 +206,7 @@ msgstr ""
"\"``) sans distinction [#]_. ``\\`` peut être utilisé pour protéger un "
"guillemet ::"
#: tutorial/introduction.rst:155
#: tutorial/introduction.rst:162
msgid ""
"In the interactive interpreter, the output string is enclosed in quotes and "
"special characters are escaped with backslashes. While this might sometimes "
@ -220,7 +228,7 @@ msgstr ""
"en affichant les caractères spéciaux qui étaient protégés par une barre "
"oblique inverse ::"
#: tutorial/introduction.rst:175
#: tutorial/introduction.rst:182
msgid ""
"If you don't want characters prefaced by ``\\`` to be interpreted as special "
"characters, you can use *raw strings* by adding an ``r`` before the first "
@ -230,7 +238,7 @@ msgstr ""
"interprétés comme étant spéciaux, utilisez les *chaînes brutes* (*raw "
"strings* en anglais) en préfixant la chaîne d'un ``r`` ::"
#: tutorial/introduction.rst:185
#: tutorial/introduction.rst:192
msgid ""
"String literals can span multiple lines. One way is using triple-quotes: ``"
"\"\"\"...\"\"\"`` or ``'''...'''``. End of lines are automatically included "
@ -243,7 +251,7 @@ msgstr ""
"on peut l'empêcher en ajoutant ``\\`` à la fin de la ligne. L'exemple "
"suivant ::"
#: tutorial/introduction.rst:196
#: tutorial/introduction.rst:203
msgid ""
"produces the following output (note that the initial newline is not "
"included):"
@ -251,7 +259,7 @@ msgstr ""
"produit l'affichage suivant (notez que le premier retour à la ligne n'est "
"pas inclus) :"
#: tutorial/introduction.rst:204
#: tutorial/introduction.rst:211
msgid ""
"Strings can be concatenated (glued together) with the ``+`` operator, and "
"repeated with ``*``::"
@ -259,7 +267,7 @@ msgstr ""
"Les chaînes peuvent être concaténées (collées ensemble) avec l'opérateur ``"
"+`` et répétées avec l'opérateur ``*`` ::"
#: tutorial/introduction.rst:211
#: tutorial/introduction.rst:218
msgid ""
"Two or more *string literals* (i.e. the ones enclosed between quotes) next "
"to each other are automatically concatenated. ::"
@ -267,28 +275,28 @@ msgstr ""
"Plusieurs chaînes de caractères, écrites littéralement (c'est-à-dire entre "
"guillemets), côte à côte, sont automatiquement concaténées. ::"
#: tutorial/introduction.rst:217
#: tutorial/introduction.rst:224
msgid ""
"This feature is particularly useful when you want to break long strings::"
msgstr ""
"Cette fonctionnalité est surtout intéressante pour couper des chaînes trop "
"longues ::"
#: tutorial/introduction.rst:224
#: tutorial/introduction.rst:231
msgid ""
"This only works with two literals though, not with variables or expressions::"
msgstr ""
"Cela ne fonctionne cependant qu'avec les chaînes littérales, pas avec les "
"variables ni les expressions ::"
#: tutorial/introduction.rst:238
#: tutorial/introduction.rst:245
msgid ""
"If you want to concatenate variables or a variable and a literal, use ``+``::"
msgstr ""
"Pour concaténer des variables, ou des variables avec des chaînes littérales, "
"utilisez l'opérateur ``+`` ::"
#: tutorial/introduction.rst:243
#: tutorial/introduction.rst:250
msgid ""
"Strings can be *indexed* (subscripted), with the first character having "
"index 0. There is no separate character type; a character is simply a string "
@ -300,20 +308,20 @@ msgstr ""
"distinct pour les caractères, un caractère est simplement une chaîne de "
"longueur 1 ::"
#: tutorial/introduction.rst:253
#: tutorial/introduction.rst:260
msgid ""
"Indices may also be negative numbers, to start counting from the right::"
msgstr ""
"Les indices peuvent également être négatifs, on compte alors en partant de "
"la droite. Par exemple ::"
#: tutorial/introduction.rst:262
#: tutorial/introduction.rst:269
msgid "Note that since -0 is the same as 0, negative indices start from -1."
msgstr ""
"Notez que, comme ``-0`` égale ``0``, les indices négatifs commencent par "
"``-1``."
#: tutorial/introduction.rst:264
#: tutorial/introduction.rst:271
msgid ""
"In addition to indexing, *slicing* is also supported. While indexing is "
"used to obtain individual characters, *slicing* allows you to obtain "
@ -324,7 +332,7 @@ msgstr ""
"indice permet d'obtenir un caractère, *trancher* permet d'obtenir une sous-"
"chaîne ::"
#: tutorial/introduction.rst:272
#: tutorial/introduction.rst:279
msgid ""
"Slice indices have useful defaults; an omitted first index defaults to zero, "
"an omitted second index defaults to the size of the string being sliced. ::"
@ -333,7 +341,7 @@ msgstr ""
"indice vaut zéro par défaut (c.-à-d. lorsqu'il est omis), le deuxième "
"correspond par défaut à la taille de la chaîne de caractères ::"
#: tutorial/introduction.rst:282
#: tutorial/introduction.rst:289
msgid ""
"Note how the start is always included, and the end always excluded. This "
"makes sure that ``s[:i] + s[i:]`` is always equal to ``s``::"
@ -341,7 +349,7 @@ msgstr ""
"Notez que le début est toujours inclus et la fin toujours exclue. Cela "
"assure que ``s[:i] + s[i:]`` est toujours égal à ``s`` ::"
#: tutorial/introduction.rst:290
#: tutorial/introduction.rst:297
msgid ""
"One way to remember how slices work is to think of the indices as pointing "
"*between* characters, with the left edge of the first character numbered 0. "
@ -353,7 +361,7 @@ msgstr ""
"caractère ayant la position 0. Le côté droit du dernier caractère d'une "
"chaîne de *n* caractères a alors pour indice *n*. Par exemple ::"
#: tutorial/introduction.rst:301
#: tutorial/introduction.rst:308
msgid ""
"The first row of numbers gives the position of the indices 0...6 in the "
"string; the second row gives the corresponding negative indices. The slice "
@ -365,7 +373,7 @@ msgstr ""
"de *i* à *j* est constituée de tous les caractères situés entre les bords "
"libellés *i* et *j*, respectivement."
#: tutorial/introduction.rst:306
#: tutorial/introduction.rst:313
msgid ""
"For non-negative indices, the length of a slice is the difference of the "
"indices, if both are within bounds. For example, the length of "
@ -375,11 +383,11 @@ msgstr ""
"entre ces indices, si les deux sont entre les bornes. Par exemple, la "
"longueur de ``word[1:3]`` est 2."
#: tutorial/introduction.rst:310
#: tutorial/introduction.rst:317
msgid "Attempting to use an index that is too large will result in an error::"
msgstr "Utiliser un indice trop grand produit une erreur ::"
#: tutorial/introduction.rst:317
#: tutorial/introduction.rst:324
msgid ""
"However, out of range slice indexes are handled gracefully when used for "
"slicing::"
@ -387,7 +395,7 @@ msgstr ""
"Cependant, les indices hors bornes sont gérés silencieusement lorsqu'ils "
"sont utilisés dans des tranches ::"
#: tutorial/introduction.rst:325
#: tutorial/introduction.rst:332
msgid ""
"Python strings cannot be changed --- they are :term:`immutable`. Therefore, "
"assigning to an indexed position in the string results in an error::"
@ -396,21 +404,21 @@ msgstr ""
"qu'elles sont :term:`immuables <immutable>`. Affecter une nouvelle valeur à "
"un indice dans une chaîne produit une erreur ::"
#: tutorial/introduction.rst:337
#: tutorial/introduction.rst:344
msgid "If you need a different string, you should create a new one::"
msgstr ""
"Si vous avez besoin d'une chaîne différente, vous devez en créer une "
"nouvelle ::"
#: tutorial/introduction.rst:344
#: tutorial/introduction.rst:351
msgid "The built-in function :func:`len` returns the length of a string::"
msgstr "La fonction native :func:`len` renvoie la longueur d'une chaîne ::"
#: tutorial/introduction.rst:355
#: tutorial/introduction.rst:362
msgid ":ref:`textseq`"
msgstr ":ref:`textseq`"
#: tutorial/introduction.rst:354
#: tutorial/introduction.rst:361
msgid ""
"Strings are examples of *sequence types*, and support the common operations "
"supported by such types."
@ -418,11 +426,11 @@ msgstr ""
"Les chaînes de caractères sont des exemples de *types séquences* ; elles "
"acceptent donc les opérations classiques prises en charge par ces types."
#: tutorial/introduction.rst:359
#: tutorial/introduction.rst:366
msgid ":ref:`string-methods`"
msgstr ":ref:`string-methods`"
#: tutorial/introduction.rst:358
#: tutorial/introduction.rst:365
msgid ""
"Strings support a large number of methods for basic transformations and "
"searching."
@ -430,28 +438,28 @@ msgstr ""
"Les chaînes de caractères gèrent un large éventail de méthodes de "
"transformations basiques et de recherche."
#: tutorial/introduction.rst:362
#: tutorial/introduction.rst:369
msgid ":ref:`f-strings`"
msgstr ":ref:`f-strings`"
#: tutorial/introduction.rst:362
#: tutorial/introduction.rst:369
msgid "String literals that have embedded expressions."
msgstr "Des chaînes littérales qui contiennent des expressions."
#: tutorial/introduction.rst:365
#: tutorial/introduction.rst:372
msgid ":ref:`formatstrings`"
msgstr ":ref:`formatstrings`"
#: tutorial/introduction.rst:365
#: tutorial/introduction.rst:372
msgid "Information about string formatting with :meth:`str.format`."
msgstr ""
"Informations sur le formatage des chaînes avec la méthode :meth:`str.format`."
#: tutorial/introduction.rst:368
#: tutorial/introduction.rst:375
msgid ":ref:`old-string-formatting`"
msgstr ":ref:`old-string-formatting`"
#: tutorial/introduction.rst:368
#: tutorial/introduction.rst:375
msgid ""
"The old formatting operations invoked when strings are the left operand of "
"the ``%`` operator are described in more detail here."
@ -459,11 +467,11 @@ msgstr ""
"Description détaillée des anciennes méthodes de mise en forme, appelées "
"lorsque les chaînes de caractères sont à gauche de l'opérateur ``%``."
#: tutorial/introduction.rst:375
#: tutorial/introduction.rst:382
msgid "Lists"
msgstr "Listes"
#: tutorial/introduction.rst:377
#: tutorial/introduction.rst:384
msgid ""
"Python knows a number of *compound* data types, used to group together other "
"values. The most versatile is the *list*, which can be written as a list of "
@ -476,7 +484,7 @@ msgstr ""
"par des virgules. Les éléments d'une liste ne sont pas obligatoirement tous "
"du même type, bien qu'à l'usage ce soit souvent le cas. ::"
#: tutorial/introduction.rst:386
#: tutorial/introduction.rst:393
msgid ""
"Like strings (and all other built-in :term:`sequence` types), lists can be "
"indexed and sliced::"
@ -484,7 +492,7 @@ msgstr ""
"Comme les chaînes de caractères (et toute autre type de :term:`sequence`), "
"les listes peuvent être indicées et découpées ::"
#: tutorial/introduction.rst:396
#: tutorial/introduction.rst:403
msgid ""
"All slice operations return a new list containing the requested elements. "
"This means that the following slice returns a :ref:`shallow copy "
@ -494,11 +502,11 @@ msgstr ""
"les éléments demandés. Cela signifie que l'opération suivante renvoie une :"
"ref:`copie (superficielle) <shallow_vs_deep_copy>` de la liste ::"
#: tutorial/introduction.rst:403
#: tutorial/introduction.rst:410
msgid "Lists also support operations like concatenation::"
msgstr "Les listes gèrent aussi les opérations comme les concaténations ::"
#: tutorial/introduction.rst:408
#: tutorial/introduction.rst:415
msgid ""
"Unlike strings, which are :term:`immutable`, lists are a :term:`mutable` "
"type, i.e. it is possible to change their content::"
@ -507,7 +515,7 @@ msgstr ""
"listes sont :term:`muables <mutable>` : il est possible de modifier leur "
"contenu ::"
#: tutorial/introduction.rst:418
#: tutorial/introduction.rst:425
msgid ""
"You can also add new items at the end of the list, by using the :meth:`~list."
"append` *method* (we will see more about methods later)::"
@ -516,7 +524,7 @@ msgstr ""
"avec la méthode :meth:`~list.append` (les méthodes sont abordées plus "
"tard) ::"
#: tutorial/introduction.rst:426
#: tutorial/introduction.rst:433
msgid ""
"Assignment to slices is also possible, and this can even change the size of "
"the list or clear it entirely::"
@ -524,11 +532,11 @@ msgstr ""
"Des affectations de tranches sont également possibles, ce qui peut même "
"modifier la taille de la liste ou la vider complètement ::"
#: tutorial/introduction.rst:445
#: tutorial/introduction.rst:452
msgid "The built-in function :func:`len` also applies to lists::"
msgstr "La primitive :func:`len` s'applique aussi aux listes ::"
#: tutorial/introduction.rst:451
#: tutorial/introduction.rst:458
msgid ""
"It is possible to nest lists (create lists containing other lists), for "
"example::"
@ -536,11 +544,11 @@ msgstr ""
"Il est possible d'imbriquer des listes (c.-à-d. créer des listes contenant "
"d'autres listes). Par exemple ::"
#: tutorial/introduction.rst:467
#: tutorial/introduction.rst:474
msgid "First Steps Towards Programming"
msgstr "Premiers pas vers la programmation"
#: tutorial/introduction.rst:469
#: tutorial/introduction.rst:476
msgid ""
"Of course, we can use Python for more complicated tasks than adding two and "
"two together. For instance, we can write an initial sub-sequence of the "
@ -552,11 +560,11 @@ msgstr ""
"`suite de Fibonacci <https://fr.wikipedia.org/wiki/Suite_de_Fibonacci>`_ "
"comme ceci ::"
#: tutorial/introduction.rst:489
#: tutorial/introduction.rst:496
msgid "This example introduces several new features."
msgstr "Cet exemple introduit plusieurs nouvelles fonctionnalités."
#: tutorial/introduction.rst:491
#: tutorial/introduction.rst:498
msgid ""
"The first line contains a *multiple assignment*: the variables ``a`` and "
"``b`` simultaneously get the new values 0 and 1. On the last line this is "
@ -571,7 +579,7 @@ msgstr ""
"avant que les affectations ne soient effectuées. Ces expressions en partie "
"droite sont toujours évaluées de la gauche vers la droite."
#: tutorial/introduction.rst:497
#: tutorial/introduction.rst:504
msgid ""
"The :keyword:`while` loop executes as long as the condition (here: ``a < "
"10``) remains true. In Python, like in C, any non-zero integer value is "
@ -592,7 +600,7 @@ msgstr ""
"``==`` (égal), ``<=`` (inférieur ou égal), ``>=`` (supérieur ou égal) et ``!"
"=`` (non égal)."
#: tutorial/introduction.rst:506
#: tutorial/introduction.rst:513
msgid ""
"The *body* of the loop is *indented*: indentation is Python's way of "
"grouping statements. At the interactive prompt, you have to type a tab or "
@ -614,7 +622,7 @@ msgstr ""
"venez de saisir la dernière ligne). Notez bien que toutes les lignes à "
"l'intérieur d'un bloc doivent être indentées au même niveau."
#: tutorial/introduction.rst:515
#: tutorial/introduction.rst:522
msgid ""
"The :func:`print` function writes the value of the argument(s) it is given. "
"It differs from just writing the expression you want to write (as we did "
@ -631,7 +639,7 @@ msgstr ""
"apostrophe et une espace est insérée entre les éléments de telle sorte que "
"vous pouvez facilement formater les choses, comme ceci ::"
#: tutorial/introduction.rst:526
#: tutorial/introduction.rst:533
msgid ""
"The keyword argument *end* can be used to avoid the newline after the "
"output, or end the output with a different string::"
@ -639,11 +647,11 @@ msgstr ""
"Le paramètre nommé *end* peut servir pour enlever le retour à la ligne ou "
"pour terminer la ligne par une autre chaîne ::"
#: tutorial/introduction.rst:538
#: tutorial/introduction.rst:545
msgid "Footnotes"
msgstr "Notes"
#: tutorial/introduction.rst:539
#: tutorial/introduction.rst:546
msgid ""
"Since ``**`` has higher precedence than ``-``, ``-3**2`` will be interpreted "
"as ``-(3**2)`` and thus result in ``-9``. To avoid this and get ``9``, you "
@ -653,7 +661,7 @@ msgstr ""
"** 2)`` et vaut donc ``-9``. Pour éviter cela et obtenir ``9``, utilisez des "
"parenthèses : ``(-3) ** 2``."
#: tutorial/introduction.rst:543
#: tutorial/introduction.rst:550
msgid ""
"Unlike other languages, special characters such as ``\\n`` have the same "
"meaning with both single (``'...'``) and double (``\"...\"``) quotes. The "

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-09-23 16:16+0200\n"
"POT-Creation-Date: 2021-10-21 15:04+0200\n"
"PO-Revision-Date: 2020-04-27 22:54+0200\n"
"Last-Translator: Julien Palard <julien@palard.fr>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -297,10 +297,12 @@ msgstr ""
"la variable shell :envvar:`PATH`) ;"
#: tutorial/modules.rst:194
msgid "The installation-dependent default."
msgstr "la valeur par défaut, dépendante de l'installation."
msgid ""
"The installation-dependent default (by convention including a ``site-"
"packages`` directory, handled by the :mod:`site` module)."
msgstr ""
#: tutorial/modules.rst:197
#: tutorial/modules.rst:198
msgid ""
"On file systems which support symlinks, the directory containing the input "
"script is calculated after the symlink is followed. In other words the "
@ -311,7 +313,7 @@ msgstr ""
"Autrement dit, le dossier contenant le lien symbolique n'est **pas** ajouté "
"aux dossiers de recherche de modules."
#: tutorial/modules.rst:201
#: tutorial/modules.rst:202
msgid ""
"After initialization, Python programs can modify :data:`sys.path`. The "
"directory containing the script being run is placed at the beginning of the "
@ -327,11 +329,11 @@ msgstr ""
"chargé à sa place. C'est une erreur typique, à moins que ce ne soit voulu. "
"Voir :ref:`tut-standardmodules` pour plus d'informations."
#: tutorial/modules.rst:212
#: tutorial/modules.rst:213
msgid "\"Compiled\" Python files"
msgstr "Fichiers Python « compilés »"
#: tutorial/modules.rst:214
#: tutorial/modules.rst:215
msgid ""
"To speed up loading modules, Python caches the compiled version of each "
"module in the ``__pycache__`` directory under the name :file:`module."
@ -349,7 +351,7 @@ msgstr ""
"Cette règle de nommage permet à des versions compilées par des versions "
"différentes de Python de coexister."
#: tutorial/modules.rst:222
#: tutorial/modules.rst:223
msgid ""
"Python checks the modification date of the source against the compiled "
"version to see if it's out of date and needs to be recompiled. This is a "
@ -363,7 +365,7 @@ msgstr ""
"indépendantes de la plateforme et peuvent donc être partagées entre des "
"systèmes d'architectures différentes."
#: tutorial/modules.rst:227
#: tutorial/modules.rst:228
msgid ""
"Python does not check the cache in two circumstances. First, it always "
"recompiles and does not store the result for the module that's loaded "
@ -379,11 +381,11 @@ msgstr ""
"source (où seule la version compilée est fournie), le module compilé doit se "
"trouver dans le dossier source et sa source ne doit pas être présente."
#: tutorial/modules.rst:234
#: tutorial/modules.rst:235
msgid "Some tips for experts:"
msgstr "Astuces pour les experts :"
#: tutorial/modules.rst:236
#: tutorial/modules.rst:237
msgid ""
"You can use the :option:`-O` or :option:`-OO` switches on the Python command "
"to reduce the size of a compiled module. The ``-O`` switch removes assert "
@ -402,7 +404,7 @@ msgstr ""
"`` et sont généralement plus petits. Les versions futures de Python "
"pourraient changer les effets de l'optimisation ;"
#: tutorial/modules.rst:244
#: tutorial/modules.rst:245
msgid ""
"A program doesn't run any faster when it is read from a ``.pyc`` file than "
"when it is read from a ``.py`` file; the only thing that's faster about ``."
@ -411,7 +413,7 @@ msgstr ""
"un programme ne s'exécute pas plus vite lorsqu'il est lu depuis un ``.pyc``, "
"il est juste chargé plus vite ;"
#: tutorial/modules.rst:248
#: tutorial/modules.rst:249
msgid ""
"The module :mod:`compileall` can create .pyc files for all modules in a "
"directory."
@ -419,7 +421,7 @@ msgstr ""
"le module :mod:`compileall` peut créer des fichiers ``.pyc`` pour tous les "
"modules d'un dossier ;"
#: tutorial/modules.rst:251
#: tutorial/modules.rst:252
msgid ""
"There is more detail on this process, including a flow chart of the "
"decisions, in :pep:`3147`."
@ -427,11 +429,11 @@ msgstr ""
"vous trouvez plus de détails sur ce processus, ainsi qu'un organigramme des "
"décisions, dans la :pep:`3147`."
#: tutorial/modules.rst:258
#: tutorial/modules.rst:259
msgid "Standard Modules"
msgstr "Modules standards"
#: tutorial/modules.rst:262
#: tutorial/modules.rst:263
msgid ""
"Python comes with a library of standard modules, described in a separate "
"document, the Python Library Reference (\"Library Reference\" hereafter). "
@ -457,7 +459,7 @@ msgstr ""
"présent dans tous les interpréteurs Python. Les variables ``sys.ps1`` et "
"``sys.ps2`` définissent les chaînes d'invites principales et secondaires ::"
#: tutorial/modules.rst:285
#: tutorial/modules.rst:286
msgid ""
"These two variables are only defined if the interpreter is in interactive "
"mode."
@ -465,7 +467,7 @@ msgstr ""
"Ces deux variables ne sont définies que si l'interpréteur est en mode "
"interactif."
#: tutorial/modules.rst:287
#: tutorial/modules.rst:288
msgid ""
"The variable ``sys.path`` is a list of strings that determines the "
"interpreter's search path for modules. It is initialized to a default path "
@ -480,11 +482,11 @@ msgstr ""
"définie. ``sys.path`` est modifiable en utilisant les opérations habituelles "
"des listes ::"
#: tutorial/modules.rst:300
#: tutorial/modules.rst:301
msgid "The :func:`dir` Function"
msgstr "La fonction :func:`dir`"
#: tutorial/modules.rst:302
#: tutorial/modules.rst:303
msgid ""
"The built-in function :func:`dir` is used to find out which names a module "
"defines. It returns a sorted list of strings::"
@ -493,19 +495,19 @@ msgstr ""
"définis par un module. Elle donne une liste de chaînes classées par ordre "
"lexicographique ::"
#: tutorial/modules.rst:331
#: tutorial/modules.rst:332
msgid ""
"Without arguments, :func:`dir` lists the names you have defined currently::"
msgstr "Sans paramètre, :func:`dir` liste les noms actuellement définis ::"
#: tutorial/modules.rst:339
#: tutorial/modules.rst:340
msgid ""
"Note that it lists all types of names: variables, modules, functions, etc."
msgstr ""
"Notez qu'elle liste tous les types de noms : les variables, fonctions, "
"modules, etc."
#: tutorial/modules.rst:343
#: tutorial/modules.rst:344
msgid ""
":func:`dir` does not list the names of built-in functions and variables. If "
"you want a list of those, they are defined in the standard module :mod:"
@ -515,11 +517,11 @@ msgstr ""
"Si vous voulez les lister, elles sont définies dans le module :mod:"
"`builtins` ::"
#: tutorial/modules.rst:382
#: tutorial/modules.rst:383
msgid "Packages"
msgstr "Les paquets"
#: tutorial/modules.rst:384
#: tutorial/modules.rst:385
msgid ""
"Packages are a way of structuring Python's module namespace by using "
"\"dotted module names\". For example, the module name :mod:`A.B` designates "
@ -538,7 +540,7 @@ msgstr ""
"paquets contenant plusieurs modules tel que NumPy ou Pillow d'avoir à se "
"soucier des noms des modules des autres."
#: tutorial/modules.rst:392
#: tutorial/modules.rst:393
msgid ""
"Suppose you want to design a collection of modules (a \"package\") for the "
"uniform handling of sound files and sound data. There are many different "
@ -565,7 +567,7 @@ msgstr ""
"structure possible pour votre paquet (exprimée sous la forme d'une "
"arborescence de fichiers) :"
#: tutorial/modules.rst:429
#: tutorial/modules.rst:430
msgid ""
"When importing the package, Python searches through the directories on ``sys."
"path`` looking for the package subdirectory."
@ -573,7 +575,7 @@ msgstr ""
"Lorsqu'il importe des paquets, Python cherche dans chaque dossier de ``sys."
"path`` un sous-dossier du nom du paquet."
#: tutorial/modules.rst:432
#: tutorial/modules.rst:433
msgid ""
"The :file:`__init__.py` files are required to make Python treat directories "
"containing the file as packages. This prevents directories with a common "
@ -590,7 +592,7 @@ msgstr ""
"exécuter du code d'initialisation pour son paquet ou configurer la variable "
"``__all__`` (documentée plus loin)."
#: tutorial/modules.rst:439
#: tutorial/modules.rst:440
msgid ""
"Users of the package can import individual modules from the package, for "
"example::"
@ -598,7 +600,7 @@ msgstr ""
"Les utilisateurs d'un module peuvent importer ses modules individuellement, "
"par exemple ::"
#: tutorial/modules.rst:444
#: tutorial/modules.rst:445
msgid ""
"This loads the submodule :mod:`sound.effects.echo`. It must be referenced "
"with its full name. ::"
@ -606,11 +608,11 @@ msgstr ""
"charge le sous-module :mod:`sound.effects.echo`. Il doit alors être "
"référencé par son nom complet. ::"
#: tutorial/modules.rst:449
#: tutorial/modules.rst:450
msgid "An alternative way of importing the submodule is::"
msgstr "Une autre manière d'importer des sous-modules est ::"
#: tutorial/modules.rst:453
#: tutorial/modules.rst:454
msgid ""
"This also loads the submodule :mod:`echo`, and makes it available without "
"its package prefix, so it can be used as follows::"
@ -618,7 +620,7 @@ msgstr ""
"charge aussi le sous-module :mod:`echo` et le rend disponible sans avoir à "
"indiquer le préfixe du paquet. Il peut donc être utilisé comme ceci ::"
#: tutorial/modules.rst:458
#: tutorial/modules.rst:459
msgid ""
"Yet another variation is to import the desired function or variable "
"directly::"
@ -626,7 +628,7 @@ msgstr ""
"Une autre méthode consiste à importer la fonction ou la variable désirée "
"directement ::"
#: tutorial/modules.rst:462
#: tutorial/modules.rst:463
msgid ""
"Again, this loads the submodule :mod:`echo`, but this makes its function :"
"func:`echofilter` directly available::"
@ -634,7 +636,7 @@ msgstr ""
"Le sous-module :mod:`echo` est toujours chargé mais ici la fonction :func:"
"`echofilter` est disponible directement ::"
#: tutorial/modules.rst:467
#: tutorial/modules.rst:468
msgid ""
"Note that when using ``from package import item``, the item can be either a "
"submodule (or subpackage) of the package, or some other name defined in the "
@ -650,7 +652,7 @@ msgstr ""
"le paquet ; s'il ne l'est pas, elle cherche à charger un module et, si elle "
"n'en trouve pas, une exception :exc:`ImportError` est levée."
#: tutorial/modules.rst:474
#: tutorial/modules.rst:475
msgid ""
"Contrarily, when using syntax like ``import item.subitem.subsubitem``, each "
"item except for the last must be a package; the last item can be a module or "
@ -663,11 +665,11 @@ msgstr ""
"ni une fonction, ni une classe, ni une variable définie dans l'élément "
"précédent."
#: tutorial/modules.rst:483
#: tutorial/modules.rst:484
msgid "Importing \\* From a Package"
msgstr "Importer \\* depuis un paquet"
#: tutorial/modules.rst:487
#: tutorial/modules.rst:488
msgid ""
"Now what happens when the user writes ``from sound.effects import *``? "
"Ideally, one would hope that this somehow goes out to the filesystem, finds "
@ -682,7 +684,7 @@ msgstr ""
"avoir des effets secondaires indésirables ou, du moins, désirés seulement "
"lorsque le sous-module est importé explicitement."
#: tutorial/modules.rst:493
#: tutorial/modules.rst:494
msgid ""
"The only solution is for the package author to provide an explicit index of "
"the package. The :keyword:`import` statement uses the following convention: "
@ -705,7 +707,7 @@ msgstr ""
"pour son paquet. Par exemple, le fichier :file:`sound/effects/__init__.py` "
"peut contenir le code suivant ::"
#: tutorial/modules.rst:505
#: tutorial/modules.rst:506
msgid ""
"This would mean that ``from sound.effects import *`` would import the three "
"named submodules of the :mod:`sound` package."
@ -713,7 +715,7 @@ msgstr ""
"Cela signifie que ``from sound.effects import *`` importe les trois sous-"
"modules explicitement désignés du paquet :mod:`sound`."
#: tutorial/modules.rst:508
#: tutorial/modules.rst:509
msgid ""
"If ``__all__`` is not defined, the statement ``from sound.effects import *`` "
"does *not* import all submodules from the package :mod:`sound.effects` into "
@ -735,7 +737,7 @@ msgstr ""
"modules du paquet ayant été chargés explicitement par une instruction :"
"keyword:`import`. Typiquement ::"
#: tutorial/modules.rst:521
#: tutorial/modules.rst:522
msgid ""
"In this example, the :mod:`echo` and :mod:`surround` modules are imported in "
"the current namespace because they are defined in the :mod:`sound.effects` "
@ -747,7 +749,7 @@ msgstr ""
"qu'ils sont définis dans le paquet :mod:`sound.effects` (cela fonctionne "
"aussi lorsque ``__all__`` est définie)."
#: tutorial/modules.rst:526
#: tutorial/modules.rst:527
msgid ""
"Although certain modules are designed to export only names that follow "
"certain patterns when you use ``import *``, it is still considered bad "
@ -758,7 +760,7 @@ msgstr ""
"*`` reste considéré comme une mauvaise pratique dans du code à destination "
"d'un environnement de production."
#: tutorial/modules.rst:530
#: tutorial/modules.rst:531
msgid ""
"Remember, there is nothing wrong with using ``from package import "
"specific_submodule``! In fact, this is the recommended notation unless the "
@ -770,11 +772,11 @@ msgstr ""
"que le module qui fait les importations ait besoin de sous-modules ayant le "
"même nom mais provenant de paquets différents."
#: tutorial/modules.rst:539
#: tutorial/modules.rst:540
msgid "Intra-package References"
msgstr "Références internes dans un paquet"
#: tutorial/modules.rst:541
#: tutorial/modules.rst:542
msgid ""
"When packages are structured into subpackages (as with the :mod:`sound` "
"package in the example), you can use absolute imports to refer to submodules "
@ -788,7 +790,7 @@ msgstr ""
"vocoder` a besoin du module :mod:`echo` du paquet :mod:`sound.effects`, il "
"peut utiliser ``from sound.effects import echo``."
#: tutorial/modules.rst:547
#: tutorial/modules.rst:548
msgid ""
"You can also write relative imports, with the ``from module import name`` "
"form of import statement. These imports use leading dots to indicate the "
@ -800,7 +802,7 @@ msgstr ""
"points pour indiquer leur origine (paquet courant ou parent). Depuis le "
"module :mod:`surround`, par exemple vous pouvez écrire ::"
#: tutorial/modules.rst:556
#: tutorial/modules.rst:557
msgid ""
"Note that relative imports are based on the name of the current module. "
"Since the name of the main module is always ``\"__main__\"``, modules "
@ -812,11 +814,11 @@ msgstr ""
"modules utilisés par le module principal d'une application ne peuvent être "
"importés que par des importations absolues."
#: tutorial/modules.rst:562
#: tutorial/modules.rst:563
msgid "Packages in Multiple Directories"
msgstr "Paquets dans plusieurs dossiers"
#: tutorial/modules.rst:564
#: tutorial/modules.rst:565
msgid ""
"Packages support one more special attribute, :attr:`__path__`. This is "
"initialized to be a list containing the name of the directory holding the "
@ -830,7 +832,7 @@ msgstr ""
"peut être modifiée, altérant ainsi les futures recherches de modules et sous-"
"paquets contenus dans le paquet."
#: tutorial/modules.rst:570
#: tutorial/modules.rst:571
msgid ""
"While this feature is not often needed, it can be used to extend the set of "
"modules found in a package."
@ -838,11 +840,11 @@ msgstr ""
"Bien que cette fonctionnalité ne soit que rarement utile, elle peut servir à "
"élargir la liste des modules trouvés dans un paquet."
#: tutorial/modules.rst:575
#: tutorial/modules.rst:576
msgid "Footnotes"
msgstr "Notes"
#: tutorial/modules.rst:576
#: tutorial/modules.rst:577
msgid ""
"In fact function definitions are also 'statements' that are 'executed'; the "
"execution of a module-level function definition enters the function name in "
@ -851,3 +853,6 @@ msgstr ""
"En réalité, la déclaration d'une fonction est elle-même une instruction ; "
"son exécution enregistre le nom de la fonction dans la table des symboles "
"globaux du module."
#~ msgid "The installation-dependent default."
#~ msgstr "la valeur par défaut, dépendante de l'installation."