@@ -6,14 +6,14 @@ msgstr ""
6
6
"Project-Id-Version : Python 3\n "
7
7
"Report-Msgid-Bugs-To : \n "
8
8
"POT-Creation-Date : 2022-05-21 16:37+0200\n "
9
- "PO-Revision-Date : 2020-12-23 19:23+0100 \n "
9
+ "PO-Revision-Date : 2022-05-24 18:30+0200 \n "
10
10
"Last-Translator : Jules Lasne <jules.lasne@gmail.com>\n "
11
11
"Language-Team : FRENCH <traductions@lists.afpy.org>\n "
12
12
"Language : fr\n "
13
13
"MIME-Version : 1.0\n "
14
14
"Content-Type : text/plain; charset=UTF-8\n "
15
15
"Content-Transfer-Encoding : 8bit\n "
16
- "X-Generator : Poedit 2.2.3 \n "
16
+ "X-Generator : Poedit 3.0.1 \n "
17
17
18
18
#: tutorial/inputoutput.rst:5
19
19
msgid "Input and Output"
@@ -348,14 +348,14 @@ msgid "Reading and Writing Files"
348
348
msgstr "Lecture et écriture de fichiers"
349
349
350
350
#: tutorial/inputoutput.rst:281
351
- #, fuzzy
352
351
msgid ""
353
352
":func:`open` returns a :term:`file object`, and is most commonly used with "
354
353
"two positional arguments and one keyword argument: ``open(filename, mode, "
355
354
"encoding=None)``"
356
355
msgstr ""
357
356
"La fonction :func:`open` renvoie un :term:`objet fichier` et est le plus "
358
- "souvent utilisée avec deux arguments : ``open(nomfichier, mode)``."
357
+ "souvent utilisée avec deux arguments positionels et un argument nommé : "
358
+ "``open(filename, mode, encoding=None)``"
359
359
360
360
#: tutorial/inputoutput.rst:294
361
361
msgid ""
@@ -378,7 +378,6 @@ msgstr ""
378
378
"L'argument *mode* est optionnel, sa valeur par défaut est ``'r'``."
379
379
380
380
#: tutorial/inputoutput.rst:303
381
- #, fuzzy
382
381
msgid ""
383
382
"Normally, files are opened in :dfn:`text mode`, that means, you read and "
384
383
"write strings from and to the file, which are encoded in a specific "
@@ -391,12 +390,14 @@ msgid ""
391
390
msgstr ""
392
391
"Normalement, les fichiers sont ouverts en :dfn:`mode texte`, c'est-à-dire "
393
392
"que vous lisez et écrivez des chaînes de caractères depuis et dans ce "
394
- "fichier, suivant un encodage donné. Si aucun encodage n'est spécifié, "
395
- "l'encodage par défaut dépend de la plateforme (voir :func:`open`). ``'b'`` "
396
- "collé à la fin du mode indique que le fichier doit être ouvert en :dfn:`mode "
397
- "binaire` c'est-à-dire que les données sont lues et écrites sous formes "
398
- "d'octets (type *bytes*). Ce mode est à utiliser pour les fichiers contenant "
399
- "autre chose que du texte."
393
+ "fichier, suivant un encodage donné via *encoding*. Si *encoding* n'est pas "
394
+ "spécifié, l'encodage par défaut dépend de la plateforme (voir :func:`open`). "
395
+ "UTF-8 étant le standard moderne de facto, ``encoding=\" utf-8\" `` est "
396
+ "recommandé à moins que vous ne sachiez que vous devez utiliser un autre "
397
+ "encodage. L’ajout d’un ``'b'`` au mode ouvre le fichier en :dfn:`binary "
398
+ "mode`. Les données en mode binaire sont lues et écrites sous forme d’objets :"
399
+ "class:`bytes`. Vous ne pouvez pas spécifier *encoding* lorsque vous ouvrez "
400
+ "un fichier en mode binaire."
400
401
401
402
#: tutorial/inputoutput.rst:313
402
403
msgid ""
@@ -423,14 +424,14 @@ msgid ""
423
424
"It is good practice to use the :keyword:`with` keyword when dealing with "
424
425
"file objects. The advantage is that the file is properly closed after its "
425
426
"suite finishes, even if an exception is raised at some point. Using :"
426
- "keyword:`!with` is also much shorter than writing equivalent :keyword:"
427
- "`try` \\ -\\ :keyword:`finally` blocks::"
427
+ "keyword:`!with` is also much shorter than writing equivalent :keyword:`try` "
428
+ "\\ -\\ :keyword:`finally` blocks::"
428
429
msgstr ""
429
430
"C'est une bonne pratique d'utiliser le mot-clé :keyword:`with` lorsque vous "
430
431
"traitez des fichiers. Vous fermez ainsi toujours correctement le fichier, "
431
432
"même si une exception est levée. Utiliser :keyword:`!with` est aussi "
432
- "beaucoup plus court que d'utiliser l'équivalent avec des blocs :keyword:"
433
- "`try` \\ …\\ :keyword:`finally` ::"
433
+ "beaucoup plus court que d'utiliser l'équivalent avec des blocs :keyword:`try` "
434
+ "\\ …\\ :keyword:`finally` ::"
434
435
435
436
#: tutorial/inputoutput.rst:334
436
437
msgid ""
@@ -498,8 +499,8 @@ msgstr ""
498
499
499
500
#: tutorial/inputoutput.rst:380
500
501
msgid ""
501
- "``f.readline()`` reads a single line from the file; a newline character "
502
- "(`` \\ n``) is left at the end of the string, and is only omitted on the last "
502
+ "``f.readline()`` reads a single line from the file; a newline character (`` "
503
+ "\\ n``) is left at the end of the string, and is only omitted on the last "
503
504
"line of the file if the file doesn't end in a newline. This makes the "
504
505
"return value unambiguous; if ``f.readline()`` returns an empty string, the "
505
506
"end of the file has been reached, while a blank line is represented by "
@@ -669,24 +670,25 @@ msgid ""
669
670
"a :term:`text file` object opened for writing, we can do this::"
670
671
msgstr ""
671
672
"Une variante de la fonction :func:`~json.dumps`, nommée :func:`~json.dump`, "
672
- "sérialise simplement l'objet donné vers un :term:`fichier texte <text "
673
- "file>`. Donc si ``f`` est un :term:`fichier texte <text file>` ouvert en "
674
- "écriture, il est possible de faire ::"
673
+ "sérialise simplement l'objet donné vers un :term:`text file`. Donc si ``f`` "
674
+ "est un :term:`text file` ouvert en écriture, il est possible de faire ::"
675
675
676
676
#: tutorial/inputoutput.rst:497
677
- #, fuzzy
678
677
msgid ""
679
678
"To decode the object again, if ``f`` is a :term:`binary file` or :term:`text "
680
679
"file` object which has been opened for reading::"
681
680
msgstr ""
682
- "Pour reconstruire l'objet, si ``f`` est cette fois un :term:`fichier texte` "
683
- "ouvert en lecture ::"
681
+ "Pour reconstruire l'objet, si ``f`` est cette fois un :term:`binary file` ou "
682
+ "un :term:`text file` ouvert en lecture ::"
684
683
685
684
#: tutorial/inputoutput.rst:503
686
685
msgid ""
687
686
"JSON files must be encoded in UTF-8. Use ``encoding=\" utf-8\" `` when opening "
688
687
"JSON file as a :term:`text file` for both of reading and writing."
689
688
msgstr ""
689
+ "Les fichiers JSON doivent être encodés en UTF-8. Utilisez ``encoding="
690
+ "\" utf-8\" `` lorsque vous ouvrez un fichier JSON en tant que :term:`fichier "
691
+ "texte<text file>`, que ce soit en lecture ou en écriture."
690
692
691
693
#: tutorial/inputoutput.rst:506
692
694
msgid ""
0 commit comments