Make merge (#1695)

* Make merge * FIX: spelling for pospell. * Uniformisation des entêtes po.
This commit is contained in:
Julien Palard 2021-09-24 10:20:01 +02:00 committed by GitHub
commit 17d5f9cebe
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: 2020-08-24 09:01+0200\n"
"POT-Creation-Date: 2021-09-23 16:16+0200\n"
"PO-Revision-Date: 2019-06-18 22:05+0200\n"
"Last-Translator: \n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -57,13 +57,14 @@ msgid "Python is just the language for you."
msgstr "Python est le langage parfait pour vous."
#: tutorial/appetite.rst:22
#, fuzzy
msgid ""
"You could write a Unix shell script or Windows batch files for some of these "
"tasks, but shell scripts are best at moving around files and changing text "
"data, not well-suited for GUI applications or games. You could write a C/C++/"
"Java program, but it can take a lot of development time to get even a first-"
"draft program. Python is simpler to use, available on Windows, Mac OS X, "
"and Unix operating systems, and will help you get the job done more quickly."
"draft program. Python is simpler to use, available on Windows, macOS, and "
"Unix operating systems, and will help you get the job done more quickly."
msgstr ""
"Vous pouvez écrire un script shell Unix ou des fichiers batch Windows pour "
"certaines de ces tâches. Les scripts shell sont appropriés pour déplacer des "

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-19 22:36+0200\n"
"POT-Creation-Date: 2021-09-23 16:16+0200\n"
"PO-Revision-Date: 2021-09-04 02:09+0200\n"
"Last-Translator: Jean Abou Samra <jean@abou-samra.fr>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -54,11 +54,18 @@ msgstr ""
"par ailleurs équivalente aux instructions ``switch`` ou ``case`` disponibles "
"dans d'autres langages."
#: tutorial/controlflow.rst:43
#: tutorial/controlflow.rst:39
msgid ""
"If you're comparing the same value to several constants, or checking for "
"specific types or attributes, you may also find the :keyword:`!match` "
"statement useful. For more details see :ref:`tut-match`."
msgstr ""
#: tutorial/controlflow.rst:46
msgid ":keyword:`!for` Statements"
msgstr "L'instruction :keyword:`!for`"
#: tutorial/controlflow.rst:48
#: tutorial/controlflow.rst:51
msgid ""
"The :keyword:`for` statement in Python differs a bit from what you may be "
"used to in C or Pascal. Rather than always iterating over an arithmetic "
@ -77,7 +84,7 @@ msgstr ""
"caractères…), dans l'ordre dans lequel ils apparaissent dans la séquence. "
"Par exemple :"
#: tutorial/controlflow.rst:69
#: tutorial/controlflow.rst:72
msgid ""
"Code that modifies a collection while iterating over that same collection "
"can be tricky to get right. Instead, it is usually more straight-forward to "
@ -87,11 +94,11 @@ msgstr ""
"s'avérer délicat. Il est généralement plus simple de boucler sur une copie "
"de la collection ou de créer une nouvelle collection ::"
#: tutorial/controlflow.rst:88
#: tutorial/controlflow.rst:94
msgid "The :func:`range` Function"
msgstr "La fonction :func:`range`"
#: tutorial/controlflow.rst:90
#: tutorial/controlflow.rst:96
msgid ""
"If you do need to iterate over a sequence of numbers, the built-in function :"
"func:`range` comes in handy. It generates arithmetic progressions::"
@ -99,7 +106,7 @@ msgstr ""
"Si vous devez itérer sur une suite de nombres, la fonction native :func:"
"`range` est faite pour cela. Elle génère des suites arithmétiques ::"
#: tutorial/controlflow.rst:102
#: tutorial/controlflow.rst:108
msgid ""
"The given end point is never part of the generated sequence; ``range(10)`` "
"generates 10 values, the legal indices for items of a sequence of length "
@ -112,7 +119,7 @@ msgstr ""
"valeur d'incrément différentes (y compris négative pour cette dernière, que "
"l'on appelle également parfois le « pas ») ::"
#: tutorial/controlflow.rst:116
#: tutorial/controlflow.rst:122
msgid ""
"To iterate over the indices of a sequence, you can combine :func:`range` "
"and :func:`len` as follows::"
@ -120,7 +127,7 @@ msgstr ""
"Pour itérer sur les indices d'une séquence, on peut combiner les fonctions :"
"func:`range` et :func:`len` ::"
#: tutorial/controlflow.rst:129
#: tutorial/controlflow.rst:135
msgid ""
"In most such cases, however, it is convenient to use the :func:`enumerate` "
"function, see :ref:`tut-loopidioms`."
@ -128,11 +135,11 @@ msgstr ""
"Cependant, dans la plupart des cas, il est plus pratique d'utiliser la "
"fonction :func:`enumerate`. Voyez pour cela :ref:`tut-loopidioms`."
#: tutorial/controlflow.rst:132
#: tutorial/controlflow.rst:138
msgid "A strange thing happens if you just print a range::"
msgstr "Une chose étrange se produit lorsqu'on affiche un *range* ::"
#: tutorial/controlflow.rst:137
#: tutorial/controlflow.rst:143
msgid ""
"In many ways the object returned by :func:`range` behaves as if it is a "
"list, but in fact it isn't. It is an object which returns the successive "
@ -144,7 +151,7 @@ msgstr ""
"à mesure de l'itération, sans réellement produire la liste en tant que "
"telle, économisant ainsi de l'espace."
#: tutorial/controlflow.rst:142
#: tutorial/controlflow.rst:148
msgid ""
"We say such an object is :term:`iterable`, that is, suitable as a target for "
"functions and constructs that expect something from which they can obtain "
@ -159,24 +166,17 @@ msgstr ""
"de ces constructions, et un exemple de fonction qui prend un itérable en "
"paramètre est :func:`sum` ::"
#: tutorial/controlflow.rst:151
#: tutorial/controlflow.rst:157
#, fuzzy
msgid ""
"Later we will see more functions that return iterables and take iterables as "
"arguments. Lastly, maybe you are curious about how to get a list from a "
"range. Here is the solution::"
"arguments. In chapter :ref:`tut-structures`, we will discuss in more detail "
"about :func:`list`."
msgstr ""
"Plus loin nous voyons d'autres fonctions qui donnent des itérables ou en "
"prennent en paramètre. Si vous vous demandez comment obtenir une liste à "
"partir d'un *range*, voici la solution ::"
#: tutorial/controlflow.rst:158
msgid ""
"In chapter :ref:`tut-structures`, we will discuss in more detail about :func:"
"`list`."
msgstr ""
"Dans le chapitre :ref:`tut-structures`, nous discuterons plus en détail sur :"
"func:`list`."
#: tutorial/controlflow.rst:164
msgid ""
":keyword:`!break` and :keyword:`!continue` Statements, and :keyword:`!else` "
@ -273,11 +273,153 @@ msgstr ""
"permettant ainsi de construire votre code à un niveau plus abstrait. "
"L'instruction :keyword:`!pass` est alors ignorée silencieusement ::"
#: tutorial/controlflow.rst:250
#: tutorial/controlflow.rst:251
#, fuzzy
msgid ":keyword:`!match` Statements"
msgstr "L'instruction :keyword:`!pass`"
#: tutorial/controlflow.rst:253
msgid ""
"A match statement takes an expression and compares its value to successive "
"patterns given as one or more case blocks. This is superficially similar to "
"a switch statement in C, Java or JavaScript (and many other languages), but "
"it can also extract components (sequence elements or object attributes) from "
"the value into variables."
msgstr ""
#: tutorial/controlflow.rst:259
msgid ""
"The simplest form compares a subject value against one or more literals::"
msgstr ""
#: tutorial/controlflow.rst:272
msgid ""
"Note the last block: the \"variable name\" ``_`` acts as a *wildcard* and "
"never fails to match. If no case matches, none of the branches is executed."
msgstr ""
#: tutorial/controlflow.rst:275
msgid ""
"You can combine several literals in a single pattern using ``|`` (\"or\")::"
msgstr ""
#: tutorial/controlflow.rst:280
msgid ""
"Patterns can look like unpacking assignments, and can be used to bind "
"variables::"
msgstr ""
#: tutorial/controlflow.rst:296
msgid ""
"Study that one carefully! The first pattern has two literals, and can be "
"thought of as an extension of the literal pattern shown above. But the next "
"two patterns combine a literal and a variable, and the variable *binds* a "
"value from the subject (``point``). The fourth pattern captures two values, "
"which makes it conceptually similar to the unpacking assignment ``(x, y) = "
"point``."
msgstr ""
#: tutorial/controlflow.rst:303
msgid ""
"If you are using classes to structure your data you can use the class name "
"followed by an argument list resembling a constructor, but with the ability "
"to capture attributes into variables::"
msgstr ""
#: tutorial/controlflow.rst:324
msgid ""
"You can use positional parameters with some builtin classes that provide an "
"ordering for their attributes (e.g. dataclasses). You can also define a "
"specific position for attributes in patterns by setting the "
"``__match_args__`` special attribute in your classes. If it's set to (\"x\", "
"\"y\"), the following patterns are all equivalent (and all bind the ``y`` "
"attribute to the ``var`` variable)::"
msgstr ""
#: tutorial/controlflow.rst:335
msgid ""
"A recommended way to read patterns is to look at them as an extended form of "
"what you would put on the left of an assignment, to understand which "
"variables would be set to what. Only the standalone names (like ``var`` "
"above) are assigned to by a match statement. Dotted names (like ``foo."
"bar``), attribute names (the ``x=`` and ``y=`` above) or class names "
"(recognized by the \"(...)\" next to them like ``Point`` above) are never "
"assigned to."
msgstr ""
#: tutorial/controlflow.rst:342
msgid ""
"Patterns can be arbitrarily nested. For example, if we have a short list of "
"points, we could match it like this::"
msgstr ""
#: tutorial/controlflow.rst:357
msgid ""
"We can add an ``if`` clause to a pattern, known as a \"guard\". If the "
"guard is false, ``match`` goes on to try the next case block. Note that "
"value capture happens before the guard is evaluated::"
msgstr ""
#: tutorial/controlflow.rst:367
msgid "Several other key features of this statement:"
msgstr ""
#: tutorial/controlflow.rst:369
msgid ""
"Like unpacking assignments, tuple and list patterns have exactly the same "
"meaning and actually match arbitrary sequences. An important exception is "
"that they don't match iterators or strings."
msgstr ""
#: tutorial/controlflow.rst:373
msgid ""
"Sequence patterns support extended unpacking: ``[x, y, *rest]`` and ``(x, y, "
"*rest)`` work similar to unpacking assignments. The name after ``*`` may "
"also be ``_``, so ``(x, y, *_)`` matches a sequence of at least two items "
"without binding the remaining items."
msgstr ""
#: tutorial/controlflow.rst:378
msgid ""
"Mapping patterns: ``{\"bandwidth\": b, \"latency\": l}`` captures the ``"
"\"bandwidth\"`` and ``\"latency\"`` values from a dictionary. Unlike "
"sequence patterns, extra keys are ignored. An unpacking like ``**rest`` is "
"also supported. (But ``**_`` would be redundant, so it not allowed.)"
msgstr ""
#: tutorial/controlflow.rst:383
msgid "Subpatterns may be captured using the ``as`` keyword::"
msgstr ""
#: tutorial/controlflow.rst:387
msgid ""
"will capture the second element of the input as ``p2`` (as long as the input "
"is a sequence of two points)"
msgstr ""
#: tutorial/controlflow.rst:390
msgid ""
"Most literals are compared by equality, however the singletons ``True``, "
"``False`` and ``None`` are compared by identity."
msgstr ""
#: tutorial/controlflow.rst:393
msgid ""
"Patterns may use named constants. These must be dotted names to prevent "
"them from being interpreted as capture variable::"
msgstr ""
#: tutorial/controlflow.rst:410
msgid ""
"For a more detailed explanation and additional examples, you can look into :"
"pep:`636` which is written in a tutorial format."
msgstr ""
#: tutorial/controlflow.rst:416
msgid "Defining Functions"
msgstr "Définir des fonctions"
#: tutorial/controlflow.rst:252
#: tutorial/controlflow.rst:418
msgid ""
"We can create a function that writes the Fibonacci series to an arbitrary "
"boundary::"
@ -285,7 +427,7 @@ msgstr ""
"On peut créer une fonction qui écrit la suite de Fibonacci jusqu'à une "
"limite imposée ::"
#: tutorial/controlflow.rst:272
#: tutorial/controlflow.rst:438
msgid ""
"The keyword :keyword:`def` introduces a function *definition*. It must be "
"followed by the function name and the parenthesized list of formal "
@ -297,7 +439,7 @@ msgstr ""
"paramètres. L'instruction qui constitue le corps de la fonction débute à la "
"ligne suivante et doit être indentée."
#: tutorial/controlflow.rst:277
#: tutorial/controlflow.rst:443
msgid ""
"The first statement of the function body can optionally be a string literal; "
"this string literal is the function's documentation string, or :dfn:"
@ -316,7 +458,7 @@ msgstr ""
"naviguer de façon interactive dans le code ; prenez-en l'habitude, c'est une "
"bonne pratique que de documenter le code que vous écrivez."
#: tutorial/controlflow.rst:284
#: tutorial/controlflow.rst:450
msgid ""
"The *execution* of a function introduces a new symbol table used for the "
"local variables of the function. More precisely, all variable assignments "
@ -342,7 +484,7 @@ msgstr ""
"instruction :keyword:`global` et, pour les variables des fonctions "
"englobantes, désignées dans une instruction :keyword:`nonlocal`)."
#: tutorial/controlflow.rst:295
#: tutorial/controlflow.rst:461
msgid ""
"The actual parameters (arguments) to a function call are introduced in the "
"local symbol table of the called function when it is called; thus, arguments "
@ -359,7 +501,7 @@ msgstr ""
"s'appelle elle-même par récursion, une nouvelle table de symboles locaux est "
"créée pour cet appel."
#: tutorial/controlflow.rst:302
#: tutorial/controlflow.rst:468
msgid ""
"A function definition associates the function name with the function object "
"in the current symbol table. The interpreter recognizes the object pointed "
@ -372,7 +514,7 @@ msgstr ""
"référence à une même fonction, ils peuvent alors tous être utilisés pour "
"appeler la fonction ::"
#: tutorial/controlflow.rst:313
#: tutorial/controlflow.rst:479
msgid ""
"Coming from other languages, you might object that ``fib`` is not a function "
"but a procedure since it doesn't return a value. In fact, even functions "
@ -391,7 +533,7 @@ msgstr ""
"Vous pouvez le constater, si vous y tenez vraiment, en utilisant :func:"
"`print` ::"
#: tutorial/controlflow.rst:324
#: tutorial/controlflow.rst:490
msgid ""
"It is simple to write a function that returns a list of the numbers of the "
"Fibonacci series, instead of printing it::"
@ -399,14 +541,14 @@ msgstr ""
"Il est facile d'écrire une fonction qui renvoie une liste de la série de "
"Fibonacci au lieu de l'afficher ::"
#: tutorial/controlflow.rst:340
#: tutorial/controlflow.rst:506
msgid "This example, as usual, demonstrates some new Python features:"
msgstr ""
"Cet exemple, comme d'habitude, illustre de nouvelles fonctionnalités de "
"Python :"
# énumération --> pas de majuscule et point-virgule en fin de proposition.
#: tutorial/controlflow.rst:342
#: tutorial/controlflow.rst:508
msgid ""
"The :keyword:`return` statement returns with a value from a function. :"
"keyword:`!return` without an expression argument returns ``None``. Falling "
@ -418,7 +560,7 @@ msgstr ""
"``None`` ;"
# fin d'énumération --> pas de majuscule et point final.
#: tutorial/controlflow.rst:346
#: tutorial/controlflow.rst:512
msgid ""
"The statement ``result.append(a)`` calls a *method* of the list object "
"``result``. A method is a function that 'belongs' to an object and is named "
@ -444,11 +586,11 @@ msgstr ""
"liste. Dans cet exemple, elle est l'équivalent de ``result = result + [a]``, "
"en plus efficace."
#: tutorial/controlflow.rst:361
#: tutorial/controlflow.rst:527
msgid "More on Defining Functions"
msgstr "Davantage sur la définition des fonctions"
#: tutorial/controlflow.rst:363
#: tutorial/controlflow.rst:529
msgid ""
"It is also possible to define functions with a variable number of arguments. "
"There are three forms, which can be combined."
@ -456,11 +598,11 @@ msgstr ""
"Il est également possible de définir des fonctions avec un nombre variable "
"d'arguments. Trois syntaxes peuvent être utilisées, éventuellement combinées."
#: tutorial/controlflow.rst:370
#: tutorial/controlflow.rst:536
msgid "Default Argument Values"
msgstr "Valeur par défaut des arguments"
#: tutorial/controlflow.rst:372
#: tutorial/controlflow.rst:538
msgid ""
"The most useful form is to specify a default value for one or more "
"arguments. This creates a function that can be called with fewer arguments "
@ -470,12 +612,12 @@ msgstr ""
"certains arguments. Ceci crée une fonction qui peut être appelée avec moins "
"d'arguments que ceux présents dans sa définition. Par exemple ::"
#: tutorial/controlflow.rst:388
#: tutorial/controlflow.rst:554
msgid "This function can be called in several ways:"
msgstr "Cette fonction peut être appelée de plusieurs façons :"
# énumération --> pas de majuscule
#: tutorial/controlflow.rst:390
#: tutorial/controlflow.rst:556
msgid ""
"giving only the mandatory argument: ``ask_ok('Do you really want to quit?')``"
msgstr ""
@ -483,7 +625,7 @@ msgstr ""
"want to quit?')`` ;"
# énumération --> pas de majuscule et point-virgule en fin de proposition.
#: tutorial/controlflow.rst:392
#: tutorial/controlflow.rst:558
msgid ""
"giving one of the optional arguments: ``ask_ok('OK to overwrite the file?', "
"2)``"
@ -492,7 +634,7 @@ msgstr ""
"overwrite the file?', 2)`` ;"
# fin d'énumération --> pas de majuscule et point final.
#: tutorial/controlflow.rst:394
#: tutorial/controlflow.rst:560
msgid ""
"or even giving all arguments: ``ask_ok('OK to overwrite the file?', 2, 'Come "
"on, only yes or no!')``"
@ -500,7 +642,7 @@ msgstr ""
"en fournissant tous les arguments : ``ask_ok('OK to overwrite the file?', 2, "
"'Come on, only yes or no!')``."
#: tutorial/controlflow.rst:397
#: tutorial/controlflow.rst:563
msgid ""
"This example also introduces the :keyword:`in` keyword. This tests whether "
"or not a sequence contains a certain value."
@ -508,7 +650,7 @@ msgstr ""
"Cet exemple présente également le mot-clé :keyword:`in`. Celui-ci permet de "
"tester si une séquence contient une certaine valeur."
#: tutorial/controlflow.rst:400
#: tutorial/controlflow.rst:566
msgid ""
"The default values are evaluated at the point of function definition in the "
"*defining* scope, so that ::"
@ -516,11 +658,11 @@ msgstr ""
"Les valeurs par défaut sont évaluées lors de la définition de la fonction "
"dans la portée de la *définition*, de telle sorte que ::"
#: tutorial/controlflow.rst:411
#: tutorial/controlflow.rst:577
msgid "will print ``5``."
msgstr "affiche ``5``."
#: tutorial/controlflow.rst:413
#: tutorial/controlflow.rst:579
msgid ""
"**Important warning:** The default value is evaluated only once. This makes "
"a difference when the default is a mutable object such as a list, "
@ -534,11 +676,11 @@ msgstr ""
"arguments qui lui sont passés au fil des appels successifs ::"
# pas de majuscule : ok
#: tutorial/controlflow.rst:426
#: tutorial/controlflow.rst:592
msgid "This will print ::"
msgstr "affiche ::"
#: tutorial/controlflow.rst:432
#: tutorial/controlflow.rst:598
msgid ""
"If you don't want the default to be shared between subsequent calls, you can "
"write the function like this instead::"
@ -546,11 +688,11 @@ msgstr ""
"Si vous ne voulez pas que cette valeur par défaut soit partagée entre des "
"appels successifs, vous pouvez écrire la fonction de cette façon ::"
#: tutorial/controlflow.rst:445
#: tutorial/controlflow.rst:611
msgid "Keyword Arguments"
msgstr "Les arguments nommés"
#: tutorial/controlflow.rst:447
#: tutorial/controlflow.rst:613
msgid ""
"Functions can also be called using :term:`keyword arguments <keyword "
"argument>` of the form ``kwarg=value``. For instance, the following "
@ -560,7 +702,7 @@ msgstr ""
"`arguments nommés <keyword argument>` sous la forme ``kwarg=value``. Par "
"exemple, la fonction suivante ::"
#: tutorial/controlflow.rst:456
#: tutorial/controlflow.rst:622
msgid ""
"accepts one required argument (``voltage``) and three optional arguments "
"(``state``, ``action``, and ``type``). This function can be called in any "
@ -570,11 +712,11 @@ msgstr ""
"(``state``, ``action`` et ``type``). Cette fonction peut être appelée de "
"n'importe laquelle des façons suivantes ::"
#: tutorial/controlflow.rst:467
#: tutorial/controlflow.rst:633
msgid "but all the following calls would be invalid::"
msgstr "mais tous les appels qui suivent sont incorrects ::"
#: tutorial/controlflow.rst:474
#: tutorial/controlflow.rst:640
msgid ""
"In a function call, keyword arguments must follow positional arguments. All "
"the keyword arguments passed must match one of the arguments accepted by the "
@ -593,7 +735,7 @@ msgstr ""
"recevoir une valeur plus d'une fois, comme l'illustre cet exemple incorrect "
"du fait de cette restriction ::"
#: tutorial/controlflow.rst:490
#: tutorial/controlflow.rst:656
msgid ""
"When a final formal parameter of the form ``**name`` is present, it receives "
"a dictionary (see :ref:`typesmapping`) containing all keyword arguments "
@ -612,15 +754,15 @@ msgstr ""
"formels (``*name`` doit être présent avant ``**name``). Par exemple, si vous "
"définissez une fonction comme ceci ::"
#: tutorial/controlflow.rst:507
#: tutorial/controlflow.rst:673
msgid "It could be called like this::"
msgstr "Elle pourrait être appelée comme ceci ::"
#: tutorial/controlflow.rst:515
#: tutorial/controlflow.rst:681
msgid "and of course it would print:"
msgstr "et, bien sûr, elle affiche :"
#: tutorial/controlflow.rst:528
#: tutorial/controlflow.rst:694
msgid ""
"Note that the order in which the keyword arguments are printed is guaranteed "
"to match the order in which they were provided in the function call."
@ -628,11 +770,11 @@ msgstr ""
"Notez que Python garantit que l'ordre d'affichage des arguments est le même "
"que l'ordre dans lesquels ils sont fournis lors de l'appel à la fonction."
#: tutorial/controlflow.rst:532
#: tutorial/controlflow.rst:698
msgid "Special parameters"
msgstr "Paramètres spéciaux"
#: tutorial/controlflow.rst:534
#: tutorial/controlflow.rst:700
msgid ""
"By default, arguments may be passed to a Python function either by position "
"or explicitly by keyword. For readability and performance, it makes sense to "
@ -647,11 +789,11 @@ msgstr ""
"définition de la fonction pour déterminer si les éléments sont transmis par "
"position seule, par position ou nommé, ou seulement nommé."
#: tutorial/controlflow.rst:540
#: tutorial/controlflow.rst:706
msgid "A function definition may look like:"
msgstr "Voici à quoi ressemble une définition de fonction :"
#: tutorial/controlflow.rst:551
#: tutorial/controlflow.rst:717
msgid ""
"where ``/`` and ``*`` are optional. If used, these symbols indicate the kind "
"of parameter by how the arguments may be passed to the function: positional-"
@ -663,11 +805,11 @@ msgstr ""
"fonction : position seule, position ou nommé, et seulement nommé. Les "
"paramètres par mot-clé sont aussi appelés paramètres nommés."
#: tutorial/controlflow.rst:558
#: tutorial/controlflow.rst:724
msgid "Positional-or-Keyword Arguments"
msgstr "Les arguments positionnels-ou-nommés"
#: tutorial/controlflow.rst:560
#: tutorial/controlflow.rst:726
msgid ""
"If ``/`` and ``*`` are not present in the function definition, arguments may "
"be passed to a function by position or by keyword."
@ -675,11 +817,11 @@ msgstr ""
"Si ``/`` et ``*`` ne sont pas présents dans la définition de fonction, les "
"arguments peuvent être passés à une fonction par position ou par nommés."
#: tutorial/controlflow.rst:565
#: tutorial/controlflow.rst:731
msgid "Positional-Only Parameters"
msgstr "Paramètres positionnels uniquement"
#: tutorial/controlflow.rst:567
#: tutorial/controlflow.rst:733
msgid ""
"Looking at this in a bit more detail, it is possible to mark certain "
"parameters as *positional-only*. If *positional-only*, the parameters' order "
@ -698,7 +840,7 @@ msgstr ""
"des paramètres. S'il n'y a pas de ``/`` dans la définition de fonction, il "
"n'y a pas de paramètres « positionnels uniquement »."
#: tutorial/controlflow.rst:575
#: tutorial/controlflow.rst:741
msgid ""
"Parameters following the ``/`` may be *positional-or-keyword* or *keyword-"
"only*."
@ -706,11 +848,11 @@ msgstr ""
"Les paramètres qui suivent le ``/`` peuvent être *positionnels-ou-nommés* ou "
"*nommés-uniquement*."
#: tutorial/controlflow.rst:579
#: tutorial/controlflow.rst:745
msgid "Keyword-Only Arguments"
msgstr "Arguments nommés uniquement"
#: tutorial/controlflow.rst:581
#: tutorial/controlflow.rst:747
msgid ""
"To mark parameters as *keyword-only*, indicating the parameters must be "
"passed by keyword argument, place an ``*`` in the arguments list just before "
@ -721,11 +863,11 @@ msgstr ""
"``*`` dans la liste des arguments juste avant le premier paramètre "
"*uniquement nommé*."
#: tutorial/controlflow.rst:587
#: tutorial/controlflow.rst:753
msgid "Function Examples"
msgstr "Exemples de fonctions"
#: tutorial/controlflow.rst:589
#: tutorial/controlflow.rst:755
msgid ""
"Consider the following example function definitions paying close attention "
"to the markers ``/`` and ``*``::"
@ -733,7 +875,7 @@ msgstr ""
"Considérons l'exemple suivant de définitions de fonctions en portant une "
"attention particulière aux marqueurs ``/`` et ``*`` ::"
#: tutorial/controlflow.rst:605
#: tutorial/controlflow.rst:771
msgid ""
"The first function definition, ``standard_arg``, the most familiar form, "
"places no restrictions on the calling convention and arguments may be passed "
@ -743,7 +885,7 @@ msgstr ""
"familière, n'impose aucune restriction sur la convention d'appel et les "
"arguments peuvent être passés par position ou nommés ::"
#: tutorial/controlflow.rst:615
#: tutorial/controlflow.rst:781
msgid ""
"The second function ``pos_only_arg`` is restricted to only use positional "
"parameters as there is a ``/`` in the function definition::"
@ -751,7 +893,7 @@ msgstr ""
"La deuxième fonction ``pos_only_arg`` restreint le passage aux seuls "
"arguments par position car il y a un ``/`` dans la définition de fonction ::"
#: tutorial/controlflow.rst:626
#: tutorial/controlflow.rst:792
msgid ""
"The third function ``kwd_only_args`` only allows keyword arguments as "
"indicated by a ``*`` in the function definition::"
@ -759,7 +901,7 @@ msgstr ""
"La troisième fonction ``kwd_only_args`` n'autorise que les arguments nommés "
"comme l'indique le ``*`` dans la définition de fonction ::"
#: tutorial/controlflow.rst:637
#: tutorial/controlflow.rst:803
msgid ""
"And the last uses all three calling conventions in the same function "
"definition::"
@ -767,7 +909,7 @@ msgstr ""
"Et la dernière utilise les trois conventions d'appel dans la même définition "
"de fonction ::"
#: tutorial/controlflow.rst:657
#: tutorial/controlflow.rst:823
msgid ""
"Finally, consider this function definition which has a potential collision "
"between the positional argument ``name`` and ``**kwds`` which has ``name`` "
@ -777,7 +919,7 @@ msgstr ""
"potentielle entre l'argument positionnel ``name`` et ``**kwds`` qui a "
"``name`` comme mot-clé ::"
#: tutorial/controlflow.rst:662
#: tutorial/controlflow.rst:828
msgid ""
"There is no possible call that will make it return ``True`` as the keyword "
"``'name'`` will always bind to the first parameter. For example::"
@ -785,7 +927,7 @@ msgstr ""
"Il n'y a pas d'appel possible qui renvoie ``True`` car le mot-clé ``'name'`` "
"est toujours lié au premier paramètre. Par exemple ::"
#: tutorial/controlflow.rst:671
#: tutorial/controlflow.rst:837
msgid ""
"But using ``/`` (positional only arguments), it is possible since it allows "
"``name`` as a positional argument and ``'name'`` as a key in the keyword "
@ -795,7 +937,7 @@ msgstr ""
"puisqu'il permet d'utiliser ``name`` comme argument positionnel et "
"``'name'`` comme mot-clé dans les arguments nommés ::"
#: tutorial/controlflow.rst:678
#: tutorial/controlflow.rst:844
msgid ""
"In other words, the names of positional-only parameters can be used in "
"``**kwds`` without ambiguity."
@ -803,11 +945,11 @@ msgstr ""
"En d'autres termes, les noms des paramètres seulement positionnels peuvent "
"être utilisés sans ambiguïté dans ``**kwds``."
#: tutorial/controlflow.rst:683
#: tutorial/controlflow.rst:849
msgid "Recap"
msgstr "Récapitulatif"
#: tutorial/controlflow.rst:685
#: tutorial/controlflow.rst:851
msgid ""
"The use case will determine which parameters to use in the function "
"definition::"
@ -815,12 +957,12 @@ msgstr ""
"Le cas d'utilisation détermine les paramètres à utiliser dans la définition "
"de fonction ::"
#: tutorial/controlflow.rst:689
#: tutorial/controlflow.rst:855
msgid "As guidance:"
msgstr "Quelques conseils :"
# énumération --> pas de majuscule et point-virgule en fin de proposition.
#: tutorial/controlflow.rst:691
#: tutorial/controlflow.rst:857
msgid ""
"Use positional-only if you want the name of the parameters to not be "
"available to the user. This is useful when parameter names have no real "
@ -835,7 +977,7 @@ msgstr ""
"de prendre certains paramètres positionnels et mots-clés arbitraires ;"
# énumération --> pas de majuscule et point-virgule en fin de proposition.
#: tutorial/controlflow.rst:696
#: tutorial/controlflow.rst:862
msgid ""
"Use keyword-only when names have meaning and the function definition is more "
"understandable by being explicit with names or you want to prevent users "
@ -847,7 +989,7 @@ msgstr ""
"l'argument qui est passé ;"
# fin d'énumération
#: tutorial/controlflow.rst:699
#: tutorial/controlflow.rst:865
msgid ""
"For an API, use positional-only to prevent breaking API changes if the "
"parameter's name is modified in the future."
@ -855,11 +997,11 @@ msgstr ""
"dans le cas d'une API, utilisez les paramètres seulement positionnels pour "
"éviter de casser l'API si le nom du paramètre est modifié dans l'avenir."
#: tutorial/controlflow.rst:705
#: tutorial/controlflow.rst:871
msgid "Arbitrary Argument Lists"
msgstr "Listes d'arguments arbitraires"
#: tutorial/controlflow.rst:710
#: tutorial/controlflow.rst:876
msgid ""
"Finally, the least frequently used option is to specify that a function can "
"be called with an arbitrary number of arguments. These arguments will be "
@ -872,7 +1014,7 @@ msgstr ""
"nombre variable d'arguments, zéro ou plus arguments normaux peuvent "
"apparaître ::"
#: tutorial/controlflow.rst:719
#: tutorial/controlflow.rst:885
msgid ""
"Normally, these ``variadic`` arguments will be last in the list of formal "
"parameters, because they scoop up all remaining input arguments that are "
@ -884,11 +1026,11 @@ msgstr ""
"parce qu'ils agrègent toutes les valeurs suivantes. Tout paramètre placé "
"après le paramètre ``*arg`` ne pourra être utilisé que par son nom ::"
#: tutorial/controlflow.rst:736
#: tutorial/controlflow.rst:902
msgid "Unpacking Argument Lists"
msgstr "Séparation des listes d'arguments"
#: tutorial/controlflow.rst:738
#: tutorial/controlflow.rst:904
msgid ""
"The reverse situation occurs when the arguments are already in a list or "
"tuple but need to be unpacked for a function call requiring separate "
@ -905,7 +1047,7 @@ msgstr ""
"l'opérateur ``*`` pour séparer les arguments présents dans une liste ou un "
"*n*-uplet ::"
#: tutorial/controlflow.rst:754
#: tutorial/controlflow.rst:920
msgid ""
"In the same fashion, dictionaries can deliver keyword arguments with the "
"``**``\\ -operator::"
@ -913,11 +1055,11 @@ msgstr ""
"De la même façon, les dictionnaires peuvent fournir des arguments nommés en "
"utilisant l'opérateur ``**`` ::"
#: tutorial/controlflow.rst:770
#: tutorial/controlflow.rst:936
msgid "Lambda Expressions"
msgstr "Fonctions anonymes"
#: tutorial/controlflow.rst:772
#: tutorial/controlflow.rst:938
msgid ""
"Small anonymous functions can be created with the :keyword:`lambda` keyword. "
"This function returns the sum of its two arguments: ``lambda a, b: a+b``. "
@ -935,7 +1077,7 @@ msgstr ""
"définition de fonction normale. Comme les fonctions imbriquées, les "
"fonctions lambda peuvent référencer des variables de la portée englobante ::"
#: tutorial/controlflow.rst:789
#: tutorial/controlflow.rst:955
msgid ""
"The above example uses a lambda expression to return a function. Another "
"use is to pass a small function as an argument::"
@ -944,11 +1086,11 @@ msgstr ""
"Une autre utilisation classique est de donner une fonction minimaliste "
"directement en tant que paramètre ::"
#: tutorial/controlflow.rst:801
#: tutorial/controlflow.rst:967
msgid "Documentation Strings"
msgstr "Chaînes de documentation"
#: tutorial/controlflow.rst:808
#: tutorial/controlflow.rst:974
msgid ""
"Here are some conventions about the content and formatting of documentation "
"strings."
@ -956,7 +1098,7 @@ msgstr ""
"Voici quelques conventions concernant le contenu et le format des chaînes de "
"documentation."
#: tutorial/controlflow.rst:811
#: tutorial/controlflow.rst:977
msgid ""
"The first line should always be a short, concise summary of the object's "
"purpose. For brevity, it should not explicitly state the object's name or "
@ -970,7 +1112,7 @@ msgstr ""
"si le nom est un verbe qui décrit une opération). La convention veut que la "
"ligne commence par une majuscule et se termine par un point."
#: tutorial/controlflow.rst:817
#: tutorial/controlflow.rst:983
msgid ""
"If there are more lines in the documentation string, the second line should "
"be blank, visually separating the summary from the rest of the description. "
@ -982,7 +1124,7 @@ msgstr ""
"Les autres lignes peuvent alors constituer un ou plusieurs paragraphes "
"décrivant le mode d'utilisation de l'objet, ses effets de bord, etc."
#: tutorial/controlflow.rst:822
#: tutorial/controlflow.rst:988
msgid ""
"The Python parser does not strip indentation from multi-line string literals "
"in Python, so tools that process documentation have to strip indentation if "
@ -1010,15 +1152,15 @@ msgstr ""
"début de ligne doivent être supprimées. L'équivalent des espaces doit être "
"testé après expansion des tabulations (normalement remplacées par 8 espaces)."
#: tutorial/controlflow.rst:834
#: tutorial/controlflow.rst:1000
msgid "Here is an example of a multi-line docstring::"
msgstr "Voici un exemple de chaîne de documentation multi-lignes ::"
#: tutorial/controlflow.rst:852
#: tutorial/controlflow.rst:1018
msgid "Function Annotations"
msgstr "Annotations de fonctions"
#: tutorial/controlflow.rst:860
#: tutorial/controlflow.rst:1026
msgid ""
":ref:`Function annotations <function>` are completely optional metadata "
"information about the types used by user-defined functions (see :pep:`3107` "
@ -1028,7 +1170,7 @@ msgstr ""
"optionnelles décrivant les types utilisés par une fonction définie par "
"l'utilisateur (voir les :pep:`3107` et :pep:`484` pour plus d'informations)."
#: tutorial/controlflow.rst:864
#: tutorial/controlflow.rst:1030
msgid ""
":term:`Annotations <function annotation>` are stored in the :attr:"
"`__annotations__` attribute of the function as a dictionary and have no "
@ -1048,11 +1190,11 @@ msgstr ""
"points de fin de l'instruction :keyword:`def`. L'exemple suivant a un "
"paramètre requis, un paramètre optionnel et la valeur de retour annotés ::"
#: tutorial/controlflow.rst:886
#: tutorial/controlflow.rst:1052
msgid "Intermezzo: Coding Style"
msgstr "Aparté : le style de codage"
#: tutorial/controlflow.rst:891
#: tutorial/controlflow.rst:1057
msgid ""
"Now that you are about to write longer, more complex pieces of Python, it is "
"a good time to talk about *coding style*. Most languages can be written (or "
@ -1067,7 +1209,7 @@ msgstr ""
"votre code plus facile aux autres est toujours une bonne idée et adopter un "
"bon style de codage peut énormément vous y aider."
#: tutorial/controlflow.rst:897
#: tutorial/controlflow.rst:1063
msgid ""
"For Python, :pep:`8` has emerged as the style guide that most projects "
"adhere to; it promotes a very readable and eye-pleasing coding style. Every "
@ -1079,11 +1221,11 @@ msgstr ""
"Chaque développeur Python se doit donc de la lire et de s'en inspirer autant "
"que possible ; voici ses principaux points notables :"
#: tutorial/controlflow.rst:902
#: tutorial/controlflow.rst:1068
msgid "Use 4-space indentation, and no tabs."
msgstr "Utilisez des indentations de 4 espaces et pas de tabulation."
#: tutorial/controlflow.rst:904
#: tutorial/controlflow.rst:1070
msgid ""
"4 spaces are a good compromise between small indentation (allows greater "
"nesting depth) and large indentation (easier to read). Tabs introduce "
@ -1094,13 +1236,13 @@ msgstr ""
"le code plus facile à lire). Les tabulations introduisent de la confusion et "
"doivent être proscrites autant que possible."
#: tutorial/controlflow.rst:908
#: tutorial/controlflow.rst:1074
msgid "Wrap lines so that they don't exceed 79 characters."
msgstr ""
"Faites en sorte que les lignes ne dépassent pas 79 caractères, au besoin en "
"insérant des retours à la ligne."
#: tutorial/controlflow.rst:910
#: tutorial/controlflow.rst:1076
msgid ""
"This helps users with small displays and makes it possible to have several "
"code files side-by-side on larger displays."
@ -1109,7 +1251,7 @@ msgstr ""
"écran et, pour les autres, cela leur permet de visualiser plusieurs fichiers "
"côte à côte."
#: tutorial/controlflow.rst:913
#: tutorial/controlflow.rst:1079
msgid ""
"Use blank lines to separate functions and classes, and larger blocks of code "
"inside functions."
@ -1117,16 +1259,16 @@ msgstr ""
"Utilisez des lignes vides pour séparer les fonctions et les classes, ou pour "
"scinder de gros blocs de code à l'intérieur de fonctions."
#: tutorial/controlflow.rst:916
#: tutorial/controlflow.rst:1082
msgid "When possible, put comments on a line of their own."
msgstr ""
"Lorsque c'est possible, placez les commentaires sur leurs propres lignes."
#: tutorial/controlflow.rst:918
#: tutorial/controlflow.rst:1084
msgid "Use docstrings."
msgstr "Utilisez les chaînes de documentation."
#: tutorial/controlflow.rst:920
#: tutorial/controlflow.rst:1086
msgid ""
"Use spaces around operators and after commas, but not directly inside "
"bracketing constructs: ``a = f(1, 2) + g(3, 4)``."
@ -1134,7 +1276,7 @@ msgstr ""
"Utilisez des espaces autour des opérateurs et après les virgules, mais pas "
"juste à l'intérieur des parenthèses : ``a = f(1, 2) + g(3, 4)``."
#: tutorial/controlflow.rst:923
#: tutorial/controlflow.rst:1089
msgid ""
"Name your classes and functions consistently; the convention is to use "
"``UpperCamelCase`` for classes and ``lowercase_with_underscores`` for "
@ -1147,7 +1289,7 @@ msgstr ""
"toujours ``self`` comme nom du premier argument des méthodes (voyez :ref:"
"`tut-firstclasses` pour en savoir plus sur les classes et les méthodes)."
#: tutorial/controlflow.rst:928
#: tutorial/controlflow.rst:1094
msgid ""
"Don't use fancy encodings if your code is meant to be used in international "
"environments. Python's default, UTF-8, or even plain ASCII work best in any "
@ -1157,7 +1299,7 @@ msgstr ""
"utilisé dans des environnements internationaux. Par défaut, Python travaille "
"en UTF-8. Pour couvrir tous les cas, préférez le simple ASCII."
#: tutorial/controlflow.rst:932
#: tutorial/controlflow.rst:1098
msgid ""
"Likewise, don't use non-ASCII characters in identifiers if there is only the "
"slightest chance people speaking a different language will read or maintain "
@ -1167,11 +1309,11 @@ msgstr ""
"variables s'il est envisageable qu'une personne parlant une autre langue "
"lise ou doive modifier votre code."
#: tutorial/controlflow.rst:938
#: tutorial/controlflow.rst:1104
msgid "Footnotes"
msgstr "Notes"
#: tutorial/controlflow.rst:939
#: tutorial/controlflow.rst:1105
msgid ""
"Actually, *call by object reference* would be a better description, since if "
"a mutable object is passed, the caller will see any changes the callee makes "
@ -1181,3 +1323,10 @@ msgstr ""
"plus juste dans la mesure où, si un objet muable est passé en argument, "
"l'appelant verra toutes les modifications qui lui auront été apportées par "
"l'appelé (insertion d'éléments dans une liste…)."
#~ msgid ""
#~ "In chapter :ref:`tut-structures`, we will discuss in more detail about :"
#~ "func:`list`."
#~ msgstr ""
#~ "Dans le chapitre :ref:`tut-structures`, nous discuterons plus en détail "
#~ "sur :func:`list`."

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-19 22:36+0200\n"
"POT-Creation-Date: 2021-09-23 16:16+0200\n"
"PO-Revision-Date: 2021-09-04 02:20+0200\n"
"Last-Translator: Jean Abou Samra <jean@abou-samra.fr>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -171,11 +171,12 @@ msgstr ""
"l'exécution de l'instruction :keyword:`try` est terminée."
#: tutorial/errors.rst:104
#, fuzzy
msgid ""
"If an exception occurs during execution of the try clause, the rest of the "
"clause is skipped. Then if its type matches the exception named after the :"
"keyword:`except` keyword, the except clause is executed, and then execution "
"continues after the :keyword:`try` statement."
"If an exception occurs during execution of the :keyword:`try` clause, the "
"rest of the clause is skipped. Then, if its type matches the exception "
"named after the :keyword:`except` keyword, the *except clause* is executed, "
"and then execution continues after the try/except block."
msgstr ""
"si une exception intervient pendant l'exécution de la clause ``try``, le "
"reste de cette clause est sauté. Si le type d'exception levée correspond à "
@ -185,9 +186,10 @@ msgstr ""
# dernier élément de l'énumération
#: tutorial/errors.rst:109
#, fuzzy
msgid ""
"If an exception occurs which does not match the exception named in the "
"except clause, it is passed on to outer :keyword:`try` statements; if no "
"*except clause*, it is passed on to outer :keyword:`try` statements; if no "
"handler is found, it is an *unhandled exception* and execution stops with a "
"message as shown above."
msgstr ""
@ -198,12 +200,14 @@ msgstr ""
"comme indiqué ci-dessus."
#: tutorial/errors.rst:114
#, fuzzy
msgid ""
"A :keyword:`try` statement may have more than one except clause, to specify "
"handlers for different exceptions. At most one handler will be executed. "
"Handlers only handle exceptions that occur in the corresponding try clause, "
"not in other handlers of the same :keyword:`!try` statement. An except "
"clause may name multiple exceptions as a parenthesized tuple, for example::"
"A :keyword:`try` statement may have more than one *except clause*, to "
"specify handlers for different exceptions. At most one handler will be "
"executed. Handlers only handle exceptions that occur in the corresponding "
"*try clause*, not in other handlers of the same :keyword:`!try` statement. "
"An *except clause* may name multiple exceptions as a parenthesized tuple, "
"for example::"
msgstr ""
"Une instruction :keyword:`try` peut comporter plusieurs clauses ``except`` "
"pour permettre la prise en charge de différentes exceptions. Mais un seul "
@ -214,11 +218,12 @@ msgstr ""
"d'un *n*-uplet entre parenthèses, comme dans cet exemple ::"
#: tutorial/errors.rst:123
#, fuzzy
msgid ""
"A class in an :keyword:`except` clause is compatible with an exception if it "
"is the same class or a base class thereof (but not the other way around --- "
"an except clause listing a derived class is not compatible with a base "
"class). For example, the following code will print B, C, D in that order::"
"an *except clause* listing a derived class is not compatible with a base "
"class). For example, the following code will print B, C, D in that order::"
msgstr ""
"Une classe dans une clause :keyword:`except` est compatible avec une "
"exception si elle est de la même classe ou d'une de ses classes dérivées. "
@ -227,19 +232,22 @@ msgstr ""
"suivant affiche B, C et D dans cet ordre ::"
#: tutorial/errors.rst:147
#, fuzzy
msgid ""
"Note that if the except clauses were reversed (with ``except B`` first), it "
"would have printed B, B, B --- the first matching except clause is triggered."
"Note that if the *except clauses* were reversed (with ``except B`` first), "
"it would have printed B, B, B --- the first matching *except clause* is "
"triggered."
msgstr ""
"Notez que si les clauses ``except`` avaient été inversées (avec ``except B`` "
"en premier), il aurait affiché B, B, B — la première clause ``except`` qui "
"correspond est déclenchée."
#: tutorial/errors.rst:150
#, fuzzy
msgid ""
"The last except clause may omit the exception name(s), to serve as a "
"wildcard. Use this with extreme caution, since it is easy to mask a real "
"programming error in this way! It can also be used to print an error "
"All exceptions inherit from :exc:`BaseException`, and so it can be used to "
"serve as a wildcard. Use this with extreme caution, since it is easy to mask "
"a real programming error in this way! It can also be used to print an error "
"message and then re-raise the exception (allowing a caller to handle the "
"exception as well)::"
msgstr ""
@ -252,10 +260,17 @@ msgstr ""
#: tutorial/errors.rst:169
msgid ""
"Alternatively the last except clause may omit the exception name(s), however "
"the exception value must then be retrieved from ``sys.exc_info()[1]``."
msgstr ""
#: tutorial/errors.rst:172
#, fuzzy
msgid ""
"The :keyword:`try` ... :keyword:`except` statement has an optional *else "
"clause*, which, when present, must follow all except clauses. It is useful "
"for code that must be executed if the try clause does not raise an "
"exception. For example::"
"clause*, which, when present, must follow all *except clauses*. It is "
"useful for code that must be executed if the *try clause* does not raise an "
"exception. For example::"
msgstr ""
"L'instruction :keyword:`try` ... :keyword:`except` accepte également une "
"*clause else* optionnelle qui, lorsqu'elle est présente, doit se placer "
@ -263,7 +278,7 @@ msgstr ""
"être exécuté lorsqu'aucune exception n'a été levée par la clause ``try``. "
"Par exemple ::"
#: tutorial/errors.rst:183
#: tutorial/errors.rst:186
msgid ""
"The use of the :keyword:`!else` clause is better than adding additional code "
"to the :keyword:`try` clause because it avoids accidentally catching an "
@ -275,7 +290,7 @@ msgstr ""
"une exception qui n'a pas été levée par le code initialement protégé par "
"l'instruction :keyword:`!try` ... :keyword:`!except`."
#: tutorial/errors.rst:188
#: tutorial/errors.rst:191
msgid ""
"When an exception occurs, it may have an associated value, also known as the "
"exception's *argument*. The presence and type of the argument depend on the "
@ -285,9 +300,10 @@ msgstr ""
"appelle *l'argument* de l'exception. La présence de cet argument et son type "
"dépendent du type de l'exception."
#: tutorial/errors.rst:192
#: tutorial/errors.rst:195
#, fuzzy
msgid ""
"The except clause may specify a variable after the exception name. The "
"The *except clause* may specify a variable after the exception name. The "
"variable is bound to an exception instance with the arguments stored in "
"``instance.args``. For convenience, the exception instance defines :meth:"
"`__str__` so the arguments can be printed directly without having to "
@ -302,7 +318,7 @@ msgstr ""
"possible de construire une exception, y ajouter ses attributs, puis la lever "
"plus tard. ::"
#: tutorial/errors.rst:216
#: tutorial/errors.rst:219
msgid ""
"If an exception has arguments, they are printed as the last part ('detail') "
"of the message for unhandled exceptions."
@ -310,22 +326,23 @@ msgstr ""
"Si une exception a un argument, il est affiché dans la dernière partie du "
"message des exceptions non gérées."
#: tutorial/errors.rst:219
#: tutorial/errors.rst:222
#, fuzzy
msgid ""
"Exception handlers don't just handle exceptions if they occur immediately in "
"the try clause, but also if they occur inside functions that are called "
"(even indirectly) in the try clause. For example::"
"the *try clause*, but also if they occur inside functions that are called "
"(even indirectly) in the *try clause*. For example::"
msgstr ""
"Les gestionnaires d'exceptions n'interceptent pas que les exceptions qui "
"sont levées immédiatement dans leur clause ``try``, mais aussi celles qui "
"sont levées au sein de fonctions appelées (parfois indirectement) dans la "
"clause ``try``. Par exemple ::"
#: tutorial/errors.rst:237
#: tutorial/errors.rst:240
msgid "Raising Exceptions"
msgstr "Déclencher des exceptions"
#: tutorial/errors.rst:239
#: tutorial/errors.rst:242
msgid ""
"The :keyword:`raise` statement allows the programmer to force a specified "
"exception to occur. For example::"
@ -333,7 +350,7 @@ msgstr ""
"L'instruction :keyword:`raise` permet au programmeur de déclencher une "
"exception spécifique. Par exemple ::"
#: tutorial/errors.rst:247
#: tutorial/errors.rst:250
msgid ""
"The sole argument to :keyword:`raise` indicates the exception to be raised. "
"This must be either an exception instance or an exception class (a class "
@ -346,7 +363,7 @@ msgstr ""
"classe dérivée de :class:`Exception`). Si une classe est donnée, elle est "
"implicitement instanciée *via* l'appel de son constructeur, sans argument ::"
#: tutorial/errors.rst:254
#: tutorial/errors.rst:257
msgid ""
"If you need to determine whether an exception was raised but don't intend to "
"handle it, a simpler form of the :keyword:`raise` statement allows you to re-"
@ -356,11 +373,11 @@ msgstr ""
"n'avez pas intention de la gérer, une forme plus simple de l'instruction :"
"keyword:`raise` permet de propager l'exception ::"
#: tutorial/errors.rst:273
#: tutorial/errors.rst:276
msgid "Exception Chaining"
msgstr "Chaînage d'exceptions"
#: tutorial/errors.rst:275
#: tutorial/errors.rst:278
msgid ""
"The :keyword:`raise` statement allows an optional :keyword:`from<raise>` "
"which enables chaining exceptions. For example::"
@ -368,33 +385,34 @@ msgstr ""
"L'instruction :keyword:`raise` autorise un :keyword:`from<raise>` optionnel "
"qui permet de chaîner les exceptions. Par exemple ::"
#: tutorial/errors.rst:281
#: tutorial/errors.rst:284
msgid "This can be useful when you are transforming exceptions. For example::"
msgstr ""
"Cela peut être utile lorsque vous transformez des exceptions. Par exemple ::"
#: tutorial/errors.rst:302
#: tutorial/errors.rst:305
#, fuzzy
msgid ""
"Exception chaining happens automatically when an exception is raised inside "
"an :keyword:`except` or :keyword:`finally` section. Exception chaining can "
"be disabled by using ``from None`` idiom:"
"an :keyword:`except` or :keyword:`finally` section. This can be disabled by "
"using ``from None`` idiom:"
msgstr ""
"Le chaînage d'exceptions se produit automatiquement lorsqu'une exception est "
"levée dans une section :keyword:`except` ou :keyword:`finally`. Le chaînage "
"d'exceptions peut être désactivé en utilisant l'idiome ``from None`` :"
#: tutorial/errors.rst:315
#: tutorial/errors.rst:318
msgid ""
"For more information about chaining mechanics, see :ref:`bltin-exceptions`."
msgstr ""
"Pour plus d'informations sur les mécanismes de chaînage, voir :ref:`bltin-"
"exceptions`."
#: tutorial/errors.rst:321
#: tutorial/errors.rst:324
msgid "User-defined Exceptions"
msgstr "Exceptions définies par l'utilisateur"
#: tutorial/errors.rst:323
#: tutorial/errors.rst:326
msgid ""
"Programs may name their own exceptions by creating a new exception class "
"(see :ref:`tut-classes` for more about Python classes). Exceptions should "
@ -406,7 +424,7 @@ msgstr ""
"les classes de Python). Les exceptions sont typiquement dérivées de la "
"classe :exc:`Exception`, directement ou non."
#: tutorial/errors.rst:327
#: tutorial/errors.rst:330
msgid ""
"Exception classes can be defined which do anything any other class can do, "
"but are usually kept simple, often only offering a number of attributes that "
@ -425,7 +443,7 @@ msgstr ""
"exceptions définies dans ce module et de créer des sous-classes spécifiques "
"d'exceptions pour les différentes conditions d'erreurs ::"
#: tutorial/errors.rst:365
#: tutorial/errors.rst:368
msgid ""
"Most exceptions are defined with names that end in \"Error\", similar to the "
"naming of the standard exceptions."
@ -433,7 +451,7 @@ msgstr ""
"La plupart des exceptions sont définies avec des noms qui se terminent par "
"\"Error\", comme les exceptions standards."
#: tutorial/errors.rst:368
#: tutorial/errors.rst:371
msgid ""
"Many standard modules define their own exceptions to report errors that may "
"occur in functions they define. More information on classes is presented in "
@ -444,11 +462,11 @@ msgstr ""
"d'informations sur les classes sont présentées dans le chapitre :ref:`tut-"
"classes`."
#: tutorial/errors.rst:376
#: tutorial/errors.rst:379
msgid "Defining Clean-up Actions"
msgstr "Définition d'actions de nettoyage"
#: tutorial/errors.rst:378
#: tutorial/errors.rst:381
msgid ""
"The :keyword:`try` statement has another optional clause which is intended "
"to define clean-up actions that must be executed under all circumstances. "
@ -458,7 +476,7 @@ msgstr ""
"à définir des actions de nettoyage devant être exécutées dans certaines "
"circonstances. Par exemple ::"
#: tutorial/errors.rst:392
#: tutorial/errors.rst:395
msgid ""
"If a :keyword:`finally` clause is present, the :keyword:`!finally` clause "
"will execute as the last task before the :keyword:`try` statement completes. "
@ -472,7 +490,7 @@ msgstr ""
"exception ou non. Les prochains points parlent de cas plus complexes "
"lorsqu'une exception apparait :"
#: tutorial/errors.rst:398
#: tutorial/errors.rst:401
msgid ""
"If an exception occurs during execution of the :keyword:`!try` clause, the "
"exception may be handled by an :keyword:`except` clause. If the exception is "
@ -484,7 +502,7 @@ msgstr ""
"n'est pas récupérée par une clause :keyword:`!except`, l'exception est levée "
"à nouveau après que la clause :keyword:`!finally` a été exécutée."
#: tutorial/errors.rst:404
#: tutorial/errors.rst:407
msgid ""
"An exception could occur during execution of an :keyword:`!except` or :"
"keyword:`!else` clause. Again, the exception is re-raised after the :keyword:"
@ -494,7 +512,7 @@ msgstr ""
"except` ou :keyword:`!else`. Encore une fois, l'exception est reprise après "
"que la clause :keyword:`!finally` a été exécutée."
#: tutorial/errors.rst:408
#: tutorial/errors.rst:411
msgid ""
"If the :keyword:`!finally` clause executes a :keyword:`break`, :keyword:"
"`continue` or :keyword:`return` statement, exceptions are not re-raised."
@ -503,7 +521,7 @@ msgstr ""
"instruction :keyword:`break`, :keyword:`continue` ou :keyword:`return`, "
"alors les exceptions ne sont pas reprises."
#: tutorial/errors.rst:412
#: tutorial/errors.rst:415
msgid ""
"If the :keyword:`!try` statement reaches a :keyword:`break`, :keyword:"
"`continue` or :keyword:`return` statement, the :keyword:`!finally` clause "
@ -515,7 +533,7 @@ msgstr ""
"keyword:`!finally` s'exécute juste avant l'exécution de :keyword:`!break`, :"
"keyword:`!continue` ou :keyword:`!return`."
#: tutorial/errors.rst:418
#: tutorial/errors.rst:421
msgid ""
"If a :keyword:`!finally` clause includes a :keyword:`!return` statement, the "
"returned value will be the one from the :keyword:`!finally` clause's :"
@ -527,15 +545,15 @@ msgstr ""
"keyword:`!finally`, et non la valeur du :keyword:`!return` de la clause :"
"keyword:`!try`."
#: tutorial/errors.rst:424
#: tutorial/errors.rst:427
msgid "For example::"
msgstr "Par exemple ::"
#: tutorial/errors.rst:435
#: tutorial/errors.rst:438
msgid "A more complicated example::"
msgstr "Un exemple plus compliqué ::"
#: tutorial/errors.rst:460
#: tutorial/errors.rst:463
msgid ""
"As you can see, the :keyword:`finally` clause is executed in any event. "
"The :exc:`TypeError` raised by dividing two strings is not handled by the :"
@ -548,7 +566,7 @@ msgstr ""
"`except` et est donc propagée après que la clause :keyword:`!finally` a été "
"exécutée."
#: tutorial/errors.rst:465
#: tutorial/errors.rst:468
msgid ""
"In real world applications, the :keyword:`finally` clause is useful for "
"releasing external resources (such as files or network connections), "
@ -558,11 +576,11 @@ msgstr ""
"utile pour libérer des ressources externes (telles que des fichiers ou des "
"connexions réseau), quelle qu'ait été l'utilisation de ces ressources."
#: tutorial/errors.rst:473
#: tutorial/errors.rst:476
msgid "Predefined Clean-up Actions"
msgstr "Actions de nettoyage prédéfinies"
#: tutorial/errors.rst:475
#: tutorial/errors.rst:478
msgid ""
"Some objects define standard clean-up actions to be undertaken when the "
"object is no longer needed, regardless of whether or not the operation using "
@ -574,7 +592,7 @@ msgstr ""
"que l'opération ayant utilisé l'objet ait réussi ou non. Regardez l'exemple "
"suivant, qui tente d'ouvrir un fichier et d'afficher son contenu à l'écran ::"
#: tutorial/errors.rst:483
#: tutorial/errors.rst:486
msgid ""
"The problem with this code is that it leaves the file open for an "
"indeterminate amount of time after this part of the code has finished "
@ -590,7 +608,7 @@ msgstr ""
"objets comme des fichiers d'une façon qui assure qu'ils seront toujours "
"nettoyés rapidement et correctement. ::"
#: tutorial/errors.rst:493
#: tutorial/errors.rst:496
msgid ""
"After the statement is executed, the file *f* is always closed, even if a "
"problem was encountered while processing the lines. Objects which, like "

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-01 16:00+0200\n"
"POT-Creation-Date: 2021-09-23 16:16+0200\n"
"PO-Revision-Date: 2020-05-21 16:45+0200\n"
"Last-Translator: Mathieu Dupuy <deronnax@gmail.com>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -299,9 +299,10 @@ msgstr ""
"représenté exactement)."
#: tutorial/floatingpoint.rst:160
#, fuzzy
msgid ""
"If you are a heavy user of floating point operations you should take a look "
"at the Numerical Python package and many other packages for mathematical and "
"at the NumPy package and many other packages for mathematical and "
"statistical operations supplied by the SciPy project. See <https://scipy."
"org>."
msgstr ""

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-24 09:01+0200\n"
"POT-Creation-Date: 2021-09-23 16:16+0200\n"
"PO-Revision-Date: 2018-01-27 23:09+0100\n"
"Last-Translator: \n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -36,10 +36,11 @@ msgstr ""
"plateformes."
#: tutorial/index.rst:13
#, fuzzy
msgid ""
"The Python interpreter and the extensive standard library are freely "
"available in source or binary form for all major platforms from the Python "
"Web site, https://www.python.org/, and may be freely distributed. The same "
"web site, https://www.python.org/, and may be freely distributed. The same "
"site also contains distributions of and pointers to many free third party "
"Python modules, programs and tools, and additional documentation."
msgstr ""

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-24 09:01+0200\n"
"POT-Creation-Date: 2021-09-23 16:16+0200\n"
"PO-Revision-Date: 2020-08-27 11:32+0200\n"
"Last-Translator: Jules Lasne <jules.lasne@gmail.com>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -24,9 +24,10 @@ msgid "Invoking the Interpreter"
msgstr "Lancement de l'interpréteur"
#: tutorial/interpreter.rst:13
#, fuzzy
msgid ""
"The Python interpreter is usually installed as :file:`/usr/local/bin/"
"python3.9` on those machines where it is available; putting :file:`/usr/"
"python3.10` on those machines where it is available; putting :file:`/usr/"
"local/bin` in your Unix shell's search path makes it possible to start it by "
"typing the command:"
msgstr ""
@ -48,9 +49,10 @@ msgstr ""
"file:`/usr/local/python` est un endroit courant)."
#: tutorial/interpreter.rst:26
#, fuzzy
msgid ""
"On Windows machines where you have installed Python from the :ref:`Microsoft "
"Store <windows-store>`, the :file:`python3.9` command will be available. If "
"Store <windows-store>`, the :file:`python3.10` command will be available. If "
"you have the :ref:`py.exe launcher <launcher>` installed, you can use the :"
"file:`py` command. See :ref:`setting-envvars` for other ways to launch "
"Python."

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-24 09:01+0200\n"
"POT-Creation-Date: 2021-09-23 16:16+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"
@ -326,14 +326,6 @@ msgstr ""
#: tutorial/introduction.rst:272
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``::"
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:280
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. ::"
msgstr ""
@ -341,6 +333,14 @@ 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
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``::"
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
msgid ""
"One way to remember how slices work is to think of the indices as pointing "

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-24 09:01+0200\n"
"POT-Creation-Date: 2021-09-23 16:16+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"
@ -770,11 +770,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:537
#: tutorial/modules.rst:539
msgid "Intra-package References"
msgstr "Références internes dans un paquet"
#: tutorial/modules.rst:539
#: tutorial/modules.rst:541
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 +788,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:545
#: tutorial/modules.rst:547
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 +800,7 @@ msgstr ""
"points pour indiquer leur origine (paquet courant ou parent). Depuis le "
"module :mod:`surround`, par exemple vous pouvez écrire ::"
#: tutorial/modules.rst:554
#: tutorial/modules.rst:556
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 +812,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:560
#: tutorial/modules.rst:562
msgid "Packages in Multiple Directories"
msgstr "Paquets dans plusieurs dossiers"
#: tutorial/modules.rst:562
#: tutorial/modules.rst:564
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 +830,7 @@ msgstr ""
"peut être modifiée, altérant ainsi les futures recherches de modules et sous-"
"paquets contenus dans le paquet."
#: tutorial/modules.rst:568
#: tutorial/modules.rst:570
msgid ""
"While this feature is not often needed, it can be used to extend the set of "
"modules found in a package."
@ -838,11 +838,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:573
#: tutorial/modules.rst:575
msgid "Footnotes"
msgstr "Notes"
#: tutorial/modules.rst:574
#: tutorial/modules.rst:576
msgid ""
"In fact function definitions are also 'statements' that are 'executed'; the "
"execution of a module-level function definition enters the function name in "

View file

@ -8,7 +8,7 @@ msgstr ""
"POT-Creation-Date: 2020-08-24 09:01+0200\n"
"PO-Revision-Date: 2019-12-13 12:14+0100\n"
"Last-Translator: Loc Cosnier <loc.cosnier@pm.me>\n"
"Language-Team: \n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-19 22:36+0200\n"
"POT-Creation-Date: 2021-09-23 16:16+0200\n"
"PO-Revision-Date: 2019-12-12 15:21+0100\n"
"Last-Translator: Vincent Poulailleau <vpoulailleau@gmail.com>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -107,10 +107,11 @@ msgstr ""
"dossier ::"
#: tutorial/venv.rst:49
#, fuzzy
msgid ""
"This will create the ``tutorial-env`` directory if it doesn't exist, and "
"also create directories inside it containing a copy of the Python "
"interpreter, the standard library, and various supporting files."
"interpreter and various supporting files."
msgstr ""
"Cela crée le dossier ``tutorial-env`` (s'il n'existe pas) et des sous-"
"dossiers contenant une copie de l'interpréteur Python, de la bibliothèque "

View file

@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-24 09:01+0200\n"
"POT-Creation-Date: 2021-09-23 16:16+0200\n"
"PO-Revision-Date: 2019-05-23 23:43+0200\n"
"Last-Translator: Jules Lasne <jules.lasne@gmail.com>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
@ -84,10 +84,11 @@ msgid "More Python resources:"
msgstr "D'autres ressources :"
#: tutorial/whatnow.rst:33
#, fuzzy
msgid ""
"https://www.python.org: The major Python Web site. It contains code, "
"documentation, and pointers to Python-related pages around the Web. This "
"Web site is mirrored in various places around the world, such as Europe, "
"https://www.python.org: The major Python web site. It contains code, "
"documentation, and pointers to Python-related pages around the web. This "
"web site is mirrored in various places around the world, such as Europe, "
"Japan, and Australia; a mirror may be faster than the main site, depending "
"on your geographical location."
msgstr ""