diff --git a/.potodoignore b/.potodoignore index f7275bbbd0..734b522417 100644 --- a/.potodoignore +++ b/.potodoignore @@ -1 +1,2 @@ venv/ +locales/ diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 18d8138380..1cf595a078 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,5 +1,5 @@ -Guide de contribution à la documention via GitHub -================================================= +Guide de contribution à la documentation via GitHub +=================================================== Instructions ------------ @@ -96,7 +96,9 @@ dans les tickets et les *pull requests*. `discuss de l'AFPy `_ dans la section Traduction en indiquant sur quoi vous travaillez et l'URL de votre dépôt. -* Soit sur IRC en venant sur le canal `#python-docs-fr `_ pour nous le signaler. +* Soit sur IRC en venant sur le canal + `irc://irc.libera.chat/#python-docs-fr `_ + pour nous le signaler. Vous êtes maintenant prêt. Chaque fois que vous commencerez un nouveau fichier, suivez cette procédure : @@ -233,6 +235,21 @@ Mettez dans le commentaire de la *pull request* le texte suivant : « Closes #XXXX » où XXXX est le numéro du ticket GitHub créé pour réserver le fichier traduit. Cela permet à Github de lier la *pull request* au ticket de réservation. +Il peut arriver que vous ayez besoin de reprendre votre PR sur votre +ordinateur après avoir fait des modifications en ligne sur GitHub, +par exemple lorsque GitHub vous offre la possibilité de faire un commit +automatique contenant les suggestions proposées pendant la revue. +Cela fonctionne bien, mais le résultat n'est pas toujours accepté par +``powrap``. Si cela arrive, vous pouvez récupérer le commit fait par +GitHub puis relancer ``powrap`` : + +.. code-block:: bash + + git pull + powrap + git add + git commit -m "Formatage après commit automatique" + git push Sur une autre forge +++++++++++++++++++ @@ -500,6 +517,7 @@ mutable muable namespace espace de nommage (sauf pour le XML où c'est espace de noms) parameter paramètre +parse, parser analyser, analyseur syntaxique pickle (v.) sérialiser prompt invite raise lever @@ -531,11 +549,11 @@ whitespace caractère d'espacement Ressources de traduction ------------------------ -- les canaux IRC sur freenode : +- les canaux IRC sur irc.libera.chat : - - `#python-docs-fr `_ — communauté python autour de la documentation française, - - `#python-fr `_ — communauté python francophone, - - `#python-doc `_ — communauté python autour de la documentation anglophone ; + - `#python-docs-fr `_ — communauté python autour de la documentation française, + - `#python-fr `_ — communauté python francophone, + - `#python-doc `_ — communauté python autour de la documentation anglophone ; - les listes de diffusion relatives à la documentation (courriel) : - `de l'AFPy `_, @@ -714,7 +732,7 @@ Potodo | Permet de d'identifier les parties de la documention qu'il reste à traduire. | Installez-le à l'aide de *pip* (``pip install potodo``) dans un environnement ``python3.6`` ou plus. -| `Lien vers le dépôt `__ +| `Lien vers le dépôt `__ Pogrep ~~~~~~ @@ -723,7 +741,7 @@ Pogrep sur comment traduire un terme ou chercher la traduction d'un terme dans d'autres fichiers. | Installez-le à l'aide de *pip* (``pip install pogrep``). -| `Lien vers le dépôt `__ +| `Lien vers le dépôt `__ Padpo (beta) ~~~~~~~~~~~~ @@ -732,14 +750,14 @@ Padpo (beta) du fichier .po. | Installez-le à l'aide de *pip* (``pip install padpo``) dans un environnement ``python3.7`` ou plus. -| `Lien vers le dépôt `__ +| `Lien vers le dépôt `__ Powrap ~~~~~~ | Formateur de fichier .po. | Installez-le à l'aide de *pip* (``pip install powrap``). -| `Lien vers le dépôt `__ +| `Lien vers le dépôt `__ Affichage des modifications par Git @@ -772,4 +790,3 @@ ce qui suit après vous être assuré que ``~/.local/bin/`` se trouve dans votre Pas d'inquiétude, cela ne change la façon dont Git affiche les changements que sur les fichiers de la traduction, sans incidence sur les autres. - diff --git a/Makefile b/Makefile index e3202f58e0..f598de64c8 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,12 @@ # Here is what you can do: # # - make # Automatically build an HTML local version -# - make todo # To list remaining tasks +# - make todo # To list remaining tasks and show current progression # - make verifs # To check for correctness: wrapping, spelling -# - make wrap # To check for wrapping +# - make wrap # To rewrap modified files # - make spell # To check for spelling -# - make merge # To merge pot from upstream +# - make clean # To remove build artifacts # - make fuzzy # To find fuzzy strings -# - make progress # To compute current progression # # Modes are: autobuild-stable, autobuild-dev, and autobuild-html, # documented in gen/src/3.6/Doc/Makefile as we're only delegating the @@ -21,14 +20,42 @@ # from which we generated our po files. We use it here so when we # test build, we're building with the .rst files that generated our # .po files. -CPYTHON_CURRENT_COMMIT := eec8e61992fb654d4cf58de4d727c18622b8303e - -CPYTHON_PATH := ../cpython/ - +CPYTHON_CURRENT_COMMIT := cb0b009cfb4ae2a87a8737250c526b8f95d0551f LANGUAGE := fr BRANCH := 3.9 -EXCLUDED := whatsnew/ c-api/ +EXCLUDED := \ + whatsnew/2.?.po \ + whatsnew/3.[0-8].po \ + c-api/ \ + distutils/ \ + install/ \ + library/2to3.po \ + library/distutils.po \ + library/imp.po \ + library/tkinter.tix.po \ + library/test.po \ + library/aifc.po \ + library/asynchat.po \ + library/asyncore.po \ + library/audioop.po \ + library/cgi.po \ + library/cgitb.po \ + library/chunk.po \ + library/crypt.po \ + library/imghdr.po \ + library/msilib.po \ + library/nntplib.po \ + library/nis.po \ + library/ossaudiodev.po \ + library/pipes.po \ + library/smtpd.po \ + library/sndhdr.po \ + library/spwd.po \ + library/sunau.po \ + library/telnetlib.po \ + library/uu.po \ + library/xdrlib.po # Internal variables @@ -38,6 +65,7 @@ PYTHON := $(shell which python3) MODE := html POSPELL_TMP_DIR := .pospell/ JOBS := auto +SPHINXERRORHANDLING = -W # Detect OS @@ -58,70 +86,50 @@ endif .PHONY: all all: ensure_prerequisites - git -C $(CPYTHON_PATH) checkout $(CPYTHON_CURRENT_COMMIT) + git -C venv/cpython checkout $(CPYTHON_CURRENT_COMMIT) || (git -C venv/cpython fetch && git -C venv/cpython checkout $(CPYTHON_CURRENT_COMMIT)) mkdir -p locales/$(LANGUAGE)/LC_MESSAGES/ $(CP_CMD) -u --parents *.po */*.po locales/$(LANGUAGE)/LC_MESSAGES/ - $(MAKE) -C $(CPYTHON_PATH)/Doc/ \ - SPHINXOPTS='-qW -j$(JOBS) \ - -D locale_dirs=$(abspath locales) \ + $(MAKE) -C venv/cpython/Doc/ \ + JOBS='$(JOBS)' \ + SPHINXOPTS='-D locale_dirs=$(abspath locales) \ -D language=$(LANGUAGE) \ - -D gettext_compact=0 \ + -D gettext_compact=0 \ -D latex_engine=xelatex \ -D latex_elements.inputenc= \ -D latex_elements.fontenc=' \ + SPHINXERRORHANDLING=$(SPHINXERRORHANDLING) \ $(MODE) - git -C $(CPYTHON_PATH) checkout - - @echo "Build success, open file://$(abspath $(CPYTHON_PATH))/Doc/build/html/index.html or run 'make serve' to see them." + @echo "Build success, open file://$(abspath venv/cpython/)/Doc/build/html/index.html or run 'make htmlview' to see them." + + +# We clone cpython/ inside venv/ because venv/ is the only directory +# excluded by cpython' Sphinx configuration. +venv/cpython/.git/HEAD: + git clone https://github.com/python/cpython venv/cpython .PHONY: ensure_prerequisites -ensure_prerequisites: - @if [ -z $(CPYTHON_PATH) ]; then \ - echo "Your CPYTHON_PATH is empty, please provide one."; \ - exit 1; \ - fi - @if ! [ -d $(CPYTHON_PATH) ]; then \ - echo "Building the translation requires a cpython clone."; \ - echo "Please provide the path to a clone using the CPYTHON_PATH variable."; \ - echo "(Currently CPYTHON_PATH is $(CPYTHON_PATH)."; \ - echo "So you may want to run:"; \ - echo ""; \ - echo " git clone $(UPSTREAM) $(CPYTHON_PATH)"; \ - exit 1; \ - fi - @if [ -n "$$(git -C $(CPYTHON_PATH) status --porcelain)" ]; then \ - echo "Your cpython clone at $(CPYTHON_PATH) is not clean."; \ - echo "In order to avoid breaking things, please clean it first."; \ - exit 1; \ - fi +ensure_prerequisites: venv/cpython/.git/HEAD @if ! (blurb help >/dev/null 2>&1 && sphinx-build --version >/dev/null 2>&1); then \ - git -C $(CPYTHON_PATH) checkout $(BRANCH); \ - echo "You're missing dependencies, please enable a venv and install:"; \ + git -C venv/cpython/ checkout $(BRANCH); \ + echo "You're missing dependencies please install:"; \ echo ""; \ - echo " python -m pip install -r requirements.txt -r $(CPYTHON_PATH)/Doc/requirements.txt"; \ + echo " python -m pip install -r requirements.txt -r venv/cpython/Doc/requirements.txt"; \ exit 1; \ fi -.PHONY: serve -serve: - $(MAKE) -C $(CPYTHON_PATH)/Doc/ serve - - -.PHONY: progress -progress: - @$(PYTHON) -c 'import sys; print("{:.1%}".format(int(sys.argv[1]) / int(sys.argv[2])))' \ - $(shell msgcat *.po */*.po | msgattrib --translated | grep -c '^msgid') \ - $(shell msgcat *.po */*.po | grep -c '^msgid') - +.PHONY: htmlview +htmlview: MODE=htmlview +htmlview: all .PHONY: todo todo: ensure_prerequisites - potodo --exclude venv .venv $(EXCLUDED) + potodo --api-url 'https://git.afpy.org/api/v1/repos/AFPy/python-docs-fr/issues?state=open&type=issues' --exclude venv .venv $(EXCLUDED) .PHONY: wrap wrap: ensure_prerequisites - @echo "Verify wrapping" - powrap --check --quiet *.po **/*.po + @echo "Re wrapping modified files" + powrap -m SRCS = $(shell git diff --name-only $(BRANCH) | grep '.po$$') # foo/bar.po => $(POSPELL_TMP_DIR)/foo/bar.po.out @@ -130,44 +138,51 @@ DESTS = $(addprefix $(POSPELL_TMP_DIR)/,$(addsuffix .out,$(SRCS))) .PHONY: spell spell: ensure_prerequisites $(DESTS) +.PHONY: line-length +line-length: + @echo "Searching for long lines..." + @awk '{if (length(gensub(/శ్రీనివాస్/, ".", "g", $$0)) > 80 && length(gensub(/[^ ]/, "", "g")) > 1) {print FILENAME ":" FNR, "line too long:", $$0; ERRORS+=1}} END {if (ERRORS>0) {exit 1}}' *.po */*.po + +.PHONY: sphinx-lint +sphinx-lint: + @echo "Checking all files using sphinx-lint..." + @sphinx-lint --enable all --disable line-too-long *.po */*.po + $(POSPELL_TMP_DIR)/%.po.out: %.po dict @echo "Pospell checking $<..." - mkdir -p $(@D) + @mkdir -p $(@D) pospell -p dict -l fr_FR $< && touch $@ .PHONY: fuzzy fuzzy: ensure_prerequisites - potodo -f --exclude venv .venv $(EXCLUDED) + potodo --only-fuzzy --api-url 'https://git.afpy.org/api/v1/repos/AFPy/python-docs-fr/issues?state=open&type=issues' --exclude venv .venv $(EXCLUDED) + +.PHONY: check-headers +check-headers: + @grep -L '^# Copyright (C) [0-9-]*, Python Software Foundation' *.po */*.po | while read -r file;\ + do \ + echo "Please update the po comment in $$file"; \ + done + @grep -L '^"Project-Id-Version: Python 3\\n"$$' *.po */*.po | while read -r file;\ + do \ + echo "Please update the 'Project-Id-Version' header in $$file"; \ + done + @grep -L '^"Language: fr\\n"$$' *.po */*.po | while read -r file;\ + do \ + echo "Please update the 'Language' header in $$file"; \ + done + @grep -L '^"Language-Team: FRENCH \\n"' *.po */*.po | while read -r file;\ + do \ + echo "Please update the 'Language-Team' header in $$file"; \ + done .PHONY: verifs -verifs: wrap spell - -.PHONY: merge -merge: ensure_prerequisites - @echo "Merge from $(UPSTREAM)" - git -C $(CPYTHON_PATH) checkout $(BRANCH) - git -C $(CPYTHON_PATH) pull --ff-only - (cd $(CPYTHON_PATH)/Doc; sphinx-build -Q -b gettext -D gettext_compact=0 . ../pot) - find $(CPYTHON_PATH)/pot/ -name '*.pot' |\ - while read -r POT; \ - do \ - PO="./$$(echo "$$POT" | sed "s#$(CPYTHON_PATH)/pot/##; s#\.pot\$$#.po#")"; \ - mkdir -p "$$(dirname "$$PO")"; \ - if [ -f "$$PO" ]; \ - then \ - msgmerge --backup=off --force-po -U "$$PO" "$$POT"; \ - else \ - msgcat -o "$$PO" "$$POT"; \ - fi \ - done - rm -fr $(CPYTHON_PATH)/pot/ - sed -i 's|^#: .*Doc/|#: |' *.po */*.po - powrap -m - @printf "\n%s %s\n" "Replace CPYTHON_CURRENT_COMMIT in Makefile by: " $(shell git -C $(CPYTHON_PATH) rev-parse HEAD) - @printf 'To add, you can use:\n git status -s | grep "^ M .*\.po" | cut -d" " -f3 | while read -r file; do if [ $$(git diff "$$file" | wc -l) -gt 13 ]; then git add "$$file"; fi ; done\n' +verifs: spell line-length sphinx-lint check-headers .PHONY: clean clean: @echo "Cleaning *.mo and $(POSPELL_TMP_DIR)" - rm -fr $(POSPELL_TMP_DIR) + rm -fr $(POSPELL_TMP_DIR) locales/$(LANGUAGE)/LC_MESSAGES/ find -name '*.mo' -delete + @echo "Cleaning build directory" + $(MAKE) -C venv/cpython/Doc/ clean diff --git a/README.rst b/README.rst index 8ed47a5e8d..fe4ba11903 100644 --- a/README.rst +++ b/README.rst @@ -37,9 +37,11 @@ pour apprendre les conventions à respecter. Le `coordinateur ` de cette traduction est `Julien Palard (mdk) `_. -Vous pouvez obtenir de l'aide sur le canal ``#python-fr`` sur `freenode -`_ (ne nécessite pas d'inscription) ou poser vos questions sur la -`liste de diffusion `_ des traductions de l'AFPy. +Vous pouvez obtenir de l'aide sur le canal +`irc://irc.libera.chat/#python-fr `_ +(ne nécessite pas d'inscription) ou poser vos questions sur la +`liste de diffusion `_ +des traductions de l'AFPy. Accord de contribution à la documentation diff --git a/TRANSLATORS b/TRANSLATORS index cf632af70e..6df8140bf5 100644 --- a/TRANSLATORS +++ b/TRANSLATORS @@ -18,3 +18,6 @@ Sascha Salles Valériane Venance Loc Cosnier Yannick Gingras +Martin Chlumsky +Stephan Michaud +Edith Viau diff --git a/about.po b/about.po index abd282341b..a6be5aed00 100644 --- a/about.po +++ b/about.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-07-23 17:55+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -61,17 +61,17 @@ msgstr "" #: about.rst:26 msgid "" -"Fredrik Lundh for his `Alternative Python Reference `_ project from which Sphinx got many good ideas." +"Fredrik Lundh for his Alternative Python Reference project from which Sphinx " +"got many good ideas." msgstr "" -"Fredrik Lundh pour son projet `Alternative Python Reference `_, dont Sphinx a pris beaucoup de bonnes idées." +"Fredrik Lundh pour son projet *Alternative Python Reference*, dont Sphinx a " +"pris beaucoup de bonnes idées." -#: about.rst:32 +#: about.rst:31 msgid "Contributors to the Python Documentation" msgstr "Contributeurs de la documentation Python" -#: about.rst:34 +#: about.rst:33 msgid "" "Many people have contributed to the Python language, the Python standard " "library, and the Python documentation. See :source:`Misc/ACKS` in the " @@ -82,7 +82,7 @@ msgstr "" "sources de la distribution Python pour avoir une liste partielle des " "contributeurs." -#: about.rst:38 +#: about.rst:37 msgid "" "It is only with the input and contributions of the Python community that " "Python has such wonderful documentation -- Thank You!" diff --git a/bugs.po b/bugs.po index bd3a82323c..b1c4362c28 100644 --- a/bugs.po +++ b/bugs.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2019-12-10 16:04+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" +"PO-Revision-Date: 2021-05-26 23:13+0200\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -55,8 +55,9 @@ msgstr "" "décrivant en anglais le bogue et où vous l'avez trouvé. Si le problème ne " "touche que la traduction en français, ouvrez un ticket sur https://github." "com/python/python-docs-fr/issues, ou venez nous en toucher un mot sur le " -"canal #python-fr sur *freenode* (https://webchat.freenode.net/). Si vous " -"avez une suggestion de correction, merci de l'inclure également." +"canal #python-fr sur *libera.chat* (https://kiwiirc.com/nextclient/#irc://" +"irc.libera.chat/#python-fr). Si vous avez une suggestion de correction, " +"merci de l'inclure également." #: bugs.rst:22 msgid "" @@ -94,7 +95,7 @@ msgstr "" "Vue d'ensemble du processus pour proposer une amélioration avec l'outil de " "suivi." -#: bugs.rst:35 +#: bugs.rst:36 msgid "" "`Helping with Documentation `_" @@ -108,77 +109,91 @@ msgid "" "Python documentation." msgstr "Guide complet pour qui souhaite contribuer à la documentation Python." -#: bugs.rst:41 +#: bugs.rst:38 +msgid "" +"`Documentation Translations `_" +msgstr "" +"`Aider avec la documentation `_" + +#: bugs.rst:39 +msgid "" +"A list of GitHub pages for documentation translation and their primary " +"contacts." +msgstr "" +"Liste de dépôts GitHub où la documentation est traduite, avec les personnes " +"à contacter." + +#: bugs.rst:45 msgid "Using the Python issue tracker" msgstr "Utilisation du gestionnaire de tickets Python" -#: bugs.rst:43 +#: bugs.rst:47 msgid "" -"Bug reports for Python itself should be submitted via the Python Bug Tracker " -"(https://bugs.python.org/). The bug tracker offers a Web form which allows " -"pertinent information to be entered and submitted to the developers." +"Issue reports for Python itself should be submitted via the GitHub issues " +"tracker (https://github.com/python/cpython/issues). The GitHub issues " +"tracker offers a web form which allows pertinent information to be entered " +"and submitted to the developers." msgstr "" -"Les rapports de bogues pour Python lui-même devraient être soumis via le " -"l'outil de suivi des bogues (*Bug Tracker Python* — http://bugs.python." -"org/). Le gestionnaire de tickets propose un formulaire Web permettant de " -"saisir des informations pertinentes à soumettre aux développeurs." +"Les rapports concernant un problème relatif à Python lui-même doivent être " +"soumis *via* l'outil de suivi des problèmes de GitHub (https://github.com/" +"python/cpython/issues). Le gestionnaire de tickets propose un formulaire Web " +"permettant de saisir des informations pertinentes à soumettre aux " +"développeurs." -#: bugs.rst:47 +#: bugs.rst:52 msgid "" "The first step in filing a report is to determine whether the problem has " "already been reported. The advantage in doing so, aside from saving the " -"developers time, is that you learn what has been done to fix it; it may be " +"developers' time, is that you learn what has been done to fix it; it may be " "that the problem has already been fixed for the next release, or additional " "information is needed (in which case you are welcome to provide it if you " -"can!). To do this, search the bug database using the search box on the top " -"of the page." +"can!). To do this, search the tracker using the search box at the top of the " +"page." msgstr "" "La première étape pour remplir un rapport est de déterminer si le problème a " "déjà été rapporté. L'avantage de cette approche, en plus d'économiser du " -"temps aux développeurs, est d'apprendre ce qui a été fait pour le résoudre ; " +"temps aux développeurs, est d'apprendre ce qui a été fait pour le résoudre ; " "il se peut que le problème soit déjà résolu dans la prochaine version, ou " "que des informations complémentaires soient attendues (auquel cas votre " -"contribution est la bienvenue !). Pour ce faire, cherchez dans la base de " -"données de bogues grâce à la boîte de recherche en haut de la page." +"contribution est la bienvenue !). Pour ce faire, cherchez dans le " +"gestionnaire de tickets grâce à la boîte de recherche en haut de la page." -#: bugs.rst:54 +#: bugs.rst:59 msgid "" -"If the problem you're reporting is not already in the bug tracker, go back " -"to the Python Bug Tracker and log in. If you don't already have a tracker " -"account, select the \"Register\" link or, if you use OpenID, one of the " -"OpenID provider logos in the sidebar. It is not possible to submit a bug " -"report anonymously." +"If the problem you're reporting is not already in the list, log in to " +"GitHub. If you don't already have a GitHub account, create a new account " +"using the \"Sign up\" link. It is not possible to submit a bug report " +"anonymously." msgstr "" -"Si le problème que vous soumettez n'est pas déjà dans l'outil de suivi des " -"bogues, revenez au *Python Bug Tracker* et connectez-vous. Si vous n'avez " -"pas déjà un compte pour le *tracker*, cliquez sur le lien « S'enregistrer », " -"ou, si vous utilisez *OpenID*, sur l'un des logos des fournisseurs *OpenID* " -"dans la barre latérale. Il n'est pas possible de soumettre un rapport de " -"bogue de manière anonyme." +"Si le problème que vous soumettez n'est pas déjà dans la liste, connectez-" +"vous à GitHub. Si vous n'avez pas déjà un compte GitHub, créez un nouveau " +"compte en cliquant sur le lien « Sign Up ». Il n'est pas possible de " +"soumettre un rapport de bogue de manière anonyme." -#: bugs.rst:59 +#: bugs.rst:64 msgid "" -"Being now logged in, you can submit a bug. Select the \"Create New\" link " -"in the sidebar to open the bug reporting form." +"Being now logged in, you can submit an issue. Click on the \"New issue\" " +"button in the top bar to report a new issue." msgstr "" -"Une fois identifié, pour pouvez rapporter un bogue. Sélectionnez le lien " -"*Create New* dans la barre latérale pour ouvrir un nouveau formulaire de " -"rapport de bogue." +"Une fois connecté, vous pouvez rapporter un problème. Sélectionnez le bouton " +"*New issue* dans la barre en haut pour ouvrir un nouveau formulaire de " +"rapport." + +#: bugs.rst:67 +msgid "The submission form has two fields, \"Title\" and \"Comment\"." +msgstr "Le formulaire de rapport contient deux champs, *Title* et *Comment*." -#: bugs.rst:62 +#: bugs.rst:69 msgid "" -"The submission form has a number of fields. For the \"Title\" field, enter " -"a *very* short description of the problem; less than ten words is good. In " -"the \"Type\" field, select the type of your problem; also select the " -"\"Component\" and \"Versions\" to which the bug relates." +"For the \"Title\" field, enter a *very* short description of the problem; " +"less than ten words is good." msgstr "" -"Le formulaire de soumission a un certain nombre de champs. Pour le champ " -"« Titre », saisissez une *très* courte description du problème ; moins de " -"dix mots est approprié. Dans le champ « Type », sélectionnez le type de " -"problème ; sélectionnez aussi « Composant » et « Versions » en rapport avec " -"le bogue." +"Dans le champ *Title*, entrez une *très* brève description du problème " +"rencontré ; tâchez de vous limiter à dix mots." -#: bugs.rst:67 +#: bugs.rst:72 msgid "" "In the \"Comment\" field, describe the problem in detail, including what you " "expected to happen and what did happen. Be sure to include whether any " @@ -191,17 +206,17 @@ msgstr "" "plateforme matérielle et logicielle vous utilisiez (en incluant les " "informations de versions)." -#: bugs.rst:72 +#: bugs.rst:77 msgid "" -"Each bug report will be assigned to a developer who will determine what " -"needs to be done to correct the problem. You will receive an update each " -"time action is taken on the bug." +"Each issue report will be reviewed by a developer who will determine what " +"needs to be done to correct the problem. You will receive an update each " +"time an action is taken on the issue." msgstr "" -"Chaque bogue sera attribué à un développeur qui déterminera ce qui est " +"Chaque rapport sera attribué à un développeur qui déterminera ce qui est " "nécessaire d'entreprendre pour corriger le problème. Vous recevrez une " -"notification à chaque action effectuée sur le bogue." +"notification à chaque action concernant le rapport." -#: bugs.rst:81 +#: bugs.rst:86 msgid "" "`How to Report Bugs Effectively `_" @@ -209,7 +224,7 @@ msgstr "" "`Comment signaler des bogues de manière efficace `_ (en anglais)" -#: bugs.rst:80 +#: bugs.rst:85 msgid "" "Article which goes into some detail about how to create a useful bug report. " "This describes what kind of information is useful and why it is useful." @@ -218,15 +233,15 @@ msgstr "" "bogue utile. Il décrit quel genre d'information est utile et pourquoi elle " "est utile." -#: bugs.rst:84 +#: bugs.rst:89 msgid "" -"`Bug Report Writing Guidelines `_" +"`Bug Writing Guidelines `_" msgstr "" -"`Guide pour la rédaction de rapports de bogues `_" +"`Guide pour la rédaction de rapports de bogues `_" -#: bugs.rst:84 +#: bugs.rst:89 msgid "" "Information about writing a good bug report. Some of this is specific to " "the Mozilla project, but describes general good practices." @@ -234,11 +249,11 @@ msgstr "" "Conseils pour écrire un bon rapport de bogue. Certains sont spécifiques au " "projet Mozilla mais présentent des bonnes pratiques générales." -#: bugs.rst:90 +#: bugs.rst:95 msgid "Getting started contributing to Python yourself" msgstr "Commencer à contribuer à Python vous-même" -#: bugs.rst:92 +#: bugs.rst:97 msgid "" "Beyond just reporting bugs that you find, you are also welcome to submit " "patches to fix them. You can find more information on how to get started " @@ -252,3 +267,15 @@ msgstr "" "Developer's Guide`_. Si vous avez des questions, le `core-mentorship mailing " "list`_ est un endroit amical pour obtenir des réponses à toutes les " "questions à propos du processus de corrections de bugs dans Python." + +#~ msgid "" +#~ "The submission form has a number of fields. For the \"Title\" field, " +#~ "enter a *very* short description of the problem; less than ten words is " +#~ "good. In the \"Type\" field, select the type of your problem; also " +#~ "select the \"Component\" and \"Versions\" to which the bug relates." +#~ msgstr "" +#~ "Le formulaire de soumission a un certain nombre de champs. Pour le champ " +#~ "« Titre », saisissez une *très* courte description du problème ; moins de " +#~ "dix mots est approprié. Dans le champ « Type », sélectionnez le type de " +#~ "problème ; sélectionnez aussi « Composant » et « Versions » en rapport " +#~ "avec le bogue." diff --git a/c-api/arg.po b/c-api/arg.po index 82c7982aa5..deca4e6122 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-12-10 16:23+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -533,8 +533,8 @@ msgstr "Il existe deux modes de fonctionnement :" #: c-api/arg.rst:233 msgid "" "If *\\*buffer* points a ``NULL`` pointer, the function will allocate a " -"buffer of the needed size, copy the encoded data into this buffer and set *" -"\\*buffer* to reference the newly allocated storage. The caller is " +"buffer of the needed size, copy the encoded data into this buffer and set " +"*\\*buffer* to reference the newly allocated storage. The caller is " "responsible for calling :c:func:`PyMem_Free` to free the allocated buffer " "after usage." msgstr "" @@ -683,7 +683,8 @@ msgstr "" "le débordement." #: c-api/arg.rst:618 -msgid "``n`` (:class:`int`) [Py_ssize_t]" +#, fuzzy +msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" msgstr "``n`` (:class:`int`) [``Py_ssize_t``]" #: c-api/arg.rst:292 diff --git a/c-api/bool.po b/c-api/bool.po index f5f5c1b8a4..58dae39fbc 100644 --- a/c-api/bool.po +++ b/c-api/bool.po @@ -32,11 +32,12 @@ msgstr "" "disponibles." #: c-api/bool.rst:16 -#, fuzzy msgid "" "Return true if *o* is of type :c:data:`PyBool_Type`. This function always " "succeeds." -msgstr "Renvoie vrai si *o* est de type :c:data:`PyBook_Type`." +msgstr "" +"Renvoie vrai si *o* est de type :c:data:`PyBook_Type`. Cette fonction " +"réussit systématiquement." #: c-api/bool.rst:22 msgid "" diff --git a/c-api/buffer.po b/c-api/buffer.po index d0d9ee4659..ad16daf629 100644 --- a/c-api/buffer.po +++ b/c-api/buffer.po @@ -455,7 +455,7 @@ msgstr "oui" #: c-api/buffer.rst:323 c-api/buffer.rst:325 msgid "if needed" -msgstr "" +msgstr "si nécessaire" #: c-api/buffer.rst:278 c-api/buffer.rst:298 c-api/buffer.rst:302 #: c-api/buffer.rst:327 c-api/buffer.rst:331 c-api/buffer.rst:335 @@ -513,7 +513,7 @@ msgstr "" #: c-api/buffer.rst:321 msgid "readonly" -msgstr "" +msgstr "lecture seule" #: c-api/buffer.rst:321 msgid "format" @@ -529,7 +529,7 @@ msgstr "0" #: c-api/buffer.rst:329 c-api/buffer.rst:337 msgid "1 or 0" -msgstr "" +msgstr "0 ou 1" #: c-api/buffer.rst:342 msgid "Complex arrays" @@ -642,6 +642,8 @@ msgid "" "Return the implied :c:data:`~Py_buffer.itemsize` from :c:data:`~Py_buffer." "format`. On error, raise an exception and return -1." msgstr "" +"Retourne l'\\ :c:data:`~Py_buffer.itemsize` du :c:data:`~Py_buffer.format`. " +"En cas d'erreur, lève une exception et retourne -1." #: c-api/buffer.rst:475 msgid "" diff --git a/c-api/bytearray.po b/c-api/bytearray.po index 1e74d73072..bdab1641cf 100644 --- a/c-api/bytearray.po +++ b/c-api/bytearray.po @@ -6,13 +6,14 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-27 19:26+0100\n" -"PO-Revision-Date: 2018-10-04 12:21+0200\n" -"Last-Translator: Julien Palard \n" +"PO-Revision-Date: 2021-05-05 14:32+0200\n" +"Last-Translator: Mindiell \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.2.1\n" #: c-api/bytearray.rst:6 msgid "Byte Array Objects" @@ -37,22 +38,20 @@ msgid "Type check macros" msgstr "Macros de vérification de type" #: c-api/bytearray.rst:27 -#, fuzzy msgid "" "Return true if the object *o* is a bytearray object or an instance of a " "subtype of the bytearray type. This function always succeeds." msgstr "" "Renvoie vrai si l'objet *o* est un ``bytearray`` ou une instance d'un sous-" -"type du type ``bytearray``." +"type du type ``bytearray``. Cette méthode réussit toujours." #: c-api/bytearray.rst:33 -#, fuzzy msgid "" "Return true if the object *o* is a bytearray object, but not an instance of " "a subtype of the bytearray type. This function always succeeds." msgstr "" "Renvoie vrai si l'objet *o* est un ``bytearray``, mais pas une instance d'un " -"sous-type du type ``bytearray``." +"sous-type du type ``bytearray``. Cette méthode réussit toujours." #: c-api/bytearray.rst:38 msgid "Direct API functions" @@ -67,13 +66,12 @@ msgstr "" "implémente le :ref:`protocole buffer `." #: c-api/bytearray.rst:50 -#, fuzzy msgid "" "Create a new bytearray object from *string* and its length, *len*. On " "failure, ``NULL`` is returned." msgstr "" "Crée un nouvel objet ``bytearray`` à partir d'un objet *string* et de sa " -"longueur, *len*. En cas d'échec, *NULL* est renvoyé." +"longueur, *len*. En cas d'échec, ``NULL`` est renvoyé." #: c-api/bytearray.rst:56 msgid "" @@ -83,21 +81,19 @@ msgstr "" "avec le résultat." #: c-api/bytearray.rst:61 -#, fuzzy msgid "Return the size of *bytearray* after checking for a ``NULL`` pointer." msgstr "" "Renvoie la taille de *bytearray* après vérification de la présence d'un " -"pointeur *NULL*." +"pointeur ``NULL``." #: c-api/bytearray.rst:66 -#, fuzzy msgid "" "Return the contents of *bytearray* as a char array after checking for a " "``NULL`` pointer. The returned array always has an extra null byte appended." msgstr "" "Renvoie le contenu de *bytearray* sous forme d'un tableau de caractères, en " -"vérifiant que ce n'est pas un pointeur *NULL*. Le tableau renvoyé se termine " -"toujours par un octet *null*." +"vérifiant que ce n'est pas un pointeur ``NULL``. Le tableau renvoyé a " +"toujours un caractère *null* rajouté." #: c-api/bytearray.rst:73 msgid "Resize the internal buffer of *bytearray* to *len*." diff --git a/c-api/bytes.po b/c-api/bytes.po index a616a8e83f..d1898ad54d 100644 --- a/c-api/bytes.po +++ b/c-api/bytes.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-07-03 11:50+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -21,7 +21,7 @@ msgstr "Objets *bytes*" #: c-api/bytes.rst:8 msgid "" "These functions raise :exc:`TypeError` when expecting a bytes parameter and " -"are called with a non-bytes parameter." +"called with a non-bytes parameter." msgstr "" #: c-api/bytes.rst:16 @@ -96,7 +96,7 @@ msgstr "Commentaires" #: c-api/bytes.rst:70 msgid ":attr:`%%`" -msgstr "" +msgstr ":attr:`%%`" #: c-api/bytes.rst:70 msgid "*n/a*" @@ -108,7 +108,7 @@ msgstr "" #: c-api/bytes.rst:72 msgid ":attr:`%c`" -msgstr "" +msgstr ":attr:`%c`" #: c-api/bytes.rst:75 c-api/bytes.rst:96 msgid "int" @@ -120,7 +120,7 @@ msgstr "" #: c-api/bytes.rst:75 msgid ":attr:`%d`" -msgstr "" +msgstr ":attr:`%d`" #: c-api/bytes.rst:75 msgid "Equivalent to ``printf(\"%d\")``. [1]_" @@ -128,7 +128,7 @@ msgstr "" #: c-api/bytes.rst:78 msgid ":attr:`%u`" -msgstr "" +msgstr ":attr:`%u`" #: c-api/bytes.rst:78 msgid "unsigned int" @@ -140,7 +140,7 @@ msgstr "" #: c-api/bytes.rst:81 msgid ":attr:`%ld`" -msgstr "" +msgstr ":attr:`%ld`" #: c-api/bytes.rst:81 msgid "long" @@ -152,7 +152,7 @@ msgstr "" #: c-api/bytes.rst:84 msgid ":attr:`%lu`" -msgstr "" +msgstr ":attr:`%lu`" #: c-api/bytes.rst:84 msgid "unsigned long" @@ -164,10 +164,10 @@ msgstr "" #: c-api/bytes.rst:87 msgid ":attr:`%zd`" -msgstr "" +msgstr ":attr:`%zd`" #: c-api/bytes.rst:87 -msgid "Py_ssize_t" +msgid ":c:type:`\\ Py_ssize_t`" msgstr "" #: c-api/bytes.rst:87 @@ -176,7 +176,7 @@ msgstr "" #: c-api/bytes.rst:90 msgid ":attr:`%zu`" -msgstr "" +msgstr ":attr:`%zu`" #: c-api/bytes.rst:90 msgid "size_t" @@ -188,7 +188,7 @@ msgstr "" #: c-api/bytes.rst:93 msgid ":attr:`%i`" -msgstr "" +msgstr ":attr:`%i`" #: c-api/bytes.rst:93 msgid "Equivalent to ``printf(\"%i\")``. [1]_" @@ -196,7 +196,7 @@ msgstr "" #: c-api/bytes.rst:96 msgid ":attr:`%x`" -msgstr "" +msgstr ":attr:`%x`" #: c-api/bytes.rst:96 msgid "Equivalent to ``printf(\"%x\")``. [1]_" @@ -204,7 +204,7 @@ msgstr "" #: c-api/bytes.rst:99 msgid ":attr:`%s`" -msgstr "" +msgstr ":attr:`%s`" #: c-api/bytes.rst:99 msgid "const char\\*" @@ -216,7 +216,7 @@ msgstr "" #: c-api/bytes.rst:102 msgid ":attr:`%p`" -msgstr "" +msgstr ":attr:`%p`" #: c-api/bytes.rst:102 msgid "const void\\*" @@ -224,9 +224,9 @@ msgstr "" #: c-api/bytes.rst:102 msgid "" -"The hex representation of a C pointer. Mostly equivalent to ``printf(\"%p" -"\")`` except that it is guaranteed to start with the literal ``0x`` " -"regardless of what the platform's ``printf`` yields." +"The hex representation of a C pointer. Mostly equivalent to " +"``printf(\"%p\")`` except that it is guaranteed to start with the literal " +"``0x`` regardless of what the platform's ``printf`` yields." msgstr "" #: c-api/bytes.rst:111 @@ -330,7 +330,7 @@ msgid "" "address of an existing bytes object as an lvalue (it may be written into), " "and the new size desired. On success, *\\*bytes* holds the resized bytes " "object and ``0`` is returned; the address in *\\*bytes* may differ from its " -"input value. If the reallocation fails, the original bytes object at *" -"\\*bytes* is deallocated, *\\*bytes* is set to ``NULL``, :exc:`MemoryError` " +"input value. If the reallocation fails, the original bytes object at " +"*\\*bytes* is deallocated, *\\*bytes* is set to ``NULL``, :exc:`MemoryError` " "is set, and ``-1`` is returned." msgstr "" diff --git a/c-api/call.po b/c-api/call.po index 64002794d4..7115788544 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-07-20 15:07+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -49,8 +49,8 @@ msgstr "" #: c-api/call.rst:29 msgid "" -"To call an object, use :c:func:`PyObject_Call` or other :ref:`call API `." +"To call an object, use :c:func:`PyObject_Call` or another :ref:`call API " +"`." msgstr "" #: c-api/call.rst:36 @@ -250,7 +250,7 @@ msgstr "" msgid "" "Various functions are available for calling a Python object. Each converts " "its arguments to a convention supported by the called object – either " -"*tp_call* or vectorcall. In order to do as litle conversion as possible, " +"*tp_call* or vectorcall. In order to do as little conversion as possible, " "pick one that best fits the format of data you have available." msgstr "" @@ -266,7 +266,7 @@ msgstr "Fonction" #: c-api/call.rst:195 msgid "callable" -msgstr "" +msgstr "appelable (*callable*)" #: c-api/call.rst:195 msgid "args" diff --git a/c-api/complex.po b/c-api/complex.po index b1e78be08e..b04f207b45 100644 --- a/c-api/complex.po +++ b/c-api/complex.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-01-14 20:31+0100\n" "Last-Translator: ANTOINE FOURES \n" "Language-Team: FRENCH \n" @@ -74,8 +74,9 @@ msgstr "" "`Py_complex` en C." #: c-api/complex.rst:51 +#, fuzzy msgid "" -"Return the negation of the complex number *complex*, using the C :c:type:" +"Return the negation of the complex number *num*, using the C :c:type:" "`Py_complex` representation." msgstr "" "Renvoie l'opposé du nombre complexe *complex*, sous la forme d'un :c:type:" diff --git a/c-api/contextvars.po b/c-api/contextvars.po index 615bbab5c1..36ac798c66 100644 --- a/c-api/contextvars.po +++ b/c-api/contextvars.po @@ -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-05-19 22:36+0200\n" "PO-Revision-Date: 2018-08-03 23:47+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -124,8 +124,8 @@ msgstr "" #: c-api/contextvars.rst:109 msgid "" "Create a new ``ContextVar`` object. The *name* parameter is used for " -"introspection and debug purposes. The *def* parameter may optionally " -"specify the default value for the context variable. If an error has " +"introspection and debug purposes. The *def* parameter specifies a default " +"value for the context variable, or ``NULL`` for no default. If an error has " "occurred, this function returns ``NULL``." msgstr "" @@ -155,16 +155,16 @@ msgid "``NULL``" msgstr "``NULL``" #: c-api/contextvars.rst:127 -msgid "If the value was found, the function will create a new reference to it." +msgid "Except for ``NULL``, the function returns a new reference." msgstr "" #: c-api/contextvars.rst:131 msgid "" -"Set the value of *var* to *value* in the current context. Returns a pointer " -"to a :c:type:`PyObject` object, or ``NULL`` if an error has occurred." +"Set the value of *var* to *value* in the current context. Returns a new " +"token object for this change, or ``NULL`` if an error has occurred." msgstr "" -#: c-api/contextvars.rst:137 +#: c-api/contextvars.rst:136 msgid "" "Reset the state of the *var* context variable to that it was in before :c:" "func:`PyContextVar_Set` that returned the *token* was called. This function " diff --git a/c-api/datetime.po b/c-api/datetime.po index cb0b0a25f5..14604dd3b6 100644 --- a/c-api/datetime.po +++ b/c-api/datetime.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-06-28 15:17+0200\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -259,23 +259,28 @@ msgstr "" "une instance de :c:data:`PyDateTime_DateTime` ou une sous-classe de celle-" "ci. L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" -#: c-api/datetime.rst:200 +#: c-api/datetime.rst:207 msgid "Return the hour, as an int from 0 through 23." msgstr "Renvoie l'heure, sous forme d'entier allant de 0 à 23." -#: c-api/datetime.rst:205 +#: c-api/datetime.rst:212 msgid "Return the minute, as an int from 0 through 59." msgstr "Renvoie la minute, sous forme d'entier allant de 0 à 59." -#: c-api/datetime.rst:210 +#: c-api/datetime.rst:217 msgid "Return the second, as an int from 0 through 59." msgstr "Renvoie la seconde, sous forme d'entier allant de 0 à 59." -#: c-api/datetime.rst:215 +#: c-api/datetime.rst:222 msgid "Return the microsecond, as an int from 0 through 999999." msgstr "Renvoie la microseconde, sous forme d'entier allant de 0 à 999999." -#: c-api/datetime.rst:194 +#: c-api/datetime.rst:227 +#, fuzzy +msgid "Return the fold, as an int from 0 through 1." +msgstr "Renvoie le jour, sous forme d'entier allant de 1 à 31." + +#: c-api/datetime.rst:201 #, fuzzy msgid "" "Macros to extract fields from time objects. The argument must be an " @@ -286,7 +291,7 @@ msgstr "" "instance de :c:data:`PyDateTime_Time` ou une sous-classe de celle-ci. " "L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" -#: c-api/datetime.rst:218 +#: c-api/datetime.rst:232 #, fuzzy msgid "" "Macros to extract fields from time delta objects. The argument must be an " @@ -297,26 +302,26 @@ msgstr "" "être une instance de :c:data:`PyDateTime_Delta` ou une sous-classe de celle-" "ci. L'argument ne doit pas être *NULL*, et le type n'est pas vérifié :" -#: c-api/datetime.rst:224 +#: c-api/datetime.rst:238 msgid "Return the number of days, as an int from -999999999 to 999999999." msgstr "" "Renvoie le nombre de jours, sous forme d'entier allant de ``-999999999`` à " "``999999999``." -#: c-api/datetime.rst:231 +#: c-api/datetime.rst:245 msgid "Return the number of seconds, as an int from 0 through 86399." msgstr "Renvoie le nombre de secondes sous forme d'entier allant de 0 à 86399." -#: c-api/datetime.rst:238 +#: c-api/datetime.rst:252 msgid "Return the number of microseconds, as an int from 0 through 999999." msgstr "" "Renvoie le nombre de microsecondes, sous forme d'entier allant de 0 à 999999." -#: c-api/datetime.rst:243 +#: c-api/datetime.rst:257 msgid "Macros for the convenience of modules implementing the DB API:" msgstr "Macros de confort pour les modules implémentant l'API DB :" -#: c-api/datetime.rst:247 +#: c-api/datetime.rst:261 msgid "" "Create and return a new :class:`datetime.datetime` object given an argument " "tuple suitable for passing to :meth:`datetime.datetime.fromtimestamp()`." @@ -324,7 +329,7 @@ msgstr "" "Crée et renvoie un nouvel objet :class:`datetime.datetime` à partir d'un n-" "uplet qui peut être passé à :meth:`datetime.datetime.fromtimestamp()`." -#: c-api/datetime.rst:253 +#: c-api/datetime.rst:267 msgid "" "Create and return a new :class:`datetime.date` object given an argument " "tuple suitable for passing to :meth:`datetime.date.fromtimestamp()`." diff --git a/c-api/decimal.po b/c-api/decimal.po deleted file mode 100644 index 934a32d503..0000000000 --- a/c-api/decimal.po +++ /dev/null @@ -1,212 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2021, Python Software Foundation -# This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: Python 3.10\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-18 17:40+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: c-api/decimal.rst:7 -msgid "Decimal capsule API" -msgstr "" - -#: c-api/decimal.rst:9 -msgid "" -"Capsule API functions can be used in the same manner as regular library " -"functions, provided that the API has been initialized." -msgstr "" - -#: c-api/decimal.rst:14 -msgid "Initialize" -msgstr "" - -#: c-api/decimal.rst:16 -msgid "" -"Typically, a C extension module that uses the decimal API will do these " -"steps in its init function:" -msgstr "" - -#: c-api/decimal.rst:34 -msgid "Type checking, predicates, accessors" -msgstr "" - -#: c-api/decimal.rst:38 -msgid "" -"Return 1 if ``dec`` is a Decimal, 0 otherwise. This function does not set " -"any exceptions." -msgstr "" - -#: c-api/decimal.rst:44 -msgid "Return 1 if ``dec`` is ``NaN``, ``sNaN`` or ``Infinity``, 0 otherwise." -msgstr "" - -#: c-api/decimal.rst:55 c-api/decimal.rst:64 -msgid "" -"Set TypeError and return -1 if ``dec`` is not a Decimal. It is guaranteed " -"that this is the only failure mode, so if ``dec`` has already been type-" -"checked, no errors can occur and the function can be treated as a simple " -"predicate." -msgstr "" - -#: c-api/decimal.rst:53 -msgid "Return 1 if ``dec`` is ``NaN`` or ``sNaN``, 0 otherwise." -msgstr "" - -#: c-api/decimal.rst:62 -msgid "Return 1 if ``dec`` is ``Infinity``, 0 otherwise." -msgstr "" - -#: c-api/decimal.rst:71 -msgid "" -"Return the number of digits in the coefficient. For ``Infinity``, the " -"number of digits is always zero. Typically, the same applies to ``NaN`` and " -"``sNaN``, but both of these can have a payload that is equivalent to a " -"coefficient. Therefore, ``NaNs`` can have a nonzero return value." -msgstr "" - -#: c-api/decimal.rst:76 -msgid "" -"Set TypeError and return -1 if ``dec`` is not a Decimal. It is guaranteed " -"that this is the only failure mode, so if ``dec`` has already been type-" -"checked, no errors can occur and the function can be treated as a simple " -"accessor." -msgstr "" - -#: c-api/decimal.rst:82 -msgid "Exact conversions between decimals and primitive C types" -msgstr "" - -#: c-api/decimal.rst:84 -msgid "" -"This API supports conversions for decimals with a coefficient up to 38 " -"digits." -msgstr "" - -#: c-api/decimal.rst:87 -msgid "Data structures" -msgstr "" - -#: c-api/decimal.rst:89 -msgid "" -"The conversion functions use the following status codes and data structures:" -msgstr "" - -#: c-api/decimal.rst:110 -msgid "" -"The status cases are explained below. ``sign`` is 0 for positive and 1 for " -"negative. ``((uint128_t)hi << 64) + lo`` is the coefficient, ``exp`` is the " -"exponent." -msgstr "" - -#: c-api/decimal.rst:113 -msgid "" -"The data structure is called \"triple\" because the decimal triple (sign, " -"coeff, exp) is an established term and (``hi``, ``lo``) represents a single " -"``uint128_t`` coefficient." -msgstr "" - -#: c-api/decimal.rst:216 -msgid "Functions" -msgstr "" - -#: c-api/decimal.rst:122 -msgid "" -"Convert a decimal to a triple. As above, it is guaranteed that the only " -"Python failure mode is a TypeError, checks can be omitted if the type is " -"known." -msgstr "" - -#: c-api/decimal.rst:126 -msgid "" -"For simplicity, the usage of the function and all special cases are " -"explained in code form and comments:" -msgstr "" - -#: c-api/decimal.rst:180 -msgid "" -"Create a decimal from a triple. The following rules must be observed for " -"initializing the triple:" -msgstr "" - -#: c-api/decimal.rst:183 -msgid "``triple.sign`` must always be 0 (for positive) or 1 (for negative)." -msgstr "" - -#: c-api/decimal.rst:185 -msgid "" -"``MPD_TRIPLE_QNAN``: ``triple.exp`` must be 0. If ``triple.hi`` or ``triple." -"lo`` are nonzero, create a ``NaN`` with a payload." -msgstr "" - -#: c-api/decimal.rst:188 -msgid "" -"``MPD_TRIPLE_SNAN``: ``triple.exp`` must be 0. If ``triple.hi`` or ``triple." -"lo`` are nonzero, create an ``sNaN`` with a payload." -msgstr "" - -#: c-api/decimal.rst:191 -msgid "" -"``MPD_TRIPLE_INF``: ``triple.exp``, ``triple.hi`` and ``triple.lo`` must be " -"zero." -msgstr "" - -#: c-api/decimal.rst:193 -msgid "" -"``MPD_TRIPLE_NORMAL``: ``MPD_MIN_ETINY + 38 < triple.exp < MPD_MAX_EMAX - " -"38``. ``triple.hi`` and ``triple.lo`` can be chosen freely." -msgstr "" - -#: c-api/decimal.rst:196 -msgid "``MPD_TRIPLE_ERROR``: It is always an error to set this tag." -msgstr "" - -#: c-api/decimal.rst:199 -msgid "" -"If one of the above conditions is not met, the function returns ``NaN`` if " -"the ``InvalidOperation`` trap is not set in the thread local context. " -"Otherwise, it sets the ``InvalidOperation`` exception and returns NULL." -msgstr "" - -#: c-api/decimal.rst:203 -msgid "" -"Additionally, though extremely unlikely give the small allocation sizes, the " -"function can set ``MemoryError`` and return ``NULL``." -msgstr "" - -#: c-api/decimal.rst:208 -msgid "Advanced API" -msgstr "" - -#: c-api/decimal.rst:210 -msgid "" -"This API enables the use of ``libmpdec`` functions. Since Python is " -"compiled with hidden symbols, the API requires an external libmpdec and the " -"``mpdecimal.h`` header." -msgstr "" - -#: c-api/decimal.rst:220 -msgid "" -"Return a new decimal that can be used in the ``result`` position of " -"``libmpdec`` functions." -msgstr "" - -#: c-api/decimal.rst:225 -msgid "" -"Get a pointer to the internal ``mpd_t`` of the decimal. Decimals are " -"immutable, so this function must only be used on a new Decimal that has been " -"created by PyDec_Alloc()." -msgstr "" - -#: c-api/decimal.rst:231 -msgid "Get a pointer to the constant internal ``mpd_t`` of the decimal." -msgstr "" diff --git a/c-api/exceptions.po b/c-api/exceptions.po index 19799c5f2a..60dc1ebba8 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-10-04 12:24+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -28,8 +28,8 @@ msgid "" "occurred. Most C API functions don't clear this on success, but will set it " "to indicate the cause of the error on failure. Most C API functions also " "return an error indicator, usually ``NULL`` if they are supposed to return a " -"pointer, or ``-1`` if they return an integer (exception: the :c:func:`PyArg_" -"\\*` functions return ``1`` for success and ``0`` for failure)." +"pointer, or ``-1`` if they return an integer (exception: the :c:func:" +"`PyArg_\\*` functions return ``1`` for success and ``0`` for failure)." msgstr "" #: c-api/exceptions.rst:20 @@ -139,7 +139,7 @@ msgid "" "specifies the exception type; it is normally one of the standard exceptions, " "e.g. :c:data:`PyExc_RuntimeError`. You need not increment its reference " "count. The second argument is an error message; it is decoded from " -"``'utf-8``'." +"``'utf-8'``." msgstr "" #: c-api/exceptions.rst:108 @@ -274,25 +274,31 @@ msgstr "" #: c-api/exceptions.rst:258 msgid "" +"Much like :c:func:`PyErr_SetImportError` but this function allows for " +"specifying a subclass of :exc:`ImportError` to raise." +msgstr "" + +#: c-api/exceptions.rst:266 +msgid "" "Set file, line, and offset information for the current exception. If the " "current exception is not a :exc:`SyntaxError`, then it sets additional " "attributes, which make the exception printing subsystem think the exception " "is a :exc:`SyntaxError`." msgstr "" -#: c-api/exceptions.rst:268 +#: c-api/exceptions.rst:276 msgid "" "Like :c:func:`PyErr_SyntaxLocationObject`, but *filename* is a byte string " "decoded from the filesystem encoding (:func:`os.fsdecode`)." msgstr "" -#: c-api/exceptions.rst:276 +#: c-api/exceptions.rst:284 msgid "" -"Like :c:func:`PyErr_SyntaxLocationEx`, but the col_offset parameter is " +"Like :c:func:`PyErr_SyntaxLocationEx`, but the *col_offset* parameter is " "omitted." msgstr "" -#: c-api/exceptions.rst:282 +#: c-api/exceptions.rst:290 msgid "" "This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, " "where *message* indicates that an internal operation (e.g. a Python/C API " @@ -300,11 +306,11 @@ msgid "" "use." msgstr "" -#: c-api/exceptions.rst:289 +#: c-api/exceptions.rst:297 msgid "Issuing warnings" msgstr "" -#: c-api/exceptions.rst:291 +#: c-api/exceptions.rst:299 msgid "" "Use these functions to issue warnings from C code. They mirror similar " "functions exported by the Python :mod:`warnings` module. They normally " @@ -320,7 +326,7 @@ msgid "" "return an error value)." msgstr "" -#: c-api/exceptions.rst:306 +#: c-api/exceptions.rst:314 msgid "" "Issue a warning message. The *category* argument is a warning category (see " "below) or ``NULL``; the *message* argument is a UTF-8 encoded string. " @@ -330,7 +336,7 @@ msgid "" "`PyErr_WarnEx`, 2 is the function above that, and so forth." msgstr "" -#: c-api/exceptions.rst:313 +#: c-api/exceptions.rst:321 msgid "" "Warning categories must be subclasses of :c:data:`PyExc_Warning`; :c:data:" "`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`; the default " @@ -339,65 +345,59 @@ msgid "" "enumerated at :ref:`standardwarningcategories`." msgstr "" -#: c-api/exceptions.rst:319 +#: c-api/exceptions.rst:327 msgid "" "For information about warning control, see the documentation for the :mod:" "`warnings` module and the :option:`-W` option in the command line " "documentation. There is no C API for warning control." msgstr "" -#: c-api/exceptions.rst:325 -msgid "" -"Much like :c:func:`PyErr_SetImportError` but this function allows for " -"specifying a subclass of :exc:`ImportError` to raise." -msgstr "" - -#: c-api/exceptions.rst:333 +#: c-api/exceptions.rst:334 msgid "" "Issue a warning message with explicit control over all warning attributes. " "This is a straightforward wrapper around the Python function :func:`warnings." -"warn_explicit`, see there for more information. The *module* and *registry* " +"warn_explicit`; see there for more information. The *module* and *registry* " "arguments may be set to ``NULL`` to get the default effect described there." msgstr "" -#: c-api/exceptions.rst:344 +#: c-api/exceptions.rst:345 msgid "" "Similar to :c:func:`PyErr_WarnExplicitObject` except that *message* and " "*module* are UTF-8 encoded strings, and *filename* is decoded from the " "filesystem encoding (:func:`os.fsdecode`)." msgstr "" -#: c-api/exceptions.rst:351 +#: c-api/exceptions.rst:352 msgid "" "Function similar to :c:func:`PyErr_WarnEx`, but use :c:func:" "`PyUnicode_FromFormat` to format the warning message. *format* is an ASCII-" "encoded string." msgstr "" -#: c-api/exceptions.rst:360 +#: c-api/exceptions.rst:361 msgid "" "Function similar to :c:func:`PyErr_WarnFormat`, but *category* is :exc:" "`ResourceWarning` and it passes *source* to :func:`warnings.WarningMessage`." msgstr "" -#: c-api/exceptions.rst:367 +#: c-api/exceptions.rst:368 msgid "Querying the error indicator" msgstr "" -#: c-api/exceptions.rst:371 +#: c-api/exceptions.rst:372 msgid "" "Test whether the error indicator is set. If set, return the exception " -"*type* (the first argument to the last call to one of the :c:func:`PyErr_Set" -"\\*` functions or to :c:func:`PyErr_Restore`). If not set, return " +"*type* (the first argument to the last call to one of the :c:func:" +"`PyErr_Set\\*` functions or to :c:func:`PyErr_Restore`). If not set, return " "``NULL``. You do not own a reference to the return value, so you do not " "need to :c:func:`Py_DECREF` it." msgstr "" -#: c-api/exceptions.rst:377 +#: c-api/exceptions.rst:378 msgid "The caller must hold the GIL." msgstr "" -#: c-api/exceptions.rst:381 +#: c-api/exceptions.rst:382 msgid "" "Do not compare the return value to a specific exception; use :c:func:" "`PyErr_ExceptionMatches` instead, shown below. (The comparison could easily " @@ -405,14 +405,14 @@ msgid "" "of a class exception, or it may be a subclass of the expected exception.)" msgstr "" -#: c-api/exceptions.rst:389 +#: c-api/exceptions.rst:390 msgid "" "Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This " "should only be called when an exception is actually set; a memory access " "violation will occur if no exception has been raised." msgstr "" -#: c-api/exceptions.rst:396 +#: c-api/exceptions.rst:397 msgid "" "Return true if the *given* exception matches the exception type in *exc*. " "If *exc* is a class object, this also returns true when *given* is an " @@ -420,7 +420,7 @@ msgid "" "tuple (and recursively in subtuples) are searched for a match." msgstr "" -#: c-api/exceptions.rst:404 +#: c-api/exceptions.rst:405 msgid "" "Retrieve the error indicator into three variables whose addresses are " "passed. If the error indicator is not set, set all three variables to " @@ -429,14 +429,14 @@ msgid "" "the type object is not." msgstr "" -#: c-api/exceptions.rst:411 +#: c-api/exceptions.rst:412 msgid "" "This function is normally only used by code that needs to catch exceptions " "or by code that needs to save and restore the error indicator temporarily, e." "g.::" msgstr "" -#: c-api/exceptions.rst:426 +#: c-api/exceptions.rst:427 msgid "" "Set the error indicator from the three objects. If the error indicator is " "already set, it is cleared first. If the objects are ``NULL``, the error " @@ -449,14 +449,14 @@ msgid "" "function. I warned you.)" msgstr "" -#: c-api/exceptions.rst:438 +#: c-api/exceptions.rst:439 msgid "" "This function is normally only used by code that needs to save and restore " "the error indicator temporarily. Use :c:func:`PyErr_Fetch` to save the " "current error indicator." msgstr "" -#: c-api/exceptions.rst:445 +#: c-api/exceptions.rst:446 msgid "" "Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` " "below can be \"unnormalized\", meaning that ``*exc`` is a class object but " @@ -466,14 +466,14 @@ msgid "" "improve performance." msgstr "" -#: c-api/exceptions.rst:453 +#: c-api/exceptions.rst:454 msgid "" "This function *does not* implicitly set the ``__traceback__`` attribute on " "the exception value. If setting the traceback appropriately is desired, the " "following additional snippet is needed::" msgstr "" -#: c-api/exceptions.rst:464 +#: c-api/exceptions.rst:465 msgid "" "Retrieve the exception info, as known from ``sys.exc_info()``. This refers " "to an exception that was *already caught*, not to an exception that was " @@ -481,7 +481,7 @@ msgid "" "may be ``NULL``. Does not modify the exception info state." msgstr "" -#: c-api/exceptions.rst:471 +#: c-api/exceptions.rst:472 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -489,7 +489,7 @@ msgid "" "exception state." msgstr "" -#: c-api/exceptions.rst:481 +#: c-api/exceptions.rst:482 msgid "" "Set the exception info, as known from ``sys.exc_info()``. This refers to an " "exception that was *already caught*, not to an exception that was freshly " @@ -498,7 +498,7 @@ msgid "" "about the three arguments, see :c:func:`PyErr_Restore`." msgstr "" -#: c-api/exceptions.rst:489 +#: c-api/exceptions.rst:490 msgid "" "This function is not normally used by code that wants to handle exceptions. " "Rather, it can be used when code needs to save and restore the exception " @@ -506,11 +506,11 @@ msgid "" "state." msgstr "" -#: c-api/exceptions.rst:498 +#: c-api/exceptions.rst:499 msgid "Signal Handling" msgstr "Traitement des signaux" -#: c-api/exceptions.rst:508 +#: c-api/exceptions.rst:509 msgid "" "This function interacts with Python's signal handling. It checks whether a " "signal has been sent to the processes and if so, invokes the corresponding " @@ -522,27 +522,27 @@ msgid "" "may not be cleared if it was previously set." msgstr "" -#: c-api/exceptions.rst:524 +#: c-api/exceptions.rst:525 msgid "" "Simulate the effect of a :const:`SIGINT` signal arriving. The next time :c:" "func:`PyErr_CheckSignals` is called, the Python signal handler for :const:" "`SIGINT` will be called." msgstr "" -#: c-api/exceptions.rst:528 +#: c-api/exceptions.rst:529 msgid "" "If :const:`SIGINT` isn't handled by Python (it was set to :data:`signal." "SIG_DFL` or :data:`signal.SIG_IGN`), this function does nothing." msgstr "" -#: c-api/exceptions.rst:534 +#: c-api/exceptions.rst:535 msgid "" "This utility function specifies a file descriptor to which the signal number " "is written as a single byte whenever a signal is received. *fd* must be non-" "blocking. It returns the previous such file descriptor." msgstr "" -#: c-api/exceptions.rst:538 +#: c-api/exceptions.rst:539 msgid "" "The value ``-1`` disables the feature; this is the initial state. This is " "equivalent to :func:`signal.set_wakeup_fd` in Python, but without any error " @@ -550,15 +550,15 @@ msgid "" "be called from the main thread." msgstr "" -#: c-api/exceptions.rst:543 +#: c-api/exceptions.rst:544 msgid "On Windows, the function now also supports socket handles." msgstr "" -#: c-api/exceptions.rst:548 +#: c-api/exceptions.rst:549 msgid "Exception Classes" msgstr "" -#: c-api/exceptions.rst:552 +#: c-api/exceptions.rst:553 msgid "" "This utility function creates and returns a new exception class. The *name* " "argument must be the name of the new exception, a C string of the form " @@ -567,7 +567,7 @@ msgid "" "(accessible in C as :c:data:`PyExc_Exception`)." msgstr "" -#: c-api/exceptions.rst:558 +#: c-api/exceptions.rst:559 msgid "" "The :attr:`__module__` attribute of the new class is set to the first part " "(up to the last dot) of the *name* argument, and the class name is set to " @@ -577,31 +577,31 @@ msgid "" "variables and methods." msgstr "" -#: c-api/exceptions.rst:567 +#: c-api/exceptions.rst:568 msgid "" "Same as :c:func:`PyErr_NewException`, except that the new exception class " "can easily be given a docstring: If *doc* is non-``NULL``, it will be used " "as the docstring for the exception class." msgstr "" -#: c-api/exceptions.rst:575 +#: c-api/exceptions.rst:576 msgid "Exception Objects" msgstr "Objets exception" -#: c-api/exceptions.rst:579 +#: c-api/exceptions.rst:580 msgid "" "Return the traceback associated with the exception as a new reference, as " "accessible from Python through :attr:`__traceback__`. If there is no " "traceback associated, this returns ``NULL``." msgstr "" -#: c-api/exceptions.rst:586 +#: c-api/exceptions.rst:587 msgid "" "Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " "clear it." msgstr "" -#: c-api/exceptions.rst:592 +#: c-api/exceptions.rst:593 msgid "" "Return the context (another exception instance during whose handling *ex* " "was raised) associated with the exception as a new reference, as accessible " @@ -609,127 +609,127 @@ msgid "" "this returns ``NULL``." msgstr "" -#: c-api/exceptions.rst:600 +#: c-api/exceptions.rst:601 msgid "" "Set the context associated with the exception to *ctx*. Use ``NULL`` to " "clear it. There is no type check to make sure that *ctx* is an exception " "instance. This steals a reference to *ctx*." msgstr "" -#: c-api/exceptions.rst:607 +#: c-api/exceptions.rst:608 msgid "" "Return the cause (either an exception instance, or :const:`None`, set by " "``raise ... from ...``) associated with the exception as a new reference, as " "accessible from Python through :attr:`__cause__`." msgstr "" -#: c-api/exceptions.rst:614 +#: c-api/exceptions.rst:615 msgid "" "Set the cause associated with the exception to *cause*. Use ``NULL`` to " "clear it. There is no type check to make sure that *cause* is either an " "exception instance or :const:`None`. This steals a reference to *cause*." msgstr "" -#: c-api/exceptions.rst:618 +#: c-api/exceptions.rst:619 msgid "" ":attr:`__suppress_context__` is implicitly set to ``True`` by this function." msgstr "" -#: c-api/exceptions.rst:624 +#: c-api/exceptions.rst:625 msgid "Unicode Exception Objects" msgstr "Objets exception Unicode" -#: c-api/exceptions.rst:626 +#: c-api/exceptions.rst:627 msgid "" "The following functions are used to create and modify Unicode exceptions " "from C." msgstr "" -#: c-api/exceptions.rst:630 +#: c-api/exceptions.rst:631 msgid "" "Create a :class:`UnicodeDecodeError` object with the attributes *encoding*, " "*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are " "UTF-8 encoded strings." msgstr "" -#: c-api/exceptions.rst:636 +#: c-api/exceptions.rst:637 msgid "" "Create a :class:`UnicodeEncodeError` object with the attributes *encoding*, " "*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are " "UTF-8 encoded strings." msgstr "" -#: c-api/exceptions.rst:650 +#: c-api/exceptions.rst:651 msgid "3.11" -msgstr "" +msgstr "3.11" -#: c-api/exceptions.rst:642 +#: c-api/exceptions.rst:643 msgid "" "``Py_UNICODE`` is deprecated since Python 3.3. Please migrate to " "``PyObject_CallFunction(PyExc_UnicodeEncodeError, \"sOnns\", ...)``." msgstr "" -#: c-api/exceptions.rst:647 +#: c-api/exceptions.rst:648 msgid "" "Create a :class:`UnicodeTranslateError` object with the attributes *object*, " "*length*, *start*, *end* and *reason*. *reason* is a UTF-8 encoded string." msgstr "" -#: c-api/exceptions.rst:652 +#: c-api/exceptions.rst:653 msgid "" "``Py_UNICODE`` is deprecated since Python 3.3. Please migrate to " "``PyObject_CallFunction(PyExc_UnicodeTranslateError, \"Onns\", ...)``." msgstr "" -#: c-api/exceptions.rst:658 +#: c-api/exceptions.rst:659 msgid "Return the *encoding* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:664 +#: c-api/exceptions.rst:665 msgid "Return the *object* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:670 +#: c-api/exceptions.rst:671 msgid "" -"Get the *start* attribute of the given exception object and place it into *" -"\\*start*. *start* must not be ``NULL``. Return ``0`` on success, ``-1`` " +"Get the *start* attribute of the given exception object and place it into " +"*\\*start*. *start* must not be ``NULL``. Return ``0`` on success, ``-1`` " "on failure." msgstr "" -#: c-api/exceptions.rst:678 +#: c-api/exceptions.rst:679 msgid "" "Set the *start* attribute of the given exception object to *start*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: c-api/exceptions.rst:685 +#: c-api/exceptions.rst:686 msgid "" -"Get the *end* attribute of the given exception object and place it into *" -"\\*end*. *end* must not be ``NULL``. Return ``0`` on success, ``-1`` on " +"Get the *end* attribute of the given exception object and place it into " +"*\\*end*. *end* must not be ``NULL``. Return ``0`` on success, ``-1`` on " "failure." msgstr "" -#: c-api/exceptions.rst:693 +#: c-api/exceptions.rst:694 msgid "" "Set the *end* attribute of the given exception object to *end*. Return " "``0`` on success, ``-1`` on failure." msgstr "" -#: c-api/exceptions.rst:700 +#: c-api/exceptions.rst:701 msgid "Return the *reason* attribute of the given exception object." msgstr "" -#: c-api/exceptions.rst:706 +#: c-api/exceptions.rst:707 msgid "" "Set the *reason* attribute of the given exception object to *reason*. " "Return ``0`` on success, ``-1`` on failure." msgstr "" -#: c-api/exceptions.rst:713 +#: c-api/exceptions.rst:714 msgid "Recursion Control" msgstr "Contrôle de la récursion" -#: c-api/exceptions.rst:715 +#: c-api/exceptions.rst:716 msgid "" "These two functions provide a way to perform safe recursive calls at the C " "level, both in the core and in extension modules. They are needed if the " @@ -739,42 +739,42 @@ msgid "" "recursion handling." msgstr "" -#: c-api/exceptions.rst:724 +#: c-api/exceptions.rst:725 msgid "Marks a point where a recursive C-level call is about to be performed." msgstr "" -#: c-api/exceptions.rst:726 +#: c-api/exceptions.rst:727 msgid "" "If :const:`USE_STACKCHECK` is defined, this function checks if the OS stack " "overflowed using :c:func:`PyOS_CheckStack`. In this is the case, it sets a :" "exc:`MemoryError` and returns a nonzero value." msgstr "" -#: c-api/exceptions.rst:730 +#: c-api/exceptions.rst:731 msgid "" "The function then checks if the recursion limit is reached. If this is the " "case, a :exc:`RecursionError` is set and a nonzero value is returned. " "Otherwise, zero is returned." msgstr "" -#: c-api/exceptions.rst:734 +#: c-api/exceptions.rst:735 msgid "" "*where* should be a UTF-8 encoded string such as ``\" in instance check\"`` " "to be concatenated to the :exc:`RecursionError` message caused by the " "recursion depth limit." msgstr "" -#: c-api/exceptions.rst:746 +#: c-api/exceptions.rst:747 msgid "This function is now also available in the limited API." msgstr "" -#: c-api/exceptions.rst:743 +#: c-api/exceptions.rst:744 msgid "" "Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each " "*successful* invocation of :c:func:`Py_EnterRecursiveCall`." msgstr "" -#: c-api/exceptions.rst:749 +#: c-api/exceptions.rst:750 msgid "" "Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " "requires special recursion handling. In addition to protecting the stack, :" @@ -783,13 +783,13 @@ msgid "" "Effectively, these are the C equivalent to :func:`reprlib.recursive_repr`." msgstr "" -#: c-api/exceptions.rst:757 +#: c-api/exceptions.rst:758 msgid "" "Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " "implementation to detect cycles." msgstr "" -#: c-api/exceptions.rst:760 +#: c-api/exceptions.rst:761 msgid "" "If the object has already been processed, the function returns a positive " "integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " @@ -797,30 +797,30 @@ msgid "" "`dict` objects return ``{...}`` and :class:`list` objects return ``[...]``." msgstr "" -#: c-api/exceptions.rst:766 +#: c-api/exceptions.rst:767 msgid "" "The function will return a negative integer if the recursion limit is " "reached. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " "should typically return ``NULL``." msgstr "" -#: c-api/exceptions.rst:770 +#: c-api/exceptions.rst:771 msgid "" "Otherwise, the function returns zero and the :c:member:`~PyTypeObject." "tp_repr` implementation can continue normally." msgstr "" -#: c-api/exceptions.rst:775 +#: c-api/exceptions.rst:776 msgid "" "Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation of :" "c:func:`Py_ReprEnter` that returns zero." msgstr "" -#: c-api/exceptions.rst:782 +#: c-api/exceptions.rst:783 msgid "Standard Exceptions" msgstr "Exceptions standards" -#: c-api/exceptions.rst:784 +#: c-api/exceptions.rst:785 msgid "" "All standard Python exceptions are available as global variables whose names " "are ``PyExc_`` followed by the Python exception name. These have the type :" @@ -828,452 +828,448 @@ msgid "" "all the variables:" msgstr "" -#: c-api/exceptions.rst:978 c-api/exceptions.rst:1023 +#: c-api/exceptions.rst:979 c-api/exceptions.rst:1024 msgid "C Name" msgstr "Nom C" -#: c-api/exceptions.rst:1023 +#: c-api/exceptions.rst:1024 msgid "Python Name" msgstr "Nom Python" -#: c-api/exceptions.rst:978 c-api/exceptions.rst:1023 +#: c-api/exceptions.rst:979 c-api/exceptions.rst:1024 msgid "Notes" msgstr "Notes" -#: c-api/exceptions.rst:847 +#: c-api/exceptions.rst:848 msgid ":c:data:`PyExc_BaseException`" msgstr ":c:data:`PyExc_BaseException`" -#: c-api/exceptions.rst:847 +#: c-api/exceptions.rst:848 msgid ":exc:`BaseException`" msgstr ":exc:`BaseException`" -#: c-api/exceptions.rst:849 c-api/exceptions.rst:897 c-api/exceptions.rst:1025 -msgid "\\(1)" -msgstr "\\(1)" +#: c-api/exceptions.rst:850 c-api/exceptions.rst:898 c-api/exceptions.rst:910 +msgid "[1]_" +msgstr "" -#: c-api/exceptions.rst:849 +#: c-api/exceptions.rst:850 msgid ":c:data:`PyExc_Exception`" msgstr ":c:data:`PyExc_Exception`" -#: c-api/exceptions.rst:849 +#: c-api/exceptions.rst:850 msgid ":exc:`Exception`" msgstr ":exc:`Exception`" -#: c-api/exceptions.rst:851 +#: c-api/exceptions.rst:852 msgid ":c:data:`PyExc_ArithmeticError`" msgstr ":c:data:`PyExc_ArithmeticError`" -#: c-api/exceptions.rst:851 +#: c-api/exceptions.rst:852 msgid ":exc:`ArithmeticError`" msgstr ":exc:`ArithmeticError`" -#: c-api/exceptions.rst:853 +#: c-api/exceptions.rst:854 msgid ":c:data:`PyExc_AssertionError`" msgstr ":c:data:`PyExc_AssertionError`" -#: c-api/exceptions.rst:853 +#: c-api/exceptions.rst:854 msgid ":exc:`AssertionError`" msgstr ":exc:`AssertionError`" -#: c-api/exceptions.rst:855 +#: c-api/exceptions.rst:856 msgid ":c:data:`PyExc_AttributeError`" msgstr ":c:data:`PyExc_AttributeError`" -#: c-api/exceptions.rst:855 +#: c-api/exceptions.rst:856 msgid ":exc:`AttributeError`" msgstr ":exc:`AttributeError`" -#: c-api/exceptions.rst:857 +#: c-api/exceptions.rst:858 msgid ":c:data:`PyExc_BlockingIOError`" msgstr ":c:data:`PyExc_BlockingIOError`" -#: c-api/exceptions.rst:857 +#: c-api/exceptions.rst:858 msgid ":exc:`BlockingIOError`" msgstr ":exc:`BlockingIOError`" -#: c-api/exceptions.rst:859 +#: c-api/exceptions.rst:860 msgid ":c:data:`PyExc_BrokenPipeError`" msgstr ":c:data:`PyExc_BrokenPipeError`" -#: c-api/exceptions.rst:859 +#: c-api/exceptions.rst:860 msgid ":exc:`BrokenPipeError`" msgstr ":exc:`BrokenPipeError`" -#: c-api/exceptions.rst:861 +#: c-api/exceptions.rst:862 msgid ":c:data:`PyExc_BufferError`" msgstr ":c:data:`PyExc_BufferError`" -#: c-api/exceptions.rst:861 +#: c-api/exceptions.rst:862 msgid ":exc:`BufferError`" msgstr ":exc:`BufferError`" -#: c-api/exceptions.rst:863 +#: c-api/exceptions.rst:864 msgid ":c:data:`PyExc_ChildProcessError`" msgstr ":c:data:`PyExc_ChildProcessError`" -#: c-api/exceptions.rst:863 +#: c-api/exceptions.rst:864 msgid ":exc:`ChildProcessError`" msgstr ":exc:`ChildProcessError`" -#: c-api/exceptions.rst:865 +#: c-api/exceptions.rst:866 msgid ":c:data:`PyExc_ConnectionAbortedError`" msgstr ":c:data:`PyExc_ConnectionAbortedError`" -#: c-api/exceptions.rst:865 +#: c-api/exceptions.rst:866 msgid ":exc:`ConnectionAbortedError`" msgstr ":exc:`ConnectionAbortedError`" -#: c-api/exceptions.rst:867 +#: c-api/exceptions.rst:868 msgid ":c:data:`PyExc_ConnectionError`" msgstr ":c:data:`PyExc_ConnectionError`" -#: c-api/exceptions.rst:867 +#: c-api/exceptions.rst:868 msgid ":exc:`ConnectionError`" msgstr ":exc:`ConnectionError`" -#: c-api/exceptions.rst:869 +#: c-api/exceptions.rst:870 msgid ":c:data:`PyExc_ConnectionRefusedError`" msgstr ":c:data:`PyExc_ConnectionRefusedError`" -#: c-api/exceptions.rst:869 +#: c-api/exceptions.rst:870 msgid ":exc:`ConnectionRefusedError`" msgstr ":exc:`ConnectionRefusedError`" -#: c-api/exceptions.rst:871 +#: c-api/exceptions.rst:872 msgid ":c:data:`PyExc_ConnectionResetError`" msgstr ":c:data:`PyExc_ConnectionResetError`" -#: c-api/exceptions.rst:871 +#: c-api/exceptions.rst:872 msgid ":exc:`ConnectionResetError`" msgstr ":exc:`ConnectionResetError`" -#: c-api/exceptions.rst:873 +#: c-api/exceptions.rst:874 msgid ":c:data:`PyExc_EOFError`" msgstr ":c:data:`PyExc_EOFError`" -#: c-api/exceptions.rst:873 +#: c-api/exceptions.rst:874 msgid ":exc:`EOFError`" msgstr ":exc:`EOFError`" -#: c-api/exceptions.rst:875 +#: c-api/exceptions.rst:876 msgid ":c:data:`PyExc_FileExistsError`" msgstr ":c:data:`PyExc_FileExistsError`" -#: c-api/exceptions.rst:875 +#: c-api/exceptions.rst:876 msgid ":exc:`FileExistsError`" msgstr ":exc:`FileExistsError`" -#: c-api/exceptions.rst:877 +#: c-api/exceptions.rst:878 msgid ":c:data:`PyExc_FileNotFoundError`" msgstr ":c:data:`PyExc_FloatingPointError`" -#: c-api/exceptions.rst:877 +#: c-api/exceptions.rst:878 msgid ":exc:`FileNotFoundError`" msgstr ":exc:`FileNotFoundError`" -#: c-api/exceptions.rst:879 +#: c-api/exceptions.rst:880 msgid ":c:data:`PyExc_FloatingPointError`" msgstr ":c:data:`PyExc_FloatingPointError`" -#: c-api/exceptions.rst:879 +#: c-api/exceptions.rst:880 msgid ":exc:`FloatingPointError`" msgstr ":exc:`FloatingPointError`" -#: c-api/exceptions.rst:881 +#: c-api/exceptions.rst:882 msgid ":c:data:`PyExc_GeneratorExit`" msgstr ":c:data:`PyExc_GeneratorExit`" -#: c-api/exceptions.rst:881 +#: c-api/exceptions.rst:882 msgid ":exc:`GeneratorExit`" msgstr ":exc:`GeneratorExit`" -#: c-api/exceptions.rst:883 +#: c-api/exceptions.rst:884 msgid ":c:data:`PyExc_ImportError`" msgstr ":c:data:`PyExc_ImportError`" -#: c-api/exceptions.rst:883 +#: c-api/exceptions.rst:884 msgid ":exc:`ImportError`" msgstr ":exc:`ImportError`" -#: c-api/exceptions.rst:885 +#: c-api/exceptions.rst:886 msgid ":c:data:`PyExc_IndentationError`" msgstr ":c:data:`PyExc_IndentationError`" -#: c-api/exceptions.rst:885 +#: c-api/exceptions.rst:886 msgid ":exc:`IndentationError`" msgstr ":exc:`IndentationError`" -#: c-api/exceptions.rst:887 +#: c-api/exceptions.rst:888 msgid ":c:data:`PyExc_IndexError`" msgstr ":c:data:`PyExc_IndexError`" -#: c-api/exceptions.rst:887 +#: c-api/exceptions.rst:888 msgid ":exc:`IndexError`" msgstr ":exc:`IndexError`" -#: c-api/exceptions.rst:889 +#: c-api/exceptions.rst:890 msgid ":c:data:`PyExc_InterruptedError`" msgstr ":c:data:`PyExc_InterruptedError`" -#: c-api/exceptions.rst:889 +#: c-api/exceptions.rst:890 msgid ":exc:`InterruptedError`" msgstr ":exc:`InterruptedError`" -#: c-api/exceptions.rst:891 +#: c-api/exceptions.rst:892 msgid ":c:data:`PyExc_IsADirectoryError`" msgstr ":c:data:`PyExc_IsADirectoryError`" -#: c-api/exceptions.rst:891 +#: c-api/exceptions.rst:892 msgid ":exc:`IsADirectoryError`" msgstr ":exc:`IsADirectoryError`" -#: c-api/exceptions.rst:893 +#: c-api/exceptions.rst:894 msgid ":c:data:`PyExc_KeyError`" msgstr ":c:data:`PyExc_KeyError`" -#: c-api/exceptions.rst:893 +#: c-api/exceptions.rst:894 msgid ":exc:`KeyError`" msgstr ":exc:`KeyError`" -#: c-api/exceptions.rst:895 +#: c-api/exceptions.rst:896 msgid ":c:data:`PyExc_KeyboardInterrupt`" msgstr ":c:data:`PyExc_KeyboardInterrupt`" -#: c-api/exceptions.rst:895 +#: c-api/exceptions.rst:896 msgid ":exc:`KeyboardInterrupt`" msgstr ":exc:`KeyboardInterrupt`" -#: c-api/exceptions.rst:897 +#: c-api/exceptions.rst:898 msgid ":c:data:`PyExc_LookupError`" msgstr ":c:data:`PyExc_LookupError`" -#: c-api/exceptions.rst:897 +#: c-api/exceptions.rst:898 msgid ":exc:`LookupError`" msgstr ":exc:`LookupError`" -#: c-api/exceptions.rst:899 +#: c-api/exceptions.rst:900 msgid ":c:data:`PyExc_MemoryError`" msgstr ":c:data:`PyExc_MemoryError`" -#: c-api/exceptions.rst:899 +#: c-api/exceptions.rst:900 msgid ":exc:`MemoryError`" msgstr ":exc:`MemoryError`" -#: c-api/exceptions.rst:901 +#: c-api/exceptions.rst:902 #, fuzzy msgid ":c:data:`PyExc_ModuleNotFoundError`" msgstr ":c:data:`PyExc_ModuleNotFoundError`." -#: c-api/exceptions.rst:901 +#: c-api/exceptions.rst:902 msgid ":exc:`ModuleNotFoundError`" -msgstr "" +msgstr ":exc:`ModuleNotFoundError`" -#: c-api/exceptions.rst:903 +#: c-api/exceptions.rst:904 msgid ":c:data:`PyExc_NameError`" msgstr ":c:data:`PyExc_NameError`" -#: c-api/exceptions.rst:903 +#: c-api/exceptions.rst:904 msgid ":exc:`NameError`" msgstr ":exc:`NameError`" -#: c-api/exceptions.rst:905 +#: c-api/exceptions.rst:906 msgid ":c:data:`PyExc_NotADirectoryError`" msgstr ":c:data:`PyExc_NotADirectoryError`" -#: c-api/exceptions.rst:905 +#: c-api/exceptions.rst:906 msgid ":exc:`NotADirectoryError`" msgstr ":exc:`NotADirectoryError`" -#: c-api/exceptions.rst:907 +#: c-api/exceptions.rst:908 msgid ":c:data:`PyExc_NotImplementedError`" msgstr ":c:data:`PyExc_NotImplementedError`" -#: c-api/exceptions.rst:907 +#: c-api/exceptions.rst:908 msgid ":exc:`NotImplementedError`" msgstr ":exc:`NotImplementedError`" -#: c-api/exceptions.rst:909 +#: c-api/exceptions.rst:910 msgid ":c:data:`PyExc_OSError`" msgstr ":c:data:`PyExc_OSError`" -#: c-api/exceptions.rst:909 +#: c-api/exceptions.rst:910 msgid ":exc:`OSError`" msgstr ":exc:`OSError`" -#: c-api/exceptions.rst:911 +#: c-api/exceptions.rst:912 msgid ":c:data:`PyExc_OverflowError`" msgstr ":c:data:`PyExc_OverflowError`" -#: c-api/exceptions.rst:911 +#: c-api/exceptions.rst:912 msgid ":exc:`OverflowError`" msgstr ":exc:`OverflowError`" -#: c-api/exceptions.rst:913 +#: c-api/exceptions.rst:914 msgid ":c:data:`PyExc_PermissionError`" msgstr ":c:data:`PyExc_PermissionError`" -#: c-api/exceptions.rst:913 +#: c-api/exceptions.rst:914 msgid ":exc:`PermissionError`" msgstr ":exc:`PermissionError`" -#: c-api/exceptions.rst:915 +#: c-api/exceptions.rst:916 msgid ":c:data:`PyExc_ProcessLookupError`" msgstr ":c:data:`PyExc_ProcessLookupError`" -#: c-api/exceptions.rst:915 +#: c-api/exceptions.rst:916 msgid ":exc:`ProcessLookupError`" msgstr ":exc:`ProcessLookupError`" -#: c-api/exceptions.rst:917 +#: c-api/exceptions.rst:918 msgid ":c:data:`PyExc_RecursionError`" msgstr ":c:data:`PyExc_ReferenceError`" -#: c-api/exceptions.rst:917 +#: c-api/exceptions.rst:918 msgid ":exc:`RecursionError`" -msgstr "" +msgstr ":exc:`RecursionError`" -#: c-api/exceptions.rst:919 +#: c-api/exceptions.rst:920 msgid ":c:data:`PyExc_ReferenceError`" msgstr ":c:data:`PyExc_ReferenceError`" -#: c-api/exceptions.rst:919 +#: c-api/exceptions.rst:920 msgid ":exc:`ReferenceError`" msgstr ":exc:`ReferenceError`" -#: c-api/exceptions.rst:919 -msgid "\\(2)" -msgstr "\\(2)" - -#: c-api/exceptions.rst:921 +#: c-api/exceptions.rst:922 msgid ":c:data:`PyExc_RuntimeError`" msgstr ":c:data:`PyExc_RuntimeError`" -#: c-api/exceptions.rst:921 +#: c-api/exceptions.rst:922 msgid ":exc:`RuntimeError`" msgstr ":exc:`RuntimeError`" -#: c-api/exceptions.rst:923 +#: c-api/exceptions.rst:924 msgid ":c:data:`PyExc_StopAsyncIteration`" msgstr ":c:data:`PyExc_StopAsyncIteration`" -#: c-api/exceptions.rst:923 +#: c-api/exceptions.rst:924 msgid ":exc:`StopAsyncIteration`" msgstr ":exc:`StopAsyncIteration`" -#: c-api/exceptions.rst:925 +#: c-api/exceptions.rst:926 msgid ":c:data:`PyExc_StopIteration`" msgstr ":c:data:`PyExc_StopIteration`" -#: c-api/exceptions.rst:925 +#: c-api/exceptions.rst:926 msgid ":exc:`StopIteration`" msgstr ":exc:`StopIteration`" -#: c-api/exceptions.rst:927 +#: c-api/exceptions.rst:928 msgid ":c:data:`PyExc_SyntaxError`" msgstr ":c:data:`PyExc_SyntaxError`" -#: c-api/exceptions.rst:927 +#: c-api/exceptions.rst:928 msgid ":exc:`SyntaxError`" msgstr ":exc:`SyntaxError`" -#: c-api/exceptions.rst:929 +#: c-api/exceptions.rst:930 msgid ":c:data:`PyExc_SystemError`" msgstr ":c:data:`PyExc_SystemError`" -#: c-api/exceptions.rst:929 +#: c-api/exceptions.rst:930 msgid ":exc:`SystemError`" msgstr ":exc:`SystemError`" -#: c-api/exceptions.rst:931 +#: c-api/exceptions.rst:932 msgid ":c:data:`PyExc_SystemExit`" msgstr ":c:data:`PyExc_SystemExit`" -#: c-api/exceptions.rst:931 +#: c-api/exceptions.rst:932 msgid ":exc:`SystemExit`" msgstr ":exc:`SystemExit`" -#: c-api/exceptions.rst:933 +#: c-api/exceptions.rst:934 msgid ":c:data:`PyExc_TabError`" msgstr ":c:data:`PyExc_TabError`" -#: c-api/exceptions.rst:933 +#: c-api/exceptions.rst:934 msgid ":exc:`TabError`" msgstr ":exc:`TabError`" -#: c-api/exceptions.rst:935 +#: c-api/exceptions.rst:936 msgid ":c:data:`PyExc_TimeoutError`" msgstr ":c:data:`PyExc_ImportError`" -#: c-api/exceptions.rst:935 +#: c-api/exceptions.rst:936 msgid ":exc:`TimeoutError`" msgstr ":exc:`TimeoutError`" -#: c-api/exceptions.rst:937 +#: c-api/exceptions.rst:938 msgid ":c:data:`PyExc_TypeError`" msgstr ":c:data:`PyExc_TypeError`" -#: c-api/exceptions.rst:937 +#: c-api/exceptions.rst:938 msgid ":exc:`TypeError`" msgstr ":exc:`TypeError`" -#: c-api/exceptions.rst:939 +#: c-api/exceptions.rst:940 msgid ":c:data:`PyExc_UnboundLocalError`" msgstr ":c:data:`PyExc_UnboundLocalError`" -#: c-api/exceptions.rst:939 +#: c-api/exceptions.rst:940 msgid ":exc:`UnboundLocalError`" msgstr ":exc:`UnboundLocalError`" -#: c-api/exceptions.rst:941 +#: c-api/exceptions.rst:942 msgid ":c:data:`PyExc_UnicodeDecodeError`" msgstr ":c:data:`PyExc_UnicodeDecodeError`" -#: c-api/exceptions.rst:941 +#: c-api/exceptions.rst:942 msgid ":exc:`UnicodeDecodeError`" msgstr ":exc:`UnicodeDecodeError`" -#: c-api/exceptions.rst:943 +#: c-api/exceptions.rst:944 msgid ":c:data:`PyExc_UnicodeEncodeError`" msgstr ":c:data:`PyExc_UnicodeEncodeError`" -#: c-api/exceptions.rst:943 +#: c-api/exceptions.rst:944 msgid ":exc:`UnicodeEncodeError`" msgstr ":exc:`UnicodeEncodeError`" -#: c-api/exceptions.rst:945 +#: c-api/exceptions.rst:946 msgid ":c:data:`PyExc_UnicodeError`" msgstr ":c:data:`PyExc_UnicodeError`" -#: c-api/exceptions.rst:945 +#: c-api/exceptions.rst:946 msgid ":exc:`UnicodeError`" msgstr ":exc:`UnicodeError`" -#: c-api/exceptions.rst:947 +#: c-api/exceptions.rst:948 msgid ":c:data:`PyExc_UnicodeTranslateError`" msgstr ":c:data:`PyExc_UnicodeTranslateError`" -#: c-api/exceptions.rst:947 +#: c-api/exceptions.rst:948 msgid ":exc:`UnicodeTranslateError`" msgstr ":exc:`UnicodeTranslateError`" -#: c-api/exceptions.rst:949 +#: c-api/exceptions.rst:950 msgid ":c:data:`PyExc_ValueError`" msgstr ":c:data:`PyExc_ValueError`" -#: c-api/exceptions.rst:949 +#: c-api/exceptions.rst:950 msgid ":exc:`ValueError`" msgstr ":exc:`ValueError`" -#: c-api/exceptions.rst:951 +#: c-api/exceptions.rst:952 msgid ":c:data:`PyExc_ZeroDivisionError`" msgstr ":c:data:`PyExc_ZeroDivisionError`" -#: c-api/exceptions.rst:951 +#: c-api/exceptions.rst:952 msgid ":exc:`ZeroDivisionError`" msgstr ":exc:`ZeroDivisionError`" -#: c-api/exceptions.rst:954 +#: c-api/exceptions.rst:955 msgid "" ":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" "`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" @@ -1285,57 +1281,57 @@ msgid "" "`PyExc_TimeoutError` were introduced following :pep:`3151`." msgstr "" -#: c-api/exceptions.rst:964 +#: c-api/exceptions.rst:965 msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." msgstr ":c:data:`PyExc_StopAsyncIteration` et :c:data:`PyExc_RecursionError`." -#: c-api/exceptions.rst:967 +#: c-api/exceptions.rst:968 msgid ":c:data:`PyExc_ModuleNotFoundError`." msgstr ":c:data:`PyExc_ModuleNotFoundError`." -#: c-api/exceptions.rst:970 +#: c-api/exceptions.rst:971 msgid "These are compatibility aliases to :c:data:`PyExc_OSError`:" msgstr "" -#: c-api/exceptions.rst:980 +#: c-api/exceptions.rst:981 msgid ":c:data:`PyExc_EnvironmentError`" msgstr ":c:data:`PyExc_EnvironmentError`" -#: c-api/exceptions.rst:982 +#: c-api/exceptions.rst:983 msgid ":c:data:`PyExc_IOError`" msgstr ":c:data:`PyExc_IOError`" -#: c-api/exceptions.rst:984 +#: c-api/exceptions.rst:985 msgid ":c:data:`PyExc_WindowsError`" msgstr ":c:data:`PyExc_WindowsError`" -#: c-api/exceptions.rst:984 -msgid "\\(3)" -msgstr "\\(3)" +#: c-api/exceptions.rst:985 +msgid "[2]_" +msgstr "" -#: c-api/exceptions.rst:987 +#: c-api/exceptions.rst:988 msgid "These aliases used to be separate exception types." msgstr "" -#: c-api/exceptions.rst:1051 +#: c-api/exceptions.rst:1052 msgid "Notes:" msgstr "Notes :" -#: c-api/exceptions.rst:993 +#: c-api/exceptions.rst:994 msgid "This is a base class for other standard exceptions." msgstr "C'est la classe de base pour les autres exceptions standards." -#: c-api/exceptions.rst:996 +#: c-api/exceptions.rst:997 msgid "" "Only defined on Windows; protect code that uses this by testing that the " "preprocessor macro ``MS_WINDOWS`` is defined." msgstr "" -#: c-api/exceptions.rst:1002 +#: c-api/exceptions.rst:1003 msgid "Standard Warning Categories" msgstr "" -#: c-api/exceptions.rst:1004 +#: c-api/exceptions.rst:1005 msgid "" "All standard Python warning categories are available as global variables " "whose names are ``PyExc_`` followed by the Python exception name. These have " @@ -1343,98 +1339,111 @@ msgid "" "here are all the variables:" msgstr "" -#: c-api/exceptions.rst:1025 +#: c-api/exceptions.rst:1026 msgid ":c:data:`PyExc_Warning`" msgstr ":c:data:`PyExc_Warning`" -#: c-api/exceptions.rst:1025 +#: c-api/exceptions.rst:1026 msgid ":exc:`Warning`" msgstr ":exc:`Warning`" -#: c-api/exceptions.rst:1027 +#: c-api/exceptions.rst:1026 +msgid "[3]_" +msgstr "" + +#: c-api/exceptions.rst:1028 msgid ":c:data:`PyExc_BytesWarning`" msgstr ":c:data:`PyExc_BytesWarning`" -#: c-api/exceptions.rst:1027 +#: c-api/exceptions.rst:1028 msgid ":exc:`BytesWarning`" msgstr ":exc:`BytesWarning`" -#: c-api/exceptions.rst:1029 +#: c-api/exceptions.rst:1030 msgid ":c:data:`PyExc_DeprecationWarning`" msgstr ":c:data:`PyExc_DeprecationWarning`" -#: c-api/exceptions.rst:1029 +#: c-api/exceptions.rst:1030 msgid ":exc:`DeprecationWarning`" msgstr ":exc:`DeprecationWarning`" -#: c-api/exceptions.rst:1031 +#: c-api/exceptions.rst:1032 msgid ":c:data:`PyExc_FutureWarning`" msgstr ":c:data:`PyExc_FutureWarning`" -#: c-api/exceptions.rst:1031 +#: c-api/exceptions.rst:1032 msgid ":exc:`FutureWarning`" msgstr ":exc:`FutureWarning`" -#: c-api/exceptions.rst:1033 +#: c-api/exceptions.rst:1034 msgid ":c:data:`PyExc_ImportWarning`" msgstr ":c:data:`PyExc_ImportWarning`" -#: c-api/exceptions.rst:1033 +#: c-api/exceptions.rst:1034 msgid ":exc:`ImportWarning`" msgstr ":exc:`ImportWarning`" -#: c-api/exceptions.rst:1035 +#: c-api/exceptions.rst:1036 msgid ":c:data:`PyExc_PendingDeprecationWarning`" msgstr ":c:data:`PyExc_PendingDeprecationWarning`" -#: c-api/exceptions.rst:1035 +#: c-api/exceptions.rst:1036 msgid ":exc:`PendingDeprecationWarning`" msgstr ":exc:`PendingDeprecationWarning`" -#: c-api/exceptions.rst:1037 +#: c-api/exceptions.rst:1038 msgid ":c:data:`PyExc_ResourceWarning`" msgstr ":c:data:`PyExc_ResourceWarning`" -#: c-api/exceptions.rst:1037 +#: c-api/exceptions.rst:1038 msgid ":exc:`ResourceWarning`" msgstr ":exc:`ResourceWarning`" -#: c-api/exceptions.rst:1039 +#: c-api/exceptions.rst:1040 msgid ":c:data:`PyExc_RuntimeWarning`" msgstr ":c:data:`PyExc_RuntimeWarning`" -#: c-api/exceptions.rst:1039 +#: c-api/exceptions.rst:1040 msgid ":exc:`RuntimeWarning`" msgstr ":exc:`RuntimeWarning`" -#: c-api/exceptions.rst:1041 +#: c-api/exceptions.rst:1042 msgid ":c:data:`PyExc_SyntaxWarning`" msgstr ":c:data:`PyExc_SyntaxWarning`" -#: c-api/exceptions.rst:1041 +#: c-api/exceptions.rst:1042 msgid ":exc:`SyntaxWarning`" msgstr ":exc:`SyntaxWarning`" -#: c-api/exceptions.rst:1043 +#: c-api/exceptions.rst:1044 msgid ":c:data:`PyExc_UnicodeWarning`" msgstr ":c:data:`PyExc_UnicodeWarning`" -#: c-api/exceptions.rst:1043 +#: c-api/exceptions.rst:1044 msgid ":exc:`UnicodeWarning`" msgstr ":exc:`UnicodeWarning`" -#: c-api/exceptions.rst:1045 +#: c-api/exceptions.rst:1046 msgid ":c:data:`PyExc_UserWarning`" msgstr ":c:data:`PyExc_UserWarning`" -#: c-api/exceptions.rst:1045 +#: c-api/exceptions.rst:1046 msgid ":exc:`UserWarning`" msgstr ":exc:`UserWarning`" -#: c-api/exceptions.rst:1048 +#: c-api/exceptions.rst:1049 msgid ":c:data:`PyExc_ResourceWarning`." msgstr ":c:data:`PyExc_ResourceWarning`." -#: c-api/exceptions.rst:1054 +#: c-api/exceptions.rst:1055 msgid "This is a base class for other standard warning categories." msgstr "C'est la classe de base pour les autres catégories de *warning*." + +#~ msgid "\\(1)" +#~ msgstr "\\(1)" + +#~ msgid "\\(2)" +#~ msgstr "\\(2)" + +#~ msgid "\\(3)" +#~ msgstr "\\(3)" diff --git a/c-api/function.po b/c-api/function.po index c60e6d04a3..21ba742b12 100644 --- a/c-api/function.po +++ b/c-api/function.po @@ -20,11 +20,11 @@ msgstr "Objets fonctions" #: c-api/function.rst:10 msgid "There are a few functions specific to Python functions." -msgstr "" +msgstr "Certaines fonctions sont spécifiques aux fonctions Python." #: c-api/function.rst:15 msgid "The C structure used for functions." -msgstr "" +msgstr "La structure C utilisée pour les fonctions." #: c-api/function.rst:22 msgid "" @@ -32,6 +32,8 @@ msgid "" "function type. It is exposed to Python programmers as ``types." "FunctionType``." msgstr "" +"C'est une instance de :c:type:`PyTypeObject` et représente le type fonction " +"en Python. Il est exposé aux développeurs comme ``types.FunctionType``." #: c-api/function.rst:28 msgid "" @@ -39,6 +41,9 @@ msgid "" "`PyFunction_Type`). The parameter must not be ``NULL``. This function " "always succeeds." msgstr "" +"Renvoie vrai si *o* est un objet de type fonction (a comme type :c:data:" +"`PyFunction_Type`). Le paramètre ne doit pas être ``NULL``. Cette fonction " +"réussit toujours." #: c-api/function.rst:34 msgid "" @@ -46,6 +51,8 @@ msgid "" "*globals* must be a dictionary with the global variables accessible to the " "function." msgstr "" +"Renvoie une nouvelle fonction associée avec l'objet *code*. *globals* doit " +"être un dictionnaire avec les variables globales accessibles à la fonction." #: c-api/function.rst:37 msgid "" @@ -65,11 +72,12 @@ msgstr "" #: c-api/function.rst:54 msgid "Return the code object associated with the function object *op*." -msgstr "" +msgstr "Renvoie l'objet code associé avec l'objet de la fonction *op*." #: c-api/function.rst:59 msgid "Return the globals dictionary associated with the function object *op*." msgstr "" +"Renvoie le dictionnaire global associé avec l'objet de la fonction *op*." #: c-api/function.rst:64 msgid "" @@ -83,37 +91,49 @@ msgid "" "Return the argument default values of the function object *op*. This can be " "a tuple of arguments or ``NULL``." msgstr "" +"Renvoie les valeurs par défaut de l'argument de l'objet de la fonction *op*. " +"Cela peut être un tuple d'arguments ou ``NULL``." #: c-api/function.rst:77 msgid "" "Set the argument default values for the function object *op*. *defaults* " "must be ``Py_None`` or a tuple." msgstr "" +"Définir les valeurs par défaut de l'argument pour l'objet de la fonction " +"*op*. *defaults* doit être ``Py_None`` ou un tuple." #: c-api/function.rst:94 c-api/function.rst:108 msgid "Raises :exc:`SystemError` and returns ``-1`` on failure." -msgstr "" +msgstr "Lève :exc:`SystemError` et renvoie ``-1`` en cas de d'échec." #: c-api/function.rst:85 msgid "" "Return the closure associated with the function object *op*. This can be " "``NULL`` or a tuple of cell objects." msgstr "" +"Renvoie la fermeture associée avec l'objet de la fonction *op*. Cela peut " +"être ``NULL`` ou un tuple d'objets cellule." #: c-api/function.rst:91 msgid "" "Set the closure associated with the function object *op*. *closure* must be " "``Py_None`` or a tuple of cell objects." msgstr "" +"Définir la fermeture associée avec l'objet de la fonction *op*. *closure* " +"doit être ``Py_None`` ou un tuple d'objets cellule." #: c-api/function.rst:99 msgid "" "Return the annotations of the function object *op*. This can be a mutable " "dictionary or ``NULL``." msgstr "" +"Renvoie les annotations de l'objet de la fonction *op*. Cela peut être un " +"dictionnaire mutable ou ``NULL``." #: c-api/function.rst:105 msgid "" "Set the annotations for the function object *op*. *annotations* must be a " "dictionary or ``Py_None``." msgstr "" +"Définir les annotations pour l'objet de la fonction *op*. *annotations* doit " +"être un dictionnaire ou ``Py_None``." diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index da2c4feaac..7bd683892d 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -21,11 +21,11 @@ msgstr "" #: c-api/gcsupport.rst:8 msgid "" "Python's support for detecting and collecting garbage which involves " -"circular references requires support from object types which are \"containers" -"\" for other objects which may also be containers. Types which do not store " -"references to other objects, or which only store references to atomic types " -"(such as numbers or strings), do not need to provide any explicit support " -"for garbage collection." +"circular references requires support from object types which are " +"\"containers\" for other objects which may also be containers. Types which " +"do not store references to other objects, or which only store references to " +"atomic types (such as numbers or strings), do not need to provide any " +"explicit support for garbage collection." msgstr "" #: c-api/gcsupport.rst:15 @@ -60,26 +60,61 @@ msgid "" "initialized, it must call :c:func:`PyObject_GC_Track`." msgstr "" +#: c-api/gcsupport.rst:36 +msgid "" +"Similarly, the deallocator for the object must conform to a similar pair of " +"rules:" +msgstr "" + #: c-api/gcsupport.rst:39 msgid "" +"Before fields which refer to other containers are invalidated, :c:func:" +"`PyObject_GC_UnTrack` must be called." +msgstr "" + +#: c-api/gcsupport.rst:42 +msgid "" +"The object's memory must be deallocated using :c:func:`PyObject_GC_Del`." +msgstr "" + +#: c-api/gcsupport.rst:45 +msgid "" +"If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least a :" +"c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one from its " +"subclass or subclasses." +msgstr "" + +#: c-api/gcsupport.rst:49 +msgid "" +"When calling :c:func:`PyType_Ready` or some of the APIs that indirectly call " +"it like :c:func:`PyType_FromSpecWithBases` or :c:func:`PyType_FromSpec` the " +"interpreter will automatically populate the :c:member:`~PyTypeObject." +"tp_flags`, :c:member:`~PyTypeObject.tp_traverse` and :c:member:" +"`~PyTypeObject.tp_clear` fields if the type inherits from a class that " +"implements the garbage collector protocol and the child class does *not* " +"include the :const:`Py_TPFLAGS_HAVE_GC` flag." +msgstr "" + +#: c-api/gcsupport.rst:59 +msgid "" "Analogous to :c:func:`PyObject_New` but for container objects with the :" "const:`Py_TPFLAGS_HAVE_GC` flag set." msgstr "" -#: c-api/gcsupport.rst:45 +#: c-api/gcsupport.rst:65 msgid "" "Analogous to :c:func:`PyObject_NewVar` but for container objects with the :" "const:`Py_TPFLAGS_HAVE_GC` flag set." msgstr "" -#: c-api/gcsupport.rst:51 +#: c-api/gcsupport.rst:71 msgid "" "Resize an object allocated by :c:func:`PyObject_NewVar`. Returns the " "resized object or ``NULL`` on failure. *op* must not be tracked by the " "collector yet." msgstr "" -#: c-api/gcsupport.rst:57 +#: c-api/gcsupport.rst:77 msgid "" "Adds the object *op* to the set of container objects tracked by the " "collector. The collector can run at unexpected times so objects must be " @@ -88,62 +123,45 @@ msgid "" "usually near the end of the constructor." msgstr "" -#: c-api/gcsupport.rst:66 +#: c-api/gcsupport.rst:86 msgid "" "Returns non-zero if the object implements the garbage collector protocol, " "otherwise returns 0." msgstr "" -#: c-api/gcsupport.rst:69 +#: c-api/gcsupport.rst:89 msgid "" "The object cannot be tracked by the garbage collector if this function " "returns 0." msgstr "" -#: c-api/gcsupport.rst:74 +#: c-api/gcsupport.rst:94 msgid "" "Returns 1 if the object type of *op* implements the GC protocol and *op* is " "being currently tracked by the garbage collector and 0 otherwise." msgstr "" -#: c-api/gcsupport.rst:77 +#: c-api/gcsupport.rst:97 msgid "This is analogous to the Python function :func:`gc.is_tracked`." msgstr "" -#: c-api/gcsupport.rst:84 +#: c-api/gcsupport.rst:104 msgid "" "Returns 1 if the object type of *op* implements the GC protocol and *op* has " "been already finalized by the garbage collector and 0 otherwise." msgstr "" -#: c-api/gcsupport.rst:87 +#: c-api/gcsupport.rst:107 msgid "This is analogous to the Python function :func:`gc.is_finalized`." msgstr "" -#: c-api/gcsupport.rst:91 -msgid "" -"Similarly, the deallocator for the object must conform to a similar pair of " -"rules:" -msgstr "" - -#: c-api/gcsupport.rst:94 -msgid "" -"Before fields which refer to other containers are invalidated, :c:func:" -"`PyObject_GC_UnTrack` must be called." -msgstr "" - -#: c-api/gcsupport.rst:97 -msgid "" -"The object's memory must be deallocated using :c:func:`PyObject_GC_Del`." -msgstr "" - -#: c-api/gcsupport.rst:102 +#: c-api/gcsupport.rst:114 msgid "" "Releases memory allocated to an object using :c:func:`PyObject_GC_New` or :c:" "func:`PyObject_GC_NewVar`." msgstr "" -#: c-api/gcsupport.rst:108 +#: c-api/gcsupport.rst:120 msgid "" "Remove the object *op* from the set of container objects tracked by the " "collector. Note that :c:func:`PyObject_GC_Track` can be called again on " @@ -153,19 +171,19 @@ msgid "" "handler become invalid." msgstr "" -#: c-api/gcsupport.rst:117 +#: c-api/gcsupport.rst:129 msgid "" "The :c:func:`_PyObject_GC_TRACK` and :c:func:`_PyObject_GC_UNTRACK` macros " "have been removed from the public C API." msgstr "" -#: c-api/gcsupport.rst:120 +#: c-api/gcsupport.rst:132 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function " "parameter of this type:" msgstr "" -#: c-api/gcsupport.rst:125 +#: c-api/gcsupport.rst:137 msgid "" "Type of the visitor function passed to the :c:member:`~PyTypeObject." "tp_traverse` handler. The function should be called with an object to " @@ -175,13 +193,13 @@ msgid "" "users will need to write their own visitor functions." msgstr "" -#: c-api/gcsupport.rst:132 +#: c-api/gcsupport.rst:144 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` handler must have the following " "type:" msgstr "" -#: c-api/gcsupport.rst:137 +#: c-api/gcsupport.rst:149 msgid "" "Traversal function for a container object. Implementations must call the " "*visit* function for each object directly contained by *self*, with the " @@ -191,7 +209,7 @@ msgid "" "returned immediately." msgstr "" -#: c-api/gcsupport.rst:144 +#: c-api/gcsupport.rst:156 msgid "" "To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:" "func:`Py_VISIT` macro is provided. In order to use this macro, the :c:" @@ -199,20 +217,20 @@ msgid "" "exactly *visit* and *arg*:" msgstr "" -#: c-api/gcsupport.rst:151 +#: c-api/gcsupport.rst:163 msgid "" "If *o* is not ``NULL``, call the *visit* callback, with arguments *o* and " "*arg*. If *visit* returns a non-zero value, then return it. Using this " "macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::" msgstr "" -#: c-api/gcsupport.rst:164 +#: c-api/gcsupport.rst:176 msgid "" "The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:" "`inquiry` type, or ``NULL`` if the object is immutable." msgstr "" -#: c-api/gcsupport.rst:170 +#: c-api/gcsupport.rst:182 msgid "" "Drop references that may have created reference cycles. Immutable objects " "do not have to define this method since they can never directly create " diff --git a/c-api/import.po b/c-api/import.po index 339895db92..985d717701 100644 --- a/c-api/import.po +++ b/c-api/import.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -311,6 +311,13 @@ msgid "" "`name` field; failure to provide the sentinel value can result in a memory " "fault. Returns ``0`` on success or ``-1`` if insufficient memory could be " "allocated to extend the internal table. In the event of failure, no modules " -"are added to the internal table. This should be called before :c:func:" +"are added to the internal table. This must be called before :c:func:" "`Py_Initialize`." msgstr "" + +#: c-api/import.rst:304 +msgid "" +"If Python is initialized multiple times, :c:func:`PyImport_AppendInittab` " +"or :c:func:`PyImport_ExtendInittab` must be called before each Python " +"initialization." +msgstr "" diff --git a/c-api/init.po b/c-api/init.po index 5da8f220de..b1f8a4e487 100644 --- a/c-api/init.po +++ b/c-api/init.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-11-29 18:22+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -626,7 +626,7 @@ msgid "" "name (set by :c:func:`Py_SetProgramName` above) and some environment " "variables. The returned string consists of a series of directory names " "separated by a platform dependent delimiter character. The delimiter " -"character is ``':'`` on Unix and Mac OS X, ``';'`` on Windows. The returned " +"character is ``':'`` on Unix and macOS, ``';'`` on Windows. The returned " "string points into static storage; the caller should not modify its value. " "The list :data:`sys.path` is initialized with this value on interpreter " "startup; it can be (and usually is) modified later to change the search path " @@ -640,8 +640,8 @@ msgid "" "default search path but uses the one provided instead. This is useful if " "Python is embedded by an application that has full knowledge of the location " "of all modules. The path components should be separated by the platform " -"dependent delimiter character, which is ``':'`` on Unix and Mac OS X, " -"``';'`` on Windows." +"dependent delimiter character, which is ``':'`` on Unix and macOS, ``';'`` " +"on Windows." msgstr "" #: c-api/init.rst:475 @@ -673,10 +673,10 @@ msgstr "" #: c-api/init.rst:500 msgid "" "The first word (up to the first space character) is the current Python " -"version; the first three characters are the major and minor version " -"separated by a period. The returned string points into static storage; the " -"caller should not modify its value. The value is available to Python code " -"as :data:`sys.version`." +"version; the first characters are the major and minor version separated by a " +"period. The returned string points into static storage; the caller should " +"not modify its value. The value is available to Python code as :data:`sys." +"version`." msgstr "" #: c-api/init.rst:510 @@ -684,10 +684,10 @@ msgid "" "Return the platform identifier for the current platform. On Unix, this is " "formed from the \"official\" name of the operating system, converted to " "lower case, followed by the major revision number; e.g., for Solaris 2.x, " -"which is also known as SunOS 5.x, the value is ``'sunos5'``. On Mac OS X, " -"it is ``'darwin'``. On Windows, it is ``'win'``. The returned string " -"points into static storage; the caller should not modify its value. The " -"value is available to Python code as ``sys.platform``." +"which is also known as SunOS 5.x, the value is ``'sunos5'``. On macOS, it " +"is ``'darwin'``. On Windows, it is ``'win'``. The returned string points " +"into static storage; the caller should not modify its value. The value is " +"available to Python code as ``sys.platform``." msgstr "" #: c-api/init.rst:521 @@ -1690,7 +1690,7 @@ msgstr "" #: c-api/init.rst:1470 msgid ":const:`PyTrace_CALL`" -msgstr "" +msgstr ":const:`PyTrace_CALL`" #: c-api/init.rst:1475 c-api/init.rst:1486 msgid "Always :c:data:`Py_None`." @@ -1698,7 +1698,7 @@ msgstr "" #: c-api/init.rst:1472 msgid ":const:`PyTrace_EXCEPTION`" -msgstr "" +msgstr ":const:`PyTrace_EXCEPTION`" #: c-api/init.rst:1472 msgid "Exception information as returned by :func:`sys.exc_info`." @@ -1706,11 +1706,11 @@ msgstr "" #: c-api/init.rst:1475 msgid ":const:`PyTrace_LINE`" -msgstr "" +msgstr ":const:`PyTrace_LINE`" #: c-api/init.rst:1477 msgid ":const:`PyTrace_RETURN`" -msgstr "" +msgstr ":const:`PyTrace_RETURN`" #: c-api/init.rst:1477 msgid "" @@ -1719,7 +1719,7 @@ msgstr "" #: c-api/init.rst:1480 msgid ":const:`PyTrace_C_CALL`" -msgstr "" +msgstr ":const:`PyTrace_C_CALL`" #: c-api/init.rst:1482 c-api/init.rst:1484 msgid "Function object being called." @@ -1727,15 +1727,15 @@ msgstr "" #: c-api/init.rst:1482 msgid ":const:`PyTrace_C_EXCEPTION`" -msgstr "" +msgstr ":const:`PyTrace_C_EXCEPTION`" #: c-api/init.rst:1484 msgid ":const:`PyTrace_C_RETURN`" -msgstr "" +msgstr ":const:`PyTrace_C_RETURN`" #: c-api/init.rst:1486 msgid ":const:`PyTrace_OPCODE`" -msgstr "" +msgstr ":const:`PyTrace_OPCODE`" #: c-api/init.rst:1491 msgid "" @@ -1955,7 +1955,7 @@ msgstr "" #: c-api/init.rst:1691 msgid "" -"A freed key becomes a dangling pointer, you should reset the key to `NULL`." +"A freed key becomes a dangling pointer. You should reset the key to `NULL`." msgstr "" #: c-api/init.rst:1696 diff --git a/c-api/init_config.po b/c-api/init_config.po index a54b179975..c5c1b860cc 100644 --- a/c-api/init_config.po +++ b/c-api/init_config.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-09-04 11:42+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -976,41 +976,43 @@ msgstr "" #: c-api/init_config.rst:733 msgid "" -"If ``PyImport_FrozenModules``, ``PyImport_AppendInittab()`` or " -"``PyImport_ExtendInittab()`` are used, they must be set or called after " -"Python preinitialization and before the Python initialization." +"If :c:func:`PyImport_FrozenModules`, :c:func:`PyImport_AppendInittab` or :c:" +"func:`PyImport_ExtendInittab` are used, they must be set or called after " +"Python preinitialization and before the Python initialization. If Python is " +"initialized multiple times, :c:func:`PyImport_AppendInittab` or :c:func:" +"`PyImport_ExtendInittab` must be called before each Python initialization." msgstr "" -#: c-api/init_config.rst:737 +#: c-api/init_config.rst:740 msgid "Example setting the program name::" msgstr "" -#: c-api/init_config.rst:765 +#: c-api/init_config.rst:768 msgid "" "More complete example modifying the default configuration, read the " "configuration, and then override some parameters::" msgstr "" -#: c-api/init_config.rst:816 +#: c-api/init_config.rst:819 msgid "Isolated Configuration" msgstr "" -#: c-api/init_config.rst:818 +#: c-api/init_config.rst:821 msgid "" ":c:func:`PyPreConfig_InitIsolatedConfig` and :c:func:" "`PyConfig_InitIsolatedConfig` functions create a configuration to isolate " "Python from the system. For example, to embed Python into an application." msgstr "" -#: c-api/init_config.rst:823 +#: c-api/init_config.rst:826 msgid "" -"This configuration ignores global configuration variables, environments " +"This configuration ignores global configuration variables, environment " "variables, command line arguments (:c:member:`PyConfig.argv` is not parsed) " "and user site directory. The C standard streams (ex: ``stdout``) and the " "LC_CTYPE locale are left unchanged. Signal handlers are not installed." msgstr "" -#: c-api/init_config.rst:828 +#: c-api/init_config.rst:831 msgid "" "Configuration files are still used with this configuration. Set the :ref:" "`Path Configuration ` (\"output fields\") to ignore these " @@ -1018,122 +1020,122 @@ msgid "" "configuration." msgstr "" -#: c-api/init_config.rst:837 +#: c-api/init_config.rst:840 msgid "Python Configuration" msgstr "" -#: c-api/init_config.rst:839 +#: c-api/init_config.rst:842 msgid "" ":c:func:`PyPreConfig_InitPythonConfig` and :c:func:" "`PyConfig_InitPythonConfig` functions create a configuration to build a " "customized Python which behaves as the regular Python." msgstr "" -#: c-api/init_config.rst:843 +#: c-api/init_config.rst:846 msgid "" "Environments variables and command line arguments are used to configure " "Python, whereas global configuration variables are ignored." msgstr "" -#: c-api/init_config.rst:846 +#: c-api/init_config.rst:849 msgid "" "This function enables C locale coercion (:pep:`538`) and UTF-8 Mode (:pep:" "`540`) depending on the LC_CTYPE locale, :envvar:`PYTHONUTF8` and :envvar:" "`PYTHONCOERCECLOCALE` environment variables." msgstr "" -#: c-api/init_config.rst:850 +#: c-api/init_config.rst:853 msgid "Example of customized Python always running in isolated mode::" msgstr "" -#: c-api/init_config.rst:889 +#: c-api/init_config.rst:892 msgid "Path Configuration" msgstr "" -#: c-api/init_config.rst:891 +#: c-api/init_config.rst:894 msgid ":c:type:`PyConfig` contains multiple fields for the path configuration:" msgstr "" -#: c-api/init_config.rst:893 +#: c-api/init_config.rst:896 msgid "Path configuration inputs:" msgstr "" -#: c-api/init_config.rst:895 +#: c-api/init_config.rst:898 msgid ":c:member:`PyConfig.home`" msgstr "" -#: c-api/init_config.rst:896 +#: c-api/init_config.rst:899 msgid ":c:member:`PyConfig.platlibdir`" msgstr "" -#: c-api/init_config.rst:897 +#: c-api/init_config.rst:900 msgid ":c:member:`PyConfig.pathconfig_warnings`" msgstr "" -#: c-api/init_config.rst:898 +#: c-api/init_config.rst:901 msgid ":c:member:`PyConfig.program_name`" msgstr "" -#: c-api/init_config.rst:899 +#: c-api/init_config.rst:902 msgid ":c:member:`PyConfig.pythonpath_env`" msgstr "" -#: c-api/init_config.rst:900 +#: c-api/init_config.rst:903 msgid "current working directory: to get absolute paths" msgstr "" -#: c-api/init_config.rst:901 +#: c-api/init_config.rst:904 msgid "" "``PATH`` environment variable to get the program full path (from :c:member:" "`PyConfig.program_name`)" msgstr "" -#: c-api/init_config.rst:903 +#: c-api/init_config.rst:906 msgid "``__PYVENV_LAUNCHER__`` environment variable" msgstr "" -#: c-api/init_config.rst:904 +#: c-api/init_config.rst:907 msgid "" -"(Windows only) Application paths in the registry under \"Software\\Python" -"\\PythonCore\\X.Y\\PythonPath\" of HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE " -"(where X.Y is the Python version)." +"(Windows only) Application paths in the registry under " +"\"Software\\Python\\PythonCore\\X.Y\\PythonPath\" of HKEY_CURRENT_USER and " +"HKEY_LOCAL_MACHINE (where X.Y is the Python version)." msgstr "" -#: c-api/init_config.rst:908 +#: c-api/init_config.rst:911 msgid "Path configuration output fields:" msgstr "" -#: c-api/init_config.rst:910 +#: c-api/init_config.rst:913 msgid ":c:member:`PyConfig.base_exec_prefix`" msgstr "" -#: c-api/init_config.rst:911 +#: c-api/init_config.rst:914 msgid ":c:member:`PyConfig.base_executable`" msgstr "" -#: c-api/init_config.rst:912 +#: c-api/init_config.rst:915 msgid ":c:member:`PyConfig.base_prefix`" msgstr "" -#: c-api/init_config.rst:913 +#: c-api/init_config.rst:916 msgid ":c:member:`PyConfig.exec_prefix`" msgstr "" -#: c-api/init_config.rst:914 +#: c-api/init_config.rst:917 msgid ":c:member:`PyConfig.executable`" msgstr "" -#: c-api/init_config.rst:915 +#: c-api/init_config.rst:918 msgid "" ":c:member:`PyConfig.module_search_paths_set`, :c:member:`PyConfig." "module_search_paths`" msgstr "" -#: c-api/init_config.rst:917 +#: c-api/init_config.rst:920 msgid ":c:member:`PyConfig.prefix`" msgstr "" -#: c-api/init_config.rst:919 +#: c-api/init_config.rst:922 msgid "" "If at least one \"output field\" is not set, Python calculates the path " "configuration to fill unset fields. If :c:member:`~PyConfig." @@ -1142,7 +1144,7 @@ msgid "" "module_search_paths_set` is set to 1." msgstr "" -#: c-api/init_config.rst:925 +#: c-api/init_config.rst:928 msgid "" "It is possible to completely ignore the function calculating the default " "path configuration by setting explicitly all path configuration output " @@ -1152,52 +1154,52 @@ msgid "" "well." msgstr "" -#: c-api/init_config.rst:932 +#: c-api/init_config.rst:935 msgid "" "Set :c:member:`~PyConfig.pathconfig_warnings` to 0 to suppress warnings when " "calculating the path configuration (Unix only, Windows does not log any " "warning)." msgstr "" -#: c-api/init_config.rst:935 +#: c-api/init_config.rst:938 msgid "" "If :c:member:`~PyConfig.base_prefix` or :c:member:`~PyConfig." "base_exec_prefix` fields are not set, they inherit their value from :c:" "member:`~PyConfig.prefix` and :c:member:`~PyConfig.exec_prefix` respectively." msgstr "" -#: c-api/init_config.rst:939 +#: c-api/init_config.rst:942 msgid ":c:func:`Py_RunMain` and :c:func:`Py_Main` modify :data:`sys.path`:" msgstr "" -#: c-api/init_config.rst:941 +#: c-api/init_config.rst:944 msgid "" "If :c:member:`~PyConfig.run_filename` is set and is a directory which " "contains a ``__main__.py`` script, prepend :c:member:`~PyConfig." "run_filename` to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:944 +#: c-api/init_config.rst:947 msgid "If :c:member:`~PyConfig.isolated` is zero:" msgstr "" -#: c-api/init_config.rst:946 +#: c-api/init_config.rst:949 msgid "" "If :c:member:`~PyConfig.run_module` is set, prepend the current directory " "to :data:`sys.path`. Do nothing if the current directory cannot be read." msgstr "" -#: c-api/init_config.rst:948 +#: c-api/init_config.rst:951 msgid "" "If :c:member:`~PyConfig.run_filename` is set, prepend the directory of the " "filename to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:950 +#: c-api/init_config.rst:953 msgid "Otherwise, prepend an empty string to :data:`sys.path`." msgstr "" -#: c-api/init_config.rst:952 +#: c-api/init_config.rst:955 msgid "" "If :c:member:`~PyConfig.site_import` is non-zero, :data:`sys.path` can be " "modified by the :mod:`site` module. If :c:member:`~PyConfig." @@ -1206,152 +1208,152 @@ msgid "" "data:`sys.path`." msgstr "" -#: c-api/init_config.rst:958 +#: c-api/init_config.rst:961 msgid "The following configuration files are used by the path configuration:" msgstr "" -#: c-api/init_config.rst:960 +#: c-api/init_config.rst:963 msgid "``pyvenv.cfg``" msgstr "" -#: c-api/init_config.rst:961 +#: c-api/init_config.rst:964 msgid "``python._pth`` (Windows only)" msgstr "" -#: c-api/init_config.rst:962 +#: c-api/init_config.rst:965 msgid "``pybuilddir.txt`` (Unix only)" msgstr "" -#: c-api/init_config.rst:964 +#: c-api/init_config.rst:967 msgid "" "The ``__PYVENV_LAUNCHER__`` environment variable is used to set :c:member:" "`PyConfig.base_executable`" msgstr "" -#: c-api/init_config.rst:969 +#: c-api/init_config.rst:972 msgid "Py_RunMain()" msgstr "" -#: c-api/init_config.rst:973 +#: c-api/init_config.rst:976 msgid "" "Execute the command (:c:member:`PyConfig.run_command`), the script (:c:" "member:`PyConfig.run_filename`) or the module (:c:member:`PyConfig." "run_module`) specified on the command line or in the configuration." msgstr "" -#: c-api/init_config.rst:978 +#: c-api/init_config.rst:981 msgid "By default and when if :option:`-i` option is used, run the REPL." msgstr "" -#: c-api/init_config.rst:980 +#: c-api/init_config.rst:983 msgid "" "Finally, finalizes Python and returns an exit status that can be passed to " "the ``exit()`` function." msgstr "" -#: c-api/init_config.rst:983 +#: c-api/init_config.rst:986 msgid "" "See :ref:`Python Configuration ` for an example of " "customized Python always running in isolated mode using :c:func:`Py_RunMain`." msgstr "" -#: c-api/init_config.rst:989 +#: c-api/init_config.rst:992 msgid "Py_GetArgcArgv()" msgstr "" -#: c-api/init_config.rst:993 +#: c-api/init_config.rst:996 msgid "Get the original command line arguments, before Python modified them." msgstr "" -#: c-api/init_config.rst:997 +#: c-api/init_config.rst:1000 msgid "Multi-Phase Initialization Private Provisional API" msgstr "" -#: c-api/init_config.rst:999 +#: c-api/init_config.rst:1002 msgid "" "This section is a private provisional API introducing multi-phase " -"initialization, the core feature of the :pep:`432`:" +"initialization, the core feature of :pep:`432`:" msgstr "" -#: c-api/init_config.rst:1002 +#: c-api/init_config.rst:1005 msgid "\"Core\" initialization phase, \"bare minimum Python\":" msgstr "" -#: c-api/init_config.rst:1004 +#: c-api/init_config.rst:1007 msgid "Builtin types;" msgstr "" -#: c-api/init_config.rst:1005 +#: c-api/init_config.rst:1008 msgid "Builtin exceptions;" msgstr "" -#: c-api/init_config.rst:1006 +#: c-api/init_config.rst:1009 msgid "Builtin and frozen modules;" msgstr "" -#: c-api/init_config.rst:1007 +#: c-api/init_config.rst:1010 msgid "" "The :mod:`sys` module is only partially initialized (ex: :data:`sys.path` " "doesn't exist yet)." msgstr "" -#: c-api/init_config.rst:1010 +#: c-api/init_config.rst:1013 msgid "\"Main\" initialization phase, Python is fully initialized:" msgstr "" -#: c-api/init_config.rst:1012 +#: c-api/init_config.rst:1015 msgid "Install and configure :mod:`importlib`;" msgstr "" -#: c-api/init_config.rst:1013 +#: c-api/init_config.rst:1016 msgid "Apply the :ref:`Path Configuration `;" msgstr "" -#: c-api/init_config.rst:1014 +#: c-api/init_config.rst:1017 msgid "Install signal handlers;" msgstr "" -#: c-api/init_config.rst:1015 +#: c-api/init_config.rst:1018 msgid "" "Finish :mod:`sys` module initialization (ex: create :data:`sys.stdout` and :" "data:`sys.path`);" msgstr "" -#: c-api/init_config.rst:1017 +#: c-api/init_config.rst:1020 msgid "" "Enable optional features like :mod:`faulthandler` and :mod:`tracemalloc`;" msgstr "" -#: c-api/init_config.rst:1018 +#: c-api/init_config.rst:1021 msgid "Import the :mod:`site` module;" msgstr "" -#: c-api/init_config.rst:1019 +#: c-api/init_config.rst:1022 msgid "etc." msgstr "" -#: c-api/init_config.rst:1021 +#: c-api/init_config.rst:1024 msgid "Private provisional API:" msgstr "" -#: c-api/init_config.rst:1023 +#: c-api/init_config.rst:1026 msgid "" ":c:member:`PyConfig._init_main`: if set to 0, :c:func:" "`Py_InitializeFromConfig` stops at the \"Core\" initialization phase." msgstr "" -#: c-api/init_config.rst:1025 +#: c-api/init_config.rst:1028 msgid "" ":c:member:`PyConfig._isolated_interpreter`: if non-zero, disallow threads, " "subprocesses and fork." msgstr "" -#: c-api/init_config.rst:1030 +#: c-api/init_config.rst:1033 msgid "" "Move to the \"Main\" initialization phase, finish the Python initialization." msgstr "" -#: c-api/init_config.rst:1032 +#: c-api/init_config.rst:1035 msgid "" "No module is imported during the \"Core\" phase and the ``importlib`` module " "is not configured: the :ref:`Path Configuration ` is only " @@ -1360,14 +1362,14 @@ msgid "" "maybe install a custom :data:`sys.meta_path` importer or an import hook, etc." msgstr "" -#: c-api/init_config.rst:1038 +#: c-api/init_config.rst:1041 msgid "" "It may become possible to calculatin the :ref:`Path Configuration ` in Python, after the Core phase and before the Main phase, which is " "one of the :pep:`432` motivation." msgstr "" -#: c-api/init_config.rst:1042 +#: c-api/init_config.rst:1045 msgid "" "The \"Core\" phase is not properly defined: what should be and what should " "not be available at this phase is not specified yet. The API is marked as " @@ -1375,7 +1377,7 @@ msgid "" "until a proper public API is designed." msgstr "" -#: c-api/init_config.rst:1047 +#: c-api/init_config.rst:1050 msgid "" "Example running Python code between \"Core\" and \"Main\" initialization " "phases::" diff --git a/c-api/intro.po b/c-api/intro.po index c33437a1b3..314dec668f 100644 --- a/c-api/intro.po +++ b/c-api/intro.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -297,7 +297,7 @@ msgstr "" #: c-api/intro.rst:253 msgid "Reference Counts" -msgstr "" +msgstr "Compteurs de références" #: c-api/intro.rst:255 msgid "" @@ -499,11 +499,19 @@ msgid "" "that use them." msgstr "" -#: c-api/intro.rst:509 +#: c-api/intro.rst:507 +msgid "" +"A signed integral type such that ``sizeof(Py_ssize_t) == sizeof(size_t)``. " +"C99 doesn't define such a thing directly (size_t is an unsigned integral " +"type). See :pep:`353` for details. ``PY_SSIZE_T_MAX`` is the largest " +"positive value of type :c:type:`Py_ssize_t`." +msgstr "" + +#: c-api/intro.rst:516 msgid "Exceptions" msgstr "Exceptions" -#: c-api/intro.rst:511 +#: c-api/intro.rst:518 msgid "" "The Python programmer only needs to deal with exceptions if specific error " "handling is required; unhandled exceptions are automatically propagated to " @@ -512,7 +520,7 @@ msgid "" "stack traceback." msgstr "" -#: c-api/intro.rst:519 +#: c-api/intro.rst:526 msgid "" "For C programmers, however, error checking always has to be explicit. All " "functions in the Python/C API can raise exceptions, unless an explicit claim " @@ -527,7 +535,7 @@ msgid "" "explicitly documented." msgstr "" -#: c-api/intro.rst:534 +#: c-api/intro.rst:541 msgid "" "Exception state is maintained in per-thread storage (this is equivalent to " "using global storage in an unthreaded application). A thread can be in one " @@ -540,7 +548,7 @@ msgid "" "clears the exception state." msgstr "" -#: c-api/intro.rst:544 +#: c-api/intro.rst:551 msgid "" "The full exception state consists of three objects (all of which can be " "``NULL``): the exception type, the corresponding exception value, and the " @@ -553,7 +561,7 @@ msgid "" "``sys.exc_info()`` and friends." msgstr "" -#: c-api/intro.rst:556 +#: c-api/intro.rst:563 msgid "" "Note that starting with Python 1.5, the preferred, thread-safe way to access " "the exception state from Python code is to call the function :func:`sys." @@ -567,7 +575,7 @@ msgid "" "referenced by the stack frames in the traceback." msgstr "" -#: c-api/intro.rst:567 +#: c-api/intro.rst:574 msgid "" "As a general principle, a function that calls another function to perform " "some task should check whether the called function raised an exception, and " @@ -578,7 +586,7 @@ msgid "" "of the error." msgstr "" -#: c-api/intro.rst:576 +#: c-api/intro.rst:583 msgid "" "A simple example of detecting exceptions and passing them on is shown in " "the :c:func:`sum_sequence` example above. It so happens that this example " @@ -587,11 +595,11 @@ msgid "" "why you like Python, we show the equivalent Python code::" msgstr "" -#: c-api/intro.rst:591 +#: c-api/intro.rst:598 msgid "Here is the corresponding C code, in all its glory::" msgstr "" -#: c-api/intro.rst:643 +#: c-api/intro.rst:650 msgid "" "This example represents an endorsed use of the ``goto`` statement in C! It " "illustrates the use of :c:func:`PyErr_ExceptionMatches` and :c:func:" @@ -604,11 +612,11 @@ msgid "" "success after the final call made is successful." msgstr "" -#: c-api/intro.rst:657 +#: c-api/intro.rst:664 msgid "Embedding Python" msgstr "Embarquer Python" -#: c-api/intro.rst:659 +#: c-api/intro.rst:666 msgid "" "The one important task that only embedders (as opposed to extension writers) " "of the Python interpreter have to worry about is the initialization, and " @@ -616,7 +624,7 @@ msgid "" "the interpreter can only be used after the interpreter has been initialized." msgstr "" -#: c-api/intro.rst:672 +#: c-api/intro.rst:679 msgid "" "The basic initialization function is :c:func:`Py_Initialize`. This " "initializes the table of loaded modules, and creates the fundamental " @@ -624,7 +632,7 @@ msgid "" "initializes the module search path (``sys.path``)." msgstr "" -#: c-api/intro.rst:679 +#: c-api/intro.rst:686 msgid "" ":c:func:`Py_Initialize` does not set the \"script argument list\" (``sys." "argv``). If this variable is needed by Python code that will be executed " @@ -632,7 +640,7 @@ msgid "" "argv, updatepath)`` after the call to :c:func:`Py_Initialize`." msgstr "" -#: c-api/intro.rst:684 +#: c-api/intro.rst:691 msgid "" "On most systems (in particular, on Unix and Windows, although the details " "are slightly different), :c:func:`Py_Initialize` calculates the module " @@ -644,7 +652,7 @@ msgid "" "on the shell command search path (the environment variable :envvar:`PATH`)." msgstr "" -#: c-api/intro.rst:693 +#: c-api/intro.rst:700 msgid "" "For instance, if the Python executable is found in :file:`/usr/local/bin/" "python`, it will assume that the libraries are in :file:`/usr/local/lib/" @@ -655,7 +663,7 @@ msgid "" "in front of the standard path by setting :envvar:`PYTHONPATH`." msgstr "" -#: c-api/intro.rst:708 +#: c-api/intro.rst:715 msgid "" "The embedding application can steer the search by calling " "``Py_SetProgramName(file)`` *before* calling :c:func:`Py_Initialize`. Note " @@ -666,7 +674,7 @@ msgid "" "func:`Py_GetProgramFullPath` (all defined in :file:`Modules/getpath.c`)." msgstr "" -#: c-api/intro.rst:718 +#: c-api/intro.rst:725 msgid "" "Sometimes, it is desirable to \"uninitialize\" Python. For instance, the " "application may want to start over (make another call to :c:func:" @@ -680,18 +688,18 @@ msgid "" "released." msgstr "" -#: c-api/intro.rst:732 +#: c-api/intro.rst:739 msgid "Debugging Builds" msgstr "" -#: c-api/intro.rst:734 +#: c-api/intro.rst:741 msgid "" "Python can be built with several macros to enable extra checks of the " "interpreter and extension modules. These checks tend to add a large amount " "of overhead to the runtime so they are not enabled by default." msgstr "" -#: c-api/intro.rst:738 +#: c-api/intro.rst:745 msgid "" "A full list of the various types of debugging builds is in the file :file:" "`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are " @@ -701,7 +709,7 @@ msgid "" "section." msgstr "" -#: c-api/intro.rst:744 +#: c-api/intro.rst:751 msgid "" "Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined " "produces what is generally meant by \"a debug build\" of Python. :c:macro:" @@ -711,61 +719,61 @@ msgid "" "enabled in the Unix build, compiler optimization is disabled." msgstr "" -#: c-api/intro.rst:751 +#: c-api/intro.rst:758 msgid "" "In addition to the reference count debugging described below, the following " "extra checks are performed:" msgstr "" -#: c-api/intro.rst:754 +#: c-api/intro.rst:761 msgid "Extra checks are added to the object allocator." msgstr "" -#: c-api/intro.rst:756 +#: c-api/intro.rst:763 msgid "Extra checks are added to the parser and compiler." msgstr "" -#: c-api/intro.rst:758 +#: c-api/intro.rst:765 msgid "" "Downcasts from wide types to narrow types are checked for loss of " "information." msgstr "" -#: c-api/intro.rst:760 +#: c-api/intro.rst:767 msgid "" "A number of assertions are added to the dictionary and set implementations. " "In addition, the set object acquires a :meth:`test_c_api` method." msgstr "" -#: c-api/intro.rst:763 +#: c-api/intro.rst:770 msgid "Sanity checks of the input arguments are added to frame creation." msgstr "" -#: c-api/intro.rst:765 +#: c-api/intro.rst:772 msgid "" "The storage for ints is initialized with a known invalid pattern to catch " "reference to uninitialized digits." msgstr "" -#: c-api/intro.rst:768 +#: c-api/intro.rst:775 msgid "" "Low-level tracing and extra exception checking are added to the runtime " "virtual machine." msgstr "" -#: c-api/intro.rst:771 +#: c-api/intro.rst:778 msgid "Extra checks are added to the memory arena implementation." msgstr "" -#: c-api/intro.rst:773 +#: c-api/intro.rst:780 msgid "Extra debugging is added to the thread module." msgstr "" -#: c-api/intro.rst:775 +#: c-api/intro.rst:782 msgid "There may be additional checks not mentioned here." msgstr "" -#: c-api/intro.rst:777 +#: c-api/intro.rst:784 msgid "" "Defining :c:macro:`Py_TRACE_REFS` enables reference tracing. When defined, " "a circular doubly linked list of active objects is maintained by adding two " @@ -775,7 +783,7 @@ msgid "" "macro:`Py_DEBUG`." msgstr "" -#: c-api/intro.rst:783 +#: c-api/intro.rst:790 msgid "" "Please refer to :file:`Misc/SpecialBuilds.txt` in the Python source " "distribution for more detailed information." diff --git a/c-api/long.po b/c-api/long.po index 6d9368fb4c..488441f14b 100644 --- a/c-api/long.po +++ b/c-api/long.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -72,7 +72,7 @@ msgstr "" #: c-api/long.rst:43 msgid "" "The current implementation keeps an array of integer objects for all " -"integers between ``-5`` and ``256``, when you create an int in that range " +"integers between ``-5`` and ``256``. When you create an int in that range " "you actually just get back a reference to the existing object." msgstr "" diff --git a/c-api/mapping.po b/c-api/mapping.po index 4f1d3a2386..ba6a54e2c5 100644 --- a/c-api/mapping.po +++ b/c-api/mapping.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-01-28 14:58+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -32,11 +32,13 @@ msgstr "" # → pas correct en VO ! # - "This function always succeeds." équivaut-il à "jamais d'erreur" ? #: c-api/mapping.rst:14 +#, fuzzy msgid "" -"Return ``1`` if the object provides mapping protocol or supports slicing, " -"and ``0`` otherwise. Note that it returns ``1`` for Python classes with a :" -"meth:`__getitem__` method since in general case it is impossible to " -"determine what type of keys it supports. This function always succeeds." +"Return ``1`` if the object provides the mapping protocol or supports " +"slicing, and ``0`` otherwise. Note that it returns ``1`` for Python classes " +"with a :meth:`__getitem__` method, since in general it is impossible to " +"determine what type of keys the class supports. This function always " +"succeeds." msgstr "" "Renvoie ``1`` si l'objet prend en charge le protocole de correspondance ou " "le découpage en tranches et ``0`` sinon. Notez qu'elle renvoie ``1`` pour " diff --git a/c-api/memory.po b/c-api/memory.po index 673614bcbc..d336ca0f2a 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -478,8 +478,8 @@ msgstr "" #: c-api/memory.rst:364 msgid "" -"Structure used to describe a memory block allocator. The structure has four " -"fields:" +"Structure used to describe a memory block allocator. The structure has the " +"following fields:" msgstr "" #: c-api/memory.rst:513 diff --git a/c-api/method.po b/c-api/method.po index 4519cfcf4d..583d3ea249 100644 --- a/c-api/method.po +++ b/c-api/method.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -40,7 +40,7 @@ msgstr "" #: c-api/method.rst:30 msgid "" -"Return a new instance method object, with *func* being any callable object " +"Return a new instance method object, with *func* being any callable object. " "*func* is the function that will be called when the instance method is " "called." msgstr "" diff --git a/c-api/module.po b/c-api/module.po index fd4240f869..653b0fb10b 100644 --- a/c-api/module.po +++ b/c-api/module.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -213,7 +213,7 @@ msgid "" "``NULL`` if not needed." msgstr "" -#: c-api/module.rst:217 c-api/module.rst:232 +#: c-api/module.rst:217 c-api/module.rst:238 msgid "" "This function is not called if the module state was requested but is not " "allocated yet. This is the case immediately after the module is created and " @@ -223,7 +223,7 @@ msgid "" "``NULL``." msgstr "" -#: c-api/module.rst:224 c-api/module.rst:239 +#: c-api/module.rst:230 c-api/module.rst:245 msgid "No longer called before the module state is allocated." msgstr "" @@ -233,55 +233,64 @@ msgid "" "``NULL`` if not needed." msgstr "" -#: c-api/module.rst:229 +#: c-api/module.rst:224 +msgid "" +"Like :c:member:`PyTypeObject.tp_clear`, this function is not *always* called " +"before a module is deallocated. For example, when reference counting is " +"enough to determine that an object is no longer used, the cyclic garbage " +"collector is not involved and :c:member:`~PyModuleDef.m_free` is called " +"directly." +msgstr "" + +#: c-api/module.rst:235 msgid "" "A function to call during deallocation of the module object, or ``NULL`` if " "not needed." msgstr "" -#: c-api/module.rst:243 +#: c-api/module.rst:249 msgid "Single-phase initialization" msgstr "" -#: c-api/module.rst:245 +#: c-api/module.rst:251 msgid "" "The module initialization function may create and return the module object " "directly. This is referred to as \"single-phase initialization\", and uses " "one of the following two module creation functions:" msgstr "" -#: c-api/module.rst:251 +#: c-api/module.rst:257 msgid "" "Create a new module object, given the definition in *def*. This behaves " "like :c:func:`PyModule_Create2` with *module_api_version* set to :const:" "`PYTHON_API_VERSION`." msgstr "" -#: c-api/module.rst:258 +#: c-api/module.rst:264 msgid "" "Create a new module object, given the definition in *def*, assuming the API " "version *module_api_version*. If that version does not match the version of " "the running interpreter, a :exc:`RuntimeWarning` is emitted." msgstr "" -#: c-api/module.rst:264 +#: c-api/module.rst:270 msgid "" "Most uses of this function should be using :c:func:`PyModule_Create` " "instead; only use this if you are sure you need it." msgstr "" -#: c-api/module.rst:267 +#: c-api/module.rst:273 msgid "" "Before it is returned from in the initialization function, the resulting " "module object is typically populated using functions like :c:func:" "`PyModule_AddObject`." msgstr "" -#: c-api/module.rst:273 +#: c-api/module.rst:279 msgid "Multi-phase initialization" msgstr "" -#: c-api/module.rst:275 +#: c-api/module.rst:281 msgid "" "An alternate way to specify extensions is to request \"multi-phase " "initialization\". Extension modules created this way behave more like Python " @@ -291,7 +300,7 @@ msgid "" "methods of classes." msgstr "" -#: c-api/module.rst:282 +#: c-api/module.rst:288 msgid "" "Unlike modules created using single-phase initialization, these modules are " "not singletons: if the *sys.modules* entry is removed and the module is re-" @@ -304,14 +313,14 @@ msgid "" "or individual classes created with :c:func:`PyType_FromSpec`)." msgstr "" -#: c-api/module.rst:292 +#: c-api/module.rst:298 msgid "" "All modules created using multi-phase initialization are expected to " "support :ref:`sub-interpreters `. Making sure " "multiple modules are independent is typically enough to achieve this." msgstr "" -#: c-api/module.rst:296 +#: c-api/module.rst:302 msgid "" "To request multi-phase initialization, the initialization function " "(PyInit_modulename) returns a :c:type:`PyModuleDef` instance with non-empty :" @@ -319,65 +328,65 @@ msgid "" "instance must be initialized with the following function:" msgstr "" -#: c-api/module.rst:303 +#: c-api/module.rst:309 msgid "" "Ensures a module definition is a properly initialized Python object that " "correctly reports its type and reference count." msgstr "" -#: c-api/module.rst:306 +#: c-api/module.rst:312 msgid "Returns *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." msgstr "" -#: c-api/module.rst:310 +#: c-api/module.rst:316 msgid "" "The *m_slots* member of the module definition must point to an array of " "``PyModuleDef_Slot`` structures:" msgstr "" -#: c-api/module.rst:317 +#: c-api/module.rst:323 msgid "A slot ID, chosen from the available values explained below." msgstr "" -#: c-api/module.rst:321 +#: c-api/module.rst:327 msgid "Value of the slot, whose meaning depends on the slot ID." msgstr "" -#: c-api/module.rst:325 +#: c-api/module.rst:331 msgid "The *m_slots* array must be terminated by a slot with id 0." msgstr "" -#: c-api/module.rst:327 +#: c-api/module.rst:333 msgid "The available slot types are:" msgstr "" -#: c-api/module.rst:331 +#: c-api/module.rst:337 msgid "" "Specifies a function that is called to create the module object itself. The " "*value* pointer of this slot must point to a function of the signature:" msgstr "" -#: c-api/module.rst:336 +#: c-api/module.rst:342 msgid "" "The function receives a :py:class:`~importlib.machinery.ModuleSpec` " "instance, as defined in :PEP:`451`, and the module definition. It should " "return a new module object, or set an error and return ``NULL``." msgstr "" -#: c-api/module.rst:341 +#: c-api/module.rst:347 msgid "" "This function should be kept minimal. In particular, it should not call " "arbitrary Python code, as trying to import the same module again may result " "in an infinite loop." msgstr "" -#: c-api/module.rst:345 +#: c-api/module.rst:351 msgid "" "Multiple ``Py_mod_create`` slots may not be specified in one module " "definition." msgstr "" -#: c-api/module.rst:348 +#: c-api/module.rst:354 msgid "" "If ``Py_mod_create`` is not specified, the import machinery will create a " "normal module object using :c:func:`PyModule_New`. The name is taken from " @@ -386,7 +395,7 @@ msgid "" "through symlinks, all while sharing a single module definition." msgstr "" -#: c-api/module.rst:354 +#: c-api/module.rst:360 msgid "" "There is no requirement for the returned object to be an instance of :c:type:" "`PyModule_Type`. Any type can be used, as long as it supports setting and " @@ -396,7 +405,7 @@ msgid "" "``Py_mod_create``." msgstr "" -#: c-api/module.rst:363 +#: c-api/module.rst:369 msgid "" "Specifies a function that is called to *execute* the module. This is " "equivalent to executing the code of a Python module: typically, this " @@ -404,21 +413,21 @@ msgid "" "function is:" msgstr "" -#: c-api/module.rst:370 +#: c-api/module.rst:376 msgid "" "If multiple ``Py_mod_exec`` slots are specified, they are processed in the " "order they appear in the *m_slots* array." msgstr "" -#: c-api/module.rst:373 +#: c-api/module.rst:379 msgid "See :PEP:`489` for more details on multi-phase initialization." msgstr "" -#: c-api/module.rst:376 +#: c-api/module.rst:382 msgid "Low-level module creation functions" msgstr "" -#: c-api/module.rst:378 +#: c-api/module.rst:384 msgid "" "The following functions are called under the hood when using multi-phase " "initialization. They can be used directly, for example when creating module " @@ -426,14 +435,14 @@ msgid "" "``PyModule_ExecDef`` must be called to fully initialize a module." msgstr "" -#: c-api/module.rst:385 +#: c-api/module.rst:391 msgid "" "Create a new module object, given the definition in *module* and the " "ModuleSpec *spec*. This behaves like :c:func:`PyModule_FromDefAndSpec2` " "with *module_api_version* set to :const:`PYTHON_API_VERSION`." msgstr "" -#: c-api/module.rst:393 +#: c-api/module.rst:399 msgid "" "Create a new module object, given the definition in *module* and the " "ModuleSpec *spec*, assuming the API version *module_api_version*. If that " @@ -441,24 +450,24 @@ msgid "" "`RuntimeWarning` is emitted." msgstr "" -#: c-api/module.rst:400 +#: c-api/module.rst:406 msgid "" "Most uses of this function should be using :c:func:`PyModule_FromDefAndSpec` " "instead; only use this if you are sure you need it." msgstr "" -#: c-api/module.rst:407 +#: c-api/module.rst:413 msgid "Process any execution slots (:c:data:`Py_mod_exec`) given in *def*." msgstr "" -#: c-api/module.rst:413 +#: c-api/module.rst:419 msgid "" "Set the docstring for *module* to *docstring*. This function is called " "automatically when creating a module from ``PyModuleDef``, using either " "``PyModule_Create`` or ``PyModule_FromDefAndSpec``." msgstr "" -#: c-api/module.rst:422 +#: c-api/module.rst:428 msgid "" "Add the functions from the ``NULL`` terminated *functions* array to " "*module*. Refer to the :c:type:`PyMethodDef` documentation for details on " @@ -470,11 +479,11 @@ msgid "" "``PyModule_FromDefAndSpec``." msgstr "" -#: c-api/module.rst:434 +#: c-api/module.rst:440 msgid "Support functions" msgstr "" -#: c-api/module.rst:436 +#: c-api/module.rst:442 msgid "" "The module initialization function (if using single phase initialization) or " "a function called from a module execution slot (if using multi-phase " @@ -482,40 +491,40 @@ msgid "" "module state:" msgstr "" -#: c-api/module.rst:443 +#: c-api/module.rst:449 msgid "" "Add an object to *module* as *name*. This is a convenience function which " "can be used from the module's initialization function. This steals a " "reference to *value* on success. Return ``-1`` on error, ``0`` on success." msgstr "" -#: c-api/module.rst:449 +#: c-api/module.rst:455 msgid "" "Unlike other functions that steal references, ``PyModule_AddObject()`` only " "decrements the reference count of *value* **on success**." msgstr "" -#: c-api/module.rst:452 +#: c-api/module.rst:458 msgid "" "This means that its return value must be checked, and calling code must :c:" "func:`Py_DECREF` *value* manually on error. Example usage::" msgstr "" -#: c-api/module.rst:464 +#: c-api/module.rst:470 msgid "" "Add an integer constant to *module* as *name*. This convenience function " "can be used from the module's initialization function. Return ``-1`` on " "error, ``0`` on success." msgstr "" -#: c-api/module.rst:471 +#: c-api/module.rst:477 msgid "" "Add a string constant to *module* as *name*. This convenience function can " "be used from the module's initialization function. The string *value* must " "be ``NULL``-terminated. Return ``-1`` on error, ``0`` on success." msgstr "" -#: c-api/module.rst:478 +#: c-api/module.rst:484 msgid "" "Add an int constant to *module*. The name and the value are taken from " "*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int " @@ -523,11 +532,11 @@ msgid "" "error, ``0`` on success." msgstr "" -#: c-api/module.rst:486 +#: c-api/module.rst:492 msgid "Add a string constant to *module*." msgstr "" -#: c-api/module.rst:490 +#: c-api/module.rst:496 msgid "" "Add a type object to *module*. The type object is finalized by calling " "internally :c:func:`PyType_Ready`. The name of the type object is taken from " @@ -535,25 +544,25 @@ msgid "" "``-1`` on error, ``0`` on success." msgstr "" -#: c-api/module.rst:500 +#: c-api/module.rst:506 msgid "Module lookup" msgstr "" -#: c-api/module.rst:502 +#: c-api/module.rst:508 msgid "" "Single-phase initialization creates singleton modules that can be looked up " "in the context of the current interpreter. This allows the module object to " "be retrieved later with only a reference to the module definition." msgstr "" -#: c-api/module.rst:506 +#: c-api/module.rst:512 msgid "" "These functions will not work on modules created using multi-phase " "initialization, since multiple such modules can be created from a single " "definition." msgstr "" -#: c-api/module.rst:511 +#: c-api/module.rst:517 msgid "" "Returns the module object that was created from *def* for the current " "interpreter. This method requires that the module object has been attached " @@ -562,18 +571,18 @@ msgid "" "to the interpreter state yet, it returns ``NULL``." msgstr "" -#: c-api/module.rst:518 +#: c-api/module.rst:524 msgid "" "Attaches the module object passed to the function to the interpreter state. " "This allows the module object to be accessible via :c:func:" "`PyState_FindModule`." msgstr "" -#: c-api/module.rst:521 +#: c-api/module.rst:527 msgid "Only effective on modules created using single-phase initialization." msgstr "" -#: c-api/module.rst:523 +#: c-api/module.rst:529 msgid "" "Python calls ``PyState_AddModule`` automatically after importing a module, " "so it is unnecessary (but harmless) to call it from module initialization " @@ -584,15 +593,15 @@ msgid "" "state updates)." msgstr "" -#: c-api/module.rst:542 +#: c-api/module.rst:548 msgid "The caller must hold the GIL." msgstr "" -#: c-api/module.rst:533 +#: c-api/module.rst:539 msgid "Return 0 on success or -1 on failure." msgstr "" -#: c-api/module.rst:539 +#: c-api/module.rst:545 msgid "" "Removes the module object created from *def* from the interpreter state. " "Return 0 on success or -1 on failure." diff --git a/c-api/number.po b/c-api/number.po index c024c83250..75d18ed196 100644 --- a/c-api/number.po +++ b/c-api/number.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -55,7 +55,7 @@ msgstr "" #: c-api/number.rst:46 msgid "" "Return the floor of *o1* divided by *o2*, or ``NULL`` on failure. This is " -"equivalent to the \"classic\" division of integers." +"the equivalent of the Python expression ``o1 // o2``." msgstr "" #: c-api/number.rst:52 @@ -64,7 +64,8 @@ msgid "" "by *o2*, or ``NULL`` on failure. The return value is \"approximate\" " "because binary floating point numbers are approximate; it is not possible to " "represent all real numbers in base two. This function can return a floating " -"point value when passed two integers." +"point value when passed two integers. This is the equivalent of the Python " +"expression ``o1 / o2``." msgstr "" #: c-api/number.rst:61 @@ -183,17 +184,18 @@ msgid "" "because binary floating point numbers are approximate; it is not possible to " "represent all real numbers in base two. This function can return a floating " "point value when passed two integers. The operation is done *in-place* when " -"*o1* supports it." +"*o1* supports it. This is the equivalent of the Python statement ``o1 /= " +"o2``." msgstr "" -#: c-api/number.rst:187 +#: c-api/number.rst:188 msgid "" "Returns the remainder of dividing *o1* by *o2*, or ``NULL`` on failure. The " "operation is done *in-place* when *o1* supports it. This is the equivalent " "of the Python statement ``o1 %= o2``." msgstr "" -#: c-api/number.rst:196 +#: c-api/number.rst:197 msgid "" "See the built-in function :func:`pow`. Returns ``NULL`` on failure. The " "operation is done *in-place* when *o1* supports it. This is the equivalent " @@ -203,60 +205,60 @@ msgid "" "an illegal memory access)." msgstr "" -#: c-api/number.rst:205 +#: c-api/number.rst:206 msgid "" "Returns the result of left shifting *o1* by *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 <<= o2``." msgstr "" -#: c-api/number.rst:212 +#: c-api/number.rst:213 msgid "" "Returns the result of right shifting *o1* by *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 >>= o2``." msgstr "" -#: c-api/number.rst:219 +#: c-api/number.rst:220 msgid "" "Returns the \"bitwise and\" of *o1* and *o2* on success and ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 &= o2``." msgstr "" -#: c-api/number.rst:226 +#: c-api/number.rst:227 msgid "" "Returns the \"bitwise exclusive or\" of *o1* by *o2* on success, or ``NULL`` " "on failure. The operation is done *in-place* when *o1* supports it. This " "is the equivalent of the Python statement ``o1 ^= o2``." msgstr "" -#: c-api/number.rst:233 +#: c-api/number.rst:234 msgid "" "Returns the \"bitwise or\" of *o1* and *o2* on success, or ``NULL`` on " "failure. The operation is done *in-place* when *o1* supports it. This is " "the equivalent of the Python statement ``o1 |= o2``." msgstr "" -#: c-api/number.rst:242 +#: c-api/number.rst:243 msgid "" "Returns the *o* converted to an integer object on success, or ``NULL`` on " "failure. This is the equivalent of the Python expression ``int(o)``." msgstr "" -#: c-api/number.rst:250 +#: c-api/number.rst:251 msgid "" "Returns the *o* converted to a float object on success, or ``NULL`` on " "failure. This is the equivalent of the Python expression ``float(o)``." msgstr "" -#: c-api/number.rst:256 +#: c-api/number.rst:257 msgid "" "Returns the *o* converted to a Python int on success or ``NULL`` with a :exc:" "`TypeError` exception raised on failure." msgstr "" -#: c-api/number.rst:262 +#: c-api/number.rst:263 msgid "" "Returns the integer *n* converted to base *base* as a string. The *base* " "argument must be one of 2, 8, 10, or 16. For base 2, 8, or 16, the returned " @@ -265,25 +267,26 @@ msgid "" "`PyNumber_Index` first." msgstr "" -#: c-api/number.rst:271 +#: c-api/number.rst:272 msgid "" -"Returns *o* converted to a Py_ssize_t value if *o* can be interpreted as an " -"integer. If the call fails, an exception is raised and ``-1`` is returned." +"Returns *o* converted to a :c:type:`Py_ssize_t` value if *o* can be " +"interpreted as an integer. If the call fails, an exception is raised and " +"``-1`` is returned." msgstr "" -#: c-api/number.rst:274 +#: c-api/number.rst:275 msgid "" -"If *o* can be converted to a Python int but the attempt to convert to a " -"Py_ssize_t value would raise an :exc:`OverflowError`, then the *exc* " +"If *o* can be converted to a Python int but the attempt to convert to a :c:" +"type:`Py_ssize_t` value would raise an :exc:`OverflowError`, then the *exc* " "argument is the type of exception that will be raised (usually :exc:" "`IndexError` or :exc:`OverflowError`). If *exc* is ``NULL``, then the " "exception is cleared and the value is clipped to ``PY_SSIZE_T_MIN`` for a " "negative integer or ``PY_SSIZE_T_MAX`` for a positive integer." msgstr "" -#: c-api/number.rst:284 +#: c-api/number.rst:285 msgid "" -"Returns ``1`` if *o* is an index integer (has the nb_index slot of the " -"tp_as_number structure filled in), and ``0`` otherwise. This function always " -"succeeds." +"Returns ``1`` if *o* is an index integer (has the ``nb_index`` slot of the " +"``tp_as_number`` structure filled in), and ``0`` otherwise. This function " +"always succeeds." msgstr "" diff --git a/c-api/object.po b/c-api/object.po index 10af58d834..654463c72e 100644 --- a/c-api/object.po +++ b/c-api/object.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-08-16 22:56+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -118,7 +118,7 @@ msgstr "" "attributs d'instance, contrairement aux autres descripteurs. Sinon, une :exc:" "`AttributeError` est levée." -#: c-api/object.rst:90 +#: c-api/object.rst:91 msgid "" "Set the value of the attribute named *attr_name*, for object *o*, to the " "value *v*. Raise an exception and return ``-1`` on failure; return ``0`` on " @@ -132,22 +132,23 @@ msgstr "" #: c-api/object.rst:84 #, fuzzy msgid "" -"If *v* is ``NULL``, the attribute is deleted, however this feature is " -"deprecated in favour of using :c:func:`PyObject_DelAttr`." +"If *v* is ``NULL``, the attribute is deleted. This behaviour is deprecated " +"in favour of using :c:func:`PyObject_DelAttr`, but there are currently no " +"plans to remove it." msgstr "" "Si *v* est *NULL*, l'attribut est supprimé. Cette fonctionnalité est " "obsolète,nous vous conseillons d'utiliser :c:func:`PyObject_DelAttr`." -#: c-api/object.rst:95 +#: c-api/object.rst:96 #, fuzzy msgid "" -"If *v* is ``NULL``, the attribute is deleted, however this feature is " -"deprecated in favour of using :c:func:`PyObject_DelAttrString`." +"If *v* is ``NULL``, the attribute is deleted, but this feature is deprecated " +"in favour of using :c:func:`PyObject_DelAttrString`." msgstr "" "Si *v* est *NULL*, l'attribut est supprimé. Cette fonctionnalité est " "obsolète, nous vous conseillons d'utiliser :c:func:`PyObject_DelAttr`." -#: c-api/object.rst:101 +#: c-api/object.rst:102 msgid "" "Generic attribute setter and deleter function that is meant to be put into a " "type object's :c:member:`~PyTypeObject.tp_setattro` slot. It looks for a " @@ -167,7 +168,7 @@ msgstr "" "attr:`~object.__dict__` de l'objet (si présent). En cas de succès, ``0`` est " "renvoyé, sinon une :exc:`AttributeError` est levée et ``-1`` est renvoyé." -#: c-api/object.rst:119 +#: c-api/object.rst:120 msgid "" "Delete attribute named *attr_name*, for object *o*. Returns ``-1`` on " "failure. This is the equivalent of the Python statement ``del o.attr_name``." @@ -176,7 +177,7 @@ msgstr "" "cas d'échec. Ceci est l'équivalent de l'expression Python ``del o." "attr_name``." -#: c-api/object.rst:125 +#: c-api/object.rst:126 msgid "" "A generic implementation for the getter of a ``__dict__`` descriptor. It " "creates the dictionary if necessary." @@ -184,7 +185,7 @@ msgstr "" "Une implémentation générique de l'accesseur d'un descripteur d'un " "``__dict__``. Crée le dictionnaire si nécessaire." -#: c-api/object.rst:133 +#: c-api/object.rst:134 msgid "" "A generic implementation for the setter of a ``__dict__`` descriptor. This " "implementation does not allow the dictionary to be deleted." @@ -192,7 +193,7 @@ msgstr "" "Une implémentation générique du mutateur d'un descripteur de ``__dict__``. " "Cette implémentation n'autorise pas la suppression du dictionnaire." -#: c-api/object.rst:141 +#: c-api/object.rst:142 #, fuzzy msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " @@ -211,7 +212,7 @@ msgstr "" "*opid*. Renvoie la valeur de la comparaison en cas de succès, ou *NULL* en " "cas d'échec." -#: c-api/object.rst:151 +#: c-api/object.rst:152 msgid "" "Compare the values of *o1* and *o2* using the operation specified by *opid*, " "which must be one of :const:`Py_LT`, :const:`Py_LE`, :const:`Py_EQ`, :const:" @@ -229,7 +230,7 @@ msgstr "" "l'équivalent de l'expression Python ``o1 op o2``, où ``op`` est l'opérateur " "correspondant à *opid*." -#: c-api/object.rst:160 +#: c-api/object.rst:161 msgid "" "If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` " "will always return ``1`` for :const:`Py_EQ` and ``0`` for :const:`Py_NE`." @@ -237,7 +238,7 @@ msgstr "" "Si *o1* et *o2* sont le même objet, :c:func:`PyObject_RichCompareBool` " "renvoie toujours ``1`` pour :const:`Py_EQ` et ``0`` pour :const:`Py_NE`." -#: c-api/object.rst:167 +#: c-api/object.rst:168 #, fuzzy msgid "" "Compute a string representation of object *o*. Returns the string " @@ -250,7 +251,7 @@ msgstr "" "d'échec. Ceci est l'équivalent de l'expression Python ``repr(o)``. Appelé " "par la fonction native :func:`repr`." -#: c-api/object.rst:195 +#: c-api/object.rst:196 msgid "" "This function now includes a debug assertion to help ensure that it does not " "silently discard an active exception." @@ -258,7 +259,7 @@ msgstr "" "Cette fonction inclut maintenant une assertion de débogage afin d'assurer " "qu'elle ne passe pas sous silence une exception active." -#: c-api/object.rst:179 +#: c-api/object.rst:180 msgid "" "As :c:func:`PyObject_Repr`, compute a string representation of object *o*, " "but escape the non-ASCII characters in the string returned by :c:func:" @@ -268,12 +269,12 @@ msgid "" msgstr "" "Comme :c:Func:`PyObject_Repr`, calcule une représentation en chaîne de " "caractères de l'objet *o*, mais échappe les caractères non ASCII dans la " -"chaîne de caractères renvoyée par :c:Func:`PyObject_Repr` avec' ``\\x``, ``" -"\\u`` ou ``\\U``. Cela génère une chaîne de caractères similaire à celle " +"chaîne de caractères renvoyée par :c:Func:`PyObject_Repr` avec' ``\\x``, " +"``\\u`` ou ``\\U``. Cela génère une chaîne de caractères similaire à celle " "renvoyée par :c:func:`PyObject_Repr` en Python 2. Appelée par la fonction " "native :func:`ascii`." -#: c-api/object.rst:190 +#: c-api/object.rst:191 #, fuzzy msgid "" "Compute a string representation of object *o*. Returns the string " @@ -287,7 +288,7 @@ msgstr "" "par la fonction native :func:`str`, et, par conséquent, par la fonction :" "func:`print`." -#: c-api/object.rst:204 +#: c-api/object.rst:205 #, fuzzy msgid "" "Compute a bytes representation of object *o*. ``NULL`` is returned on " @@ -302,7 +303,7 @@ msgstr "" "entier. Contrairement à ``bytes(o)``, une exception *TypeError* est levée " "lorsque *o* est un entier au lieu d'un objet octet initialisé avec des zéros." -#: c-api/object.rst:213 +#: c-api/object.rst:214 msgid "" "Return ``1`` if the class *derived* is identical to or derived from the " "class *cls*, otherwise return ``0``. In case of an error, return ``-1``." @@ -310,7 +311,7 @@ msgstr "" "Renvoie ``1`` si la classe *derived* est identique à ou dérivée de la classe " "*cls*, renvoie ``0`` sinon. En cas d'erreur, renvoie ``-1``." -#: c-api/object.rst:235 +#: c-api/object.rst:236 msgid "" "If *cls* is a tuple, the check will be done against every entry in *cls*. " "The result will be ``1`` when at least one of the checks returns ``1``, " @@ -320,7 +321,7 @@ msgstr "" "*cls*. Le résultat sera ``1`` quand au moins une des vérifications renvoie " "``1``, sinon ce sera ``0``." -#: c-api/object.rst:220 +#: c-api/object.rst:221 msgid "" "If *cls* has a :meth:`~class.__subclasscheck__` method, it will be called to " "determine the subclass status as described in :pep:`3119`. Otherwise, " @@ -332,7 +333,7 @@ msgstr "" "Sinon, *derived* est une sous-classe de *cls* si c'est une sous-classe " "directe ou indirecte, c'est-à-dire contenue dans ``cls.__mro__``." -#: c-api/object.rst:225 +#: c-api/object.rst:226 msgid "" "Normally only class objects, i.e. instances of :class:`type` or a derived " "class, are considered classes. However, objects can override this by having " @@ -343,7 +344,7 @@ msgstr "" "les objets peuvent surcharger cela en ayant un attribut :attr:`__bases__` " "(qui doit être un *n*-uplet de classes de bases)." -#: c-api/object.rst:232 +#: c-api/object.rst:233 msgid "" "Return ``1`` if *inst* is an instance of the class *cls* or a subclass of " "*cls*, or ``0`` if not. On error, returns ``-1`` and sets an exception." @@ -352,7 +353,7 @@ msgstr "" "classe de *cls*, ou ``0`` sinon. En cas d'erreur, renvoie ``-1`` et " "initialise une exception." -#: c-api/object.rst:239 +#: c-api/object.rst:240 msgid "" "If *cls* has a :meth:`~class.__instancecheck__` method, it will be called to " "determine the subclass status as described in :pep:`3119`. Otherwise, " @@ -363,7 +364,7 @@ msgstr "" "Sinon, *inst* est une instance *cls* si sa classe est une sous-classe de " "*cls*." -#: c-api/object.rst:243 +#: c-api/object.rst:244 msgid "" "An instance *inst* can override what is considered its class by having a :" "attr:`__class__` attribute." @@ -371,7 +372,7 @@ msgstr "" "Une instance *inst* peut surcharger ce qui est considéré comme sa classe en " "ayant un attribut :attr:`__class__`." -#: c-api/object.rst:246 +#: c-api/object.rst:247 msgid "" "An object *cls* can override if it is considered a class, and what its base " "classes are, by having a :attr:`__bases__` attribute (which must be a tuple " @@ -381,19 +382,19 @@ msgstr "" "que ses classes de bases sont, en ayant un attribut :attr:`__bases__` (qui " "doit être un *n*-uplet des classes de base)." -#: c-api/object.rst:255 +#: c-api/object.rst:256 msgid "" "Compute and return the hash value of an object *o*. On failure, return " "``-1``. This is the equivalent of the Python expression ``hash(o)``." msgstr "" -#: c-api/object.rst:258 +#: c-api/object.rst:259 msgid "" -"The return type is now Py_hash_t. This is a signed integer the same size as " -"Py_ssize_t." +"The return type is now Py_hash_t. This is a signed integer the same size " +"as :c:type:`Py_ssize_t`." msgstr "" -#: c-api/object.rst:265 +#: c-api/object.rst:266 msgid "" "Set a :exc:`TypeError` indicating that ``type(o)`` is not hashable and " "return ``-1``. This function receives special treatment when stored in a " @@ -401,38 +402,38 @@ msgid "" "that it is not hashable." msgstr "" -#: c-api/object.rst:273 +#: c-api/object.rst:274 msgid "" "Returns ``1`` if the object *o* is considered to be true, and ``0`` " "otherwise. This is equivalent to the Python expression ``not not o``. On " "failure, return ``-1``." msgstr "" -#: c-api/object.rst:280 +#: c-api/object.rst:281 msgid "" "Returns ``0`` if the object *o* is considered to be true, and ``1`` " "otherwise. This is equivalent to the Python expression ``not o``. On " "failure, return ``-1``." msgstr "" -#: c-api/object.rst:289 +#: c-api/object.rst:290 msgid "" "When *o* is non-``NULL``, returns a type object corresponding to the object " "type of object *o*. On failure, raises :exc:`SystemError` and returns " "``NULL``. This is equivalent to the Python expression ``type(o)``. This " "function increments the reference count of the return value. There's really " -"no reason to use this function instead of the common expression ``o-" -">ob_type``, which returns a pointer of type :c:type:`PyTypeObject*`, except " -"when the incremented reference count is needed." +"no reason to use this function instead of the :c:func:`Py_TYPE()` function, " +"which returns a pointer of type :c:type:`PyTypeObject*`, except when the " +"incremented reference count is needed." msgstr "" -#: c-api/object.rst:300 +#: c-api/object.rst:301 msgid "" "Return true if the object *o* is of type *type* or a subtype of *type*. " "Both parameters must be non-``NULL``." msgstr "" -#: c-api/object.rst:309 +#: c-api/object.rst:310 msgid "" "Return the length of object *o*. If the object *o* provides either the " "sequence and mapping protocols, the sequence length is returned. On error, " @@ -440,15 +441,16 @@ msgid "" "``len(o)``." msgstr "" -#: c-api/object.rst:316 +#: c-api/object.rst:317 msgid "" "Return an estimated length for the object *o*. First try to return its " "actual length, then an estimate using :meth:`~object.__length_hint__`, and " "finally return the default value. On error return ``-1``. This is the " -"equivalent to the Python expression ``operator.length_hint(o, default)``." +"equivalent to the Python expression ``operator.length_hint(o, " +"defaultvalue)``." msgstr "" -#: c-api/object.rst:326 +#: c-api/object.rst:327 #, fuzzy msgid "" "Return element of *o* corresponding to the object *key* or ``NULL`` on " @@ -458,7 +460,7 @@ msgstr "" "l'attribut en cas de succès, ou *NULL* en cas d'échec. Ceci est équivalent à " "l'expression Python ``o.attr_name``." -#: c-api/object.rst:332 +#: c-api/object.rst:333 #, fuzzy msgid "" "Map the object *key* to the value *v*. Raise an exception and return ``-1`` " @@ -470,7 +472,7 @@ msgstr "" "``0`` en cas de succès. Ceci est équivalent à l'instruction Python ``o." "attr_name = v``." -#: c-api/object.rst:340 +#: c-api/object.rst:341 #, fuzzy msgid "" "Remove the mapping for the object *key* from the object *o*. Return ``-1`` " @@ -480,7 +482,7 @@ msgstr "" "Renvoie ``-1`` en cas d'échec. C'est l'équivalent de la commande Python " "``del o[key]``." -#: c-api/object.rst:346 +#: c-api/object.rst:347 msgid "" "This is equivalent to the Python expression ``dir(o)``, returning a " "(possibly empty) list of strings appropriate for the object argument, or " @@ -490,7 +492,7 @@ msgid "" "`PyErr_Occurred` will return false." msgstr "" -#: c-api/object.rst:355 +#: c-api/object.rst:356 msgid "" "This is equivalent to the Python expression ``iter(o)``. It returns a new " "iterator for the object argument, or the object itself if the object is " diff --git a/c-api/refcounting.po b/c-api/refcounting.po index 405d98f2c6..0823e5177c 100644 --- a/c-api/refcounting.po +++ b/c-api/refcounting.po @@ -23,6 +23,8 @@ msgid "" "The macros in this section are used for managing reference counts of Python " "objects." msgstr "" +"Les macros dans cette section permettent de gérer le compteur de références " +"des objets Python." #: c-api/refcounting.rst:16 msgid "" @@ -36,6 +38,8 @@ msgid "" "Increment the reference count for object *o*. The object may be ``NULL``, " "in which case the macro has no effect." msgstr "" +"Incrémente le compteur de références de l'objet *o*. La macro n'a pas " +"d'effet si l'objet est ``NULL``." #: c-api/refcounting.rst:28 msgid "" @@ -57,6 +61,15 @@ msgid "" "update the list data structure, and then call :c:func:`Py_DECREF` for the " "temporary variable." msgstr "" +"La fonction de dés-allocation peut invoquer du code Python arbitraire (par " +"exemple quand une instance d'une classe avec une méthode :meth:`__del__` est " +"supprimée). Le code exécuté a accès à toutes les variables Python globales " +"mais les exceptions lors de l'exécution de ce code ne sont pas propagées. " +"Tous les objets qui peuvent être atteints à partir d'une variable globale " +"doivent être dans un état cohérent avant d'appeler :c:func:`Py_DECREF`. Par " +"exemple le code pour supprimer un élément d'une liste doit copier une " +"référence à l'objet dans une variable temporaire, mettre à jour la liste, et " +"enfin appeler :c:func:`Py_DECREF` avec la variable temporaire." #: c-api/refcounting.rst:47 msgid "" @@ -64,6 +77,10 @@ msgid "" "in which case the macro has no effect; otherwise the effect is the same as " "for :c:func:`Py_DECREF`, and the same warning applies." msgstr "" +"Décrémente le compteur de références de l'objet *o*. L'objet peut être " +"``NULL``, dans ce cas la macro n'a pas d'effet. Dans le cas contraire le " +"comportement est identique à :c:func:`Py_DECREF` et les mêmes avertissements " +"sont de rigueur." #: c-api/refcounting.rst:54 msgid "" @@ -74,12 +91,20 @@ msgid "" "object passed because the macro carefully uses a temporary variable and sets " "the argument to ``NULL`` before decrementing its reference count." msgstr "" +"Décrémente le compteur de références de l'objet *o*. L'objet peut être " +"``NULL``, dans ce cas la macro n'a pas d'effet. Dans le cas contraire le " +"comportement est identique à :c:func:`Py_DECREF`, puis l'argument est mis à " +"``NULL``. L'avertissement au sujet de l'objet passé en argument à :c:func:" +"`Py_DECREF` ne s'applique pas car la macro utilise une variable temporaire " +"et met l'objet à ``NULL`` avant de décrémenter le compteur de références." #: c-api/refcounting.rst:61 msgid "" "It is a good idea to use this macro whenever decrementing the reference " "count of an object that might be traversed during garbage collection." msgstr "" +"Il est recommandé d'utiliser cette macro lorsqu'on décrémente le compteur de " +"référence d'un objet qui peut être parcouru par le ramasse-miette." #: c-api/refcounting.rst:65 msgid "" @@ -95,3 +120,7 @@ msgid "" "core: :c:func:`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:" "`_Py_NewReference`, as well as the global variable :c:data:`_Py_RefTotal`." msgstr "" +"Les fonctions ou macros suivantes doivent être uniquement utilisées au sein " +"de l'interpréteur et ne font pas partie de l'API publique : :c:func:" +"`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:`_Py_NewReference`, " +"ainsi que la variable globale :c:data:`_Py_RefTotal`." diff --git a/c-api/reflection.po b/c-api/reflection.po index 10deec6abc..a53042a2bd 100644 --- a/c-api/reflection.po +++ b/c-api/reflection.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-02-26 12:01+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -60,7 +60,7 @@ msgstr "" #: c-api/reflection.rst:36 msgid "Get the *frame* next outer frame." -msgstr "" +msgstr "Renvoie la *frame* encadrant immédiatement à *frame*." #: c-api/reflection.rst:38 msgid "Return a strong reference, or ``NULL`` if *frame* has no outer frame." @@ -72,7 +72,7 @@ msgstr "" #: c-api/reflection.rst:47 msgid "Get the *frame* code." -msgstr "" +msgstr "Obtenir le code *frame*." #: c-api/reflection.rst:49 msgid "Return a strong reference." @@ -104,6 +104,6 @@ msgid "" msgstr "" "Renvoie une description en chaîne de caractères, en fonction du type de " "*func*. Les valeurs renvoyées peuvent être ``\"()\"`` pour les fonction et " -"les méthodes, ``\\\" constructor\\\"``, ``\\\" instance\\\"``, ``\\\" object" -"\\\"``. Concaténé avec le résultat de :c:func:`PyEval_GetFuncName`, le " +"les méthodes, ``\\\" constructor\\\"``, ``\\\" instance\\\"``, ``\\\" " +"object\\\"``. Concaténé avec le résultat de :c:func:`PyEval_GetFuncName`, le " "résultat sera une description de *func*" diff --git a/c-api/sequence.po b/c-api/sequence.po index 15b5b657ac..938b8d092c 100644 --- a/c-api/sequence.po +++ b/c-api/sequence.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -20,11 +20,11 @@ msgstr "" #: c-api/sequence.rst:11 msgid "" -"Return ``1`` if the object provides sequence protocol, and ``0`` otherwise. " -"Note that it returns ``1`` for Python classes with a :meth:`__getitem__` " -"method unless they are :class:`dict` subclasses since in general case it is " -"impossible to determine what the type of keys it supports. This function " -"always succeeds." +"Return ``1`` if the object provides the sequence protocol, and ``0`` " +"otherwise. Note that it returns ``1`` for Python classes with a :meth:" +"`__getitem__` method, unless they are :class:`dict` subclasses, since in " +"general it is impossible to determine what type of keys the class supports. " +"This function always succeeds." msgstr "" #: c-api/sequence.rst:23 @@ -85,8 +85,8 @@ msgstr "" #: c-api/sequence.rst:72 msgid "" -"If *v* is ``NULL``, the element is deleted, however this feature is " -"deprecated in favour of using :c:func:`PySequence_DelItem`." +"If *v* is ``NULL``, the element is deleted, but this feature is deprecated " +"in favour of using :c:func:`PySequence_DelItem`." msgstr "" #: c-api/sequence.rst:78 @@ -166,8 +166,8 @@ msgstr "" #: c-api/sequence.rst:148 msgid "" "Returns the length of *o*, assuming that *o* was returned by :c:func:" -"`PySequence_Fast` and that *o* is not ``NULL``. The size can also be gotten " -"by calling :c:func:`PySequence_Size` on *o*, but :c:func:" +"`PySequence_Fast` and that *o* is not ``NULL``. The size can also be " +"retrieved by calling :c:func:`PySequence_Size` on *o*, but :c:func:" "`PySequence_Fast_GET_SIZE` is faster because it can assume *o* is a list or " "tuple." msgstr "" diff --git a/c-api/set.po b/c-api/set.po index 3a076f7c9c..68d35e337e 100644 --- a/c-api/set.po +++ b/c-api/set.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -21,14 +21,14 @@ msgstr "" #: c-api/set.rst:15 msgid "" "This section details the public API for :class:`set` and :class:`frozenset` " -"objects. Any functionality not listed below is best accessed using the " -"either the abstract object protocol (including :c:func:" -"`PyObject_CallMethod`, :c:func:`PyObject_RichCompareBool`, :c:func:" -"`PyObject_Hash`, :c:func:`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:" -"`PyObject_Print`, and :c:func:`PyObject_GetIter`) or the abstract number " -"protocol (including :c:func:`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:" -"func:`PyNumber_Or`, :c:func:`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, :" -"c:func:`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, and :c:func:" +"objects. Any functionality not listed below is best accessed using either " +"the abstract object protocol (including :c:func:`PyObject_CallMethod`, :c:" +"func:`PyObject_RichCompareBool`, :c:func:`PyObject_Hash`, :c:func:" +"`PyObject_Repr`, :c:func:`PyObject_IsTrue`, :c:func:`PyObject_Print`, and :c:" +"func:`PyObject_GetIter`) or the abstract number protocol (including :c:func:" +"`PyNumber_And`, :c:func:`PyNumber_Subtract`, :c:func:`PyNumber_Or`, :c:func:" +"`PyNumber_Xor`, :c:func:`PyNumber_InPlaceAnd`, :c:func:" +"`PyNumber_InPlaceSubtract`, :c:func:`PyNumber_InPlaceOr`, and :c:func:" "`PyNumber_InPlaceXor`)." msgstr "" @@ -39,9 +39,9 @@ msgid "" "`PyDictObject` in that it is a fixed size for small sets (much like tuple " "storage) and will point to a separate, variable sized block of memory for " "medium and large sized sets (much like list storage). None of the fields of " -"this structure should be considered public and are subject to change. All " -"access should be done through the documented API rather than by manipulating " -"the values in the structure." +"this structure should be considered public and all are subject to change. " +"All access should be done through the documented API rather than by " +"manipulating the values in the structure." msgstr "" #: c-api/set.rst:40 @@ -145,7 +145,7 @@ msgstr "" #: c-api/set.rst:127 msgid "" "Add *key* to a :class:`set` instance. Also works with :class:`frozenset` " -"instances (like :c:func:`PyTuple_SetItem` it can be used to fill-in the " +"instances (like :c:func:`PyTuple_SetItem` it can be used to fill in the " "values of brand new frozensets before they are exposed to other code). " "Return ``0`` on success or ``-1`` on failure. Raise a :exc:`TypeError` if " "the *key* is unhashable. Raise a :exc:`MemoryError` if there is no room to " diff --git a/c-api/stable.po b/c-api/stable.po index 0acc383a21..8178a535db 100644 --- a/c-api/stable.po +++ b/c-api/stable.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-10-04 12:26+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -54,10 +54,10 @@ msgstr "" #: c-api/stable.rst:23 msgid "" "Since Python 3.2, a subset of the API has been declared to guarantee a " -"stable ABI. Extension modules wishing to use this API (called \"limited API" -"\") need to define ``Py_LIMITED_API``. A number of interpreter details then " -"become hidden from the extension module; in return, a module is built that " -"works on any 3.x version (x>=2) without recompilation." +"stable ABI. Extension modules wishing to use this API (called \"limited " +"API\") need to define ``Py_LIMITED_API``. A number of interpreter details " +"then become hidden from the extension module; in return, a module is built " +"that works on any 3.x version (x>=2) without recompilation." msgstr "" "Depuis Python 3.2 il est garanti qu'une certaine partie de l'API gardera une " "ABI stable. Les modules d'extension souhaitant utiliser cette API (Appellée " diff --git a/c-api/structures.po b/c-api/structures.po index a41d6e49f7..47af15dc8b 100644 --- a/c-api/structures.po +++ b/c-api/structures.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -177,24 +177,24 @@ msgid "" "has four fields:" msgstr "" -#: c-api/structures.rst:364 c-api/structures.rst:445 +#: c-api/structures.rst:364 c-api/structures.rst:460 msgid "Field" msgstr "Champ" -#: c-api/structures.rst:364 c-api/structures.rst:445 +#: c-api/structures.rst:364 c-api/structures.rst:460 msgid "C Type" msgstr "Type C" -#: c-api/structures.rst:364 c-api/structures.rst:445 +#: c-api/structures.rst:364 c-api/structures.rst:460 msgid "Meaning" msgstr "Signification" #: c-api/structures.rst:210 msgid ":attr:`ml_name`" -msgstr "" +msgstr ":attr:`ml_name`" -#: c-api/structures.rst:218 c-api/structures.rst:379 c-api/structures.rst:447 -#: c-api/structures.rst:455 +#: c-api/structures.rst:218 c-api/structures.rst:379 c-api/structures.rst:462 +#: c-api/structures.rst:470 msgid "const char \\*" msgstr "" @@ -204,7 +204,7 @@ msgstr "" #: c-api/structures.rst:212 msgid ":attr:`ml_meth`" -msgstr "" +msgstr ":attr:`ml_meth`" #: c-api/structures.rst:212 msgid "PyCFunction" @@ -216,7 +216,7 @@ msgstr "" #: c-api/structures.rst:215 msgid ":attr:`ml_flags`" -msgstr "" +msgstr ":attr:`ml_flags`" #: c-api/structures.rst:368 c-api/structures.rst:391 msgid "int" @@ -228,7 +228,7 @@ msgstr "" #: c-api/structures.rst:218 msgid ":attr:`ml_doc`" -msgstr "" +msgstr ":attr:`ml_doc`" #: c-api/structures.rst:379 msgid "points to the contents of the docstring" @@ -384,7 +384,7 @@ msgstr "" #: c-api/structures.rst:366 msgid ":attr:`name`" -msgstr "" +msgstr ":attr:`name`" #: c-api/structures.rst:366 msgid "name of the member" @@ -392,7 +392,7 @@ msgstr "" #: c-api/structures.rst:368 msgid ":attr:`!type`" -msgstr "" +msgstr ":attr:`!type`" #: c-api/structures.rst:368 msgid "the type of the member in the C struct" @@ -400,7 +400,7 @@ msgstr "" #: c-api/structures.rst:371 msgid ":attr:`offset`" -msgstr "" +msgstr ":attr:`offset`" #: c-api/structures.rst:407 msgid "Py_ssize_t" @@ -413,7 +413,7 @@ msgstr "" #: c-api/structures.rst:375 msgid ":attr:`flags`" -msgstr "" +msgstr ":attr:`flags`" #: c-api/structures.rst:375 msgid "flag bits indicating if the field should be read-only or writable" @@ -421,7 +421,7 @@ msgstr "" #: c-api/structures.rst:379 msgid ":attr:`doc`" -msgstr "" +msgstr ":attr:`doc`" #: c-api/structures.rst:383 msgid "" @@ -588,86 +588,99 @@ msgid "" "``T_PYSSIZET`` and ``READONLY``, for example::" msgstr "" -#: c-api/structures.rst:441 +#: c-api/structures.rst:442 +msgid "" +"Get an attribute belonging to the object at address *obj_addr*. The " +"attribute is described by ``PyMemberDef`` *m*. Returns ``NULL`` on error." +msgstr "" + +#: c-api/structures.rst:449 +msgid "" +"Set an attribute belonging to the object at address *obj_addr* to object " +"*o*. The attribute to set is described by ``PyMemberDef`` *m*. Returns " +"``0`` if successful and a negative value on failure." +msgstr "" + +#: c-api/structures.rst:456 msgid "" "Structure to define property-like access for a type. See also description of " "the :c:member:`PyTypeObject.tp_getset` slot." msgstr "" -#: c-api/structures.rst:447 +#: c-api/structures.rst:462 msgid "name" -msgstr "" +msgstr "nom" -#: c-api/structures.rst:447 +#: c-api/structures.rst:462 msgid "attribute name" msgstr "" -#: c-api/structures.rst:449 +#: c-api/structures.rst:464 msgid "get" msgstr "" -#: c-api/structures.rst:449 +#: c-api/structures.rst:464 msgid "getter" msgstr "" -#: c-api/structures.rst:449 -msgid "C Function to get the attribute" +#: c-api/structures.rst:464 +msgid "C function to get the attribute" msgstr "" -#: c-api/structures.rst:451 +#: c-api/structures.rst:466 msgid "set" msgstr "" -#: c-api/structures.rst:451 +#: c-api/structures.rst:466 msgid "setter" msgstr "" -#: c-api/structures.rst:451 +#: c-api/structures.rst:466 msgid "" "optional C function to set or delete the attribute, if omitted the attribute " "is readonly" msgstr "" -#: c-api/structures.rst:455 +#: c-api/structures.rst:470 msgid "doc" msgstr "" -#: c-api/structures.rst:455 +#: c-api/structures.rst:470 msgid "optional docstring" msgstr "" -#: c-api/structures.rst:457 +#: c-api/structures.rst:472 msgid "closure" msgstr "" -#: c-api/structures.rst:457 +#: c-api/structures.rst:472 msgid "void \\*" msgstr "" -#: c-api/structures.rst:457 +#: c-api/structures.rst:472 msgid "" "optional function pointer, providing additional data for getter and setter" msgstr "" -#: c-api/structures.rst:462 +#: c-api/structures.rst:477 msgid "" "The ``get`` function takes one :c:type:`PyObject*` parameter (the instance) " "and a function pointer (the associated ``closure``)::" msgstr "" -#: c-api/structures.rst:467 +#: c-api/structures.rst:482 msgid "" "It should return a new reference on success or ``NULL`` with a set exception " "on failure." msgstr "" -#: c-api/structures.rst:470 +#: c-api/structures.rst:485 msgid "" "``set`` functions take two :c:type:`PyObject*` parameters (the instance and " "the value to be set) and a function pointer (the associated ``closure``)::" msgstr "" -#: c-api/structures.rst:475 +#: c-api/structures.rst:490 msgid "" "In case the attribute should be deleted the second parameter is ``NULL``. " "Should return ``0`` on success or ``-1`` with a set exception on failure." diff --git a/c-api/sys.po b/c-api/sys.po index fb2d949cd9..7bf3e5e6cb 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -201,7 +201,7 @@ msgstr "" msgid "The function now uses the UTF-8 encoding in the UTF-8 mode." msgstr "" -#: c-api/sys.rst:206 +#: c-api/sys.rst:162 msgid "" "The function now uses the UTF-8 encoding on Windows if :c:data:" "`Py_LegacyWindowsFSEncodingFlag` is zero;" @@ -222,7 +222,7 @@ msgstr "" msgid "" "Return a pointer to a newly allocated byte string, use :c:func:`PyMem_Free` " "to free the memory. Return ``NULL`` on encoding error or memory allocation " -"error" +"error." msgstr "" #: c-api/sys.rst:190 @@ -243,6 +243,12 @@ msgid "" "functions." msgstr "" +#: c-api/sys.rst:206 +msgid "" +"The function now uses the UTF-8 encoding on Windows if :c:data:" +"`Py_LegacyWindowsFSEncodingFlag` is zero." +msgstr "" + #: c-api/sys.rst:214 msgid "System Functions" msgstr "" @@ -374,8 +380,8 @@ msgstr "" #: c-api/sys.rst:323 msgid "" -"Note that ``#`` format characters should always be treated as " -"``Py_ssize_t``, regardless of whether ``PY_SSIZE_T_CLEAN`` was defined." +"Note that ``#`` format characters should always be treated as :c:type:" +"`Py_ssize_t`, regardless of whether ``PY_SSIZE_T_CLEAN`` was defined." msgstr "" #: c-api/sys.rst:326 @@ -384,14 +390,14 @@ msgstr "" #: c-api/sys.rst:332 msgid "" -"Require ``Py_ssize_t`` for ``#`` format characters. Previously, an " +"Require :c:type:`Py_ssize_t` for ``#`` format characters. Previously, an " "unavoidable deprecation warning was raised." msgstr "" #: c-api/sys.rst:338 msgid "" "Append the callable *hook* to the list of active auditing hooks. Return zero " -"for success and non-zero on failure. If the runtime has been initialized, " +"on success and non-zero on failure. If the runtime has been initialized, " "also set an error on failure. Hooks added through this API are called for " "all interpreters created by the runtime." msgstr "" diff --git a/c-api/type.po b/c-api/type.po index 00971c6d5c..d8f11ff86b 100644 --- a/c-api/type.po +++ b/c-api/type.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-02-15 00:33+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -110,7 +110,17 @@ msgid "" "and sets an exception on error." msgstr "" -#: c-api/type.rst:102 +#: c-api/type.rst:101 +msgid "" +"If some of the base classes implements the GC protocol and the provided type " +"does not include the :const:`Py_TPFLAGS_HAVE_GC` in its flags, then the GC " +"protocol will be automatically implemented from its parents. On the " +"contrary, if the type being created does include :const:`Py_TPFLAGS_HAVE_GC` " +"in its flags then it **must** implement the GC protocol itself by at least " +"implementing the :c:member:`~PyTypeObject.tp_traverse` handle." +msgstr "" + +#: c-api/type.rst:111 msgid "" "Return the function pointer stored in the given slot. If the result is " "``NULL``, this indicates that either the slot is ``NULL``, or that the " @@ -118,28 +128,28 @@ msgid "" "result pointer into the appropriate function type." msgstr "" -#: c-api/type.rst:108 +#: c-api/type.rst:117 msgid "" "See :c:member:`PyType_Slot.slot` for possible values of the *slot* argument." msgstr "" -#: c-api/type.rst:110 +#: c-api/type.rst:119 msgid "An exception is raised if *type* is not a heap type." msgstr "" -#: c-api/type.rst:116 +#: c-api/type.rst:125 msgid "" "Return the module object associated with the given type when the type was " "created using :c:func:`PyType_FromModuleAndSpec`." msgstr "" -#: c-api/type.rst:137 +#: c-api/type.rst:146 msgid "" "If no module is associated with the given type, sets :py:class:`TypeError` " "and returns ``NULL``." msgstr "" -#: c-api/type.rst:122 +#: c-api/type.rst:131 msgid "" "This function is usually used to get the module in which a method is " "defined. Note that in such a method, ``PyType_GetModule(Py_TYPE(self))`` may " @@ -149,110 +159,110 @@ msgid "" "defines the method." msgstr "" -#: c-api/type.rst:133 +#: c-api/type.rst:142 msgid "" "Return the state of the module object associated with the given type. This " "is a shortcut for calling :c:func:`PyModule_GetState()` on the result of :c:" "func:`PyType_GetModule`." msgstr "" -#: c-api/type.rst:140 +#: c-api/type.rst:149 msgid "" "If the *type* has an associated module but its state is ``NULL``, returns " "``NULL`` without setting an exception." msgstr "" -#: c-api/type.rst:147 +#: c-api/type.rst:156 msgid "Creating Heap-Allocated Types" msgstr "" -#: c-api/type.rst:149 +#: c-api/type.rst:158 msgid "" "The following functions and structs are used to create :ref:`heap types " "`." msgstr "" -#: c-api/type.rst:154 +#: c-api/type.rst:163 msgid "" "Creates and returns a heap type object from the *spec* (:const:" "`Py_TPFLAGS_HEAPTYPE`)." msgstr "" -#: c-api/type.rst:157 +#: c-api/type.rst:166 msgid "" "If *bases* is a tuple, the created heap type contains all types contained in " "it as base types." msgstr "" -#: c-api/type.rst:160 +#: c-api/type.rst:169 msgid "" "If *bases* is ``NULL``, the *Py_tp_bases* slot is used instead. If that also " "is ``NULL``, the *Py_tp_base* slot is used instead. If that also is " "``NULL``, the new type derives from :class:`object`." msgstr "" -#: c-api/type.rst:164 +#: c-api/type.rst:173 msgid "" "The *module* argument can be used to record the module in which the new " "class is defined. It must be a module object or ``NULL``. If not ``NULL``, " -"the module is associated with the new type and can later be retreived with :" +"the module is associated with the new type and can later be retrieved with :" "c:func:`PyType_GetModule`. The associated module is not inherited by " "subclasses; it must be specified for each class individually." msgstr "" -#: c-api/type.rst:171 +#: c-api/type.rst:180 msgid "This function calls :c:func:`PyType_Ready` on the new type." msgstr "" -#: c-api/type.rst:177 +#: c-api/type.rst:186 msgid "Equivalent to ``PyType_FromModuleAndSpec(NULL, spec, bases)``." msgstr "" -#: c-api/type.rst:183 +#: c-api/type.rst:192 msgid "Equivalent to ``PyType_FromSpecWithBases(spec, NULL)``." msgstr "" -#: c-api/type.rst:187 +#: c-api/type.rst:196 msgid "Structure defining a type's behavior." msgstr "" -#: c-api/type.rst:191 +#: c-api/type.rst:200 msgid "Name of the type, used to set :c:member:`PyTypeObject.tp_name`." msgstr "" -#: c-api/type.rst:196 +#: c-api/type.rst:205 msgid "" "Size of the instance in bytes, used to set :c:member:`PyTypeObject." "tp_basicsize` and :c:member:`PyTypeObject.tp_itemsize`." msgstr "" -#: c-api/type.rst:202 +#: c-api/type.rst:211 msgid "Type flags, used to set :c:member:`PyTypeObject.tp_flags`." msgstr "" -#: c-api/type.rst:204 +#: c-api/type.rst:213 msgid "" "If the ``Py_TPFLAGS_HEAPTYPE`` flag is not set, :c:func:" "`PyType_FromSpecWithBases` sets it automatically." msgstr "" -#: c-api/type.rst:209 +#: c-api/type.rst:218 msgid "" "Array of :c:type:`PyType_Slot` structures. Terminated by the special slot " "value ``{0, NULL}``." msgstr "" -#: c-api/type.rst:214 +#: c-api/type.rst:223 msgid "" "Structure defining optional functionality of a type, containing a slot ID " "and a value pointer." msgstr "" -#: c-api/type.rst:219 +#: c-api/type.rst:228 msgid "A slot ID." msgstr "" -#: c-api/type.rst:221 +#: c-api/type.rst:230 msgid "" "Slot IDs are named like the field names of the structures :c:type:" "`PyTypeObject`, :c:type:`PyNumberMethods`, :c:type:`PySequenceMethods`, :c:" @@ -260,97 +270,97 @@ msgid "" "prefix. For example, use:" msgstr "" -#: c-api/type.rst:227 +#: c-api/type.rst:236 msgid "``Py_tp_dealloc`` to set :c:member:`PyTypeObject.tp_dealloc`" msgstr "" -#: c-api/type.rst:228 +#: c-api/type.rst:237 msgid "``Py_nb_add`` to set :c:member:`PyNumberMethods.nb_add`" msgstr "" -#: c-api/type.rst:229 +#: c-api/type.rst:238 msgid "``Py_sq_length`` to set :c:member:`PySequenceMethods.sq_length`" msgstr "" -#: c-api/type.rst:231 +#: c-api/type.rst:240 msgid "" "The following fields cannot be set at all using :c:type:`PyType_Spec` and :c:" "type:`PyType_Slot`:" msgstr "" -#: c-api/type.rst:234 +#: c-api/type.rst:243 msgid ":c:member:`~PyTypeObject.tp_dict`" msgstr "" -#: c-api/type.rst:235 +#: c-api/type.rst:244 msgid ":c:member:`~PyTypeObject.tp_mro`" msgstr "" -#: c-api/type.rst:236 +#: c-api/type.rst:245 msgid ":c:member:`~PyTypeObject.tp_cache`" msgstr "" -#: c-api/type.rst:237 +#: c-api/type.rst:246 msgid ":c:member:`~PyTypeObject.tp_subclasses`" msgstr "" -#: c-api/type.rst:238 +#: c-api/type.rst:247 msgid ":c:member:`~PyTypeObject.tp_weaklist`" msgstr "" -#: c-api/type.rst:239 +#: c-api/type.rst:248 msgid ":c:member:`~PyTypeObject.tp_vectorcall`" msgstr "" -#: c-api/type.rst:240 +#: c-api/type.rst:249 msgid "" ":c:member:`~PyTypeObject.tp_weaklistoffset` (see :ref:`PyMemberDef " "`)" msgstr "" -#: c-api/type.rst:242 +#: c-api/type.rst:251 msgid "" ":c:member:`~PyTypeObject.tp_dictoffset` (see :ref:`PyMemberDef `)" msgstr "" -#: c-api/type.rst:244 +#: c-api/type.rst:253 msgid "" ":c:member:`~PyTypeObject.tp_vectorcall_offset` (see :ref:`PyMemberDef " "`)" msgstr "" -#: c-api/type.rst:247 +#: c-api/type.rst:256 msgid "" "The following fields cannot be set using :c:type:`PyType_Spec` and :c:type:" "`PyType_Slot` under the limited API:" msgstr "" -#: c-api/type.rst:250 +#: c-api/type.rst:259 msgid ":c:member:`~PyBufferProcs.bf_getbuffer`" msgstr "" -#: c-api/type.rst:251 +#: c-api/type.rst:260 msgid ":c:member:`~PyBufferProcs.bf_releasebuffer`" msgstr "" -#: c-api/type.rst:253 +#: c-api/type.rst:262 msgid "" "Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be problematic on " "some platforms. To avoid issues, use the *bases* argument of :py:func:" "`PyType_FromSpecWithBases` instead." msgstr "" -#: c-api/type.rst:260 -msgid "Slots in :c:type:`PyBufferProcs` in may be set in the unlimited API." +#: c-api/type.rst:269 +msgid "Slots in :c:type:`PyBufferProcs` may be set in the unlimited API." msgstr "" -#: c-api/type.rst:264 +#: c-api/type.rst:273 msgid "" "The desired value of the slot. In most cases, this is a pointer to a " "function." msgstr "" -#: c-api/type.rst:267 +#: c-api/type.rst:276 msgid "May not be ``NULL``." msgstr "" diff --git a/c-api/typehints.po b/c-api/typehints.po new file mode 100644 index 0000000000..cadb8396bd --- /dev/null +++ b/c-api/typehints.po @@ -0,0 +1,56 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001-2023, Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python 3.9\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../Doc/c-api/typehints.rst:6 +msgid "Objects for Type Hinting" +msgstr "" + +#: ../Doc/c-api/typehints.rst:8 +msgid "" +"Various built-in types for type hinting are provided. Only :ref:" +"`GenericAlias ` is exposed to C." +msgstr "" + +#: ../Doc/c-api/typehints.rst:13 +msgid "" +"Create a :ref:`GenericAlias ` object. Equivalent to " +"calling the Python class :class:`types.GenericAlias`. The *origin* and " +"*args* arguments set the ``GenericAlias``\\ 's ``__origin__`` and " +"``__args__`` attributes respectively. *origin* should be a :c:type:" +"`PyTypeObject*`, and *args* can be a :c:type:`PyTupleObject*` or any " +"``PyObject*``. If *args* passed is not a tuple, a 1-tuple is automatically " +"constructed and ``__args__`` is set to ``(args,)``. Minimal checking is done " +"for the arguments, so the function will succeed even if *origin* is not a " +"type. The ``GenericAlias``\\ 's ``__parameters__`` attribute is constructed " +"lazily from ``__args__``. On failure, an exception is raised and ``NULL`` " +"is returned." +msgstr "" + +#: ../Doc/c-api/typehints.rst:27 +msgid "Here's an example of how to make an extension type generic::" +msgstr "" + +#: ../Doc/c-api/typehints.rst:37 +msgid "The data model method :meth:`__class_getitem__`." +msgstr "" + +#: ../Doc/c-api/typehints.rst:43 +msgid "" +"The C type of the object returned by :c:func:`Py_GenericAlias`. Equivalent " +"to :class:`types.GenericAlias` in Python." +msgstr "" diff --git a/c-api/typeobj.po b/c-api/typeobj.po index 170b5188ff..125d35bebb 100644 --- a/c-api/typeobj.po +++ b/c-api/typeobj.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -22,11 +22,11 @@ msgstr "Objets type" msgid "" "Perhaps one of the most important structures of the Python object system is " "the structure that defines a new type: the :c:type:`PyTypeObject` " -"structure. Type objects can be handled using any of the :c:func:`PyObject_" -"\\*` or :c:func:`PyType_\\*` functions, but do not offer much that's " -"interesting to most Python applications. These objects are fundamental to " -"how objects behave, so they are very important to the interpreter itself and " -"to any extension module that implements new types." +"structure. Type objects can be handled using any of the :c:func:" +"`PyObject_\\*` or :c:func:`PyType_\\*` functions, but do not offer much " +"that's interesting to most Python applications. These objects are " +"fundamental to how objects behave, so they are very important to the " +"interpreter itself and to any extension module that implements new types." msgstr "" #: c-api/typeobj.rst:16 @@ -113,7 +113,7 @@ msgstr "" #: c-api/typeobj.rst:48 c-api/typeobj.rst:99 c-api/typeobj.rst:0 #: c-api/typeobj.rst:406 -msgid "Py_ssize_t" +msgid ":c:type:`Py_ssize_t`" msgstr "" #: c-api/typeobj.rst:48 @@ -171,7 +171,7 @@ msgstr "" #: c-api/typeobj.rst:64 c-api/typeobj.rst:68 msgid ":ref:`sub-slots`" -msgstr "" +msgstr ":ref:`sub-slots`" #: c-api/typeobj.rst:64 c-api/typeobj.rst:68 c-api/typeobj.rst:82 msgid "%" @@ -646,7 +646,7 @@ msgid ":c:member:`~PyNumberMethods.nb_inplace_subtract`" msgstr "" #: c-api/typeobj.rst:212 -msgid "__sub__" +msgid "__isub__" msgstr "" #: c-api/typeobj.rst:214 @@ -661,8 +661,8 @@ msgstr "" msgid ":c:member:`~PyNumberMethods.nb_inplace_multiply`" msgstr "" -#: c-api/typeobj.rst:303 -msgid "__mul__" +#: c-api/typeobj.rst:314 +msgid "__imul__" msgstr "" #: c-api/typeobj.rst:219 @@ -678,7 +678,7 @@ msgid ":c:member:`~PyNumberMethods.nb_inplace_remainder`" msgstr "" #: c-api/typeobj.rst:222 -msgid "__mod__" +msgid "__imod__" msgstr "" #: c-api/typeobj.rst:224 @@ -702,7 +702,7 @@ msgid ":c:member:`~PyNumberMethods.nb_inplace_power`" msgstr "" #: c-api/typeobj.rst:230 -msgid "__pow__" +msgid "__ipow__" msgstr "" #: c-api/typeobj.rst:232 @@ -758,7 +758,7 @@ msgid ":c:member:`~PyNumberMethods.nb_inplace_lshift`" msgstr "" #: c-api/typeobj.rst:245 -msgid "__lshift__" +msgid "__ilshift__" msgstr "" #: c-api/typeobj.rst:247 @@ -774,7 +774,7 @@ msgid ":c:member:`~PyNumberMethods.nb_inplace_rshift`" msgstr "" #: c-api/typeobj.rst:250 -msgid "__rshift__" +msgid "__irshift__" msgstr "" #: c-api/typeobj.rst:252 @@ -790,7 +790,7 @@ msgid ":c:member:`~PyNumberMethods.nb_inplace_and`" msgstr "" #: c-api/typeobj.rst:255 -msgid "__and__" +msgid "__iand__" msgstr "" #: c-api/typeobj.rst:257 @@ -806,7 +806,7 @@ msgid ":c:member:`~PyNumberMethods.nb_inplace_xor`" msgstr "" #: c-api/typeobj.rst:260 -msgid "__xor__" +msgid "__ixor__" msgstr "" #: c-api/typeobj.rst:262 @@ -822,7 +822,7 @@ msgid ":c:member:`~PyNumberMethods.nb_inplace_or`" msgstr "" #: c-api/typeobj.rst:265 -msgid "__or__" +msgid "__ior__" msgstr "" #: c-api/typeobj.rst:267 @@ -853,7 +853,7 @@ msgstr "" msgid ":c:member:`~PyNumberMethods.nb_floor_divide`" msgstr "" -#: c-api/typeobj.rst:275 +#: c-api/typeobj.rst:273 msgid "__floordiv__" msgstr "" @@ -861,11 +861,15 @@ msgstr "" msgid ":c:member:`~PyNumberMethods.nb_inplace_floor_divide`" msgstr "" +#: c-api/typeobj.rst:275 +msgid "__ifloordiv__" +msgstr "" + #: c-api/typeobj.rst:277 msgid ":c:member:`~PyNumberMethods.nb_true_divide`" msgstr "" -#: c-api/typeobj.rst:279 +#: c-api/typeobj.rst:277 msgid "__truediv__" msgstr "" @@ -873,6 +877,10 @@ msgstr "" msgid ":c:member:`~PyNumberMethods.nb_inplace_true_divide`" msgstr "" +#: c-api/typeobj.rst:279 +msgid "__itruediv__" +msgstr "" + #: c-api/typeobj.rst:281 msgid ":c:member:`~PyNumberMethods.nb_index`" msgstr "" @@ -894,7 +902,7 @@ msgid ":c:member:`~PyNumberMethods.nb_inplace_matrix_multiply`" msgstr "" #: c-api/typeobj.rst:286 -msgid "__matmul__" +msgid "__imatmul__" msgstr "" #: c-api/typeobj.rst:290 @@ -949,6 +957,10 @@ msgstr "" msgid ":c:type:`ssizeargfunc`" msgstr "" +#: c-api/typeobj.rst:303 +msgid "__mul__" +msgstr "" + #: c-api/typeobj.rst:305 msgid ":c:member:`~PySequenceMethods.sq_item`" msgstr "" @@ -985,10 +997,6 @@ msgstr "" msgid ":c:member:`~PySequenceMethods.sq_inplace_repeat`" msgstr "" -#: c-api/typeobj.rst:314 -msgid "__imul__" -msgstr "" - #: c-api/typeobj.rst:318 msgid ":c:member:`~PyBufferProcs.bf_getbuffer`" msgstr "" @@ -1073,11 +1081,10 @@ msgstr "Objets type" #: c-api/typeobj.rst:476 msgid "" "The type object structure extends the :c:type:`PyVarObject` structure. The :" -"attr:`ob_size` field is used for dynamic types (created by :func:" -"`type_new`, usually called from a class statement). Note that :c:data:" -"`PyType_Type` (the metatype) initializes :c:member:`~PyTypeObject." -"tp_itemsize`, which means that its instances (i.e. type objects) *must* have " -"the :attr:`ob_size` field." +"attr:`ob_size` field is used for dynamic types (created by :func:`type_new`, " +"usually called from a class statement). Note that :c:data:`PyType_Type` (the " +"metatype) initializes :c:member:`~PyTypeObject.tp_itemsize`, which means " +"that its instances (i.e. type objects) *must* have the :attr:`ob_size` field." msgstr "" #: c-api/typeobj.rst:486 @@ -1093,15 +1100,15 @@ msgid "" msgstr "" #: c-api/typeobj.rst:508 c-api/typeobj.rst:544 c-api/typeobj.rst:629 -#: c-api/typeobj.rst:719 c-api/typeobj.rst:755 c-api/typeobj.rst:797 -#: c-api/typeobj.rst:826 c-api/typeobj.rst:871 c-api/typeobj.rst:909 -#: c-api/typeobj.rst:956 c-api/typeobj.rst:991 c-api/typeobj.rst:1039 -#: c-api/typeobj.rst:1059 c-api/typeobj.rst:1092 c-api/typeobj.rst:1162 -#: c-api/typeobj.rst:1245 c-api/typeobj.rst:1365 c-api/typeobj.rst:1427 -#: c-api/typeobj.rst:1463 c-api/typeobj.rst:1492 c-api/typeobj.rst:1542 -#: c-api/typeobj.rst:1586 c-api/typeobj.rst:1677 c-api/typeobj.rst:1732 -#: c-api/typeobj.rst:1785 c-api/typeobj.rst:1813 c-api/typeobj.rst:1832 -#: c-api/typeobj.rst:1856 c-api/typeobj.rst:1911 +#: c-api/typeobj.rst:731 c-api/typeobj.rst:767 c-api/typeobj.rst:809 +#: c-api/typeobj.rst:838 c-api/typeobj.rst:883 c-api/typeobj.rst:921 +#: c-api/typeobj.rst:968 c-api/typeobj.rst:1003 c-api/typeobj.rst:1051 +#: c-api/typeobj.rst:1071 c-api/typeobj.rst:1104 c-api/typeobj.rst:1174 +#: c-api/typeobj.rst:1257 c-api/typeobj.rst:1383 c-api/typeobj.rst:1445 +#: c-api/typeobj.rst:1481 c-api/typeobj.rst:1510 c-api/typeobj.rst:1560 +#: c-api/typeobj.rst:1604 c-api/typeobj.rst:1695 c-api/typeobj.rst:1750 +#: c-api/typeobj.rst:1803 c-api/typeobj.rst:1831 c-api/typeobj.rst:1850 +#: c-api/typeobj.rst:1874 c-api/typeobj.rst:1940 msgid "**Inheritance:**" msgstr "" @@ -1142,8 +1149,8 @@ msgid "" "will not change this field if it is non-zero." msgstr "" -#: c-api/typeobj.rst:677 c-api/typeobj.rst:891 c-api/typeobj.rst:1429 -#: c-api/typeobj.rst:1570 c-api/typeobj.rst:1679 c-api/typeobj.rst:1896 +#: c-api/typeobj.rst:689 c-api/typeobj.rst:903 c-api/typeobj.rst:1447 +#: c-api/typeobj.rst:1588 c-api/typeobj.rst:1697 c-api/typeobj.rst:1925 msgid "This field is inherited by subtypes." msgstr "" @@ -1307,34 +1314,41 @@ msgstr "" #: c-api/typeobj.rst:660 msgid "" +"If the type supports garbage collection (has the :const:`Py_TPFLAGS_HAVE_GC` " +"flag bit set), the destructor should call :c:func:`PyObject_GC_UnTrack` " +"before clearing any member fields." +msgstr "" + +#: c-api/typeobj.rst:672 +msgid "" "Finally, if the type is heap allocated (:const:`Py_TPFLAGS_HEAPTYPE`), the " "deallocator should decrement the reference count for its type object after " "calling the type deallocator. In order to avoid dangling pointers, the " "recommended way to achieve this is:" msgstr "" -#: c-api/typeobj.rst:682 +#: c-api/typeobj.rst:694 msgid "" "An optional offset to a per-instance function that implements calling the " "object using the :ref:`vectorcall protocol `, a more efficient " "alternative of the simpler :c:member:`~PyTypeObject.tp_call`." msgstr "" -#: c-api/typeobj.rst:687 +#: c-api/typeobj.rst:699 msgid "" "This field is only used if the flag :const:`Py_TPFLAGS_HAVE_VECTORCALL` is " "set. If so, this must be a positive integer containing the offset in the " "instance of a :c:type:`vectorcallfunc` pointer." msgstr "" -#: c-api/typeobj.rst:691 +#: c-api/typeobj.rst:703 msgid "" "The *vectorcallfunc* pointer may be ``NULL``, in which case the instance " "behaves as if :const:`Py_TPFLAGS_HAVE_VECTORCALL` was not set: calling the " "instance falls back to :c:member:`~PyTypeObject.tp_call`." msgstr "" -#: c-api/typeobj.rst:695 +#: c-api/typeobj.rst:707 msgid "" "Any class that sets ``Py_TPFLAGS_HAVE_VECTORCALL`` must also set :c:member:" "`~PyTypeObject.tp_call` and make sure its behaviour is consistent with the " @@ -1342,7 +1356,7 @@ msgid "" "`PyVectorcall_Call`." msgstr "" -#: c-api/typeobj.rst:702 +#: c-api/typeobj.rst:714 msgid "" "It is not recommended for :ref:`heap types ` to implement the " "vectorcall protocol. When a user sets :attr:`__call__` in Python code, only " @@ -1350,20 +1364,20 @@ msgid "" "function." msgstr "" -#: c-api/typeobj.rst:709 +#: c-api/typeobj.rst:721 msgid "" "The semantics of the ``tp_vectorcall_offset`` slot are provisional and " "expected to be finalized in Python 3.9. If you use vectorcall, plan for " "updating your code for Python 3.9." msgstr "" -#: c-api/typeobj.rst:715 +#: c-api/typeobj.rst:727 msgid "" "Before version 3.8, this slot was named ``tp_print``. In Python 2.x, it was " "used for printing to a file. In Python 3.0 to 3.7, it was unused." msgstr "" -#: c-api/typeobj.rst:721 +#: c-api/typeobj.rst:733 msgid "" "This field is always inherited. However, the :const:" "`Py_TPFLAGS_HAVE_VECTORCALL` flag is not always inherited. If it's not, then " @@ -1372,11 +1386,11 @@ msgid "" "`heap types`_ (including subclasses defined in Python)." msgstr "" -#: c-api/typeobj.rst:732 +#: c-api/typeobj.rst:744 msgid "An optional pointer to the get-attribute-string function." msgstr "" -#: c-api/typeobj.rst:734 +#: c-api/typeobj.rst:746 msgid "" "This field is deprecated. When it is defined, it should point to a function " "that acts the same as the :c:member:`~PyTypeObject.tp_getattro` function, " @@ -1384,11 +1398,11 @@ msgid "" "attribute name." msgstr "" -#: c-api/typeobj.rst:932 +#: c-api/typeobj.rst:944 msgid "Group: :attr:`tp_getattr`, :attr:`tp_getattro`" msgstr "" -#: c-api/typeobj.rst:742 +#: c-api/typeobj.rst:754 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_getattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " @@ -1397,12 +1411,12 @@ msgid "" "tp_getattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:945 +#: c-api/typeobj.rst:957 msgid "" "An optional pointer to the function for setting and deleting attributes." msgstr "" -#: c-api/typeobj.rst:751 +#: c-api/typeobj.rst:763 msgid "" "This field is deprecated. When it is defined, it should point to a function " "that acts the same as the :c:member:`~PyTypeObject.tp_setattro` function, " @@ -1410,11 +1424,11 @@ msgid "" "attribute name." msgstr "" -#: c-api/typeobj.rst:958 +#: c-api/typeobj.rst:970 msgid "Group: :attr:`tp_setattr`, :attr:`tp_setattro`" msgstr "" -#: c-api/typeobj.rst:759 +#: c-api/typeobj.rst:771 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_setattro`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " @@ -1423,34 +1437,34 @@ msgid "" "tp_setattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:766 +#: c-api/typeobj.rst:778 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement :term:`awaitable` and :term:`asynchronous iterator` " "protocols at the C-level. See :ref:`async-structs` for details." msgstr "" -#: c-api/typeobj.rst:770 +#: c-api/typeobj.rst:782 msgid "Formerly known as ``tp_compare`` and ``tp_reserved``." msgstr "" -#: c-api/typeobj.rst:775 +#: c-api/typeobj.rst:787 msgid "" "The :c:member:`~PyTypeObject.tp_as_async` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:783 +#: c-api/typeobj.rst:795 msgid "" "An optional pointer to a function that implements the built-in function :" "func:`repr`." msgstr "" -#: c-api/typeobj.rst:786 +#: c-api/typeobj.rst:798 msgid "The signature is the same as for :c:func:`PyObject_Repr`::" msgstr "" -#: c-api/typeobj.rst:790 +#: c-api/typeobj.rst:802 msgid "" "The function must return a string or a Unicode object. Ideally, this " "function should return a string that, when passed to :func:`eval`, given a " @@ -1459,83 +1473,83 @@ msgid "" "``'>'`` from which both the type and the value of the object can be deduced." msgstr "" -#: c-api/typeobj.rst:913 c-api/typeobj.rst:964 c-api/typeobj.rst:1374 -#: c-api/typeobj.rst:1547 c-api/typeobj.rst:1681 c-api/typeobj.rst:1737 -#: c-api/typeobj.rst:1789 +#: c-api/typeobj.rst:925 c-api/typeobj.rst:976 c-api/typeobj.rst:1392 +#: c-api/typeobj.rst:1565 c-api/typeobj.rst:1699 c-api/typeobj.rst:1755 +#: c-api/typeobj.rst:1807 msgid "**Default:**" msgstr "" -#: c-api/typeobj.rst:803 +#: c-api/typeobj.rst:815 msgid "" "When this field is not set, a string of the form ``<%s object at %p>`` is " "returned, where ``%s`` is replaced by the type name, and ``%p`` by the " "object's memory address." msgstr "" -#: c-api/typeobj.rst:810 +#: c-api/typeobj.rst:822 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the number protocol. These fields are documented " "in :ref:`number-structs`." msgstr "" -#: c-api/typeobj.rst:816 +#: c-api/typeobj.rst:828 msgid "" "The :c:member:`~PyTypeObject.tp_as_number` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:822 +#: c-api/typeobj.rst:834 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the sequence protocol. These fields are documented " "in :ref:`sequence-structs`." msgstr "" -#: c-api/typeobj.rst:828 +#: c-api/typeobj.rst:840 msgid "" "The :c:member:`~PyTypeObject.tp_as_sequence` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:834 +#: c-api/typeobj.rst:846 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the mapping protocol. These fields are documented " "in :ref:`mapping-structs`." msgstr "" -#: c-api/typeobj.rst:840 +#: c-api/typeobj.rst:852 msgid "" "The :c:member:`~PyTypeObject.tp_as_mapping` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:848 +#: c-api/typeobj.rst:860 msgid "" "An optional pointer to a function that implements the built-in function :" "func:`hash`." msgstr "" -#: c-api/typeobj.rst:851 +#: c-api/typeobj.rst:863 msgid "The signature is the same as for :c:func:`PyObject_Hash`::" msgstr "" -#: c-api/typeobj.rst:855 +#: c-api/typeobj.rst:867 msgid "" "The value ``-1`` should not be returned as a normal return value; when an " "error occurs during the computation of the hash value, the function should " "set an exception and return ``-1``." msgstr "" -#: c-api/typeobj.rst:859 +#: c-api/typeobj.rst:871 msgid "" "When this field is not set (*and* :attr:`tp_richcompare` is not set), an " "attempt to take the hash of the object raises :exc:`TypeError`. This is the " "same as setting it to :c:func:`PyObject_HashNotImplemented`." msgstr "" -#: c-api/typeobj.rst:863 +#: c-api/typeobj.rst:875 msgid "" "This field can be set explicitly to :c:func:`PyObject_HashNotImplemented` to " "block inheritance of the hash method from a parent type. This is interpreted " @@ -1546,11 +1560,11 @@ msgid "" "`PyObject_HashNotImplemented`." msgstr "" -#: c-api/typeobj.rst:1367 +#: c-api/typeobj.rst:1385 msgid "Group: :attr:`tp_hash`, :attr:`tp_richcompare`" msgstr "" -#: c-api/typeobj.rst:875 +#: c-api/typeobj.rst:887 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_richcompare`: a subtype inherits both of :c:member:`~PyTypeObject." @@ -1559,14 +1573,14 @@ msgid "" "are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:883 +#: c-api/typeobj.rst:895 msgid "" "An optional pointer to a function that implements calling the object. This " "should be ``NULL`` if the object is not callable. The signature is the same " "as for :c:func:`PyObject_Call`::" msgstr "" -#: c-api/typeobj.rst:896 +#: c-api/typeobj.rst:908 msgid "" "An optional pointer to a function that implements the built-in operation :" "func:`str`. (Note that :class:`str` is a type now, and :func:`str` calls " @@ -1575,11 +1589,11 @@ msgid "" "this handler.)" msgstr "" -#: c-api/typeobj.rst:901 +#: c-api/typeobj.rst:913 msgid "The signature is the same as for :c:func:`PyObject_Str`::" msgstr "" -#: c-api/typeobj.rst:905 +#: c-api/typeobj.rst:917 msgid "" "The function must return a string or a Unicode object. It should be a " "\"friendly\" string representation of the object, as this is the " @@ -1587,28 +1601,28 @@ msgid "" "function." msgstr "" -#: c-api/typeobj.rst:915 +#: c-api/typeobj.rst:927 msgid "" "When this field is not set, :c:func:`PyObject_Repr` is called to return a " "string representation." msgstr "" -#: c-api/typeobj.rst:921 +#: c-api/typeobj.rst:933 msgid "An optional pointer to the get-attribute function." msgstr "" -#: c-api/typeobj.rst:923 +#: c-api/typeobj.rst:935 msgid "The signature is the same as for :c:func:`PyObject_GetAttr`::" msgstr "" -#: c-api/typeobj.rst:927 +#: c-api/typeobj.rst:939 msgid "" "It is usually convenient to set this field to :c:func:" "`PyObject_GenericGetAttr`, which implements the normal way of looking for " "object attributes." msgstr "" -#: c-api/typeobj.rst:934 +#: c-api/typeobj.rst:946 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_getattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_getattr` " @@ -1617,15 +1631,15 @@ msgid "" "tp_getattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:940 +#: c-api/typeobj.rst:952 msgid ":c:type:`PyBaseObject_Type` uses :c:func:`PyObject_GenericGetAttr`." msgstr "" -#: c-api/typeobj.rst:947 +#: c-api/typeobj.rst:959 msgid "The signature is the same as for :c:func:`PyObject_SetAttr`::" msgstr "" -#: c-api/typeobj.rst:951 +#: c-api/typeobj.rst:963 msgid "" "In addition, setting *value* to ``NULL`` to delete an attribute must be " "supported. It is usually convenient to set this field to :c:func:" @@ -1633,7 +1647,7 @@ msgid "" "attributes." msgstr "" -#: c-api/typeobj.rst:960 +#: c-api/typeobj.rst:972 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_setattr`: a subtype inherits both :c:member:`~PyTypeObject.tp_setattr` " @@ -1642,24 +1656,24 @@ msgid "" "tp_setattro` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:966 +#: c-api/typeobj.rst:978 msgid ":c:type:`PyBaseObject_Type` uses :c:func:`PyObject_GenericSetAttr`." msgstr "" -#: c-api/typeobj.rst:971 +#: c-api/typeobj.rst:983 msgid "" "Pointer to an additional structure that contains fields relevant only to " "objects which implement the buffer interface. These fields are documented " "in :ref:`buffer-structs`." msgstr "" -#: c-api/typeobj.rst:977 +#: c-api/typeobj.rst:989 msgid "" "The :c:member:`~PyTypeObject.tp_as_buffer` field is not inherited, but the " "contained fields are inherited individually." msgstr "" -#: c-api/typeobj.rst:983 +#: c-api/typeobj.rst:995 msgid "" "This field is a bit mask of various flags. Some flags indicate variant " "semantics for certain situations; others are used to indicate that certain " @@ -1671,7 +1685,7 @@ msgid "" "accessed and must be considered to have a zero or ``NULL`` value instead." msgstr "" -#: c-api/typeobj.rst:993 +#: c-api/typeobj.rst:1005 msgid "" "Inheritance of this field is complicated. Most flag bits are inherited " "individually, i.e. if the base type has a flag bit set, the subtype inherits " @@ -1686,17 +1700,17 @@ msgid "" "the subtype exist and have ``NULL`` values." msgstr "" -#: c-api/typeobj.rst:1008 +#: c-api/typeobj.rst:1020 msgid "" ":c:type:`PyBaseObject_Type` uses ``Py_TPFLAGS_DEFAULT | " "Py_TPFLAGS_BASETYPE``." msgstr "" -#: c-api/typeobj.rst:1011 +#: c-api/typeobj.rst:1023 msgid "**Bit Masks:**" msgstr "" -#: c-api/typeobj.rst:1013 +#: c-api/typeobj.rst:1025 msgid "" "The following bit masks are currently defined; these can be ORed together " "using the ``|`` operator to form the value of the :c:member:`~PyTypeObject." @@ -1705,7 +1719,7 @@ msgid "" "zero." msgstr "" -#: c-api/typeobj.rst:1020 +#: c-api/typeobj.rst:1032 msgid "" "This bit is set when the type object itself is allocated on the heap, for " "example, types created dynamically using :c:func:`PyType_FromSpec`. In this " @@ -1716,30 +1730,30 @@ msgid "" "gets INCREF'ed or DECREF'ed)." msgstr "" -#: c-api/typeobj.rst:1041 c-api/typeobj.rst:1061 c-api/typeobj.rst:1094 +#: c-api/typeobj.rst:1053 c-api/typeobj.rst:1073 c-api/typeobj.rst:1106 msgid "???" msgstr "" -#: c-api/typeobj.rst:1035 +#: c-api/typeobj.rst:1047 msgid "" "This bit is set when the type can be used as the base type of another type. " "If this bit is clear, the type cannot be subtyped (similar to a \"final\" " "class in Java)." msgstr "" -#: c-api/typeobj.rst:1046 +#: c-api/typeobj.rst:1058 msgid "" "This bit is set when the type object has been fully initialized by :c:func:" "`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1056 +#: c-api/typeobj.rst:1068 msgid "" "This bit is set while :c:func:`PyType_Ready` is in the process of " "initializing the type object." msgstr "" -#: c-api/typeobj.rst:1066 +#: c-api/typeobj.rst:1078 msgid "" "This bit is set when the object supports garbage collection. If this bit is " "set, instances must be created using :c:func:`PyObject_GC_New` and destroyed " @@ -1749,12 +1763,12 @@ msgid "" "tp_clear` are present in the type object." msgstr "" -#: c-api/typeobj.rst:1247 c-api/typeobj.rst:1308 +#: c-api/typeobj.rst:1259 c-api/typeobj.rst:1326 msgid "" "Group: :const:`Py_TPFLAGS_HAVE_GC`, :attr:`tp_traverse`, :attr:`tp_clear`" msgstr "" -#: c-api/typeobj.rst:1077 +#: c-api/typeobj.rst:1089 msgid "" "The :const:`Py_TPFLAGS_HAVE_GC` flag bit is inherited together with the :" "attr:`tp_traverse` and :attr:`tp_clear` fields, i.e. if the :const:" @@ -1763,7 +1777,7 @@ msgid "" "``NULL`` values." msgstr "" -#: c-api/typeobj.rst:1087 +#: c-api/typeobj.rst:1099 msgid "" "This is a bitmask of all the bits that pertain to the existence of certain " "fields in the type object and its extension structures. Currently, it " @@ -1771,40 +1785,40 @@ msgid "" "const:`Py_TPFLAGS_HAVE_VERSION_TAG`." msgstr "" -#: c-api/typeobj.rst:1099 +#: c-api/typeobj.rst:1111 msgid "This bit indicates that objects behave like unbound methods." msgstr "" -#: c-api/typeobj.rst:1101 +#: c-api/typeobj.rst:1113 msgid "If this flag is set for ``type(meth)``, then:" msgstr "" -#: c-api/typeobj.rst:1103 +#: c-api/typeobj.rst:1115 msgid "" "``meth.__get__(obj, cls)(*args, **kwds)`` (with ``obj`` not None) must be " "equivalent to ``meth(obj, *args, **kwds)``." msgstr "" -#: c-api/typeobj.rst:1106 +#: c-api/typeobj.rst:1118 msgid "" "``meth.__get__(None, cls)(*args, **kwds)`` must be equivalent to " "``meth(*args, **kwds)``." msgstr "" -#: c-api/typeobj.rst:1109 +#: c-api/typeobj.rst:1121 msgid "" "This flag enables an optimization for typical method calls like ``obj." "meth()``: it avoids creating a temporary \"bound method\" object for ``obj." "meth``." msgstr "" -#: c-api/typeobj.rst:1117 +#: c-api/typeobj.rst:1129 msgid "" "This flag is never inherited by heap types. For extension types, it is " "inherited whenever :c:member:`~PyTypeObject.tp_descr_get` is inherited." msgstr "" -#: c-api/typeobj.rst:1134 +#: c-api/typeobj.rst:1146 msgid "" "These flags are used by functions such as :c:func:`PyLong_Check` to quickly " "determine if a type is a subclass of a built-in type; such specific checks " @@ -1814,57 +1828,57 @@ msgid "" "behave differently depending on what kind of check is used." msgstr "" -#: c-api/typeobj.rst:1145 +#: c-api/typeobj.rst:1157 msgid "" "This bit is set when the :c:member:`~PyTypeObject.tp_finalize` slot is " "present in the type structure." msgstr "" -#: c-api/typeobj.rst:1150 +#: c-api/typeobj.rst:1162 msgid "" "This flag isn't necessary anymore, as the interpreter assumes the :c:member:" "`~PyTypeObject.tp_finalize` slot is always present in the type structure." msgstr "" -#: c-api/typeobj.rst:1158 +#: c-api/typeobj.rst:1170 msgid "" "This bit is set when the class implements the :ref:`vectorcall protocol " "`. See :c:member:`~PyTypeObject.tp_vectorcall_offset` for " "details." msgstr "" -#: c-api/typeobj.rst:1164 +#: c-api/typeobj.rst:1176 msgid "" "This bit is inherited for *static* subtypes if :c:member:`~PyTypeObject." "tp_call` is also inherited. `Heap types`_ do not inherit " "``Py_TPFLAGS_HAVE_VECTORCALL``." msgstr "" -#: c-api/typeobj.rst:1173 +#: c-api/typeobj.rst:1185 msgid "" "An optional pointer to a NUL-terminated C string giving the docstring for " "this type object. This is exposed as the :attr:`__doc__` attribute on the " "type and instances of the type." msgstr "" -#: c-api/typeobj.rst:1179 +#: c-api/typeobj.rst:1191 msgid "This field is *not* inherited by subtypes." msgstr "" -#: c-api/typeobj.rst:1184 +#: c-api/typeobj.rst:1196 msgid "" "An optional pointer to a traversal function for the garbage collector. This " "is only used if the :const:`Py_TPFLAGS_HAVE_GC` flag bit is set. The " "signature is::" msgstr "" -#: c-api/typeobj.rst:1303 +#: c-api/typeobj.rst:1321 msgid "" "More information about Python's garbage collection scheme can be found in " "section :ref:`supporting-cycle-detection`." msgstr "" -#: c-api/typeobj.rst:1192 +#: c-api/typeobj.rst:1204 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` pointer is used by the garbage " "collector to detect reference cycles. A typical implementation of a :c:" @@ -1874,7 +1888,7 @@ msgid "" "`_thread` extension module::" msgstr "" -#: c-api/typeobj.rst:1207 +#: c-api/typeobj.rst:1219 msgid "" "Note that :c:func:`Py_VISIT` is called only on those members that can " "participate in reference cycles. Although there is also a ``self->key`` " @@ -1882,14 +1896,14 @@ msgid "" "part of a reference cycle." msgstr "" -#: c-api/typeobj.rst:1211 +#: c-api/typeobj.rst:1223 msgid "" "On the other hand, even if you know a member can never be part of a cycle, " "as a debugging aid you may want to visit it anyway just so the :mod:`gc` " "module's :func:`~gc.get_referents` function will include it." msgstr "" -#: c-api/typeobj.rst:1216 +#: c-api/typeobj.rst:1228 msgid "" "When implementing :c:member:`~PyTypeObject.tp_traverse`, only the members " "that the instance *owns* (by having strong references to them) must be " @@ -1902,14 +1916,14 @@ msgid "" "removed even if the instance is still alive)." msgstr "" -#: c-api/typeobj.rst:1226 +#: c-api/typeobj.rst:1238 msgid "" "Note that :c:func:`Py_VISIT` requires the *visit* and *arg* parameters to :c:" "func:`local_traverse` to have these specific names; don't name them just " "anything." msgstr "" -#: c-api/typeobj.rst:1230 +#: c-api/typeobj.rst:1242 msgid "" "Heap-allocated types (:const:`Py_TPFLAGS_HEAPTYPE`, such as those created " "with :c:func:`PyType_FromSpec` and similar APIs) hold a reference to their " @@ -1919,14 +1933,14 @@ msgid "" "superclass). If they do not, the type object may not be garbage-collected." msgstr "" -#: c-api/typeobj.rst:1240 +#: c-api/typeobj.rst:1252 msgid "" "Heap-allocated types are expected to visit ``Py_TYPE(self)`` in " "``tp_traverse``. In earlier versions of Python, due to `bug 40217 `_, doing this may lead to crashes in subclasses." msgstr "" -#: c-api/typeobj.rst:1249 +#: c-api/typeobj.rst:1261 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_clear` and the :const:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:" @@ -1934,14 +1948,14 @@ msgid "" "are all inherited from the base type if they are all zero in the subtype." msgstr "" -#: c-api/typeobj.rst:1257 +#: c-api/typeobj.rst:1269 msgid "" "An optional pointer to a clear function for the garbage collector. This is " "only used if the :const:`Py_TPFLAGS_HAVE_GC` flag bit is set. The signature " "is::" msgstr "" -#: c-api/typeobj.rst:1262 +#: c-api/typeobj.rst:1274 msgid "" "The :c:member:`~PyTypeObject.tp_clear` member function is used to break " "reference cycles in cyclic garbage detected by the garbage collector. Taken " @@ -1956,7 +1970,7 @@ msgid "" "good reason to avoid implementing :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: c-api/typeobj.rst:1272 +#: c-api/typeobj.rst:1284 msgid "" "Implementations of :c:member:`~PyTypeObject.tp_clear` should drop the " "instance's references to those of its members that may be Python objects, " @@ -1964,7 +1978,7 @@ msgid "" "example::" msgstr "" -#: c-api/typeobj.rst:1286 +#: c-api/typeobj.rst:1298 msgid "" "The :c:func:`Py_CLEAR` macro should be used, because clearing references is " "delicate: the reference to the contained object must not be decremented " @@ -1979,7 +1993,15 @@ msgid "" "in a safe order." msgstr "" -#: c-api/typeobj.rst:1297 +#: c-api/typeobj.rst:1309 +msgid "" +"Note that :c:member:`~PyTypeObject.tp_clear` is not *always* called before " +"an instance is deallocated. For example, when reference counting is enough " +"to determine that an object is no longer used, the cyclic garbage collector " +"is not involved and :c:member:`~PyTypeObject.tp_dealloc` is called directly." +msgstr "" + +#: c-api/typeobj.rst:1315 msgid "" "Because the goal of :c:member:`~PyTypeObject.tp_clear` functions is to break " "reference cycles, it's not necessary to clear contained objects like Python " @@ -1989,7 +2011,7 @@ msgid "" "invoke :c:member:`~PyTypeObject.tp_clear`." msgstr "" -#: c-api/typeobj.rst:1310 +#: c-api/typeobj.rst:1328 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_traverse` and the :const:`Py_TPFLAGS_HAVE_GC` flag bit: the flag bit, :c:" @@ -1997,18 +2019,18 @@ msgid "" "are all inherited from the base type if they are all zero in the subtype." msgstr "" -#: c-api/typeobj.rst:1318 +#: c-api/typeobj.rst:1336 msgid "" "An optional pointer to the rich comparison function, whose signature is::" msgstr "" -#: c-api/typeobj.rst:1322 +#: c-api/typeobj.rst:1340 msgid "" "The first parameter is guaranteed to be an instance of the type that is " "defined by :c:type:`PyTypeObject`." msgstr "" -#: c-api/typeobj.rst:1325 +#: c-api/typeobj.rst:1343 msgid "" "The function should return the result of the comparison (usually ``Py_True`` " "or ``Py_False``). If the comparison is undefined, it must return " @@ -2016,74 +2038,74 @@ msgid "" "set an exception condition." msgstr "" -#: c-api/typeobj.rst:1330 +#: c-api/typeobj.rst:1348 msgid "" "The following constants are defined to be used as the third argument for :c:" "member:`~PyTypeObject.tp_richcompare` and for :c:func:`PyObject_RichCompare`:" msgstr "" -#: c-api/typeobj.rst:1334 +#: c-api/typeobj.rst:1352 msgid "Constant" msgstr "Constante" -#: c-api/typeobj.rst:1334 +#: c-api/typeobj.rst:1352 msgid "Comparison" msgstr "Comparaison" -#: c-api/typeobj.rst:1336 +#: c-api/typeobj.rst:1354 msgid ":const:`Py_LT`" -msgstr "" +msgstr ":const:`Py_LT`" -#: c-api/typeobj.rst:1336 +#: c-api/typeobj.rst:1354 msgid "``<``" msgstr "``<``" -#: c-api/typeobj.rst:1338 +#: c-api/typeobj.rst:1356 msgid ":const:`Py_LE`" -msgstr "" +msgstr ":const:`Py_LE`" -#: c-api/typeobj.rst:1338 +#: c-api/typeobj.rst:1356 msgid "``<=``" msgstr "``<=``" -#: c-api/typeobj.rst:1340 +#: c-api/typeobj.rst:1358 msgid ":const:`Py_EQ`" -msgstr "" +msgstr ":const:`Py_EQ`" -#: c-api/typeobj.rst:1340 +#: c-api/typeobj.rst:1358 msgid "``==``" msgstr "``==``" -#: c-api/typeobj.rst:1342 +#: c-api/typeobj.rst:1360 msgid ":const:`Py_NE`" -msgstr "" +msgstr ":const:`Py_NE`" -#: c-api/typeobj.rst:1342 +#: c-api/typeobj.rst:1360 msgid "``!=``" msgstr "``!=``" -#: c-api/typeobj.rst:1344 +#: c-api/typeobj.rst:1362 msgid ":const:`Py_GT`" -msgstr "" +msgstr ":const:`Py_GT`" -#: c-api/typeobj.rst:1344 +#: c-api/typeobj.rst:1362 msgid "``>``" msgstr "``>``" -#: c-api/typeobj.rst:1346 +#: c-api/typeobj.rst:1364 msgid ":const:`Py_GE`" -msgstr "" +msgstr ":const:`Py_GE`" -#: c-api/typeobj.rst:1346 +#: c-api/typeobj.rst:1364 msgid "``>=``" msgstr "``>=``" -#: c-api/typeobj.rst:1349 +#: c-api/typeobj.rst:1367 msgid "" "The following macro is defined to ease writing rich comparison functions:" msgstr "" -#: c-api/typeobj.rst:1353 +#: c-api/typeobj.rst:1371 msgid "" "Return ``Py_True`` or ``Py_False`` from the function, depending on the " "result of a comparison. VAL_A and VAL_B must be orderable by C comparison " @@ -2091,15 +2113,15 @@ msgid "" "specifies the requested operation, as for :c:func:`PyObject_RichCompare`." msgstr "" -#: c-api/typeobj.rst:1359 +#: c-api/typeobj.rst:1377 msgid "The return value's reference count is properly incremented." msgstr "" -#: c-api/typeobj.rst:1361 +#: c-api/typeobj.rst:1379 msgid "On error, sets an exception and returns ``NULL`` from the function." msgstr "" -#: c-api/typeobj.rst:1369 +#: c-api/typeobj.rst:1387 msgid "" "This field is inherited by subtypes together with :c:member:`~PyTypeObject." "tp_hash`: a subtype inherits :c:member:`~PyTypeObject.tp_richcompare` and :c:" @@ -2107,7 +2129,7 @@ msgid "" "tp_richcompare` and :c:member:`~PyTypeObject.tp_hash` are both ``NULL``." msgstr "" -#: c-api/typeobj.rst:1376 +#: c-api/typeobj.rst:1394 msgid "" ":c:type:`PyBaseObject_Type` provides a :attr:`tp_richcompare` " "implementation, which may be inherited. However, if only :attr:`tp_hash` is " @@ -2115,7 +2137,7 @@ msgid "" "will not be able to participate in any comparisons." msgstr "" -#: c-api/typeobj.rst:1385 +#: c-api/typeobj.rst:1403 msgid "" "If the instances of this type are weakly referenceable, this field is " "greater than zero and contains the offset in the instance structure of the " @@ -2125,13 +2147,13 @@ msgid "" "`PyObject*` which is initialized to ``NULL``." msgstr "" -#: c-api/typeobj.rst:1392 +#: c-api/typeobj.rst:1410 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_weaklist`; that " "is the list head for weak references to the type object itself." msgstr "" -#: c-api/typeobj.rst:1397 +#: c-api/typeobj.rst:1415 msgid "" "This field is inherited by subtypes, but see the rules listed below. A " "subtype may override this offset; this means that the subtype uses a " @@ -2140,7 +2162,7 @@ msgid "" "not be a problem." msgstr "" -#: c-api/typeobj.rst:1402 +#: c-api/typeobj.rst:1420 msgid "" "When a type defined by a class statement has no :attr:`~object.__slots__` " "declaration, and none of its base types are weakly referenceable, the type " @@ -2149,7 +2171,7 @@ msgid "" "tp_weaklistoffset` of that slot's offset." msgstr "" -#: c-api/typeobj.rst:1407 +#: c-api/typeobj.rst:1425 msgid "" "When a type's :attr:`__slots__` declaration contains a slot named :attr:" "`__weakref__`, that slot becomes the weak reference list head for instances " @@ -2157,31 +2179,31 @@ msgid "" "`~PyTypeObject.tp_weaklistoffset`." msgstr "" -#: c-api/typeobj.rst:1412 +#: c-api/typeobj.rst:1430 msgid "" "When a type's :attr:`__slots__` declaration does not contain a slot named :" "attr:`__weakref__`, the type inherits its :c:member:`~PyTypeObject." "tp_weaklistoffset` from its base type." msgstr "" -#: c-api/typeobj.rst:1419 +#: c-api/typeobj.rst:1437 msgid "" "An optional pointer to a function that returns an iterator for the object. " "Its presence normally signals that the instances of this type are iterable " "(although sequences may be iterable without this function)." msgstr "" -#: c-api/typeobj.rst:1423 +#: c-api/typeobj.rst:1441 msgid "This function has the same signature as :c:func:`PyObject_GetIter`::" msgstr "" -#: c-api/typeobj.rst:1434 +#: c-api/typeobj.rst:1452 msgid "" "An optional pointer to a function that returns the next item in an iterator. " "The signature is::" msgstr "" -#: c-api/typeobj.rst:1439 +#: c-api/typeobj.rst:1457 msgid "" "When the iterator is exhausted, it must return ``NULL``; a :exc:" "`StopIteration` exception may or may not be set. When another error occurs, " @@ -2189,74 +2211,74 @@ msgid "" "this type are iterators." msgstr "" -#: c-api/typeobj.rst:1444 +#: c-api/typeobj.rst:1462 msgid "" "Iterator types should also define the :c:member:`~PyTypeObject.tp_iter` " "function, and that function should return the iterator instance itself (not " "a new iterator instance)." msgstr "" -#: c-api/typeobj.rst:1448 +#: c-api/typeobj.rst:1466 msgid "This function has the same signature as :c:func:`PyIter_Next`." msgstr "" -#: c-api/typeobj.rst:1457 +#: c-api/typeobj.rst:1475 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMethodDef` structures, declaring regular methods of this type." msgstr "" -#: c-api/typeobj.rst:1460 +#: c-api/typeobj.rst:1478 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a method descriptor." msgstr "" -#: c-api/typeobj.rst:1465 +#: c-api/typeobj.rst:1483 msgid "" "This field is not inherited by subtypes (methods are inherited through a " "different mechanism)." msgstr "" -#: c-api/typeobj.rst:1471 +#: c-api/typeobj.rst:1489 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyMemberDef` structures, declaring regular data members (fields or slots) " "of instances of this type." msgstr "" -#: c-api/typeobj.rst:1475 +#: c-api/typeobj.rst:1493 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a member descriptor." msgstr "" -#: c-api/typeobj.rst:1480 +#: c-api/typeobj.rst:1498 msgid "" "This field is not inherited by subtypes (members are inherited through a " "different mechanism)." msgstr "" -#: c-api/typeobj.rst:1486 +#: c-api/typeobj.rst:1504 msgid "" "An optional pointer to a static ``NULL``-terminated array of :c:type:" "`PyGetSetDef` structures, declaring computed attributes of instances of this " "type." msgstr "" -#: c-api/typeobj.rst:1489 +#: c-api/typeobj.rst:1507 msgid "" "For each entry in the array, an entry is added to the type's dictionary " "(see :c:member:`~PyTypeObject.tp_dict` below) containing a getset descriptor." msgstr "" -#: c-api/typeobj.rst:1494 +#: c-api/typeobj.rst:1512 msgid "" "This field is not inherited by subtypes (computed attributes are inherited " "through a different mechanism)." msgstr "" -#: c-api/typeobj.rst:1500 +#: c-api/typeobj.rst:1518 msgid "" "An optional pointer to a base type from which type properties are " "inherited. At this level, only single inheritance is supported; multiple " @@ -2264,7 +2286,7 @@ msgid "" "metatype." msgstr "" -#: c-api/typeobj.rst:1508 +#: c-api/typeobj.rst:1526 msgid "" "Slot initialization is subject to the rules of initializing globals. C99 " "requires the initializers to be \"address constants\". Function designators " @@ -2272,7 +2294,7 @@ msgid "" "valid C99 address constants." msgstr "" -#: c-api/typeobj.rst:1513 +#: c-api/typeobj.rst:1531 msgid "" "However, the unary '&' operator applied to a non-static variable like :c:" "func:`PyBaseObject_Type` is not required to produce an address constant. " @@ -2280,27 +2302,27 @@ msgid "" "strictly standard conforming in this particular behavior." msgstr "" -#: c-api/typeobj.rst:1519 +#: c-api/typeobj.rst:1537 msgid "" "Consequently, :c:member:`~PyTypeObject.tp_base` should be set in the " "extension module's init function." msgstr "" -#: c-api/typeobj.rst:1524 +#: c-api/typeobj.rst:1542 msgid "This field is not inherited by subtypes (obviously)." msgstr "" -#: c-api/typeobj.rst:1528 +#: c-api/typeobj.rst:1546 msgid "" "This field defaults to ``&PyBaseObject_Type`` (which to Python programmers " "is known as the type :class:`object`)." msgstr "" -#: c-api/typeobj.rst:1534 +#: c-api/typeobj.rst:1552 msgid "The type's dictionary is stored here by :c:func:`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1536 +#: c-api/typeobj.rst:1554 msgid "" "This field should normally be initialized to ``NULL`` before PyType_Ready is " "called; it may also be initialized to a dictionary containing initial " @@ -2309,43 +2331,43 @@ msgid "" "they don't correspond to overloaded operations (like :meth:`__add__`)." msgstr "" -#: c-api/typeobj.rst:1544 +#: c-api/typeobj.rst:1562 msgid "" "This field is not inherited by subtypes (though the attributes defined in " "here are inherited through a different mechanism)." msgstr "" -#: c-api/typeobj.rst:1549 +#: c-api/typeobj.rst:1567 msgid "" "If this field is ``NULL``, :c:func:`PyType_Ready` will assign a new " "dictionary to it." msgstr "" -#: c-api/typeobj.rst:1554 +#: c-api/typeobj.rst:1572 msgid "" "It is not safe to use :c:func:`PyDict_SetItem` on or otherwise modify :c:" "member:`~PyTypeObject.tp_dict` with the dictionary C-API." msgstr "" -#: c-api/typeobj.rst:1560 +#: c-api/typeobj.rst:1578 msgid "An optional pointer to a \"descriptor get\" function." msgstr "" -#: c-api/typeobj.rst:1578 c-api/typeobj.rst:1690 c-api/typeobj.rst:1714 +#: c-api/typeobj.rst:1596 c-api/typeobj.rst:1708 c-api/typeobj.rst:1732 msgid "The function signature is::" msgstr "" -#: c-api/typeobj.rst:1575 +#: c-api/typeobj.rst:1593 msgid "" "An optional pointer to a function for setting and deleting a descriptor's " "value." msgstr "" -#: c-api/typeobj.rst:1582 +#: c-api/typeobj.rst:1600 msgid "The *value* argument is set to ``NULL`` to delete the value." msgstr "" -#: c-api/typeobj.rst:1593 +#: c-api/typeobj.rst:1611 msgid "" "If the instances of this type have a dictionary containing instance " "variables, this field is non-zero and contains the offset in the instances " @@ -2353,13 +2375,13 @@ msgid "" "func:`PyObject_GenericGetAttr`." msgstr "" -#: c-api/typeobj.rst:1598 +#: c-api/typeobj.rst:1616 msgid "" "Do not confuse this field with :c:member:`~PyTypeObject.tp_dict`; that is " "the dictionary for attributes of the type object itself." msgstr "" -#: c-api/typeobj.rst:1601 +#: c-api/typeobj.rst:1619 msgid "" "If the value of this field is greater than zero, it specifies the offset " "from the start of the instance structure. If the value is less than zero, " @@ -2375,13 +2397,13 @@ msgid "" "the very end of the structure." msgstr "" -#: c-api/typeobj.rst:1613 +#: c-api/typeobj.rst:1631 msgid "" "The real dictionary offset in an instance can be computed from a negative :c:" "member:`~PyTypeObject.tp_dictoffset` as follows::" msgstr "" -#: c-api/typeobj.rst:1620 +#: c-api/typeobj.rst:1638 msgid "" "where :c:member:`~PyTypeObject.tp_basicsize`, :c:member:`~PyTypeObject." "tp_itemsize` and :c:member:`~PyTypeObject.tp_dictoffset` are taken from the " @@ -2391,7 +2413,7 @@ msgid "" "it is done for you by :c:func:`_PyObject_GetDictPtr`.)" msgstr "" -#: c-api/typeobj.rst:1628 +#: c-api/typeobj.rst:1646 msgid "" "This field is inherited by subtypes, but see the rules listed below. A " "subtype may override this offset; this means that the subtype instances " @@ -2400,7 +2422,7 @@ msgid "" "should not be a problem." msgstr "" -#: c-api/typeobj.rst:1633 +#: c-api/typeobj.rst:1651 msgid "" "When a type defined by a class statement has no :attr:`~object.__slots__` " "declaration, and none of its base types has an instance variable dictionary, " @@ -2408,14 +2430,14 @@ msgid "" "`~PyTypeObject.tp_dictoffset` is set to that slot's offset." msgstr "" -#: c-api/typeobj.rst:1638 +#: c-api/typeobj.rst:1656 msgid "" "When a type defined by a class statement has a :attr:`__slots__` " "declaration, the type inherits its :c:member:`~PyTypeObject.tp_dictoffset` " "from its base type." msgstr "" -#: c-api/typeobj.rst:1641 +#: c-api/typeobj.rst:1659 msgid "" "(Adding a slot named :attr:`~object.__dict__` to the :attr:`__slots__` " "declaration does not have the expected effect, it just causes confusion. " @@ -2423,17 +2445,17 @@ msgid "" "though.)" msgstr "" -#: c-api/typeobj.rst:1647 +#: c-api/typeobj.rst:1665 msgid "" "This slot has no default. For static types, if the field is ``NULL`` then " "no :attr:`__dict__` gets created for instances." msgstr "" -#: c-api/typeobj.rst:1653 +#: c-api/typeobj.rst:1671 msgid "An optional pointer to an instance initialization function." msgstr "" -#: c-api/typeobj.rst:1655 +#: c-api/typeobj.rst:1673 msgid "" "This function corresponds to the :meth:`__init__` method of classes. Like :" "meth:`__init__`, it is possible to create an instance without calling :meth:" @@ -2441,14 +2463,14 @@ msgid "" "meth:`__init__` method again." msgstr "" -#: c-api/typeobj.rst:1664 +#: c-api/typeobj.rst:1682 msgid "" "The self argument is the instance to be initialized; the *args* and *kwds* " "arguments represent positional and keyword arguments of the call to :meth:" "`__init__`." msgstr "" -#: c-api/typeobj.rst:1668 +#: c-api/typeobj.rst:1686 msgid "" "The :c:member:`~PyTypeObject.tp_init` function, if not ``NULL``, is called " "when an instance is created normally by calling its type, after the type's :" @@ -2460,42 +2482,42 @@ msgid "" "subtype's :c:member:`~PyTypeObject.tp_init` is called." msgstr "" -#: c-api/typeobj.rst:1675 +#: c-api/typeobj.rst:1693 msgid "Returns ``0`` on success, ``-1`` and sets an exception on error." msgstr "" -#: c-api/typeobj.rst:1683 +#: c-api/typeobj.rst:1701 msgid "For static types this field does not have a default." msgstr "" -#: c-api/typeobj.rst:1688 +#: c-api/typeobj.rst:1706 msgid "An optional pointer to an instance allocation function." msgstr "" -#: c-api/typeobj.rst:1696 +#: c-api/typeobj.rst:1714 msgid "" "This field is inherited by static subtypes, but not by dynamic subtypes " "(subtypes created by a class statement)." msgstr "" -#: c-api/typeobj.rst:1701 +#: c-api/typeobj.rst:1719 msgid "" "For dynamic subtypes, this field is always set to :c:func:" "`PyType_GenericAlloc`, to force a standard heap allocation strategy." msgstr "" -#: c-api/typeobj.rst:1705 +#: c-api/typeobj.rst:1723 msgid "" "For static subtypes, :c:type:`PyBaseObject_Type` uses :c:func:" "`PyType_GenericAlloc`. That is the recommended value for all statically " "defined types." msgstr "" -#: c-api/typeobj.rst:1712 +#: c-api/typeobj.rst:1730 msgid "An optional pointer to an instance creation function." msgstr "" -#: c-api/typeobj.rst:1718 +#: c-api/typeobj.rst:1736 msgid "" "The *subtype* argument is the type of the object being created; the *args* " "and *kwds* arguments represent positional and keyword arguments of the call " @@ -2504,7 +2526,7 @@ msgid "" "that type (but not an unrelated type)." msgstr "" -#: c-api/typeobj.rst:1724 +#: c-api/typeobj.rst:1742 msgid "" "The :c:member:`~PyTypeObject.tp_new` function should call ``subtype-" ">tp_alloc(subtype, nitems)`` to allocate space for the object, and then do " @@ -2516,14 +2538,14 @@ msgid "" "be deferred to :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: c-api/typeobj.rst:1734 +#: c-api/typeobj.rst:1752 msgid "" "This field is inherited by subtypes, except it is not inherited by static " "types whose :c:member:`~PyTypeObject.tp_base` is ``NULL`` or " "``&PyBaseObject_Type``." msgstr "" -#: c-api/typeobj.rst:1739 +#: c-api/typeobj.rst:1757 msgid "" "For static types this field has no default. This means if the slot is " "defined as ``NULL``, the type cannot be called to create new instances; " @@ -2531,39 +2553,39 @@ msgid "" "function." msgstr "" -#: c-api/typeobj.rst:1747 +#: c-api/typeobj.rst:1765 msgid "" "An optional pointer to an instance deallocation function. Its signature is::" msgstr "" -#: c-api/typeobj.rst:1751 +#: c-api/typeobj.rst:1769 msgid "" "An initializer that is compatible with this signature is :c:func:" "`PyObject_Free`." msgstr "" -#: c-api/typeobj.rst:1755 +#: c-api/typeobj.rst:1773 msgid "" "This field is inherited by static subtypes, but not by dynamic subtypes " "(subtypes created by a class statement)" msgstr "" -#: c-api/typeobj.rst:1760 +#: c-api/typeobj.rst:1778 msgid "" "In dynamic subtypes, this field is set to a deallocator suitable to match :c:" "func:`PyType_GenericAlloc` and the value of the :const:`Py_TPFLAGS_HAVE_GC` " "flag bit." msgstr "" -#: c-api/typeobj.rst:1764 +#: c-api/typeobj.rst:1782 msgid "For static subtypes, :c:type:`PyBaseObject_Type` uses PyObject_Del." msgstr "" -#: c-api/typeobj.rst:1769 +#: c-api/typeobj.rst:1787 msgid "An optional pointer to a function called by the garbage collector." msgstr "" -#: c-api/typeobj.rst:1771 +#: c-api/typeobj.rst:1789 msgid "" "The garbage collector needs to know whether a particular object is " "collectible or not. Normally, it is sufficient to look at the object's " @@ -2575,74 +2597,74 @@ msgid "" "instance. The signature is::" msgstr "" -#: c-api/typeobj.rst:1781 +#: c-api/typeobj.rst:1799 msgid "" "(The only example of this are types themselves. The metatype, :c:data:" "`PyType_Type`, defines this function to distinguish between statically and " "dynamically allocated types.)" msgstr "" -#: c-api/typeobj.rst:1791 +#: c-api/typeobj.rst:1809 msgid "" "This slot has no default. If this field is ``NULL``, :const:" "`Py_TPFLAGS_HAVE_GC` is used as the functional equivalent." msgstr "" -#: c-api/typeobj.rst:1797 +#: c-api/typeobj.rst:1815 msgid "Tuple of base types." msgstr "" -#: c-api/typeobj.rst:1799 +#: c-api/typeobj.rst:1817 msgid "" "This is set for types created by a class statement. It should be ``NULL`` " "for statically defined types." msgstr "" -#: c-api/typeobj.rst:1825 c-api/typeobj.rst:1844 c-api/typeobj.rst:1858 +#: c-api/typeobj.rst:1843 c-api/typeobj.rst:1862 c-api/typeobj.rst:1876 msgid "This field is not inherited." msgstr "" -#: c-api/typeobj.rst:1809 +#: c-api/typeobj.rst:1827 msgid "" "Tuple containing the expanded set of base types, starting with the type " "itself and ending with :class:`object`, in Method Resolution Order." msgstr "" -#: c-api/typeobj.rst:1815 +#: c-api/typeobj.rst:1833 msgid "" "This field is not inherited; it is calculated fresh by :c:func:" "`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1821 +#: c-api/typeobj.rst:1839 msgid "Unused. Internal use only." msgstr "" -#: c-api/typeobj.rst:1830 +#: c-api/typeobj.rst:1848 msgid "List of weak references to subclasses. Internal use only." msgstr "" -#: c-api/typeobj.rst:1839 +#: c-api/typeobj.rst:1857 msgid "" "Weak reference list head, for weak references to this type object. Not " "inherited. Internal use only." msgstr "" -#: c-api/typeobj.rst:1849 +#: c-api/typeobj.rst:1867 msgid "" "This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` instead." msgstr "" -#: c-api/typeobj.rst:1854 +#: c-api/typeobj.rst:1872 msgid "Used to index into the method cache. Internal use only." msgstr "" -#: c-api/typeobj.rst:1863 +#: c-api/typeobj.rst:1881 msgid "" "An optional pointer to an instance finalization function. Its signature is::" msgstr "" -#: c-api/typeobj.rst:1867 +#: c-api/typeobj.rst:1885 msgid "" "If :c:member:`~PyTypeObject.tp_finalize` is set, the interpreter calls it " "once when finalizing an instance. It is called either from the garbage " @@ -2652,24 +2674,37 @@ msgid "" "object in a sane state." msgstr "" -#: c-api/typeobj.rst:1874 +#: c-api/typeobj.rst:1892 msgid "" ":c:member:`~PyTypeObject.tp_finalize` should not mutate the current " "exception status; therefore, a recommended way to write a non-trivial " "finalizer is::" msgstr "" -#: c-api/typeobj.rst:1891 +#: c-api/typeobj.rst:1909 msgid "" "For this field to be taken into account (even through inheritance), you must " "also set the :const:`Py_TPFLAGS_HAVE_FINALIZE` flags bit." msgstr "" -#: c-api/typeobj.rst:1900 +#: c-api/typeobj.rst:1912 +msgid "" +"Also, note that, in a garbage collected Python, :c:member:`~PyTypeObject." +"tp_dealloc` may be called from any Python thread, not just the thread which " +"created the object (if the object becomes part of a refcount cycle, that " +"cycle might be collected by a garbage collection on any thread). This is " +"not a problem for Python API calls, since the thread on which tp_dealloc is " +"called will own the Global Interpreter Lock (GIL). However, if the object " +"being destroyed in turn destroys objects from some other C or C++ library, " +"care should be taken to ensure that destroying those objects on the thread " +"which called tp_dealloc will not violate any assumptions of the library." +msgstr "" + +#: c-api/typeobj.rst:1929 msgid "\"Safe object finalization\" (:pep:`442`)" msgstr "" -#: c-api/typeobj.rst:1905 +#: c-api/typeobj.rst:1934 msgid "" "Vectorcall function to use for calls of this type object. In other words, it " "is used to implement :ref:`vectorcall ` for ``type.__call__``. " @@ -2677,98 +2712,85 @@ msgid "" "attr:`__new__` and :attr:`__init__` is used." msgstr "" -#: c-api/typeobj.rst:1913 +#: c-api/typeobj.rst:1942 msgid "This field is never inherited." msgstr "" -#: c-api/typeobj.rst:1915 +#: c-api/typeobj.rst:1944 msgid "(the field exists since 3.8 but it's only used since 3.9)" msgstr "" -#: c-api/typeobj.rst:1918 -msgid "" -"Also, note that, in a garbage collected Python, :c:member:`~PyTypeObject." -"tp_dealloc` may be called from any Python thread, not just the thread which " -"created the object (if the object becomes part of a refcount cycle, that " -"cycle might be collected by a garbage collection on any thread). This is " -"not a problem for Python API calls, since the thread on which tp_dealloc is " -"called will own the Global Interpreter Lock (GIL). However, if the object " -"being destroyed in turn destroys objects from some other C or C++ library, " -"care should be taken to ensure that destroying those objects on the thread " -"which called tp_dealloc will not violate any assumptions of the library." -msgstr "" - -#: c-api/typeobj.rst:1932 +#: c-api/typeobj.rst:1950 msgid "Heap Types" msgstr "" -#: c-api/typeobj.rst:1934 +#: c-api/typeobj.rst:1952 msgid "" "Traditionally, types defined in C code are *static*, that is, a static :c:" "type:`PyTypeObject` structure is defined directly in code and initialized " "using :c:func:`PyType_Ready`." msgstr "" -#: c-api/typeobj.rst:1938 +#: c-api/typeobj.rst:1956 msgid "" "This results in types that are limited relative to types defined in Python:" msgstr "" -#: c-api/typeobj.rst:1940 +#: c-api/typeobj.rst:1958 msgid "" "Static types are limited to one base, i.e. they cannot use multiple " "inheritance." msgstr "" -#: c-api/typeobj.rst:1942 +#: c-api/typeobj.rst:1960 msgid "" "Static type objects (but not necessarily their instances) are immutable. It " "is not possible to add or modify the type object's attributes from Python." msgstr "" -#: c-api/typeobj.rst:1944 +#: c-api/typeobj.rst:1962 msgid "" "Static type objects are shared across :ref:`sub-interpreters `, so they should not include any subinterpreter-" "specific state." msgstr "" -#: c-api/typeobj.rst:1948 +#: c-api/typeobj.rst:1966 msgid "" "Also, since :c:type:`PyTypeObject` is not part of the :ref:`stable ABI " "`, any extension modules using static types must be compiled for a " "specific Python minor version." msgstr "" -#: c-api/typeobj.rst:1952 +#: c-api/typeobj.rst:1970 msgid "" "An alternative to static types is *heap-allocated types*, or *heap types* " "for short, which correspond closely to classes created by Python's ``class`` " "statement." msgstr "" -#: c-api/typeobj.rst:1956 +#: c-api/typeobj.rst:1974 msgid "" "This is done by filling a :c:type:`PyType_Spec` structure and calling :c:" "func:`PyType_FromSpecWithBases`." msgstr "" -#: c-api/typeobj.rst:1963 +#: c-api/typeobj.rst:1981 msgid "Number Object Structures" msgstr "" -#: c-api/typeobj.rst:1970 +#: c-api/typeobj.rst:1988 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the number protocol. Each function is used by the function of " "similar name documented in the :ref:`number` section." msgstr "" -#: c-api/typeobj.rst:2300 +#: c-api/typeobj.rst:2318 msgid "Here is the structure definition::" msgstr "" -#: c-api/typeobj.rst:2023 +#: c-api/typeobj.rst:2041 msgid "" "Binary and ternary functions must check the type of all their operands, and " "implement the necessary conversions (at least one of the operands is an " @@ -2778,30 +2800,30 @@ msgid "" "and set an exception." msgstr "" -#: c-api/typeobj.rst:2032 +#: c-api/typeobj.rst:2050 msgid "" "The :c:data:`nb_reserved` field should always be ``NULL``. It was " "previously called :c:data:`nb_long`, and was renamed in Python 3.0.1." msgstr "" -#: c-api/typeobj.rst:2077 +#: c-api/typeobj.rst:2095 msgid "Mapping Object Structures" msgstr "" -#: c-api/typeobj.rst:2084 +#: c-api/typeobj.rst:2102 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the mapping protocol. It has three members:" msgstr "" -#: c-api/typeobj.rst:2089 +#: c-api/typeobj.rst:2107 msgid "" "This function is used by :c:func:`PyMapping_Size` and :c:func:" "`PyObject_Size`, and has the same signature. This slot may be set to " "``NULL`` if the object has no defined length." msgstr "" -#: c-api/typeobj.rst:2095 +#: c-api/typeobj.rst:2113 msgid "" "This function is used by :c:func:`PyObject_GetItem` and :c:func:" "`PySequence_GetSlice`, and has the same signature as :c:func:`!" @@ -2809,7 +2831,7 @@ msgid "" "`PyMapping_Check` function to return ``1``, it can be ``NULL`` otherwise." msgstr "" -#: c-api/typeobj.rst:2103 +#: c-api/typeobj.rst:2121 msgid "" "This function is used by :c:func:`PyObject_SetItem`, :c:func:" "`PyObject_DelItem`, :c:func:`PyObject_SetSlice` and :c:func:" @@ -2819,17 +2841,17 @@ msgid "" "deletion." msgstr "" -#: c-api/typeobj.rst:2114 +#: c-api/typeobj.rst:2132 msgid "Sequence Object Structures" msgstr "" -#: c-api/typeobj.rst:2121 +#: c-api/typeobj.rst:2139 msgid "" "This structure holds pointers to the functions which an object uses to " "implement the sequence protocol." msgstr "" -#: c-api/typeobj.rst:2126 +#: c-api/typeobj.rst:2144 msgid "" "This function is used by :c:func:`PySequence_Size` and :c:func:" "`PyObject_Size`, and has the same signature. It is also used for handling " @@ -2837,21 +2859,21 @@ msgid "" "member:`~PySequenceMethods.sq_ass_item` slots." msgstr "" -#: c-api/typeobj.rst:2133 +#: c-api/typeobj.rst:2151 msgid "" "This function is used by :c:func:`PySequence_Concat` and has the same " "signature. It is also used by the ``+`` operator, after trying the numeric " "addition via the :c:member:`~PyNumberMethods.nb_add` slot." msgstr "" -#: c-api/typeobj.rst:2139 +#: c-api/typeobj.rst:2157 msgid "" "This function is used by :c:func:`PySequence_Repeat` and has the same " "signature. It is also used by the ``*`` operator, after trying numeric " "multiplication via the :c:member:`~PyNumberMethods.nb_multiply` slot." msgstr "" -#: c-api/typeobj.rst:2145 +#: c-api/typeobj.rst:2163 msgid "" "This function is used by :c:func:`PySequence_GetItem` and has the same " "signature. It is also used by :c:func:`PyObject_GetItem`, after trying the " @@ -2860,7 +2882,7 @@ msgid "" "``1``, it can be ``NULL`` otherwise." msgstr "" -#: c-api/typeobj.rst:2151 +#: c-api/typeobj.rst:2169 msgid "" "Negative indexes are handled as follows: if the :attr:`sq_length` slot is " "filled, it is called and the sequence length is used to compute a positive " @@ -2868,7 +2890,7 @@ msgid "" "the index is passed as is to the function." msgstr "" -#: c-api/typeobj.rst:2158 +#: c-api/typeobj.rst:2176 msgid "" "This function is used by :c:func:`PySequence_SetItem` and has the same " "signature. It is also used by :c:func:`PyObject_SetItem` and :c:func:" @@ -2877,14 +2899,14 @@ msgid "" "``NULL`` if the object does not support item assignment and deletion." msgstr "" -#: c-api/typeobj.rst:2167 +#: c-api/typeobj.rst:2185 msgid "" "This function may be used by :c:func:`PySequence_Contains` and has the same " "signature. This slot may be left to ``NULL``, in this case :c:func:`!" "PySequence_Contains` simply traverses the sequence until it finds a match." msgstr "" -#: c-api/typeobj.rst:2174 +#: c-api/typeobj.rst:2192 msgid "" "This function is used by :c:func:`PySequence_InPlaceConcat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -2894,7 +2916,7 @@ msgid "" "c:member:`~PyNumberMethods.nb_inplace_add` slot." msgstr "" -#: c-api/typeobj.rst:2183 +#: c-api/typeobj.rst:2201 msgid "" "This function is used by :c:func:`PySequence_InPlaceRepeat` and has the same " "signature. It should modify its first operand, and return it. This slot " @@ -2904,70 +2926,70 @@ msgid "" "via the :c:member:`~PyNumberMethods.nb_inplace_multiply` slot." msgstr "" -#: c-api/typeobj.rst:2194 +#: c-api/typeobj.rst:2212 msgid "Buffer Object Structures" msgstr "" -#: c-api/typeobj.rst:2202 +#: c-api/typeobj.rst:2220 msgid "" "This structure holds pointers to the functions required by the :ref:`Buffer " "protocol `. The protocol defines how an exporter object can " "expose its internal data to consumer objects." msgstr "" -#: c-api/typeobj.rst:2257 c-api/typeobj.rst:2321 c-api/typeobj.rst:2332 +#: c-api/typeobj.rst:2275 c-api/typeobj.rst:2339 c-api/typeobj.rst:2351 msgid "The signature of this function is::" msgstr "" -#: c-api/typeobj.rst:2212 +#: c-api/typeobj.rst:2230 msgid "" "Handle a request to *exporter* to fill in *view* as specified by *flags*. " "Except for point (3), an implementation of this function MUST take these " "steps:" msgstr "" -#: c-api/typeobj.rst:2216 +#: c-api/typeobj.rst:2234 msgid "" "Check if the request can be met. If not, raise :c:data:`PyExc_BufferError`, " "set :c:data:`view->obj` to ``NULL`` and return ``-1``." msgstr "" -#: c-api/typeobj.rst:2219 +#: c-api/typeobj.rst:2237 msgid "Fill in the requested fields." msgstr "" -#: c-api/typeobj.rst:2221 +#: c-api/typeobj.rst:2239 msgid "Increment an internal counter for the number of exports." msgstr "" -#: c-api/typeobj.rst:2223 +#: c-api/typeobj.rst:2241 msgid "" "Set :c:data:`view->obj` to *exporter* and increment :c:data:`view->obj`." msgstr "" -#: c-api/typeobj.rst:2225 +#: c-api/typeobj.rst:2243 msgid "Return ``0``." msgstr "" -#: c-api/typeobj.rst:2227 +#: c-api/typeobj.rst:2245 msgid "" "If *exporter* is part of a chain or tree of buffer providers, two main " "schemes can be used:" msgstr "" -#: c-api/typeobj.rst:2230 +#: c-api/typeobj.rst:2248 msgid "" "Re-export: Each member of the tree acts as the exporting object and sets :c:" "data:`view->obj` to a new reference to itself." msgstr "" -#: c-api/typeobj.rst:2233 +#: c-api/typeobj.rst:2251 msgid "" "Redirect: The buffer request is redirected to the root object of the tree. " "Here, :c:data:`view->obj` will be a new reference to the root object." msgstr "" -#: c-api/typeobj.rst:2237 +#: c-api/typeobj.rst:2255 msgid "" "The individual fields of *view* are described in section :ref:`Buffer " "structure `, the rules how an exporter must react to " @@ -2975,7 +2997,7 @@ msgid "" "types>`." msgstr "" -#: c-api/typeobj.rst:2242 +#: c-api/typeobj.rst:2260 msgid "" "All memory pointed to in the :c:type:`Py_buffer` structure belongs to the " "exporter and must remain valid until there are no consumers left. :c:member:" @@ -2984,19 +3006,19 @@ msgid "" "internal` are read-only for the consumer." msgstr "" -#: c-api/typeobj.rst:2249 +#: c-api/typeobj.rst:2267 msgid "" ":c:func:`PyBuffer_FillInfo` provides an easy way of exposing a simple bytes " "buffer while dealing correctly with all request types." msgstr "" -#: c-api/typeobj.rst:2252 +#: c-api/typeobj.rst:2270 msgid "" ":c:func:`PyObject_GetBuffer` is the interface for the consumer that wraps " "this function." msgstr "" -#: c-api/typeobj.rst:2261 +#: c-api/typeobj.rst:2279 msgid "" "Handle a request to release the resources of the buffer. If no resources " "need to be released, :c:member:`PyBufferProcs.bf_releasebuffer` may be " @@ -3004,15 +3026,15 @@ msgid "" "these optional steps:" msgstr "" -#: c-api/typeobj.rst:2266 +#: c-api/typeobj.rst:2284 msgid "Decrement an internal counter for the number of exports." msgstr "" -#: c-api/typeobj.rst:2268 +#: c-api/typeobj.rst:2286 msgid "If the counter is ``0``, free all memory associated with *view*." msgstr "" -#: c-api/typeobj.rst:2270 +#: c-api/typeobj.rst:2288 msgid "" "The exporter MUST use the :c:member:`~Py_buffer.internal` field to keep " "track of buffer-specific resources. This field is guaranteed to remain " @@ -3020,62 +3042,63 @@ msgid "" "*view* argument." msgstr "" -#: c-api/typeobj.rst:2276 +#: c-api/typeobj.rst:2294 msgid "" "This function MUST NOT decrement :c:data:`view->obj`, since that is done " "automatically in :c:func:`PyBuffer_Release` (this scheme is useful for " "breaking reference cycles)." msgstr "" -#: c-api/typeobj.rst:2281 +#: c-api/typeobj.rst:2299 msgid "" ":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this " "function." msgstr "" -#: c-api/typeobj.rst:2289 +#: c-api/typeobj.rst:2307 msgid "Async Object Structures" msgstr "" -#: c-api/typeobj.rst:2297 +#: c-api/typeobj.rst:2315 msgid "" "This structure holds pointers to the functions required to implement :term:" "`awaitable` and :term:`asynchronous iterator` objects." msgstr "" -#: c-api/typeobj.rst:2314 +#: c-api/typeobj.rst:2332 msgid "" "The returned object must be an iterator, i.e. :c:func:`PyIter_Check` must " "return ``1`` for it." msgstr "" -#: c-api/typeobj.rst:2317 +#: c-api/typeobj.rst:2335 msgid "" "This slot may be set to ``NULL`` if an object is not an :term:`awaitable`." msgstr "" -#: c-api/typeobj.rst:2325 +#: c-api/typeobj.rst:2343 msgid "" -"Must return an :term:`awaitable` object. See :meth:`__anext__` for details." +"Must return an :term:`asynchronous iterator` object. See :meth:`__anext__` " +"for details." msgstr "" -#: c-api/typeobj.rst:2327 +#: c-api/typeobj.rst:2346 msgid "" "This slot may be set to ``NULL`` if an object does not implement " "asynchronous iteration protocol." msgstr "" -#: c-api/typeobj.rst:2336 +#: c-api/typeobj.rst:2355 msgid "" "Must return an :term:`awaitable` object. See :meth:`__anext__` for details. " "This slot may be set to ``NULL``." msgstr "" -#: c-api/typeobj.rst:2343 +#: c-api/typeobj.rst:2362 msgid "Slot Type typedefs" msgstr "" -#: c-api/typeobj.rst:2347 +#: c-api/typeobj.rst:2366 msgid "" "The purpose of this function is to separate memory allocation from memory " "initialization. It should return a pointer to a block of memory of adequate " @@ -3089,76 +3112,76 @@ msgid "" "member:`~PyTypeObject.tp_basicsize`." msgstr "" -#: c-api/typeobj.rst:2357 +#: c-api/typeobj.rst:2376 msgid "" "This function should not do any other instance initialization, not even to " "allocate additional memory; that should be done by :c:member:`~PyTypeObject." "tp_new`." msgstr "" -#: c-api/typeobj.rst:2364 +#: c-api/typeobj.rst:2383 msgid "See :c:member:`~PyTypeObject.tp_free`." msgstr "" -#: c-api/typeobj.rst:2368 +#: c-api/typeobj.rst:2387 msgid "See :c:member:`~PyTypeObject.tp_new`." msgstr "" -#: c-api/typeobj.rst:2372 +#: c-api/typeobj.rst:2391 msgid "See :c:member:`~PyTypeObject.tp_init`." msgstr "" -#: c-api/typeobj.rst:2376 +#: c-api/typeobj.rst:2395 msgid "See :c:member:`~PyTypeObject.tp_repr`." msgstr "" -#: c-api/typeobj.rst:2389 +#: c-api/typeobj.rst:2408 msgid "Return the value of the named attribute for the object." msgstr "" -#: c-api/typeobj.rst:2395 +#: c-api/typeobj.rst:2414 msgid "" "Set the value of the named attribute for the object. The value argument is " "set to ``NULL`` to delete the attribute." msgstr "" -#: c-api/typeobj.rst:2391 +#: c-api/typeobj.rst:2410 msgid "See :c:member:`~PyTypeObject.tp_getattro`." msgstr "" -#: c-api/typeobj.rst:2398 +#: c-api/typeobj.rst:2417 msgid "See :c:member:`~PyTypeObject.tp_setattro`." msgstr "" -#: c-api/typeobj.rst:2402 +#: c-api/typeobj.rst:2421 msgid "See :c:member:`~PyTypeObject.tp_descrget`." msgstr "" -#: c-api/typeobj.rst:2406 +#: c-api/typeobj.rst:2425 msgid "See :c:member:`~PyTypeObject.tp_descrset`." msgstr "" -#: c-api/typeobj.rst:2410 +#: c-api/typeobj.rst:2429 msgid "See :c:member:`~PyTypeObject.tp_hash`." msgstr "" -#: c-api/typeobj.rst:2414 +#: c-api/typeobj.rst:2433 msgid "See :c:member:`~PyTypeObject.tp_richcompare`." msgstr "" -#: c-api/typeobj.rst:2418 +#: c-api/typeobj.rst:2437 msgid "See :c:member:`~PyTypeObject.tp_iter`." msgstr "" -#: c-api/typeobj.rst:2422 +#: c-api/typeobj.rst:2441 msgid "See :c:member:`~PyTypeObject.tp_iternext`." msgstr "" -#: c-api/typeobj.rst:2448 +#: c-api/typeobj.rst:2467 msgid "Examples" msgstr "Exemples" -#: c-api/typeobj.rst:2450 +#: c-api/typeobj.rst:2469 msgid "" "The following are simple examples of Python type definitions. They include " "common usage you may encounter. Some demonstrate tricky corner cases. For " @@ -3166,30 +3189,30 @@ msgid "" "and :ref:`new-types-topics`." msgstr "" -#: c-api/typeobj.rst:2455 +#: c-api/typeobj.rst:2474 msgid "A basic static type::" msgstr "" -#: c-api/typeobj.rst:2472 +#: c-api/typeobj.rst:2491 msgid "" "You may also find older code (especially in the CPython code base) with a " "more verbose initializer::" msgstr "" -#: c-api/typeobj.rst:2516 +#: c-api/typeobj.rst:2535 msgid "A type that supports weakrefs, instance dicts, and hashing::" msgstr "" -#: c-api/typeobj.rst:2543 +#: c-api/typeobj.rst:2562 msgid "" "A str subclass that cannot be subclassed and cannot be called to create " "instances (e.g. uses a separate factory func)::" msgstr "" -#: c-api/typeobj.rst:2562 +#: c-api/typeobj.rst:2581 msgid "The simplest static type (with fixed-length instances)::" msgstr "" -#: c-api/typeobj.rst:2573 +#: c-api/typeobj.rst:2592 msgid "The simplest static type (with variable-length instances)::" msgstr "" diff --git a/c-api/unicode.po b/c-api/unicode.po index 3093ad98d6..a926f68cb0 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-10-04 12:27+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -16,11 +16,11 @@ msgstr "" #: c-api/unicode.rst:6 msgid "Unicode Objects and Codecs" -msgstr "" +msgstr "Objets Unicode et Codecs" #: c-api/unicode.rst:12 msgid "Unicode Objects" -msgstr "" +msgstr "Objets Unicode" #: c-api/unicode.rst:14 msgid "" @@ -31,6 +31,12 @@ msgid "" "65536; otherwise, code points must be below 1114112 (which is the full " "Unicode range)." msgstr "" +"Depuis l'implémentation de :pep:`393` dans Python 3.3, les objets Unicode " +"utilisent une variété de représentations internes, pour permettre de gérer " +"l'intervalle complet des caractères Unicode en restant efficace en termes de " +"mémoire. Il y a des cas spéciaux pour les chaînes où tous les points de code " +"sont inférieurs à 128, 256, ou 65536 ; sinon, les points de code doivent " +"être inférieurs à 1114112 (qui est l'intervalle Unicode complet)." #: c-api/unicode.rst:20 msgid "" @@ -44,6 +50,9 @@ msgid "" "Due to the transition between the old APIs and the new APIs, Unicode objects " "can internally be in two states depending on how they were created:" msgstr "" +"En raison de la transition des anciennes APIs vers les nouvelles APIs, les " +"objets Unicode peuvent être dans deux états internes selon comment ils ont " +"été créés :" #: c-api/unicode.rst:27 msgid "" @@ -51,6 +60,9 @@ msgid "" "Unicode API. They use the most efficient representation allowed by the " "implementation." msgstr "" +"Les objets Unicode « canoniques » sont tous les objets créés par une API " +"Unicode non-dépréciée. Ils utilisent la représentation la plus efficace " +"permise par l'implémentation." #: c-api/unicode.rst:31 msgid "" @@ -66,16 +78,21 @@ msgid "" "APIs. All Unicode objects will be \"canonical\" since then. See :pep:`623` " "for more information." msgstr "" +"Les objets Unicode « historiques » vont être supprimés de Python 3.12 avec " +"les APIs dépréciées. Tous les objets Unicode vont être « canoniques » à " +"partir de là. Voir :pep:`623` pour plus d'information." #: c-api/unicode.rst:43 msgid "Unicode Type" -msgstr "" +msgstr "Type Unicode" #: c-api/unicode.rst:45 msgid "" "These are the basic Unicode object types used for the Unicode implementation " "in Python:" msgstr "" +"Voici les types d'objets Unicode utilisés pour l'implémentation Unicode en " +"Python :" #: c-api/unicode.rst:52 msgid "" @@ -83,6 +100,9 @@ msgid "" "characters of 32 bits, 16 bits and 8 bits, respectively. When dealing with " "single Unicode characters, use :c:type:`Py_UCS4`." msgstr "" +"Voici les *typedefs* pour les types entiers non signés suffisamment large " +"pour contenir des caractères de 32 bits, 16 bits et 8 bits, respectivement. " +"Pour traiter des caractères uniques, utilisez :c:type:`Py_UCS4`." #: c-api/unicode.rst:61 msgid "" @@ -96,6 +116,9 @@ msgid "" "whether you selected a \"narrow\" or \"wide\" Unicode version of Python at " "build time." msgstr "" +"Dans les versions précédentes, ceci était un type 16-bit ou un type 32-bit " +"selon que vous choisissiez une version Unicode *narrow* ou *wide* de Python " +"à la compilation." #: c-api/unicode.rst:74 msgid "" @@ -198,9 +221,9 @@ msgstr "" #: c-api/unicode.rst:194 msgid "" -"Read a character from a Unicode object *o*, which must be in the \"canonical" -"\" representation. This is less efficient than :c:func:`PyUnicode_READ` if " -"you do multiple consecutive reads." +"Read a character from a Unicode object *o*, which must be in the " +"\"canonical\" representation. This is less efficient than :c:func:" +"`PyUnicode_READ` if you do multiple consecutive reads." msgstr "" #: c-api/unicode.rst:203 @@ -472,7 +495,7 @@ msgstr "Commentaires" #: c-api/unicode.rst:464 msgid ":attr:`%%`" -msgstr "" +msgstr ":attr:`%%`" #: c-api/unicode.rst:464 msgid "*n/a*" @@ -484,7 +507,7 @@ msgstr "" #: c-api/unicode.rst:466 msgid ":attr:`%c`" -msgstr "" +msgstr ":attr:`%c`" #: c-api/unicode.rst:469 c-api/unicode.rst:505 msgid "int" @@ -496,7 +519,7 @@ msgstr "" #: c-api/unicode.rst:469 msgid ":attr:`%d`" -msgstr "" +msgstr ":attr:`%d`" #: c-api/unicode.rst:469 msgid "Equivalent to ``printf(\"%d\")``. [1]_" @@ -504,7 +527,7 @@ msgstr "" #: c-api/unicode.rst:472 msgid ":attr:`%u`" -msgstr "" +msgstr ":attr:`%u`" #: c-api/unicode.rst:472 msgid "unsigned int" @@ -516,7 +539,7 @@ msgstr "" #: c-api/unicode.rst:475 msgid ":attr:`%ld`" -msgstr "" +msgstr ":attr:`%ld`" #: c-api/unicode.rst:478 msgid "long" @@ -528,7 +551,7 @@ msgstr "" #: c-api/unicode.rst:478 msgid ":attr:`%li`" -msgstr "" +msgstr ":attr:`%li`" #: c-api/unicode.rst:478 msgid "Equivalent to ``printf(\"%li\")``. [1]_" @@ -536,7 +559,7 @@ msgstr "" #: c-api/unicode.rst:481 msgid ":attr:`%lu`" -msgstr "" +msgstr ":attr:`%lu`" #: c-api/unicode.rst:481 msgid "unsigned long" @@ -548,7 +571,7 @@ msgstr "" #: c-api/unicode.rst:484 msgid ":attr:`%lld`" -msgstr "" +msgstr ":attr:`%lld`" #: c-api/unicode.rst:487 msgid "long long" @@ -560,7 +583,7 @@ msgstr "" #: c-api/unicode.rst:487 msgid ":attr:`%lli`" -msgstr "" +msgstr ":attr:`%lli`" #: c-api/unicode.rst:487 msgid "Equivalent to ``printf(\"%lli\")``. [1]_" @@ -568,7 +591,7 @@ msgstr "" #: c-api/unicode.rst:490 msgid ":attr:`%llu`" -msgstr "" +msgstr ":attr:`%llu`" #: c-api/unicode.rst:490 msgid "unsigned long long" @@ -580,10 +603,10 @@ msgstr "" #: c-api/unicode.rst:493 msgid ":attr:`%zd`" -msgstr "" +msgstr ":attr:`%zd`" #: c-api/unicode.rst:496 -msgid "Py_ssize_t" +msgid ":c:type:`\\ Py_ssize_t`" msgstr "" #: c-api/unicode.rst:493 @@ -592,7 +615,7 @@ msgstr "" #: c-api/unicode.rst:496 msgid ":attr:`%zi`" -msgstr "" +msgstr ":attr:`%zi`" #: c-api/unicode.rst:496 msgid "Equivalent to ``printf(\"%zi\")``. [1]_" @@ -600,7 +623,7 @@ msgstr "" #: c-api/unicode.rst:499 msgid ":attr:`%zu`" -msgstr "" +msgstr ":attr:`%zu`" #: c-api/unicode.rst:499 msgid "size_t" @@ -612,7 +635,7 @@ msgstr "" #: c-api/unicode.rst:502 msgid ":attr:`%i`" -msgstr "" +msgstr ":attr:`%i`" #: c-api/unicode.rst:502 msgid "Equivalent to ``printf(\"%i\")``. [1]_" @@ -620,7 +643,7 @@ msgstr "" #: c-api/unicode.rst:505 msgid ":attr:`%x`" -msgstr "" +msgstr ":attr:`%x`" #: c-api/unicode.rst:505 msgid "Equivalent to ``printf(\"%x\")``. [1]_" @@ -628,7 +651,7 @@ msgstr "" #: c-api/unicode.rst:508 msgid ":attr:`%s`" -msgstr "" +msgstr ":attr:`%s`" #: c-api/unicode.rst:508 msgid "const char\\*" @@ -640,7 +663,7 @@ msgstr "" #: c-api/unicode.rst:511 msgid ":attr:`%p`" -msgstr "" +msgstr ":attr:`%p`" #: c-api/unicode.rst:511 msgid "const void\\*" @@ -648,14 +671,14 @@ msgstr "" #: c-api/unicode.rst:511 msgid "" -"The hex representation of a C pointer. Mostly equivalent to ``printf(\"%p" -"\")`` except that it is guaranteed to start with the literal ``0x`` " -"regardless of what the platform's ``printf`` yields." +"The hex representation of a C pointer. Mostly equivalent to " +"``printf(\"%p\")`` except that it is guaranteed to start with the literal " +"``0x`` regardless of what the platform's ``printf`` yields." msgstr "" #: c-api/unicode.rst:519 msgid ":attr:`%A`" -msgstr "" +msgstr ":attr:`%A`" #: c-api/unicode.rst:522 c-api/unicode.rst:534 msgid "PyObject\\*" @@ -667,7 +690,7 @@ msgstr "" #: c-api/unicode.rst:522 msgid ":attr:`%U`" -msgstr "" +msgstr ":attr:`%U`" #: c-api/unicode.rst:522 #, fuzzy @@ -676,7 +699,7 @@ msgstr "Un objet Unicode." #: c-api/unicode.rst:524 msgid ":attr:`%V`" -msgstr "" +msgstr ":attr:`%V`" #: c-api/unicode.rst:524 msgid "PyObject\\*, const char\\*" @@ -691,7 +714,7 @@ msgstr "" #: c-api/unicode.rst:531 msgid ":attr:`%S`" -msgstr "" +msgstr ":attr:`%S`" #: c-api/unicode.rst:531 msgid "The result of calling :c:func:`PyObject_Str`." @@ -699,7 +722,7 @@ msgstr "" #: c-api/unicode.rst:534 msgid ":attr:`%R`" -msgstr "" +msgstr ":attr:`%R`" #: c-api/unicode.rst:534 msgid "The result of calling :c:func:`PyObject_Repr`." @@ -736,8 +759,8 @@ msgstr "" #: c-api/unicode.rst:557 msgid "" -"Support width and precision formatter for ``\"%s\"``, ``\"%A\"``, ``\"%U" -"\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"`` added." +"Support width and precision formatter for ``\"%s\"``, ``\"%A\"``, " +"``\"%U\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"`` added." msgstr "" #: c-api/unicode.rst:564 @@ -784,8 +807,8 @@ msgstr "" #: c-api/unicode.rst:610 msgid "" -"Fill a string with a character: write *fill_char* into ``unicode[start:start" -"+length]``." +"Fill a string with a character: write *fill_char* into ``unicode[start:" +"start+length]``." msgstr "" #: c-api/unicode.rst:613 @@ -970,9 +993,9 @@ msgstr "" #: c-api/unicode.rst:794 msgid "" "Decode a string from UTF-8 on Android and VxWorks, or from the current " -"locale encoding on other platforms. The supported error handlers are ``" -"\"strict\"`` and ``\"surrogateescape\"`` (:pep:`383`). The decoder uses ``" -"\"strict\"`` error handler if *errors* is ``NULL``. *str* must end with a " +"locale encoding on other platforms. The supported error handlers are " +"``\"strict\"`` and ``\"surrogateescape\"`` (:pep:`383`). The decoder uses " +"``\"strict\"`` error handler if *errors* is ``NULL``. *str* must end with a " "null character but cannot contain embedded null characters." msgstr "" @@ -1008,10 +1031,10 @@ msgstr "" #: c-api/unicode.rst:830 msgid "" "Encode a Unicode object to UTF-8 on Android and VxWorks, or to the current " -"locale encoding on other platforms. The supported error handlers are ``" -"\"strict\"`` and ``\"surrogateescape\"`` (:pep:`383`). The encoder uses ``" -"\"strict\"`` error handler if *errors* is ``NULL``. Return a :class:`bytes` " -"object. *unicode* cannot contain embedded null characters." +"locale encoding on other platforms. The supported error handlers are " +"``\"strict\"`` and ``\"surrogateescape\"`` (:pep:`383`). The encoder uses " +"``\"strict\"`` error handler if *errors* is ``NULL``. Return a :class:" +"`bytes` object. *unicode* cannot contain embedded null characters." msgstr "" #: c-api/unicode.rst:837 @@ -1167,8 +1190,8 @@ msgstr "" #: c-api/unicode.rst:992 msgid "" "Returns a buffer allocated by :c:func:`PyMem_Alloc` (use :c:func:" -"`PyMem_Free` to free it) on success. On error, returns ``NULL`` and *" -"\\*size* is undefined. Raises a :exc:`MemoryError` if memory allocation is " +"`PyMem_Free` to free it) on success. On error, returns ``NULL`` and " +"*\\*size* is undefined. Raises a :exc:`MemoryError` if memory allocation is " "failed." msgstr "" @@ -1215,7 +1238,7 @@ msgstr "" #: c-api/unicode.rst:1028 msgid "" -"The codecs all use a similar interface. Only deviation from the following " +"The codecs all use a similar interface. Only deviations from the following " "generic ones are documented for simplicity." msgstr "" @@ -1254,7 +1277,7 @@ msgid "" "``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1326 +#: c-api/unicode.rst:1327 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsEncodedString`." @@ -1308,53 +1331,55 @@ msgstr "" msgid "" "This caches the UTF-8 representation of the string in the Unicode object, " "and subsequent calls will return a pointer to the same buffer. The caller " -"is not responsible for deallocating the buffer." +"is not responsible for deallocating the buffer. The buffer is deallocated " +"and pointers to it become invalid when the Unicode object is garbage " +"collected." msgstr "" -#: c-api/unicode.rst:1127 +#: c-api/unicode.rst:1128 msgid "The return type is now ``const char *`` rather of ``char *``." msgstr "" -#: c-api/unicode.rst:1123 +#: c-api/unicode.rst:1124 msgid "As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size." msgstr "" -#: c-api/unicode.rst:1133 +#: c-api/unicode.rst:1134 msgid "" "Encode the :c:type:`Py_UNICODE` buffer *s* of the given *size* using UTF-8 " "and return a Python bytes object. Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1140 +#: c-api/unicode.rst:1141 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsUTF8String`, :c:func:`PyUnicode_AsUTF8AndSize` or :c:func:" "`PyUnicode_AsEncodedString`." msgstr "" -#: c-api/unicode.rst:1144 +#: c-api/unicode.rst:1145 msgid "UTF-32 Codecs" msgstr "" -#: c-api/unicode.rst:1146 +#: c-api/unicode.rst:1147 msgid "These are the UTF-32 codec APIs:" msgstr "" -#: c-api/unicode.rst:1152 +#: c-api/unicode.rst:1153 msgid "" "Decode *size* bytes from a UTF-32 encoded buffer string and return the " "corresponding Unicode object. *errors* (if non-``NULL``) defines the error " "handling. It defaults to \"strict\"." msgstr "" -#: c-api/unicode.rst:1229 +#: c-api/unicode.rst:1230 msgid "" "If *byteorder* is non-``NULL``, the decoder starts decoding using the given " "byte order::" msgstr "" -#: c-api/unicode.rst:1163 +#: c-api/unicode.rst:1164 msgid "" "If ``*byteorder`` is zero, and the first four bytes of the input data are a " "byte order mark (BOM), the decoder switches to this byte order and the BOM " @@ -1362,21 +1387,21 @@ msgid "" "``-1`` or ``1``, any byte order mark is copied to the output." msgstr "" -#: c-api/unicode.rst:1242 +#: c-api/unicode.rst:1169 msgid "" "After completion, *\\*byteorder* is set to the current byte order at the end " "of input data." msgstr "" -#: c-api/unicode.rst:1245 +#: c-api/unicode.rst:1246 msgid "If *byteorder* is ``NULL``, the codec starts in native order mode." msgstr "" -#: c-api/unicode.rst:1209 c-api/unicode.rst:1284 +#: c-api/unicode.rst:1210 c-api/unicode.rst:1285 msgid "Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1179 +#: c-api/unicode.rst:1180 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF32`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF32Stateful` will not " @@ -1385,53 +1410,53 @@ msgid "" "number of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1188 +#: c-api/unicode.rst:1189 msgid "" "Return a Python byte string using the UTF-32 encoding in native byte order. " "The string always starts with a BOM mark. Error handling is \"strict\". " "Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1196 +#: c-api/unicode.rst:1197 msgid "" "Return a Python bytes object holding the UTF-32 encoded value of the Unicode " "data in *s*. Output is written according to the following byte order::" msgstr "" -#: c-api/unicode.rst:1277 +#: c-api/unicode.rst:1278 msgid "" "If byteorder is ``0``, the output string will always start with the Unicode " "BOM mark (U+FEFF). In the other two modes, no BOM mark is prepended." msgstr "" -#: c-api/unicode.rst:1206 +#: c-api/unicode.rst:1207 msgid "" "If ``Py_UNICODE_WIDE`` is not defined, surrogate pairs will be output as a " "single code point." msgstr "" -#: c-api/unicode.rst:1213 +#: c-api/unicode.rst:1214 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsUTF32String` or :c:func:`PyUnicode_AsEncodedString`." msgstr "" -#: c-api/unicode.rst:1217 +#: c-api/unicode.rst:1218 msgid "UTF-16 Codecs" msgstr "" -#: c-api/unicode.rst:1219 +#: c-api/unicode.rst:1220 msgid "These are the UTF-16 codec APIs:" msgstr "" -#: c-api/unicode.rst:1225 +#: c-api/unicode.rst:1226 msgid "" "Decode *size* bytes from a UTF-16 encoded buffer string and return the " "corresponding Unicode object. *errors* (if non-``NULL``) defines the error " "handling. It defaults to \"strict\"." msgstr "" -#: c-api/unicode.rst:1236 +#: c-api/unicode.rst:1237 msgid "" "If ``*byteorder`` is zero, and the first two bytes of the input data are a " "byte order mark (BOM), the decoder switches to this byte order and the BOM " @@ -1440,7 +1465,13 @@ msgid "" "result in either a ``\\ufeff`` or a ``\\ufffe`` character)." msgstr "" -#: c-api/unicode.rst:1253 +#: c-api/unicode.rst:1243 +msgid "" +"After completion, ``*byteorder`` is set to the current byte order at the end " +"of input data." +msgstr "" + +#: c-api/unicode.rst:1254 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF16`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeUTF16Stateful` will not " @@ -1450,47 +1481,47 @@ msgid "" "*consumed*." msgstr "" -#: c-api/unicode.rst:1262 +#: c-api/unicode.rst:1263 msgid "" "Return a Python byte string using the UTF-16 encoding in native byte order. " "The string always starts with a BOM mark. Error handling is \"strict\". " "Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1270 +#: c-api/unicode.rst:1271 msgid "" "Return a Python bytes object holding the UTF-16 encoded value of the Unicode " "data in *s*. Output is written according to the following byte order::" msgstr "" -#: c-api/unicode.rst:1280 +#: c-api/unicode.rst:1281 msgid "" "If ``Py_UNICODE_WIDE`` is defined, a single :c:type:`Py_UNICODE` value may " "get represented as a surrogate pair. If it is not defined, each :c:type:" "`Py_UNICODE` values is interpreted as a UCS-2 character." msgstr "" -#: c-api/unicode.rst:1288 +#: c-api/unicode.rst:1289 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsUTF16String` or :c:func:`PyUnicode_AsEncodedString`." msgstr "" -#: c-api/unicode.rst:1292 +#: c-api/unicode.rst:1293 msgid "UTF-7 Codecs" msgstr "" -#: c-api/unicode.rst:1294 +#: c-api/unicode.rst:1295 msgid "These are the UTF-7 codec APIs:" msgstr "" -#: c-api/unicode.rst:1299 +#: c-api/unicode.rst:1300 msgid "" "Create a Unicode object by decoding *size* bytes of the UTF-7 encoded string " "*s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1306 +#: c-api/unicode.rst:1307 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeUTF7`. If " "*consumed* is not ``NULL``, trailing incomplete UTF-7 base-64 sections will " @@ -1498,14 +1529,14 @@ msgid "" "of bytes that have been decoded will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1315 +#: c-api/unicode.rst:1316 msgid "" "Encode the :c:type:`Py_UNICODE` buffer of the given size using UTF-7 and " "return a Python bytes object. Return ``NULL`` if an exception was raised by " "the codec." msgstr "" -#: c-api/unicode.rst:1319 +#: c-api/unicode.rst:1320 msgid "" "If *base64SetO* is nonzero, \"Set O\" (punctuation that has no otherwise " "special meaning) will be encoded in base-64. If *base64WhiteSpace* is " @@ -1513,173 +1544,173 @@ msgid "" "the Python \"utf-7\" codec." msgstr "" -#: c-api/unicode.rst:1330 +#: c-api/unicode.rst:1331 msgid "Unicode-Escape Codecs" msgstr "" -#: c-api/unicode.rst:1332 +#: c-api/unicode.rst:1333 msgid "These are the \"Unicode Escape\" codec APIs:" msgstr "" -#: c-api/unicode.rst:1338 +#: c-api/unicode.rst:1339 msgid "" "Create a Unicode object by decoding *size* bytes of the Unicode-Escape " "encoded string *s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1344 +#: c-api/unicode.rst:1345 msgid "" "Encode a Unicode object using Unicode-Escape and return the result as a " "bytes object. Error handling is \"strict\". Return ``NULL`` if an " "exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1351 +#: c-api/unicode.rst:1352 msgid "" "Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Unicode-" "Escape and return a bytes object. Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1356 +#: c-api/unicode.rst:1357 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsUnicodeEscapeString`." msgstr "" -#: c-api/unicode.rst:1360 +#: c-api/unicode.rst:1361 msgid "Raw-Unicode-Escape Codecs" msgstr "" -#: c-api/unicode.rst:1362 +#: c-api/unicode.rst:1363 msgid "These are the \"Raw Unicode Escape\" codec APIs:" msgstr "" -#: c-api/unicode.rst:1368 +#: c-api/unicode.rst:1369 msgid "" "Create a Unicode object by decoding *size* bytes of the Raw-Unicode-Escape " "encoded string *s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1374 +#: c-api/unicode.rst:1375 msgid "" "Encode a Unicode object using Raw-Unicode-Escape and return the result as a " "bytes object. Error handling is \"strict\". Return ``NULL`` if an " "exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1382 +#: c-api/unicode.rst:1383 msgid "" "Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Raw-Unicode-" "Escape and return a bytes object. Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1388 +#: c-api/unicode.rst:1389 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsRawUnicodeEscapeString` or :c:func:" "`PyUnicode_AsEncodedString`." msgstr "" -#: c-api/unicode.rst:1392 +#: c-api/unicode.rst:1393 msgid "Latin-1 Codecs" msgstr "" -#: c-api/unicode.rst:1394 +#: c-api/unicode.rst:1395 msgid "" "These are the Latin-1 codec APIs: Latin-1 corresponds to the first 256 " "Unicode ordinals and only these are accepted by the codecs during encoding." msgstr "" -#: c-api/unicode.rst:1400 +#: c-api/unicode.rst:1401 msgid "" "Create a Unicode object by decoding *size* bytes of the Latin-1 encoded " "string *s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1406 +#: c-api/unicode.rst:1407 msgid "" "Encode a Unicode object using Latin-1 and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1413 +#: c-api/unicode.rst:1414 msgid "" "Encode the :c:type:`Py_UNICODE` buffer of the given *size* using Latin-1 and " "return a Python bytes object. Return ``NULL`` if an exception was raised by " "the codec." msgstr "" -#: c-api/unicode.rst:1420 +#: c-api/unicode.rst:1421 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsLatin1String` or :c:func:`PyUnicode_AsEncodedString`." msgstr "" -#: c-api/unicode.rst:1424 +#: c-api/unicode.rst:1425 msgid "ASCII Codecs" msgstr "" -#: c-api/unicode.rst:1426 +#: c-api/unicode.rst:1427 msgid "" "These are the ASCII codec APIs. Only 7-bit ASCII data is accepted. All " "other codes generate errors." msgstr "" -#: c-api/unicode.rst:1432 +#: c-api/unicode.rst:1433 msgid "" "Create a Unicode object by decoding *size* bytes of the ASCII encoded string " "*s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1438 +#: c-api/unicode.rst:1439 msgid "" "Encode a Unicode object using ASCII and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1445 +#: c-api/unicode.rst:1446 msgid "" "Encode the :c:type:`Py_UNICODE` buffer of the given *size* using ASCII and " "return a Python bytes object. Return ``NULL`` if an exception was raised by " "the codec." msgstr "" -#: c-api/unicode.rst:1452 +#: c-api/unicode.rst:1453 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsASCIIString` or :c:func:`PyUnicode_AsEncodedString`." msgstr "" -#: c-api/unicode.rst:1456 +#: c-api/unicode.rst:1457 msgid "Character Map Codecs" msgstr "" -#: c-api/unicode.rst:1458 +#: c-api/unicode.rst:1459 msgid "" "This codec is special in that it can be used to implement many different " "codecs (and this is in fact what was done to obtain most of the standard " -"codecs included in the :mod:`encodings` package). The codec uses mapping to " +"codecs included in the :mod:`encodings` package). The codec uses mappings to " "encode and decode characters. The mapping objects provided must support " "the :meth:`__getitem__` mapping interface; dictionaries and sequences work " "well." msgstr "" -#: c-api/unicode.rst:1464 +#: c-api/unicode.rst:1465 msgid "These are the mapping codec APIs:" msgstr "" -#: c-api/unicode.rst:1469 +#: c-api/unicode.rst:1470 msgid "" "Create a Unicode object by decoding *size* bytes of the encoded string *s* " "using the given *mapping* object. Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1473 +#: c-api/unicode.rst:1474 msgid "" "If *mapping* is ``NULL``, Latin-1 decoding will be applied. Else *mapping* " "must map bytes ordinals (integers in the range from 0 to 255) to Unicode " @@ -1689,14 +1720,14 @@ msgid "" "treated as undefined mappings and cause an error." msgstr "" -#: c-api/unicode.rst:1484 +#: c-api/unicode.rst:1485 msgid "" "Encode a Unicode object using the given *mapping* object and return the " "result as a bytes object. Error handling is \"strict\". Return ``NULL`` if " "an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1488 +#: c-api/unicode.rst:1489 msgid "" "The *mapping* object must map Unicode ordinal integers to bytes objects, " "integers in the range from 0 to 255 or ``None``. Unmapped character " @@ -1704,68 +1735,68 @@ msgid "" "``None`` are treated as \"undefined mapping\" and cause an error." msgstr "" -#: c-api/unicode.rst:1497 +#: c-api/unicode.rst:1498 msgid "" "Encode the :c:type:`Py_UNICODE` buffer of the given *size* using the given " "*mapping* object and return the result as a bytes object. Return ``NULL`` " "if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1504 +#: c-api/unicode.rst:1505 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsCharmapString` or :c:func:`PyUnicode_AsEncodedString`." msgstr "" -#: c-api/unicode.rst:1507 +#: c-api/unicode.rst:1508 msgid "The following codec API is special in that maps Unicode to Unicode." msgstr "" -#: c-api/unicode.rst:1511 +#: c-api/unicode.rst:1512 msgid "" "Translate a string by applying a character mapping table to it and return " "the resulting Unicode object. Return ``NULL`` if an exception was raised by " "the codec." msgstr "" -#: c-api/unicode.rst:1515 +#: c-api/unicode.rst:1516 msgid "" "The mapping table must map Unicode ordinal integers to Unicode ordinal " "integers or ``None`` (causing deletion of the character)." msgstr "" -#: c-api/unicode.rst:1518 +#: c-api/unicode.rst:1519 msgid "" "Mapping tables need only provide the :meth:`__getitem__` interface; " "dictionaries and sequences work well. Unmapped character ordinals (ones " "which cause a :exc:`LookupError`) are left untouched and are copied as-is." msgstr "" -#: c-api/unicode.rst:1522 +#: c-api/unicode.rst:1523 msgid "" "*errors* has the usual meaning for codecs. It may be ``NULL`` which " "indicates to use the default error handling." msgstr "" -#: c-api/unicode.rst:1529 +#: c-api/unicode.rst:1530 msgid "" "Translate a :c:type:`Py_UNICODE` buffer of the given *size* by applying a " "character *mapping* table to it and return the resulting Unicode object. " "Return ``NULL`` when an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1536 +#: c-api/unicode.rst:1537 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_Translate`. or :ref:`generic codec based API `" msgstr "" -#: c-api/unicode.rst:1540 +#: c-api/unicode.rst:1541 msgid "MBCS codecs for Windows" msgstr "" -#: c-api/unicode.rst:1542 +#: c-api/unicode.rst:1543 msgid "" "These are the MBCS codec APIs. They are currently only available on Windows " "and use the Win32 MBCS converters to implement the conversions. Note that " @@ -1773,13 +1804,13 @@ msgid "" "is defined by the user settings on the machine running the codec." msgstr "" -#: c-api/unicode.rst:1549 +#: c-api/unicode.rst:1550 msgid "" "Create a Unicode object by decoding *size* bytes of the MBCS encoded string " "*s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" -#: c-api/unicode.rst:1556 +#: c-api/unicode.rst:1557 msgid "" "If *consumed* is ``NULL``, behave like :c:func:`PyUnicode_DecodeMBCS`. If " "*consumed* is not ``NULL``, :c:func:`PyUnicode_DecodeMBCSStateful` will not " @@ -1787,58 +1818,58 @@ msgid "" "will be stored in *consumed*." msgstr "" -#: c-api/unicode.rst:1564 +#: c-api/unicode.rst:1565 msgid "" "Encode a Unicode object using MBCS and return the result as Python bytes " "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" -#: c-api/unicode.rst:1571 +#: c-api/unicode.rst:1572 msgid "" "Encode the Unicode object using the specified code page and return a Python " "bytes object. Return ``NULL`` if an exception was raised by the codec. Use :" "c:data:`CP_ACP` code page to get the MBCS encoder." msgstr "" -#: c-api/unicode.rst:1580 +#: c-api/unicode.rst:1581 msgid "" "Encode the :c:type:`Py_UNICODE` buffer of the given *size* using MBCS and " "return a Python bytes object. Return ``NULL`` if an exception was raised by " "the codec." msgstr "" -#: c-api/unicode.rst:1587 +#: c-api/unicode.rst:1588 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsMBCSString`, :c:func:`PyUnicode_EncodeCodePage` or :c:func:" "`PyUnicode_AsEncodedString`." msgstr "" -#: c-api/unicode.rst:1591 +#: c-api/unicode.rst:1592 msgid "Methods & Slots" msgstr "" -#: c-api/unicode.rst:1597 +#: c-api/unicode.rst:1598 msgid "Methods and Slot Functions" msgstr "" -#: c-api/unicode.rst:1599 +#: c-api/unicode.rst:1600 msgid "" "The following APIs are capable of handling Unicode objects and strings on " "input (we refer to them as strings in the descriptions) and return Unicode " "objects or integers as appropriate." msgstr "" -#: c-api/unicode.rst:1603 +#: c-api/unicode.rst:1604 msgid "They all return ``NULL`` or ``-1`` if an exception occurs." msgstr "" -#: c-api/unicode.rst:1608 +#: c-api/unicode.rst:1609 msgid "Concat two strings giving a new Unicode string." msgstr "" -#: c-api/unicode.rst:1613 +#: c-api/unicode.rst:1614 msgid "" "Split a string giving a list of Unicode strings. If *sep* is ``NULL``, " "splitting will be done at all whitespace substrings. Otherwise, splits " @@ -1847,27 +1878,27 @@ msgid "" "list." msgstr "" -#: c-api/unicode.rst:1621 +#: c-api/unicode.rst:1622 msgid "" "Split a Unicode string at line breaks, returning a list of Unicode strings. " -"CRLF is considered to be one line break. If *keepend* is ``0``, the Line " +"CRLF is considered to be one line break. If *keepend* is ``0``, the line " "break characters are not included in the resulting strings." msgstr "" -#: c-api/unicode.rst:1628 +#: c-api/unicode.rst:1629 msgid "" "Join a sequence of strings using the given *separator* and return the " "resulting Unicode string." msgstr "" -#: c-api/unicode.rst:1635 +#: c-api/unicode.rst:1636 msgid "" "Return ``1`` if *substr* matches ``str[start:end]`` at the given tail end " "(*direction* == ``-1`` means to do a prefix match, *direction* == ``1`` a " "suffix match), ``0`` otherwise. Return ``-1`` if an error occurred." msgstr "" -#: c-api/unicode.rst:1643 +#: c-api/unicode.rst:1644 msgid "" "Return the first position of *substr* in ``str[start:end]`` using the given " "*direction* (*direction* == ``1`` means to do a forward search, *direction* " @@ -1876,7 +1907,7 @@ msgid "" "indicates that an error occurred and an exception has been set." msgstr "" -#: c-api/unicode.rst:1653 +#: c-api/unicode.rst:1654 msgid "" "Return the first position of the character *ch* in ``str[start:end]`` using " "the given *direction* (*direction* == ``1`` means to do a forward search, " @@ -1885,36 +1916,36 @@ msgid "" "``-2`` indicates that an error occurred and an exception has been set." msgstr "" -#: c-api/unicode.rst:1661 +#: c-api/unicode.rst:1662 msgid "*start* and *end* are now adjusted to behave like ``str[start:end]``." msgstr "" -#: c-api/unicode.rst:1668 +#: c-api/unicode.rst:1669 msgid "" "Return the number of non-overlapping occurrences of *substr* in ``str[start:" "end]``. Return ``-1`` if an error occurred." msgstr "" -#: c-api/unicode.rst:1675 +#: c-api/unicode.rst:1676 msgid "" "Replace at most *maxcount* occurrences of *substr* in *str* with *replstr* " "and return the resulting Unicode object. *maxcount* == ``-1`` means replace " "all occurrences." msgstr "" -#: c-api/unicode.rst:1682 +#: c-api/unicode.rst:1683 msgid "" "Compare two strings and return ``-1``, ``0``, ``1`` for less than, equal, " "and greater than, respectively." msgstr "" -#: c-api/unicode.rst:1685 +#: c-api/unicode.rst:1686 msgid "" "This function returns ``-1`` upon failure, so one should call :c:func:" "`PyErr_Occurred` to check for errors." msgstr "" -#: c-api/unicode.rst:1691 +#: c-api/unicode.rst:1692 msgid "" "Compare a Unicode object, *uni*, with *string* and return ``-1``, ``0``, " "``1`` for less than, equal, and greater than, respectively. It is best to " @@ -1922,56 +1953,56 @@ msgid "" "string as ISO-8859-1 if it contains non-ASCII characters." msgstr "" -#: c-api/unicode.rst:1696 +#: c-api/unicode.rst:1697 msgid "This function does not raise exceptions." msgstr "" -#: c-api/unicode.rst:1701 +#: c-api/unicode.rst:1702 msgid "Rich compare two Unicode strings and return one of the following:" msgstr "" -#: c-api/unicode.rst:1703 +#: c-api/unicode.rst:1704 msgid "``NULL`` in case an exception was raised" msgstr "" -#: c-api/unicode.rst:1704 +#: c-api/unicode.rst:1705 msgid ":const:`Py_True` or :const:`Py_False` for successful comparisons" msgstr "" -#: c-api/unicode.rst:1705 +#: c-api/unicode.rst:1706 msgid ":const:`Py_NotImplemented` in case the type combination is unknown" msgstr "" -#: c-api/unicode.rst:1707 +#: c-api/unicode.rst:1708 msgid "" "Possible values for *op* are :const:`Py_GT`, :const:`Py_GE`, :const:" "`Py_EQ`, :const:`Py_NE`, :const:`Py_LT`, and :const:`Py_LE`." msgstr "" -#: c-api/unicode.rst:1713 +#: c-api/unicode.rst:1714 msgid "" "Return a new string object from *format* and *args*; this is analogous to " "``format % args``." msgstr "" -#: c-api/unicode.rst:1719 +#: c-api/unicode.rst:1720 msgid "" "Check whether *element* is contained in *container* and return true or false " "accordingly." msgstr "" -#: c-api/unicode.rst:1722 +#: c-api/unicode.rst:1723 msgid "" "*element* has to coerce to a one element Unicode string. ``-1`` is returned " "if there was an error." msgstr "" -#: c-api/unicode.rst:1728 +#: c-api/unicode.rst:1729 msgid "" "Intern the argument *\\*string* in place. The argument must be the address " "of a pointer variable pointing to a Python Unicode string object. If there " -"is an existing interned string that is the same as *\\*string*, it sets *" -"\\*string* to it (decrementing the reference count of the old string object " +"is an existing interned string that is the same as *\\*string*, it sets " +"*\\*string* to it (decrementing the reference count of the old string object " "and incrementing the reference count of the interned string object), " "otherwise it leaves *\\*string* alone and interns it (incrementing its " "reference count). (Clarification: even though there is a lot of talk about " @@ -1979,7 +2010,7 @@ msgid "" "the object after the call if and only if you owned it before the call.)" msgstr "" -#: c-api/unicode.rst:1741 +#: c-api/unicode.rst:1742 msgid "" "A combination of :c:func:`PyUnicode_FromString` and :c:func:" "`PyUnicode_InternInPlace`, returning either a new Unicode string object that " diff --git a/c-api/veryhigh.po b/c-api/veryhigh.po index 0fe7861b5c..e823aa424a 100644 --- a/c-api/veryhigh.po +++ b/c-api/veryhigh.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -94,16 +94,17 @@ msgid "" "`PyRun_InteractiveLoop`, otherwise return the result of :c:func:" "`PyRun_SimpleFile`. *filename* is decoded from the filesystem encoding (:" "func:`sys.getfilesystemencoding`). If *filename* is ``NULL``, this function " -"uses ``\"???\"`` as the filename." +"uses ``\"???\"`` as the filename. If *closeit* is true, the file is closed " +"before ``PyRun_SimpleFileExFlags()`` returns." msgstr "" -#: c-api/veryhigh.rst:82 +#: c-api/veryhigh.rst:84 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleStringFlags` below, " "leaving the :c:type:`PyCompilerFlags`\\* argument set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:88 +#: c-api/veryhigh.rst:90 msgid "" "Executes the Python source code from *command* in the :mod:`__main__` module " "according to the *flags* argument. If :mod:`__main__` does not already " @@ -112,26 +113,26 @@ msgid "" "information. For the meaning of *flags*, see below." msgstr "" -#: c-api/veryhigh.rst:94 +#: c-api/veryhigh.rst:96 msgid "" "Note that if an otherwise unhandled :exc:`SystemExit` is raised, this " "function will not return ``-1``, but exit the process, as long as " "``Py_InspectFlag`` is not set." msgstr "" -#: c-api/veryhigh.rst:101 +#: c-api/veryhigh.rst:103 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, " "leaving *closeit* set to ``0`` and *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:107 +#: c-api/veryhigh.rst:109 msgid "" "This is a simplified interface to :c:func:`PyRun_SimpleFileExFlags` below, " "leaving *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:113 +#: c-api/veryhigh.rst:115 msgid "" "Similar to :c:func:`PyRun_SimpleStringFlags`, but the Python source code is " "read from *fp* instead of an in-memory string. *filename* should be the name " @@ -140,20 +141,20 @@ msgid "" "PyRun_SimpleFileExFlags returns." msgstr "" -#: c-api/veryhigh.rst:120 +#: c-api/veryhigh.rst:122 msgid "" -"On Windows, *fp* should be opened as binary mode (e.g. ``fopen(filename, \"rb" -"\")``). Otherwise, Python may not handle script file with LF line ending " +"On Windows, *fp* should be opened as binary mode (e.g. ``fopen(filename, " +"\"rb\")``). Otherwise, Python may not handle script file with LF line ending " "correctly." msgstr "" -#: c-api/veryhigh.rst:126 +#: c-api/veryhigh.rst:128 msgid "" "This is a simplified interface to :c:func:`PyRun_InteractiveOneFlags` below, " "leaving *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:132 +#: c-api/veryhigh.rst:134 msgid "" "Read and execute a single statement from a file associated with an " "interactive device according to the *flags* argument. The user will be " @@ -161,7 +162,7 @@ msgid "" "filesystem encoding (:func:`sys.getfilesystemencoding`)." msgstr "" -#: c-api/veryhigh.rst:137 +#: c-api/veryhigh.rst:139 msgid "" "Returns ``0`` when the input was executed successfully, ``-1`` if there was " "an exception, or an error code from the :file:`errcode.h` include file " @@ -170,13 +171,13 @@ msgid "" "specifically if needed.)" msgstr "" -#: c-api/veryhigh.rst:146 +#: c-api/veryhigh.rst:148 msgid "" "This is a simplified interface to :c:func:`PyRun_InteractiveLoopFlags` " "below, leaving *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:152 +#: c-api/veryhigh.rst:154 msgid "" "Read and execute statements from a file associated with an interactive " "device until EOF is reached. The user will be prompted using ``sys.ps1`` " @@ -185,7 +186,7 @@ msgid "" "upon failure." msgstr "" -#: c-api/veryhigh.rst:161 +#: c-api/veryhigh.rst:163 msgid "" "Can be set to point to a function with the prototype ``int func(void)``. " "The function will be called when Python's interpreter prompt is about to " @@ -195,7 +196,7 @@ msgid "" "the Python source code." msgstr "" -#: c-api/veryhigh.rst:172 +#: c-api/veryhigh.rst:174 msgid "" "Can be set to point to a function with the prototype ``char *func(FILE " "*stdin, FILE *stdout, char *prompt)``, overriding the default function used " @@ -206,34 +207,34 @@ msgid "" "line-editing and tab-completion features." msgstr "" -#: c-api/veryhigh.rst:181 +#: c-api/veryhigh.rst:183 msgid "" "The result must be a string allocated by :c:func:`PyMem_RawMalloc` or :c:" "func:`PyMem_RawRealloc`, or ``NULL`` if an error occurred." msgstr "" -#: c-api/veryhigh.rst:184 +#: c-api/veryhigh.rst:186 msgid "" "The result must be allocated by :c:func:`PyMem_RawMalloc` or :c:func:" "`PyMem_RawRealloc`, instead of being allocated by :c:func:`PyMem_Malloc` or :" "c:func:`PyMem_Realloc`." msgstr "" -#: c-api/veryhigh.rst:192 +#: c-api/veryhigh.rst:194 msgid "" "This is a simplified interface to :c:func:" "`PyParser_SimpleParseStringFlagsFilename` below, leaving *filename* set to " "``NULL`` and *flags* set to ``0``." msgstr "" -#: c-api/veryhigh.rst:201 +#: c-api/veryhigh.rst:203 msgid "" "This is a simplified interface to :c:func:" "`PyParser_SimpleParseStringFlagsFilename` below, leaving *filename* set to " "``NULL``." msgstr "" -#: c-api/veryhigh.rst:210 +#: c-api/veryhigh.rst:212 msgid "" "Parse Python source code from *str* using the start token *start* according " "to the *flags* argument. The result can be used to create a code object " @@ -242,25 +243,25 @@ msgid "" "(:func:`sys.getfilesystemencoding`)." msgstr "" -#: c-api/veryhigh.rst:221 +#: c-api/veryhigh.rst:223 msgid "" "This is a simplified interface to :c:func:`PyParser_SimpleParseFileFlags` " "below, leaving *flags* set to ``0``." msgstr "" -#: c-api/veryhigh.rst:229 +#: c-api/veryhigh.rst:231 msgid "" "Similar to :c:func:`PyParser_SimpleParseStringFlagsFilename`, but the Python " "source code is read from *fp* instead of an in-memory string." msgstr "" -#: c-api/veryhigh.rst:237 +#: c-api/veryhigh.rst:239 msgid "" "This is a simplified interface to :c:func:`PyRun_StringFlags` below, leaving " "*flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:243 +#: c-api/veryhigh.rst:245 msgid "" "Execute Python source code from *str* in the context specified by the " "objects *globals* and *locals* with the compiler flags specified by " @@ -269,31 +270,31 @@ msgid "" "token that should be used to parse the source code." msgstr "" -#: c-api/veryhigh.rst:249 +#: c-api/veryhigh.rst:251 msgid "" "Returns the result of executing the code as a Python object, or ``NULL`` if " "an exception was raised." msgstr "" -#: c-api/veryhigh.rst:255 +#: c-api/veryhigh.rst:257 msgid "" "This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " "*closeit* set to ``0`` and *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:261 +#: c-api/veryhigh.rst:263 msgid "" "This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " "*flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:267 +#: c-api/veryhigh.rst:269 msgid "" "This is a simplified interface to :c:func:`PyRun_FileExFlags` below, leaving " "*closeit* set to ``0``." msgstr "" -#: c-api/veryhigh.rst:273 +#: c-api/veryhigh.rst:275 msgid "" "Similar to :c:func:`PyRun_StringFlags`, but the Python source code is read " "from *fp* instead of an in-memory string. *filename* should be the name of " @@ -302,19 +303,19 @@ msgid "" "func:`PyRun_FileExFlags` returns." msgstr "" -#: c-api/veryhigh.rst:282 +#: c-api/veryhigh.rst:284 msgid "" "This is a simplified interface to :c:func:`Py_CompileStringFlags` below, " "leaving *flags* set to ``NULL``." msgstr "" -#: c-api/veryhigh.rst:288 +#: c-api/veryhigh.rst:290 msgid "" "This is a simplified interface to :c:func:`Py_CompileStringExFlags` below, " "with *optimize* set to ``-1``." msgstr "" -#: c-api/veryhigh.rst:294 +#: c-api/veryhigh.rst:296 msgid "" "Parse and compile the Python source code in *str*, returning the resulting " "code object. The start token is given by *start*; this can be used to " @@ -325,7 +326,7 @@ msgid "" "returns ``NULL`` if the code cannot be parsed or compiled." msgstr "" -#: c-api/veryhigh.rst:302 +#: c-api/veryhigh.rst:304 msgid "" "The integer *optimize* specifies the optimization level of the compiler; a " "value of ``-1`` selects the optimization level of the interpreter as given " @@ -334,20 +335,20 @@ msgid "" "or ``2`` (docstrings are removed too)." msgstr "" -#: c-api/veryhigh.rst:313 +#: c-api/veryhigh.rst:315 msgid "" "Like :c:func:`Py_CompileStringObject`, but *filename* is a byte string " "decoded from the filesystem encoding (:func:`os.fsdecode`)." msgstr "" -#: c-api/veryhigh.rst:320 +#: c-api/veryhigh.rst:322 msgid "" "This is a simplified interface to :c:func:`PyEval_EvalCodeEx`, with just the " "code object, and global and local variables. The other arguments are set to " "``NULL``." msgstr "" -#: c-api/veryhigh.rst:327 +#: c-api/veryhigh.rst:329 msgid "" "Evaluate a precompiled code object, given a particular environment for its " "evaluation. This environment consists of a dictionary of global variables, " @@ -356,7 +357,7 @@ msgid "" "only_parameter>` arguments and a closure tuple of cells." msgstr "" -#: c-api/veryhigh.rst:336 +#: c-api/veryhigh.rst:338 #, fuzzy msgid "" "The C structure of the objects used to describe frame objects. The fields of " @@ -365,13 +366,13 @@ msgstr "" "La structure C utilisée pour décrire les objets *Code*. Les attributs de " "cette structure sont sujets à changer à tout moment." -#: c-api/veryhigh.rst:342 +#: c-api/veryhigh.rst:344 msgid "" "Evaluate an execution frame. This is a simplified interface to :c:func:" "`PyEval_EvalFrameEx`, for backward compatibility." msgstr "" -#: c-api/veryhigh.rst:348 +#: c-api/veryhigh.rst:350 msgid "" "This is the main, unvarnished function of Python interpretation. The code " "object associated with the execution frame *f* is executed, interpreting " @@ -381,7 +382,7 @@ msgid "" "of generator objects." msgstr "" -#: c-api/veryhigh.rst:355 +#: c-api/veryhigh.rst:357 msgid "" "This function now includes a debug assertion to help ensure that it does not " "silently discard an active exception." @@ -389,33 +390,33 @@ msgstr "" "Cette fonction inclut maintenant une assertion de débogage afin d'assurer " "qu'elle ne passe pas sous silence une exception active." -#: c-api/veryhigh.rst:362 +#: c-api/veryhigh.rst:364 msgid "" "This function changes the flags of the current evaluation frame, and returns " "true on success, false on failure." msgstr "" -#: c-api/veryhigh.rst:370 +#: c-api/veryhigh.rst:372 msgid "" "The start symbol from the Python grammar for isolated expressions; for use " "with :c:func:`Py_CompileString`." msgstr "" -#: c-api/veryhigh.rst:378 +#: c-api/veryhigh.rst:380 msgid "" "The start symbol from the Python grammar for sequences of statements as read " "from a file or other source; for use with :c:func:`Py_CompileString`. This " "is the symbol to use when compiling arbitrarily long Python source code." msgstr "" -#: c-api/veryhigh.rst:387 +#: c-api/veryhigh.rst:389 msgid "" "The start symbol from the Python grammar for a single statement; for use " "with :c:func:`Py_CompileString`. This is the symbol used for the interactive " "interpreter loop." msgstr "" -#: c-api/veryhigh.rst:394 +#: c-api/veryhigh.rst:396 msgid "" "This is the structure used to hold compiler flags. In cases where code is " "only being compiled, it is passed as ``int flags``, and in cases where code " @@ -423,34 +424,34 @@ msgid "" "case, ``from __future__ import`` can modify *flags*." msgstr "" -#: c-api/veryhigh.rst:399 +#: c-api/veryhigh.rst:401 msgid "" "Whenever ``PyCompilerFlags *flags`` is ``NULL``, :attr:`cf_flags` is treated " "as equal to ``0``, and any modification due to ``from __future__ import`` is " "discarded." msgstr "" -#: c-api/veryhigh.rst:405 +#: c-api/veryhigh.rst:407 msgid "Compiler flags." msgstr "" -#: c-api/veryhigh.rst:409 +#: c-api/veryhigh.rst:411 msgid "" "*cf_feature_version* is the minor Python version. It should be initialized " "to ``PY_MINOR_VERSION``." msgstr "" -#: c-api/veryhigh.rst:412 +#: c-api/veryhigh.rst:414 msgid "" "The field is ignored by default, it is used if and only if ``PyCF_ONLY_AST`` " "flag is set in *cf_flags*." msgstr "" -#: c-api/veryhigh.rst:415 +#: c-api/veryhigh.rst:417 msgid "Added *cf_feature_version* field." msgstr "" -#: c-api/veryhigh.rst:421 +#: c-api/veryhigh.rst:423 msgid "" "This bit can be set in *flags* to cause division operator ``/`` to be " "interpreted as \"true division\" according to :pep:`238`." diff --git a/copyright.po b/copyright.po index 96aaceeadc..079866e533 100644 --- a/copyright.po +++ b/copyright.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-01-28 14:22+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -24,7 +24,8 @@ msgid "Python and this documentation is:" msgstr "Python et cette documentation sont :" #: copyright.rst:7 -msgid "Copyright © 2001-2021 Python Software Foundation. All rights reserved." +#, fuzzy +msgid "Copyright © 2001-2023 Python Software Foundation. All rights reserved." msgstr "" "Copyright © 2001-2021 Python Software Foundation. Tous droits réservés." diff --git a/distributing/index.po b/distributing/index.po index 209183aef8..e8a297e60b 100644 --- a/distributing/index.po +++ b/distributing/index.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-02-04 09:33+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -78,12 +78,12 @@ msgstr "Vocabulaire" #: distributing/index.rst:34 msgid "" -"the `Python Packaging Index `__ is a public repository of " +"the `Python Package Index `__ is a public repository of " "open source licensed packages made available for use by other Python users" msgstr "" -"le `Python Packaging Index `__ est un dépôt public de " +"Le `Python Package Index `__ est un dépôt public de " "paquets sous licence libre rendus disponibles par d'autres utilisateurs " -"Python" +"Python." #: distributing/index.rst:37 msgid "" @@ -227,12 +227,12 @@ msgstr "" #: distributing/index.rst:104 msgid "" -"For POSIX users (including Mac OS X and Linux users), these instructions " -"assume the use of a :term:`virtual environment`." +"For POSIX users (including macOS and Linux users), these instructions assume " +"the use of a :term:`virtual environment`." msgstr "" -"Pour les utilisateurs d'environnements POSIX (incluant Mac OS X et les " -"utilisateurs de Linux), ces instructions supposent l'utilisation d'un :term:" -"`environnement virtuel`." +"Pour les utilisateurs d'environnements POSIX (dont macOS et Linux), ces " +"instructions supposent l'utilisation d'un :term:`environnement virtuel " +"`." #: distributing/index.rst:107 msgid "" @@ -274,14 +274,14 @@ msgstr "" "project_>`_" #: distributing/index.rst:130 -msgid "`Uploading the project to the Python Packaging Index`_" +msgid "`Uploading the project to the Python Package Index`_" msgstr "" "`(en) Téléverser le projet sur le Python Packaging Index `_" +"project to the Python Packaging Index_>`_ ;" #: distributing/index.rst:131 msgid "`The .pypirc file`_" -msgstr "" +msgstr "`(en) Le fichier .pypirc `_." #: distributing/index.rst:144 msgid "How do I...?" @@ -301,8 +301,8 @@ msgid "This isn't an easy topic, but here are a few tips:" msgstr "Ce n'est pas un sujet facile, mais voici quelques conseils :" #: distributing/index.rst:153 -msgid "check the Python Packaging Index to see if the name is already in use" -msgstr "vérifiez dans le *Python Packaging Index* si le nom est déjà utilisé" +msgid "check the Python Package Index to see if the name is already in use" +msgstr "vérifiez dans le *Python Package Index* si le nom est déjà utilisé ;" #: distributing/index.rst:154 msgid "" diff --git a/distutils/apiref.po b/distutils/apiref.po index e593d0ccde..2180adea18 100644 --- a/distutils/apiref.po +++ b/distutils/apiref.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-03-29 15:44+0200\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -1369,8 +1369,8 @@ msgid "" "component). These are on top of the system default and those supplied to :" "meth:`add_library_dir` and/or :meth:`set_library_dirs`. " "*runtime_library_dirs* is a list of directories that will be embedded into " -"the shared library and used to search for other shared libraries that \\*it" -"\\* depends on at run-time. (This may only be relevant on Unix.)" +"the shared library and used to search for other shared libraries that " +"\\*it\\* depends on at run-time. (This may only be relevant on Unix.)" msgstr "" "*library_dirs*, s'il est fourni, doit être une liste de répertoires à " "rechercher pour les bibliothèques qui ont été spécifiées comme des " @@ -2078,8 +2078,9 @@ msgstr "" "platform``." #: distutils/apiref.rst:1122 +#, fuzzy msgid "" -"For Mac OS X systems the OS version reflects the minimal version on which " +"For macOS systems the OS version reflects the minimal version on which " "binaries will run (that is, the value of ``MACOSX_DEPLOYMENT_TARGET`` during " "the build of Python), not the OS version of the current system." msgstr "" @@ -2089,8 +2090,9 @@ msgstr "" "compilation de Python), et non la version du système actuel." #: distutils/apiref.rst:1126 +#, fuzzy msgid "" -"For universal binary builds on Mac OS X the architecture value reflects the " +"For universal binary builds on macOS the architecture value reflects the " "universal binary status instead of the architecture of the current " "processor. For 32-bit universal binaries the architecture is ``fat``, for 64-" "bit universal binaries the architecture is ``fat64``, and for 4-way " @@ -2110,7 +2112,8 @@ msgstr "" "compilation universelle avec les architectures *i386* et *x86_64*" #: distutils/apiref.rst:1135 -msgid "Examples of returned values on Mac OS X:" +#, fuzzy +msgid "Examples of returned values on macOS:" msgstr "Exemples de valeurs renvoyées sous Mac OS X :" #: distutils/apiref.rst:1137 diff --git a/distutils/builtdist.po b/distutils/builtdist.po index bdcb5b63f8..97318e76e8 100644 --- a/distutils/builtdist.po +++ b/distutils/builtdist.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-01-28 15:11+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -39,12 +39,12 @@ msgid "" "word is already spoken for in Python. (And \"installer\" is a term specific " "to the world of mainstream desktop systems.)" msgstr "" -"Une \"distribution compilée\" vous fait surement penser à un \"paquet binaire" -"\" ou à un \"installateur\" (tout dépend de votre environnement). Ce n'est " -"cependant pas forcément un binaire, il peut ne contenir que des sources " -"Python et / ou du *byte-code* ; et nous n'appelons pas ça un *package* parce " -"que ce mot est déjà utilisé dans Python (et \"installateur\" est un terme " -"spécifique au monde des systèmes de bureau)." +"Une \"distribution compilée\" vous fait surement penser à un \"paquet " +"binaire\" ou à un \"installateur\" (tout dépend de votre environnement). Ce " +"n'est cependant pas forcément un binaire, il peut ne contenir que des " +"sources Python et / ou du *byte-code* ; et nous n'appelons pas ça un " +"*package* parce que ce mot est déjà utilisé dans Python (et \"installateur\" " +"est un terme spécifique au monde des systèmes de bureau)." #: distutils/builtdist.rst:16 msgid "" @@ -336,12 +336,12 @@ msgstr "" msgid "" "You don't have to use the :command:`bdist` command with the :option:`!--" "formats` option; you can also use the command that directly implements the " -"format you're interested in. Some of these :command:`bdist` \"sub-commands" -"\" actually generate several similar formats; for instance, the :command:" -"`bdist_dumb` command generates all the \"dumb\" archive formats (``tar``, " -"``gztar``, ``bztar``, ``xztar``, ``ztar``, and ``zip``), and :command:" -"`bdist_rpm` generates both binary and source RPMs. The :command:`bdist` sub-" -"commands, and the formats generated by each, are:" +"format you're interested in. Some of these :command:`bdist` \"sub-" +"commands\" actually generate several similar formats; for instance, the :" +"command:`bdist_dumb` command generates all the \"dumb\" archive formats " +"(``tar``, ``gztar``, ``bztar``, ``xztar``, ``ztar``, and ``zip``), and :" +"command:`bdist_rpm` generates both binary and source RPMs. The :command:" +"`bdist` sub-commands, and the formats generated by each, are:" msgstr "" "Vous ne devez pas utiliser la commande :command:`bdist` avec l'option :" "option:`!--formats` ; Vous pouvez également utiliser la commande qui " diff --git a/distutils/introduction.po b/distutils/introduction.po index a4c38e32f4..980122495d 100644 --- a/distutils/introduction.po +++ b/distutils/introduction.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-03-23 14:58+0100\n" "Last-Translator: Eric Régnier \n" "Language-Team: FRENCH \n" @@ -350,13 +350,13 @@ msgid "" "(Note that currently, the Distutils only handles C/C++ extensions for " "Python.)" msgstr "" -"un module écrit dans un langage de bas niveau de l'implémentation Python: C/C" -"++ pour Python, Java pour Jython. Typiquement contenu dans un unique fichier " -"pré-compilé chargeable, p. ex. un fichier objet partagé (:file:`.so`) pour " -"des extensions Python sous Unix, un fichier DLL (étant donné l'extension :" -"file:`.pyd`) pour les extensions Python sous Windows, ou un fichier de " -"classe Java pour les extensions Jython (notez qu'actuellement, Distutils " -"gère seulement les extensions Python C/C++)." +"un module écrit dans un langage de bas niveau de l'implémentation Python: C/" +"C++ pour Python, Java pour Jython. Typiquement contenu dans un unique " +"fichier pré-compilé chargeable, p. ex. un fichier objet partagé (:file:`." +"so`) pour des extensions Python sous Unix, un fichier DLL (étant donné " +"l'extension :file:`.pyd`) pour les extensions Python sous Windows, ou un " +"fichier de classe Java pour les extensions Jython (notez qu'actuellement, " +"Distutils gère seulement les extensions Python C/C++)." #: distutils/introduction.rst:175 msgid "package" diff --git a/distutils/sourcedist.po b/distutils/sourcedist.po index 287064dae9..6b9ffa566a 100644 --- a/distutils/sourcedist.po +++ b/distutils/sourcedist.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-02-04 21:21+0100\n" "Last-Translator: ZepmanBC \n" "Language-Team: FRENCH \n" @@ -110,6 +110,10 @@ msgstr "``bztar``" msgid "bzip2'ed tar file (:file:`.tar.bz2`)" msgstr "Fichier *tar* compressé par *bzip2* (:file:`.tar.bz2`)" +#: distutils/sourcedist.rst:37 distutils/sourcedist.rst:43 +msgid "\\(5)" +msgstr "\\(5)" + #: distutils/sourcedist.rst:37 msgid "``xztar``" msgstr "``xztar``" @@ -127,8 +131,8 @@ msgid "compressed tar file (:file:`.tar.Z`)" msgstr "Fichier *tar* compressé par *compress* (:file:`.tar.Z`)" #: distutils/sourcedist.rst:40 -msgid "\\(4)" -msgstr "\\(4)" +msgid "(4),(5)" +msgstr "" #: distutils/sourcedist.rst:43 msgid "``tar``" @@ -172,6 +176,12 @@ msgstr "" #: distutils/sourcedist.rst:65 msgid "" +"deprecated by `PEP 527 `_; `PyPI " +"`_ only accepts ``.zip`` and ``.tar.gz`` files." +msgstr "" + +#: distutils/sourcedist.rst:68 +msgid "" "When using any ``tar`` format (``gztar``, ``bztar``, ``xztar``, ``ztar`` or " "``tar``), under Unix you can specify the ``owner`` and ``group`` names that " "will be set for each member of the archive." @@ -181,17 +191,17 @@ msgstr "" "propriétaire et le groupe qui seront appliqué pour chaque fichier de " "l'archive." -#: distutils/sourcedist.rst:69 +#: distutils/sourcedist.rst:72 msgid "For example, if you want all files of the archive to be owned by root::" msgstr "" "Par exemple, si vous voulez que tous les fichiers de l'archive soient détenu " "par *root* ::" -#: distutils/sourcedist.rst:77 +#: distutils/sourcedist.rst:80 msgid "Specifying the files to distribute" msgstr "Spécifier les fichiers à distribuer" -#: distutils/sourcedist.rst:79 +#: distutils/sourcedist.rst:82 msgid "" "If you don't supply an explicit list of files (or instructions on how to " "generate one), the :command:`sdist` command puts a minimal default set into " @@ -201,7 +211,7 @@ msgstr "" "instructions pour la générer), la commande :command:`sdist` en met par " "défaut le minimum dans la distribution source :" -#: distutils/sourcedist.rst:83 +#: distutils/sourcedist.rst:86 msgid "" "all Python source files implied by the ``py_modules`` and ``packages`` " "options" @@ -209,14 +219,14 @@ msgstr "" "tous les fichiers source Python sous-entendus par les options ``py_modules`` " "et ``packages``" -#: distutils/sourcedist.rst:86 +#: distutils/sourcedist.rst:89 msgid "" "all C source files mentioned in the ``ext_modules`` or ``libraries`` options" msgstr "" "tous les fichiers source C mentionnés dans les arguments ``ext_modules`` ou " "``libraries``" -#: distutils/sourcedist.rst:92 +#: distutils/sourcedist.rst:95 msgid "" "scripts identified by the ``scripts`` option See :ref:`distutils-installing-" "scripts`." @@ -224,7 +234,7 @@ msgstr "" "scripts identifiés par l'argument ``scripts``. Voir :ref:`distutils-" "installing-scripts`." -#: distutils/sourcedist.rst:95 +#: distutils/sourcedist.rst:98 msgid "" "anything that looks like a test script: :file:`test/test\\*.py` (currently, " "the Distutils don't do anything with test scripts except include them in " @@ -236,7 +246,7 @@ msgstr "" "inclure dans les distributions sources, mais dans le futur un standard sera " "implémenté pour tester les distributions de module Python)" -#: distutils/sourcedist.rst:100 +#: distutils/sourcedist.rst:103 msgid "" "Any of the standard README files (:file:`README`, :file:`README.txt`, or :" "file:`README.rst`), :file:`setup.py` (or whatever you called your setup " @@ -247,7 +257,7 @@ msgstr "" "script d'installation si vous l'avez appelé autrement) et le fichier :file:" "`setup.cfg`." -#: distutils/sourcedist.rst:104 +#: distutils/sourcedist.rst:107 msgid "" "all files that matches the ``package_data`` metadata. See :ref:`distutils-" "installing-package-data`." @@ -255,7 +265,7 @@ msgstr "" "tous les fichiers associés aux méta-données ``package_data``. Voir :ref:" "`distutils-installing-package-data`." -#: distutils/sourcedist.rst:107 +#: distutils/sourcedist.rst:110 msgid "" "all files that matches the ``data_files`` metadata. See :ref:`distutils-" "additional-files`." @@ -263,7 +273,7 @@ msgstr "" "tous les fichiers associés aux méta-données ``data_files``. Voir :ref:" "`distutils-additional-files`." -#: distutils/sourcedist.rst:110 +#: distutils/sourcedist.rst:113 msgid "" "Sometimes this is enough, but usually you will want to specify additional " "files to distribute. The typical way to do this is to write a *manifest " @@ -283,7 +293,7 @@ msgstr "" "`sdist` traite ce modèle et génère un manifeste à partir de ces instructions " "et de ce qu'elle trouve dans le système de fichiers." -#: distutils/sourcedist.rst:118 +#: distutils/sourcedist.rst:121 msgid "" "If you prefer to roll your own manifest file, the format is simple: one " "filename per line, regular files (or symlinks to them) only. If you do " @@ -296,7 +306,7 @@ msgstr "" "vous devez tout spécifier : les groupes de fichiers par défaut décrits au-" "dessus ne sont pas inclus automatiquement dans ce cas." -#: distutils/sourcedist.rst:123 +#: distutils/sourcedist.rst:126 msgid "" "An existing generated :file:`MANIFEST` will be regenerated without :command:" "`sdist` comparing its modification time to the one of :file:`MANIFEST.in` " @@ -306,7 +316,7 @@ msgstr "" "command:`sdist` ne compare son heure de modification à :file:`MANIFEST.in` " "ou :file:`setup.py`." -#: distutils/sourcedist.rst:128 +#: distutils/sourcedist.rst:131 msgid "" ":file:`MANIFEST` files start with a comment indicating they are generated. " "Files without this comment are not overwritten or removed." @@ -315,7 +325,7 @@ msgstr "" "sont générés. Les fichiers sans ce commentaire ne sont pas réécrits ou " "supprimés." -#: distutils/sourcedist.rst:132 +#: distutils/sourcedist.rst:135 msgid "" ":command:`sdist` will read a :file:`MANIFEST` file if no :file:`MANIFEST.in` " "exists, like it used to do." @@ -323,14 +333,14 @@ msgstr "" ":command:`sdist` lira un ficher :file:`MANIFEST` s'il n'existe pas de :file:" "`MANIFEST.in` , tel qu'il en avait l'habitude." -#: distutils/sourcedist.rst:136 +#: distutils/sourcedist.rst:139 msgid "" ":file:`README.rst` is now included in the list of distutils standard READMEs." msgstr "" "Le fichier :file:`README.rst` est maintenant inclus dans la liste des " "fichiers *README* standards de *distutils*." -#: distutils/sourcedist.rst:140 +#: distutils/sourcedist.rst:143 msgid "" "The manifest template has one command per line, where each command specifies " "a set of files to include or exclude from the source distribution. For an " @@ -340,7 +350,7 @@ msgstr "" "spécifie un ensemble de fichiers à inclure ou à exclure de la distribution " "source. Par exemple, regardons à nouveau le propre manifeste de Distutils :" -#: distutils/sourcedist.rst:150 +#: distutils/sourcedist.rst:153 msgid "" "The meanings should be fairly clear: include all files in the distribution " "root matching :file:`\\*.txt`, all files anywhere under the :file:`examples` " @@ -363,7 +373,7 @@ msgstr "" "inclusions standards). Il existe d'autres commandes dans le langage du " "fichier manifeste, consultez le chapitre :ref:`sdist-cmd`." -#: distutils/sourcedist.rst:160 +#: distutils/sourcedist.rst:163 msgid "" "The order of commands in the manifest template matters: initially, we have " "the list of default files as described above, and each command in the " @@ -377,13 +387,13 @@ msgstr "" "Une fois que le traitement du manifeste modèle est fini, nous enlevons les " "fichiers qui ne doivent pas être inclus dans la distribution source :" -#: distutils/sourcedist.rst:166 +#: distutils/sourcedist.rst:169 msgid "all files in the Distutils \"build\" tree (default :file:`build/`)" msgstr "" "tous les fichiers dans l'arborescence de *build* de Distutils (par défaut :" "file:`build/`)" -#: distutils/sourcedist.rst:168 +#: distutils/sourcedist.rst:171 msgid "" "all files in directories named :file:`RCS`, :file:`CVS`, :file:`.svn`, :file:" "`.hg`, :file:`.git`, :file:`.bzr` or :file:`_darcs`" @@ -391,7 +401,7 @@ msgstr "" "tous les fichiers dans les dossiers nommés :file:`RCS`, :file:`CVS`, :file:`." "svn`, :file:`.hg`, :file:`.git`, :file:`.bzr` ou :file:`_darcs`" -#: distutils/sourcedist.rst:171 +#: distutils/sourcedist.rst:174 msgid "" "Now we have our complete list of files, which is written to the manifest for " "future reference, and then used to build the source distribution archive(s)." @@ -400,7 +410,7 @@ msgstr "" "écrite dans le manifeste pour une utilisation future et sera utilisée pour " "construire la ou les archive(s) de notre distribution source." -#: distutils/sourcedist.rst:174 +#: distutils/sourcedist.rst:177 msgid "" "You can disable the default set of included files with the :option:`!--no-" "defaults` option, and you can disable the standard exclude set with :option:" @@ -410,7 +420,7 @@ msgstr "" "utilisant l'option :option:`!--no-defaults`, ainsi que désactiver les " "exclusions standards avec l'option :option:`!--no-prune`." -#: distutils/sourcedist.rst:178 +#: distutils/sourcedist.rst:181 msgid "" "Following the Distutils' own manifest template, let's trace how the :command:" "`sdist` command builds the list of files to include in the Distutils source " @@ -420,7 +430,7 @@ msgstr "" "`sdist` construit la liste des fichiers à inclure dans la distribution " "source de Distutils." -#: distutils/sourcedist.rst:182 +#: distutils/sourcedist.rst:185 msgid "" "include all Python source files in the :file:`distutils` and :file:" "`distutils/command` subdirectories (because packages corresponding to those " @@ -433,7 +443,7 @@ msgstr "" "``packages`` du script d'installation --- voir le chapitre :ref:`setup-" "script`)" -#: distutils/sourcedist.rst:187 +#: distutils/sourcedist.rst:190 msgid "" "include :file:`README.txt`, :file:`setup.py`, and :file:`setup.cfg` " "(standard files)" @@ -441,11 +451,11 @@ msgstr "" "inclure :file:`README.txt`, :file:`setup.py` et :file:`setup.cfg` (fichiers " "standards)" -#: distutils/sourcedist.rst:190 +#: distutils/sourcedist.rst:193 msgid "include :file:`test/test\\*.py` (standard files)" msgstr "inclure :file:`test/test\\*.py` (fichiers standard)" -#: distutils/sourcedist.rst:192 +#: distutils/sourcedist.rst:195 msgid "" "include :file:`\\*.txt` in the distribution root (this will find :file:" "`README.txt` a second time, but such redundancies are weeded out later)" @@ -454,7 +464,7 @@ msgstr "" "`README.txt` une seconde fois, mais les redondances sont supprimées plus " "tard)" -#: distutils/sourcedist.rst:195 +#: distutils/sourcedist.rst:198 msgid "" "include anything matching :file:`\\*.txt` or :file:`\\*.py` in the sub-tree " "under :file:`examples`," @@ -462,7 +472,7 @@ msgstr "" "inclure tout fichier de la forme :file:`\\*.txt` ou :file:`\\*.py` dans la " "sous-arborescence de :file:`examples`," -#: distutils/sourcedist.rst:198 +#: distutils/sourcedist.rst:201 msgid "" "exclude all files in the sub-trees starting at directories matching :file:" "`examples/sample?/build`\\ ---this may exclude files included by the " @@ -475,7 +485,7 @@ msgstr "" "important que la commande ``prune`` dans le manifeste modèle vienne après la " "commande ``recursive-include``" -#: distutils/sourcedist.rst:203 +#: distutils/sourcedist.rst:206 msgid "" "exclude the entire :file:`build` tree, and any :file:`RCS`, :file:`CVS`, :" "file:`.svn`, :file:`.hg`, :file:`.git`, :file:`.bzr` and :file:`_darcs` " @@ -485,7 +495,7 @@ msgstr "" "`RCS`, :file:`CVS`, :file:`.svn`, :file:`.hg`, :file:`.git`, :file:`.bzr` " "et :file:`_darcs`" -#: distutils/sourcedist.rst:207 +#: distutils/sourcedist.rst:210 msgid "" "Just like in the setup script, file and directory names in the manifest " "template should always be slash-separated; the Distutils will take care of " @@ -498,11 +508,11 @@ msgstr "" "la représentation standard de votre plateforme. De cette manière, le " "manifeste modèle est portable sur tout système d'exploitation." -#: distutils/sourcedist.rst:216 +#: distutils/sourcedist.rst:219 msgid "Manifest-related options" msgstr "Options pour le manifeste" -#: distutils/sourcedist.rst:218 +#: distutils/sourcedist.rst:221 msgid "" "The normal course of operations for the :command:`sdist` command is as " "follows:" @@ -510,7 +520,7 @@ msgstr "" "L'ordre normal des opérations pour la commande :command:`sdist` est le " "suivant :" -#: distutils/sourcedist.rst:220 +#: distutils/sourcedist.rst:223 msgid "" "if the manifest file (:file:`MANIFEST` by default) exists and the first line " "does not have a comment indicating it is generated from :file:`MANIFEST.in`, " @@ -520,7 +530,7 @@ msgstr "" "première ligne n'a pas de commentaire indiquant qu'il a été généré par :file:" "`MANIFEST.in`, alors il est utilisé tel quel, inchangé" -#: distutils/sourcedist.rst:224 +#: distutils/sourcedist.rst:227 msgid "" "if the manifest file doesn't exist or has been previously automatically " "generated, read :file:`MANIFEST.in` and create the manifest" @@ -528,7 +538,7 @@ msgstr "" "si le manifeste n'existe pas ou s'il a été généré automatiquement, lire :" "file:`MANIFEST.in` et créer le manifeste" -#: distutils/sourcedist.rst:227 +#: distutils/sourcedist.rst:230 msgid "" "if neither :file:`MANIFEST` nor :file:`MANIFEST.in` exist, create a manifest " "with just the default file set" @@ -536,7 +546,7 @@ msgstr "" "s'il n'existe ni :file:`MANIFEST`, ni :file:`MANIFEST.in`, alors créer un " "manifeste contenant uniquement le groupe de fichiers par défaut" -#: distutils/sourcedist.rst:230 +#: distutils/sourcedist.rst:233 msgid "" "use the list of files now in :file:`MANIFEST` (either just generated or read " "in) to create the source distribution archive(s)" @@ -544,7 +554,7 @@ msgstr "" "utiliser maintenant la liste de fichiers de :file:`MANIFEST` (qu'il ait été " "généré ou lu) pour créer la ou les archive(s) de la distribution source" -#: distutils/sourcedist.rst:233 +#: distutils/sourcedist.rst:236 msgid "" "There are a couple of options that modify this behaviour. First, use the :" "option:`!--no-defaults` and :option:`!--no-prune` to disable the standard " @@ -554,7 +564,7 @@ msgstr "" "options :option:`!--no-defaults` et :option:`!--no-prune` pour désactiver " "les inclusions et exclusions standards." -#: distutils/sourcedist.rst:237 +#: distutils/sourcedist.rst:240 msgid "" "Second, you might just want to (re)generate the manifest, but not create a " "source distribution::" @@ -562,8 +572,11 @@ msgstr "" "Ensuite, si vous ne voulez que (ré)générer le manifeste, mais pas créer la " "distribution source ::" -#: distutils/sourcedist.rst:242 +#: distutils/sourcedist.rst:245 msgid ":option:`!-o` is a shortcut for :option:`!--manifest-only`." msgstr "" "L'option :option:`!-o` est un raccourci pour l'option :option:`!--manifest-" "only`." + +#~ msgid "\\(4)" +#~ msgstr "\\(4)" diff --git a/extending/extending.po b/extending/extending.po index cd580e4c33..b7ca9e9575 100644 --- a/extending/extending.po +++ b/extending/extending.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-02-07 22:27+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -143,19 +143,19 @@ msgstr "" msgid "" "All user-visible symbols defined by :file:`Python.h` have a prefix of ``Py`` " "or ``PY``, except those defined in standard header files. For convenience, " -"and since they are used extensively by the Python interpreter, ``\"Python.h" -"\"`` includes a few standard header files: ````, ````, " +"and since they are used extensively by the Python interpreter, ``\"Python." +"h\"`` includes a few standard header files: ````, ````, " "````, and ````. If the latter header file does not exist " "on your system, it declares the functions :c:func:`malloc`, :c:func:`free` " "and :c:func:`realloc` directly." msgstr "" "Tous les symboles exposés par :file:`Python.h` sont préfixés de ``Py`` ou " "``PY``, sauf ceux qui sont définis dans les en-têtes standard. Pour le " -"confort, et comme ils sont largement utilisés par l'interpréteur Python, ``" -"\"Python.h\"`` inclut lui-même quelques d'en-têtes standard : ````, " -"````, ```` et ````. Si ce dernier n'existe pas " -"sur votre système, il déclare les fonctions :c:func:`malloc`, :c:func:`free` " -"et :c:func:`realloc` directement." +"confort, et comme ils sont largement utilisés par l'interpréteur Python, " +"``\"Python.h\"`` inclut lui-même quelques d'en-têtes standard : ````, ````, ```` et ````. Si ce dernier " +"n'existe pas sur votre système, il déclare les fonctions :c:func:`malloc`, :" +"c:func:`free` et :c:func:`realloc` directement." #: extending/extending.rst:83 msgid "" @@ -230,18 +230,16 @@ msgid "Intermezzo: Errors and Exceptions" msgstr "Intermezzo : Les erreurs et les exceptions" #: extending/extending.rst:128 +#, fuzzy msgid "" "An important convention throughout the Python interpreter is the following: " "when a function fails, it should set an exception condition and return an " -"error value (usually a ``NULL`` pointer). Exceptions are stored in a static " -"global variable inside the interpreter; if this variable is ``NULL`` no " -"exception has occurred. A second global variable stores the \"associated " -"value\" of the exception (the second argument to :keyword:`raise`). A third " -"variable contains the stack traceback in case the error originated in Python " -"code. These three variables are the C equivalents of the result in Python " -"of :meth:`sys.exc_info` (see the section on module :mod:`sys` in the Python " -"Library Reference). It is important to know about them to understand how " -"errors are passed around." +"error value (usually ``-1`` or a ``NULL`` pointer). Exception information " +"is stored in three members of the interpreter's thread state. These are " +"``NULL`` if there is no exception. Otherwise they are the C equivalents of " +"the members of the Python tuple returned by :meth:`sys.exc_info`. These are " +"the exception type, exception instance, and a traceback object. It is " +"important to know about them to understand how errors are passed around." msgstr "" "Une convention primordiale imprégnant tout l'interpréteur Python est : quand " "une fonction échoue, elle devrait laisser une exception et renvoyer une " @@ -256,7 +254,7 @@ msgstr "" "Reference*). Il est important de les connaître pour comprendre comment les " "erreurs sont propagées." -#: extending/extending.rst:139 +#: extending/extending.rst:137 msgid "" "The Python API defines a number of functions to set various types of " "exceptions." @@ -264,7 +262,7 @@ msgstr "" "L'API Python définit un certain nombre de fonctions pour créer différents " "types d'exceptions." -#: extending/extending.rst:141 +#: extending/extending.rst:139 msgid "" "The most common one is :c:func:`PyErr_SetString`. Its arguments are an " "exception object and a C string. The exception object is usually a " @@ -278,7 +276,7 @@ msgstr "" "cause de l'erreur et est convertie en une chaîne Python puis stockée en tant " "que \"valeur associée\" à l'exception." -#: extending/extending.rst:147 +#: extending/extending.rst:145 msgid "" "Another useful function is :c:func:`PyErr_SetFromErrno`, which only takes an " "exception argument and constructs the associated value by inspection of the " @@ -293,7 +291,7 @@ msgstr "" "arguments : l'exception et sa valeur associée. Vous ne devez pas appliquer :" "c:func:`Py_INCREF` aux objets transmis à ces fonctions." -#: extending/extending.rst:154 +#: extending/extending.rst:152 msgid "" "You can test non-destructively whether an exception has been set with :c:" "func:`PyErr_Occurred`. This returns the current exception object, or " @@ -308,7 +306,7 @@ msgstr "" "survenue durant l'appel d'une fonction, puisque vous devriez être en mesure " "de le déterminer à partir de la valeur renvoyée." -#: extending/extending.rst:160 +#: extending/extending.rst:158 #, fuzzy msgid "" "When a function *f* that calls another function *g* detects that the latter " @@ -334,7 +332,7 @@ msgstr "" "interrompt le code en cours d'exécution et essaie de trouver un gestionnaire " "d'exception spécifié par le développeur Python." -#: extending/extending.rst:170 +#: extending/extending.rst:168 msgid "" "(There are situations where a module can actually give a more detailed error " "message by calling another :c:func:`PyErr_\\*` function, and in such cases " @@ -349,7 +347,7 @@ msgstr "" "sur la cause de l'erreur : la plupart des opérations peuvent échouer pour " "tout un tas de raisons.)" -#: extending/extending.rst:176 +#: extending/extending.rst:174 msgid "" "To ignore an exception set by a function call that failed, the exception " "condition must be cleared explicitly by calling :c:func:`PyErr_Clear`. The " @@ -364,7 +362,7 @@ msgstr "" "l'interpréteur, mais souhaite la gérer lui-même (peut-être en essayant " "quelque chose d'autre, ou en prétendant que rien n'a mal tourné)." -#: extending/extending.rst:182 +#: extending/extending.rst:180 msgid "" "Every failing :c:func:`malloc` call must be turned into an exception --- the " "direct caller of :c:func:`malloc` (or :c:func:`realloc`) must call :c:func:" @@ -379,7 +377,7 @@ msgstr "" "`PyLong_FromLong`) le font déjà, donc cette note ne concerne que ceux qui " "appellent :c:func:`malloc` directement." -#: extending/extending.rst:188 +#: extending/extending.rst:186 msgid "" "Also note that, with the important exception of :c:func:`PyArg_ParseTuple` " "and friends, functions that return an integer status usually return a " @@ -391,7 +389,7 @@ msgstr "" "donnent généralement une valeur positive ou zéro en cas de succès et ``-1`` " "en cas d'échec, comme les appels du système Unix." -#: extending/extending.rst:192 +#: extending/extending.rst:190 msgid "" "Finally, be careful to clean up garbage (by making :c:func:`Py_XDECREF` or :" "c:func:`Py_DECREF` calls for objects you have already created) when you " @@ -401,7 +399,7 @@ msgstr "" "de nettoyage (en appelant :c:func:`Py_XDECREF` ou :c:func:`Py_DECREF` avec " "les objets que vous auriez déjà créés) !" -#: extending/extending.rst:196 +#: extending/extending.rst:194 msgid "" "The choice of which exception to raise is entirely yours. There are " "predeclared C objects corresponding to all built-in Python exceptions, such " @@ -425,7 +423,7 @@ msgstr "" "satisfaire d'autres conditions, :c:data:`PyExc_ValueError` sera plus " "appropriée." -#: extending/extending.rst:206 +#: extending/extending.rst:204 msgid "" "You can also define a new exception that is unique to your module. For this, " "you usually declare a static object variable at the beginning of your file::" @@ -433,7 +431,7 @@ msgstr "" "Vous pouvez également créer une exception spécifique à votre module. Pour " "cela, déclarez simplement une variable statique au début de votre fichier ::" -#: extending/extending.rst:211 +#: extending/extending.rst:209 msgid "" "and initialize it in your module's initialization function (:c:func:" "`PyInit_spam`) with an exception object::" @@ -441,7 +439,7 @@ msgstr "" "et initialisez-la dans la fonction d'initialisation de votre module (:c:func:" "`PyInit_spam`) avec un objet exception ::" -#: extending/extending.rst:235 +#: extending/extending.rst:233 msgid "" "Note that the Python name for the exception object is :exc:`spam.error`. " "The :c:func:`PyErr_NewException` function may create a class with the base " @@ -453,7 +451,7 @@ msgstr "" "`Exception` (à moins qu'une autre classe ne lui soit fournie à la place de " "``NULL``), voir :ref:`bltin-exceptions`." -#: extending/extending.rst:240 +#: extending/extending.rst:238 msgid "" "Note also that the :c:data:`SpamError` variable retains a reference to the " "newly created exception class; this is intentional! Since the exception " @@ -471,7 +469,7 @@ msgstr "" "code qui lève cette exception peut engendrer un *core dump* ou des effets " "secondaires inattendus." -#: extending/extending.rst:247 +#: extending/extending.rst:245 msgid "" "We discuss the use of ``PyMODINIT_FUNC`` as a function return type later in " "this sample." @@ -479,7 +477,7 @@ msgstr "" "Nous traiterons de l'utilisation de ``PyMODINIT_FUNC`` comme un type de " "renvoi de fonction plus tard dans cette section." -#: extending/extending.rst:250 +#: extending/extending.rst:248 msgid "" "The :exc:`spam.error` exception can be raised in your extension module using " "a call to :c:func:`PyErr_SetString` as shown below::" @@ -487,11 +485,11 @@ msgstr "" "L'exception :exc:`spam.error` peut être levée dans votre module d'extension " "en appelant :c:func:`PyErr_SetString` comme montré ci-dessous ::" -#: extending/extending.rst:273 +#: extending/extending.rst:271 msgid "Back to the Example" msgstr "Retour vers l'exemple" -#: extending/extending.rst:275 +#: extending/extending.rst:273 msgid "" "Going back to our example function, you should now be able to understand " "this statement::" @@ -499,7 +497,7 @@ msgstr "" "En revenant vers notre fonction exemple, vous devriez maintenant être " "capable de comprendre cette affirmation ::" -#: extending/extending.rst:281 +#: extending/extending.rst:279 msgid "" "It returns ``NULL`` (the error indicator for functions returning object " "pointers) if an error is detected in the argument list, relying on the " @@ -518,7 +516,7 @@ msgstr "" "Standard, la variable :c:data:`command` doit être clairement déclarée comme " "``const char *command``)." -#: extending/extending.rst:289 +#: extending/extending.rst:287 msgid "" "The next statement is a call to the Unix function :c:func:`system`, passing " "it the string we just got from :c:func:`PyArg_ParseTuple`::" @@ -527,7 +525,7 @@ msgstr "" "en lui passant la chaîne que nous venons d'obtenir à partir de :c:func:" "`PyArg_ParseTuple` ::" -#: extending/extending.rst:294 +#: extending/extending.rst:292 msgid "" "Our :func:`spam.system` function must return the value of :c:data:`sts` as a " "Python object. This is done using the function :c:func:`PyLong_FromLong`. ::" @@ -536,7 +534,7 @@ msgstr "" "comme un objet Python. Cela est effectué par l'utilisation de la fonction :c:" "func:`PyLong_FromLong`. ::" -#: extending/extending.rst:299 +#: extending/extending.rst:297 msgid "" "In this case, it will return an integer object. (Yes, even integers are " "objects on the heap in Python!)" @@ -544,7 +542,7 @@ msgstr "" "Dans ce cas, elle renverra un objet entier. (Oui, même les entiers sont des " "objets dans le tas en Python !)" -#: extending/extending.rst:302 +#: extending/extending.rst:300 msgid "" "If you have a C function that returns no useful argument (a function " "returning :c:type:`void`), the corresponding Python function must return " @@ -556,7 +554,7 @@ msgstr "" "renvoyer ``None``. Vous aurez besoin de cette locution pour cela (qui est " "implémentée par la macro :c:macro:`Py_RETURN_NONE`) ::" -#: extending/extending.rst:310 +#: extending/extending.rst:308 msgid "" ":c:data:`Py_None` is the C name for the special Python object ``None``. It " "is a genuine Python object rather than a ``NULL`` pointer, which means " @@ -567,11 +565,11 @@ msgstr "" "qui signifie qu'une erreur est survenue, dans la plupart des situations, " "comme nous l'avons vu." -#: extending/extending.rst:318 +#: extending/extending.rst:316 msgid "The Module's Method Table and Initialization Function" msgstr "La fonction d'initialisation et le tableau des méthodes du module" -#: extending/extending.rst:320 +#: extending/extending.rst:318 msgid "" "I promised to show how :c:func:`spam_system` is called from Python programs. " "First, we need to list its name and address in a \"method table\"::" @@ -580,7 +578,7 @@ msgstr "" "depuis les programmes Python. D'abord, nous avons besoin d'avoir son nom et " "son adresse dans un « tableau des méthodes » ::" -#: extending/extending.rst:331 +#: extending/extending.rst:329 msgid "" "Note the third entry (``METH_VARARGS``). This is a flag telling the " "interpreter the calling convention to be used for the C function. It should " @@ -594,7 +592,7 @@ msgstr "" "METH_KEYWORDS`` ; la valeur ``0`` indique qu'une variante obsolète de :c:" "func:`PyArg_ParseTuple` est utilisée." -#: extending/extending.rst:336 +#: extending/extending.rst:334 msgid "" "When using only ``METH_VARARGS``, the function should expect the Python-" "level parameters to be passed in as a tuple acceptable for parsing via :c:" @@ -605,7 +603,7 @@ msgstr "" "*via* :c:func:`PyArg_ParseTuple` ; des informations supplémentaires sont " "fournies plus bas." -#: extending/extending.rst:340 +#: extending/extending.rst:338 msgid "" "The :const:`METH_KEYWORDS` bit may be set in the third field if keyword " "arguments should be passed to the function. In this case, the C function " @@ -619,14 +617,14 @@ msgstr "" "dictionnaire des mots-clés. Utilisez :c:func:`PyArg_ParseTupleAndKeywords` " "pour analyser les arguments d'une telle fonction." -#: extending/extending.rst:346 +#: extending/extending.rst:344 msgid "" "The method table must be referenced in the module definition structure::" msgstr "" "Le tableau des méthodes doit être référencé dans la structure de définition " "du module ::" -#: extending/extending.rst:357 +#: extending/extending.rst:355 msgid "" "This structure, in turn, must be passed to the interpreter in the module's " "initialization function. The initialization function must be named :c:func:" @@ -638,7 +636,7 @@ msgstr "" "nommée :c:func:`PyInit_name`, où *nom* est le nom du module, et doit être le " "seul élément non ``static`` défini dans le fichier du module ::" -#: extending/extending.rst:368 +#: extending/extending.rst:366 msgid "" "Note that PyMODINIT_FUNC declares the function as ``PyObject *`` return " "type, declares any special linkage declarations required by the platform, " @@ -649,7 +647,7 @@ msgstr "" "spéciale requise par la plate-forme, et pour le C++ déclare la fonction " "comme un C ``extern``." -#: extending/extending.rst:372 +#: extending/extending.rst:370 msgid "" "When the Python program imports module :mod:`spam` for the first time, :c:" "func:`PyInit_spam` is called. (See below for comments about embedding " @@ -674,7 +672,7 @@ msgstr "" "manière satisfaisante. La fonction `*init* doit renvoyer l'objet module à " "son appelant, afin qu'il soit ensuite inséré dans ``sys.modules``." -#: extending/extending.rst:383 +#: extending/extending.rst:381 msgid "" "When embedding Python, the :c:func:`PyInit_spam` function is not called " "automatically unless there's an entry in the :c:data:`PyImport_Inittab` " @@ -687,7 +685,7 @@ msgstr "" "utilisez :c:func:`PyImport_AppendInittab`, suivi éventuellement d'une " "importation du module ::" -#: extending/extending.rst:427 +#: extending/extending.rst:425 msgid "" "Removing entries from ``sys.modules`` or importing compiled modules into " "multiple interpreters within a process (or following a :c:func:`fork` " @@ -702,7 +700,7 @@ msgstr "" "doivent faire preuve de prudence lorsqu'ils initialisent des structures de " "données internes." -#: extending/extending.rst:433 +#: extending/extending.rst:431 msgid "" "A more substantial example module is included in the Python source " "distribution as :file:`Modules/xxmodule.c`. This file may be used as a " @@ -712,7 +710,7 @@ msgstr "" "sources Python sous le nom :file:`Modules/xxmodule.c`. Ce fichier peut être " "utilisé comme modèle ou simplement lu comme exemple." -#: extending/extending.rst:439 +#: extending/extending.rst:437 msgid "" "Unlike our ``spam`` example, ``xxmodule`` uses *multi-phase initialization* " "(new in Python 3.5), where a PyModuleDef structure is returned from " @@ -725,11 +723,11 @@ msgstr "" "module est laissée au mécanisme d'importation. Pour plus de détails sur " "l'initialisation multi-phase, voir :PEP:`489`." -#: extending/extending.rst:448 +#: extending/extending.rst:446 msgid "Compilation and Linkage" msgstr "Compilation et liaison" -#: extending/extending.rst:450 +#: extending/extending.rst:448 msgid "" "There are two more things to do before you can use your new extension: " "compiling and linking it with the Python system. If you use dynamic " @@ -739,7 +737,7 @@ msgid "" "Windows (chapter :ref:`building-on-windows`) for more information about this." msgstr "" -#: extending/extending.rst:457 +#: extending/extending.rst:455 msgid "" "If you can't use dynamic loading, or if you want to make your module a " "permanent part of the Python interpreter, you will have to change the " @@ -749,7 +747,7 @@ msgid "" "line to the file :file:`Modules/Setup.local` describing your file:" msgstr "" -#: extending/extending.rst:468 +#: extending/extending.rst:466 msgid "" "and rebuild the interpreter by running :program:`make` in the toplevel " "directory. You can also run :program:`make` in the :file:`Modules/` " @@ -758,17 +756,17 @@ msgid "" "the :file:`Setup` file.)" msgstr "" -#: extending/extending.rst:474 +#: extending/extending.rst:472 msgid "" "If your module requires additional libraries to link with, these can be " "listed on the line in the configuration file as well, for instance:" msgstr "" -#: extending/extending.rst:485 +#: extending/extending.rst:483 msgid "Calling Python Functions from C" msgstr "Appeler des fonctions Python en C" -#: extending/extending.rst:487 +#: extending/extending.rst:485 msgid "" "So far we have concentrated on making C functions callable from Python. The " "reverse is also useful: calling Python functions from C. This is especially " @@ -779,7 +777,7 @@ msgid "" "uses are also imaginable." msgstr "" -#: extending/extending.rst:495 +#: extending/extending.rst:493 msgid "" "Fortunately, the Python interpreter is easily called recursively, and there " "is a standard interface to call a Python function. (I won't dwell on how to " @@ -788,7 +786,7 @@ msgid "" "line option in :file:`Modules/main.c` from the Python source code.)" msgstr "" -#: extending/extending.rst:501 +#: extending/extending.rst:499 msgid "" "Calling a Python function is easy. First, the Python program must somehow " "pass you the Python function object. You should provide a function (or some " @@ -798,7 +796,7 @@ msgid "" "function might be part of a module definition::" msgstr "" -#: extending/extending.rst:531 +#: extending/extending.rst:529 msgid "" "This function must be registered with the interpreter using the :const:" "`METH_VARARGS` flag; this is described in section :ref:`methodtable`. The :" @@ -810,7 +808,7 @@ msgstr "" "fonction :c:func:`PyArg_ParseTuple` et ses arguments sont documentés dans la " "section :ref:`parsetuple`." -#: extending/extending.rst:536 +#: extending/extending.rst:534 msgid "" "The macros :c:func:`Py_XINCREF` and :c:func:`Py_XDECREF` increment/decrement " "the reference count of an object and are safe in the presence of ``NULL`` " @@ -823,7 +821,7 @@ msgstr "" "dans ce contexte). Plus d'informations à ce sujet dans la section :ref:" "`refcounts`." -#: extending/extending.rst:543 +#: extending/extending.rst:541 msgid "" "Later, when it is time to call the function, you call the C function :c:func:" "`PyObject_CallObject`. This function has two arguments, both pointers to " @@ -835,7 +833,7 @@ msgid "" "or more format codes between parentheses. For example::" msgstr "" -#: extending/extending.rst:563 +#: extending/extending.rst:561 msgid "" ":c:func:`PyObject_CallObject` returns a Python object pointer: this is the " "return value of the Python function. :c:func:`PyObject_CallObject` is " @@ -844,7 +842,7 @@ msgid "" "`Py_DECREF`\\ -ed immediately after the :c:func:`PyObject_CallObject` call." msgstr "" -#: extending/extending.rst:570 +#: extending/extending.rst:568 msgid "" "The return value of :c:func:`PyObject_CallObject` is \"new\": either it is a " "brand new object, or it is an existing object whose reference count has been " @@ -853,7 +851,7 @@ msgid "" "not interested in its value." msgstr "" -#: extending/extending.rst:576 +#: extending/extending.rst:574 msgid "" "Before you do this, however, it is important to check that the return value " "isn't ``NULL``. If it is, the Python function terminated by raising an " @@ -873,7 +871,7 @@ msgstr "" "souhaitable, l'exception doit être effacée en appelant :c:func:" "`PyErr_Clear`. Par exemple ::" -#: extending/extending.rst:589 +#: extending/extending.rst:587 msgid "" "Depending on the desired interface to the Python callback function, you may " "also have to provide an argument list to :c:func:`PyObject_CallObject`. In " @@ -895,7 +893,7 @@ msgstr "" "`Py_BuildValue`. Par exemple, si vous voulez passer un code d'événement " "intégral, vous pouvez utiliser le code suivant ::" -#: extending/extending.rst:608 +#: extending/extending.rst:606 msgid "" "Note the placement of ``Py_DECREF(arglist)`` immediately after the call, " "before the error check! Also note that strictly speaking this code is not " @@ -903,7 +901,7 @@ msgid "" "checked." msgstr "" -#: extending/extending.rst:612 +#: extending/extending.rst:610 msgid "" "You may also call a function with keyword arguments by using :c:func:" "`PyObject_Call`, which supports arguments and keyword arguments. As in the " @@ -914,15 +912,15 @@ msgstr "" "arguments nommés. Comme dans l'exemple ci-dessus, nous utilisons :c:func:" "`Py_BuildValue` pour construire le dictionnaire. ::" -#: extending/extending.rst:630 +#: extending/extending.rst:628 msgid "Extracting Parameters in Extension Functions" msgstr "Extraire des paramètres dans des fonctions d'extension" -#: extending/extending.rst:634 +#: extending/extending.rst:632 msgid "The :c:func:`PyArg_ParseTuple` function is declared as follows::" msgstr "La fonction :c:func:`PyArg_ParseTuple` est déclarée ainsi ::" -#: extending/extending.rst:638 +#: extending/extending.rst:636 msgid "" "The *arg* argument must be a tuple object containing an argument list passed " "from Python to a C function. The *format* argument must be a format string, " @@ -931,7 +929,7 @@ msgid "" "whose type is determined by the format string." msgstr "" -#: extending/extending.rst:644 +#: extending/extending.rst:642 msgid "" "Note that while :c:func:`PyArg_ParseTuple` checks that the Python arguments " "have the required types, it cannot check the validity of the addresses of C " @@ -939,7 +937,7 @@ msgid "" "probably crash or at least overwrite random bits in memory. So be careful!" msgstr "" -#: extending/extending.rst:649 +#: extending/extending.rst:647 msgid "" "Note that any Python object references which are provided to the caller are " "*borrowed* references; do not decrement their reference count!" @@ -948,21 +946,21 @@ msgstr "" "à l'appelant sont des références *empruntées* ; ne décrémentez pas leur " "compteur de références !" -#: extending/extending.rst:652 +#: extending/extending.rst:650 msgid "Some example calls::" msgstr "Quelques exemples d'appels ::" -#: extending/extending.rst:722 +#: extending/extending.rst:720 msgid "Keyword Parameters for Extension Functions" msgstr "Paramètres nommés pour des fonctions d'extension" -#: extending/extending.rst:726 +#: extending/extending.rst:724 msgid "" "The :c:func:`PyArg_ParseTupleAndKeywords` function is declared as follows::" msgstr "" "La fonction :c:func:`PyArg_ParseTupleAndKeywords` est déclarée ainsi ::" -#: extending/extending.rst:731 +#: extending/extending.rst:729 msgid "" "The *arg* and *format* parameters are identical to those of the :c:func:" "`PyArg_ParseTuple` function. The *kwdict* parameter is the dictionary of " @@ -982,7 +980,7 @@ msgstr "" "processus, :c:func:`PyArg_ParseTupleAndKeywords` renvoie vrai, sinon il " "renvoie faux et lève une exception appropriée." -#: extending/extending.rst:741 +#: extending/extending.rst:739 msgid "" "Nested tuples cannot be parsed when using keyword arguments! Keyword " "parameters passed in which are not present in the *kwlist* will cause :exc:" @@ -992,7 +990,7 @@ msgstr "" "arguments de type mot-clé ! Ceux-ci doivent apparaître dans dans *kwlist*, " "dans le cas contraire une exception :exc:`TypeError` est levée." -#: extending/extending.rst:747 +#: extending/extending.rst:745 msgid "" "Here is an example module which uses keywords, based on an example by Geoff " "Philbrick (philbrick@hks.com)::" @@ -1000,11 +998,11 @@ msgstr "" "Voici un exemple de module qui utilise des mots-clés, basé sur un exemple de " "*Geoff Philbrick* (philbrick@hks.com) ::" -#: extending/extending.rst:802 +#: extending/extending.rst:800 msgid "Building Arbitrary Values" msgstr "Créer des valeurs arbitraires" -#: extending/extending.rst:804 +#: extending/extending.rst:802 msgid "" "This function is the counterpart to :c:func:`PyArg_ParseTuple`. It is " "declared as follows::" @@ -1012,7 +1010,7 @@ msgstr "" "Cette fonction est le complément de :c:func:`PyArg_ParseTuple`. Elle est " "déclarée comme suit ::" -#: extending/extending.rst:809 +#: extending/extending.rst:807 msgid "" "It recognizes a set of format units similar to the ones recognized by :c:" "func:`PyArg_ParseTuple`, but the arguments (which are input to the function, " @@ -1025,7 +1023,7 @@ msgstr "" "mais juste des valeurs. Il renvoie un nouvel objet Python, adapté pour être " "renvoyé par une fonction C appelée depuis Python." -#: extending/extending.rst:814 +#: extending/extending.rst:812 #, fuzzy msgid "" "One difference with :c:func:`PyArg_ParseTuple`: while the latter requires " @@ -1041,17 +1039,17 @@ msgstr "" "dernier nécessite que son premier argument soit un *n*-uplet (puisque les " "listes d'arguments Python sont toujours représentées par des *n*-uplets en " -#: extending/extending.rst:822 +#: extending/extending.rst:820 msgid "" "Examples (to the left the call, to the right the resulting Python value):" msgstr "" "Exemples (à gauche l'appel, à droite la valeur résultante, en Python) :" -#: extending/extending.rst:848 +#: extending/extending.rst:846 msgid "Reference Counts" msgstr "Compteurs de références" -#: extending/extending.rst:850 +#: extending/extending.rst:848 msgid "" "In languages like C or C++, the programmer is responsible for dynamic " "allocation and deallocation of memory on the heap. In C, this is done using " @@ -1066,7 +1064,7 @@ msgstr "" "essentiellement la même signification et nous limiterons la discussion " "suivante au cas du C." -#: extending/extending.rst:856 +#: extending/extending.rst:854 msgid "" "Every block of memory allocated with :c:func:`malloc` should eventually be " "returned to the pool of available memory by exactly one call to :c:func:" @@ -1081,7 +1079,7 @@ msgid "" "crashes." msgstr "" -#: extending/extending.rst:867 +#: extending/extending.rst:865 msgid "" "Common causes of memory leaks are unusual paths through the code. For " "instance, a function may allocate a block of memory, do some calculation, " @@ -1098,7 +1096,7 @@ msgid "" "of errors." msgstr "" -#: extending/extending.rst:880 +#: extending/extending.rst:878 msgid "" "Since Python makes heavy use of :c:func:`malloc` and :c:func:`free`, it " "needs a strategy to avoid memory leaks as well as the use of freed memory. " @@ -1117,7 +1115,7 @@ msgstr "" "supprimée. Lorsque le compteur atteint zéro, la dernière référence à l'objet " "a été supprimée et l'objet est libéré." -#: extending/extending.rst:888 +#: extending/extending.rst:886 msgid "" "An alternative strategy is called :dfn:`automatic garbage collection`. " "(Sometimes, reference counting is also referred to as a garbage collection " @@ -1146,7 +1144,7 @@ msgstr "" "ramasse-miettes suffisamment portable sera disponible pour C. D'ici là, nous " "devrons utiliser les compteurs des références." -#: extending/extending.rst:900 +#: extending/extending.rst:898 msgid "" "While Python uses the traditional reference counting implementation, it also " "offers a cycle detector that works to detect reference cycles. This allows " @@ -1172,7 +1170,7 @@ msgstr "" "référencés à partir des objets dans le cycle, même s'il n'y a pas d'autres " "références au cycle lui-même." -#: extending/extending.rst:911 +#: extending/extending.rst:909 msgid "" "The cycle detector is able to detect garbage cycles and can reclaim them. " "The :mod:`gc` module exposes a way to run the detector (the :func:`~gc." @@ -1184,11 +1182,11 @@ msgid "" "detector is disabled in this way, the :mod:`gc` module will not be available." msgstr "" -#: extending/extending.rst:925 +#: extending/extending.rst:923 msgid "Reference Counting in Python" msgstr "Comptage de références en Python" -#: extending/extending.rst:927 +#: extending/extending.rst:925 msgid "" "There are two macros, ``Py_INCREF(x)`` and ``Py_DECREF(x)``, which handle " "the incrementing and decrementing of the reference count. :c:func:" @@ -1206,7 +1204,7 @@ msgstr "" "objet` de l'objet. À cette fin (et pour d'autres), chaque objet contient " "également un pointeur vers son objet type." -#: extending/extending.rst:934 +#: extending/extending.rst:932 msgid "" "The big question now remains: when to use ``Py_INCREF(x)`` and " "``Py_DECREF(x)``? Let's first introduce some terms. Nobody \"owns\" an " @@ -1229,7 +1227,7 @@ msgstr "" "c:func:`Py_DECREF`. Oublier de se débarrasser d'une référence crée une fuite " "de mémoire." -#: extending/extending.rst:943 +#: extending/extending.rst:941 msgid "" "It is also possible to :dfn:`borrow` [#]_ a reference to an object. The " "borrower of a reference should not call :c:func:`Py_DECREF`. The borrower " @@ -1238,7 +1236,7 @@ msgid "" "risks using freed memory and should be avoided completely [#]_." msgstr "" -#: extending/extending.rst:949 +#: extending/extending.rst:947 msgid "" "The advantage of borrowing over owning a reference is that you don't need to " "take care of disposing of the reference on all possible paths through the " @@ -1257,7 +1255,7 @@ msgstr "" "correct, une référence empruntée peut être utilisée après que le " "propriétaire auquel elle a été empruntée l'a en fait éliminée." -#: extending/extending.rst:957 +#: extending/extending.rst:955 msgid "" "A borrowed reference can be changed into an owned reference by calling :c:" "func:`Py_INCREF`. This does not affect the status of the owner from which " @@ -1266,11 +1264,11 @@ msgid "" "properly, as well as the previous owner)." msgstr "" -#: extending/extending.rst:967 +#: extending/extending.rst:965 msgid "Ownership Rules" msgstr "Règles concernant la propriété de références" -#: extending/extending.rst:969 +#: extending/extending.rst:967 msgid "" "Whenever an object reference is passed into or out of a function, it is part " "of the function's interface specification whether ownership is transferred " @@ -1281,7 +1279,7 @@ msgstr "" "l'interface de la fonction, peu importe que la propriété soit transférée " "avec la référence ou non." -#: extending/extending.rst:973 +#: extending/extending.rst:971 msgid "" "Most functions that return a reference to an object pass on ownership with " "the reference. In particular, all functions whose function it is to create " @@ -1292,7 +1290,7 @@ msgid "" "reference to a cached item." msgstr "" -#: extending/extending.rst:981 +#: extending/extending.rst:979 msgid "" "Many functions that extract objects from other objects also transfer " "ownership with the reference, for instance :c:func:" @@ -1303,14 +1301,14 @@ msgid "" "list or dictionary." msgstr "" -#: extending/extending.rst:988 +#: extending/extending.rst:986 msgid "" "The function :c:func:`PyImport_AddModule` also returns a borrowed reference, " "even though it may actually create the object it returns: this is possible " "because an owned reference to the object is stored in ``sys.modules``." msgstr "" -#: extending/extending.rst:992 +#: extending/extending.rst:990 msgid "" "When you pass an object reference into another function, in general, the " "function borrows the reference from you --- if it needs to store it, it will " @@ -1321,7 +1319,7 @@ msgid "" "don't take over ownership --- they are \"normal.\")" msgstr "" -#: extending/extending.rst:1000 +#: extending/extending.rst:998 msgid "" "When a C function is called from Python, it borrows references to its " "arguments from the caller. The caller owns a reference to the object, so " @@ -1330,18 +1328,18 @@ msgid "" "turned into an owned reference by calling :c:func:`Py_INCREF`." msgstr "" -#: extending/extending.rst:1006 +#: extending/extending.rst:1004 msgid "" "The object reference returned from a C function that is called from Python " "must be an owned reference --- ownership is transferred from the function to " "its caller." msgstr "" -#: extending/extending.rst:1014 +#: extending/extending.rst:1012 msgid "Thin Ice" msgstr "Terrain dangereux" -#: extending/extending.rst:1016 +#: extending/extending.rst:1014 msgid "" "There are a few situations where seemingly harmless use of a borrowed " "reference can lead to problems. These all have to do with implicit " @@ -1353,7 +1351,7 @@ msgstr "" "lien avec des invocations implicites de l’interpréteur, et peuvent amener le " "propriétaire d'une référence à s'en défaire." -#: extending/extending.rst:1020 +#: extending/extending.rst:1018 msgid "" "The first and most important case to know about is using :c:func:`Py_DECREF` " "on an unrelated object while borrowing a reference to a list item. For " @@ -1363,7 +1361,7 @@ msgstr "" "de :c:func:`Py_DECREF` à un objet non relié, tout en empruntant une " "référence à un élément de liste. Par exemple ::" -#: extending/extending.rst:1032 +#: extending/extending.rst:1030 msgid "" "This function first borrows a reference to ``list[0]``, then replaces " "``list[1]`` with the value ``0``, and finally prints the borrowed reference. " @@ -1373,7 +1371,7 @@ msgstr "" "``list[1]`` par la valeur ``0``, et enfin affiche la référence empruntée. " "Ça a l'air inoffensif, n'est-ce pas ? Mais ce n'est pas le cas !" -#: extending/extending.rst:1036 +#: extending/extending.rst:1034 msgid "" "Let's follow the control flow into :c:func:`PyList_SetItem`. The list owns " "references to all its items, so when item 1 is replaced, it has to dispose " @@ -1390,7 +1388,7 @@ msgstr "" "meth:`__del__`. Si l'instance de cette classe a un nombre des références de " "1, sa destruction appellera sa méthode :meth:`__del__`." -#: extending/extending.rst:1043 +#: extending/extending.rst:1041 msgid "" "Since it is written in Python, the :meth:`__del__` method can execute " "arbitrary Python code. Could it perhaps do something to invalidate the " @@ -1408,20 +1406,20 @@ msgstr "" "supposant que ce soit la dernière référence à cet objet, elle libérerait la " "mémoire qui lui est associée, invalidant ainsi ``item``." -#: extending/extending.rst:1051 +#: extending/extending.rst:1049 msgid "" "The solution, once you know the source of the problem, is easy: temporarily " "increment the reference count. The correct version of the function reads::" msgstr "" -#: extending/extending.rst:1065 +#: extending/extending.rst:1063 msgid "" "This is a true story. An older version of Python contained variants of this " "bug and someone spent a considerable amount of time in a C debugger to " "figure out why his :meth:`__del__` methods would fail..." msgstr "" -#: extending/extending.rst:1069 +#: extending/extending.rst:1067 msgid "" "The second case of problems with a borrowed reference is a variant involving " "threads. Normally, multiple threads in the Python interpreter can't get in " @@ -1444,11 +1442,11 @@ msgstr "" "processeur en attendant que les E/S soient terminées. Évidemment, la " "fonction suivante a le même problème que la précédente ::" -#: extending/extending.rst:1092 +#: extending/extending.rst:1090 msgid "NULL Pointers" msgstr "Pointeurs ``NULL``" -#: extending/extending.rst:1094 +#: extending/extending.rst:1092 msgid "" "In general, functions that take object references as arguments do not expect " "you to pass them ``NULL`` pointers, and will dump core (or cause later core " @@ -1470,7 +1468,7 @@ msgstr "" "devait tester pour ``NULL``, il y aurait beaucoup de tests redondants et le " "code s'exécuterait plus lentement." -#: extending/extending.rst:1102 +#: extending/extending.rst:1100 msgid "" "It is better to test for ``NULL`` only at the \"source:\" when a pointer " "that may be ``NULL`` is received, for example, from :c:func:`malloc` or from " @@ -1480,7 +1478,7 @@ msgstr "" "lorsqu'un pointeur qui peut être ``NULL`` est reçu, par exemple, de :c:func:" "`malloc` ou d'une fonction qui peut lever une exception." -#: extending/extending.rst:1106 +#: extending/extending.rst:1104 msgid "" "The macros :c:func:`Py_INCREF` and :c:func:`Py_DECREF` do not check for " "``NULL`` pointers --- however, their variants :c:func:`Py_XINCREF` and :c:" @@ -1490,7 +1488,7 @@ msgstr "" "pointeurs ``NULL``. Cependant, leurs variantes :c:func:`Py_XINCREF` et :c:" "func:`Py_XDECREF` le font." -#: extending/extending.rst:1110 +#: extending/extending.rst:1108 msgid "" "The macros for checking for a particular object type (``Pytype_Check()``) " "don't check for ``NULL`` pointers --- again, there is much code that calls " @@ -1499,7 +1497,7 @@ msgid "" "variants with ``NULL`` checking." msgstr "" -#: extending/extending.rst:1116 +#: extending/extending.rst:1114 msgid "" "The C function calling mechanism guarantees that the argument list passed to " "C functions (``args`` in the examples) is never ``NULL`` --- in fact it " @@ -1509,7 +1507,7 @@ msgstr "" "aux fonctions C (``args`` dans les exemples) n'est jamais ``NULL``. En fait, " "il garantit qu'il s'agit toujours d'un n-uplet [#]_." -#: extending/extending.rst:1120 +#: extending/extending.rst:1118 msgid "" "It is a severe error to ever let a ``NULL`` pointer \"escape\" to the Python " "user." @@ -1517,11 +1515,11 @@ msgstr "" "C'est une grave erreur de laisser un pointeur ``NULL`` \"échapper\" à " "l'utilisateur Python." -#: extending/extending.rst:1131 +#: extending/extending.rst:1129 msgid "Writing Extensions in C++" msgstr "Écrire des extensions en C++" -#: extending/extending.rst:1133 +#: extending/extending.rst:1131 msgid "" "It is possible to write extension modules in C++. Some restrictions apply. " "If the main program (the Python interpreter) is compiled and linked by the C " @@ -1545,11 +1543,11 @@ msgstr "" "``__cplusplus`` est défini (tous les compilateurs C++ récents définissent ce " "symbole)." -#: extending/extending.rst:1147 +#: extending/extending.rst:1145 msgid "Providing a C API for an Extension Module" msgstr "Fournir une API en langage C pour un module d'extension" -#: extending/extending.rst:1152 +#: extending/extending.rst:1150 msgid "" "Many extension modules just provide new functions and types to be used from " "Python, but sometimes the code in an extension module can be useful for " @@ -1569,7 +1567,7 @@ msgstr "" "collection devrait posséder un ensemble de fonctions C pour une manipulation " "directe à partir d'autres modules d'extension." -#: extending/extending.rst:1160 +#: extending/extending.rst:1158 msgid "" "At first sight this seems easy: just write the functions (without declaring " "them ``static``, of course), provide an appropriate header file, and " @@ -1599,7 +1597,7 @@ msgstr "" "*Unix*). Et même si les symboles sont globalement visibles, le module dont " "on souhaite appeler les fonctions n'est peut-être pas encore chargé !" -#: extending/extending.rst:1172 +#: extending/extending.rst:1170 msgid "" "Portability therefore requires not to make any assumptions about symbol " "visibility. This means that all symbols in extension modules should be " @@ -1617,7 +1615,7 @@ msgstr "" "accessibles à partir d'autres modules d'extension doivent être exportés " "d'une manière différente." -#: extending/extending.rst:1179 +#: extending/extending.rst:1177 msgid "" "Python provides a special mechanism to pass C-level information (pointers) " "from one extension module to another one: Capsules. A Capsule is a Python " @@ -1629,7 +1627,7 @@ msgid "" "the Capsule." msgstr "" -#: extending/extending.rst:1187 +#: extending/extending.rst:1185 msgid "" "There are many ways in which Capsules can be used to export the C API of an " "extension module. Each function could get its own Capsule, or all C API " @@ -1646,7 +1644,7 @@ msgstr "" "différentes manières entre le module fournissant le code et les modules " "clients." -#: extending/extending.rst:1193 +#: extending/extending.rst:1191 #, fuzzy msgid "" "Whichever method you choose, it's important to name your Capsules properly. " @@ -1664,13 +1662,13 @@ msgstr "" "concernant un éventuel conflit de types, car il n'y a pas de moyen de " "distinguer deux ou plusieurs Capsules non nommée entre elles." -#: extending/extending.rst:1200 +#: extending/extending.rst:1198 msgid "" "In particular, Capsules used to expose C APIs should be given a name " "following this convention::" msgstr "" -#: extending/extending.rst:1205 +#: extending/extending.rst:1203 #, fuzzy msgid "" "The convenience function :c:func:`PyCapsule_Import` makes it easy to load a " @@ -1684,7 +1682,7 @@ msgstr "" "utilisateurs d'API C un degré élevé de certitude que la Capsule qu'ils " "chargent contient l'API C correcte." -#: extending/extending.rst:1210 +#: extending/extending.rst:1208 msgid "" "The following example demonstrates an approach that puts most of the burden " "on the writer of the exporting module, which is appropriate for commonly " @@ -1703,7 +1701,7 @@ msgstr "" "le module et de récupérer ses pointeurs d'API C. Les modules clients n'ont " "qu'à appeler cette macro avant d'accéder à l'API C." -#: extending/extending.rst:1218 +#: extending/extending.rst:1216 msgid "" "The exporting module is a modification of the :mod:`spam` module from " "section :ref:`extending-simpleexample`. The function :func:`spam.system` " @@ -1720,25 +1718,25 @@ msgstr "" "Cette fonction :c:func:`PySpam_System` est également exportée vers d'autres " "modules d'extension." -#: extending/extending.rst:1225 +#: extending/extending.rst:1223 msgid "" "The function :c:func:`PySpam_System` is a plain C function, declared " "``static`` like everything else::" msgstr "" -#: extending/extending.rst:1234 +#: extending/extending.rst:1232 msgid "The function :c:func:`spam_system` is modified in a trivial way::" msgstr "La fonction :c:func:`spam_system` est modifiée de manière simple ::" -#: extending/extending.rst:1248 +#: extending/extending.rst:1246 msgid "In the beginning of the module, right after the line ::" msgstr "Au début du module, immédiatement après la ligne ::" -#: extending/extending.rst:1252 +#: extending/extending.rst:1250 msgid "two more lines must be added::" msgstr "on doit ajouter deux lignes supplémentaires ::" -#: extending/extending.rst:1257 +#: extending/extending.rst:1255 msgid "" "The ``#define`` is used to tell the header file that it is being included in " "the exporting module, not a client module. Finally, the module's " @@ -1750,7 +1748,7 @@ msgstr "" "Enfin, la fonction d'initialisation du module doit prendre en charge " "l'initialisation du tableau de pointeurs de l'API C ::" -#: extending/extending.rst:1287 +#: extending/extending.rst:1285 msgid "" "Note that ``PySpam_API`` is declared ``static``; otherwise the pointer array " "would disappear when :func:`PyInit_spam` terminates!" @@ -1758,7 +1756,7 @@ msgstr "" "Notez que ``PySpam_API`` est déclaré ``static`` ; sinon le tableau de " "pointeurs disparaîtrait lorsque :func:`PyInit_spam`` se finit !" -#: extending/extending.rst:1290 +#: extending/extending.rst:1288 msgid "" "The bulk of the work is in the header file :file:`spammodule.h`, which looks " "like this::" @@ -1766,7 +1764,7 @@ msgstr "" "L'essentiel du travail se trouve dans le fichier d'en-tête :file:`spammodule." "h`, qui ressemble à ceci ::" -#: extending/extending.rst:1341 +#: extending/extending.rst:1339 msgid "" "All that a client module must do in order to have access to the function :c:" "func:`PySpam_System` is to call the function (or rather macro) :c:func:" @@ -1776,7 +1774,7 @@ msgstr "" "func:`PySpam_System` est d'appeler la fonction (ou plutôt la macro) :c:func:" "`import_spam` dans sa fonction d'initialisation ::" -#: extending/extending.rst:1359 +#: extending/extending.rst:1357 msgid "" "The main disadvantage of this approach is that the file :file:`spammodule.h` " "is rather complicated. However, the basic structure is the same for each " @@ -1787,7 +1785,7 @@ msgstr "" "même pour chaque fonction exportée, ce qui fait qu'elle ne doit être apprise " "qu'une seule fois." -#: extending/extending.rst:1363 +#: extending/extending.rst:1361 msgid "" "Finally it should be mentioned that Capsules offer additional functionality, " "which is especially useful for memory allocation and deallocation of the " @@ -1804,11 +1802,11 @@ msgstr "" "file:`Include/pycapsule.h` et :file:`Objects/pycapsule.c` dans la " "distribution du code source Python)." -#: extending/extending.rst:1371 +#: extending/extending.rst:1369 msgid "Footnotes" msgstr "Notes" -#: extending/extending.rst:1372 +#: extending/extending.rst:1370 msgid "" "An interface for this function already exists in the standard module :mod:" "`os` --- it was chosen as a simple and straightforward example." @@ -1816,7 +1814,7 @@ msgstr "" "Une interface pour cette fonction existe déjà dans le module standard :mod:" "`os`, elle a été choisie comme un exemple simple et direct." -#: extending/extending.rst:1375 +#: extending/extending.rst:1373 msgid "" "The metaphor of \"borrowing\" a reference is not completely correct: the " "owner still has a copy of the reference." @@ -1824,7 +1822,7 @@ msgstr "" "L'expression « emprunter une référence » n'est pas tout à fait correcte, car " "le propriétaire a toujours une copie de la référence." -#: extending/extending.rst:1378 +#: extending/extending.rst:1376 msgid "" "Checking that the reference count is at least 1 **does not work** --- the " "reference count itself could be in freed memory and may thus be reused for " @@ -1834,7 +1832,7 @@ msgstr "" "pas**, le compte de référence lui-même pourrait être en mémoire libérée et " "peut donc être réutilisé pour un autre objet !" -#: extending/extending.rst:1382 +#: extending/extending.rst:1380 msgid "" "These guarantees don't hold when you use the \"old\" style calling " "convention --- this is still found in much existing code." diff --git a/extending/newtypes.po b/extending/newtypes.po index 8b66b30ef1..9a3b9e9924 100644 --- a/extending/newtypes.po +++ b/extending/newtypes.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-24 17:33+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-02-07 20:03+0100\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -94,7 +94,13 @@ msgid "" "of this function::" msgstr "" -#: extending/newtypes.rst:83 +#: extending/newtypes.rst:79 +msgid "" +"If your type supports garbage collection, the destructor should call :c:func:" +"`PyObject_GC_UnTrack` before clearing any member fields::" +msgstr "" + +#: extending/newtypes.rst:95 msgid "" "One important requirement of the deallocator function is that it leaves any " "pending exceptions alone. This is important since deallocators are " @@ -109,7 +115,7 @@ msgid "" "c:func:`PyErr_Fetch` and :c:func:`PyErr_Restore` functions::" msgstr "" -#: extending/newtypes.rst:122 +#: extending/newtypes.rst:134 msgid "" "There are limitations to what you can safely do in a deallocator function. " "First, if your type supports garbage collection (using :c:member:" @@ -122,43 +128,43 @@ msgid "" "tp_dealloc` again, causing a double free and a crash." msgstr "" -#: extending/newtypes.rst:131 +#: extending/newtypes.rst:143 msgid "" "Starting with Python 3.4, it is recommended not to put any complex " "finalization code in :c:member:`~PyTypeObject.tp_dealloc`, and instead use " "the new :c:member:`~PyTypeObject.tp_finalize` type method." msgstr "" -#: extending/newtypes.rst:136 +#: extending/newtypes.rst:148 msgid ":pep:`442` explains the new finalization scheme." msgstr ":pep:`442` explique le nouveau schéma de finalisation." -#: extending/newtypes.rst:143 +#: extending/newtypes.rst:155 msgid "Object Presentation" msgstr "Présentation de l'objet" -#: extending/newtypes.rst:145 +#: extending/newtypes.rst:157 msgid "" "In Python, there are two ways to generate a textual representation of an " "object: the :func:`repr` function, and the :func:`str` function. (The :func:" "`print` function just calls :func:`str`.) These handlers are both optional." msgstr "" -#: extending/newtypes.rst:154 +#: extending/newtypes.rst:166 msgid "" "The :c:member:`~PyTypeObject.tp_repr` handler should return a string object " "containing a representation of the instance for which it is called. Here is " "a simple example::" msgstr "" -#: extending/newtypes.rst:165 +#: extending/newtypes.rst:177 msgid "" "If no :c:member:`~PyTypeObject.tp_repr` handler is specified, the " "interpreter will supply a representation that uses the type's :c:member:" "`~PyTypeObject.tp_name` and a uniquely-identifying value for the object." msgstr "" -#: extending/newtypes.rst:169 +#: extending/newtypes.rst:181 msgid "" "The :c:member:`~PyTypeObject.tp_str` handler is to :func:`str` what the :c:" "member:`~PyTypeObject.tp_repr` handler described above is to :func:`repr`; " @@ -169,15 +175,15 @@ msgid "" "the :c:member:`~PyTypeObject.tp_repr` handler is used instead." msgstr "" -#: extending/newtypes.rst:176 +#: extending/newtypes.rst:188 msgid "Here is a simple example::" msgstr "Voici un exemple simple ::" -#: extending/newtypes.rst:188 +#: extending/newtypes.rst:200 msgid "Attribute Management" msgstr "Gestion des attributs" -#: extending/newtypes.rst:190 +#: extending/newtypes.rst:202 msgid "" "For every object which can support attributes, the corresponding type must " "provide the functions that control how the attributes are resolved. There " @@ -187,7 +193,7 @@ msgid "" "handler is ``NULL``." msgstr "" -#: extending/newtypes.rst:196 +#: extending/newtypes.rst:208 msgid "" "Python supports two pairs of attribute handlers; a type that supports " "attributes only needs to implement the functions for one pair. The " @@ -196,7 +202,7 @@ msgid "" "use whichever pair makes more sense for the implementation's convenience. ::" msgstr "" -#: extending/newtypes.rst:208 +#: extending/newtypes.rst:220 msgid "" "If accessing attributes of an object is always a simple operation (this will " "be explained shortly), there are generic implementations which can be used " @@ -207,17 +213,17 @@ msgid "" "mechanism that is available." msgstr "" -#: extending/newtypes.rst:219 +#: extending/newtypes.rst:231 msgid "Generic Attribute Management" msgstr "Gestion des attributs génériques" -#: extending/newtypes.rst:221 +#: extending/newtypes.rst:233 msgid "" "Most extension types only use *simple* attributes. So, what makes the " "attributes simple? There are only a couple of conditions that must be met:" msgstr "" -#: extending/newtypes.rst:224 +#: extending/newtypes.rst:236 msgid "" "The name of the attributes must be known when :c:func:`PyType_Ready` is " "called." @@ -225,19 +231,19 @@ msgstr "" "Le nom des attributs doivent être déjà connus lorsqu'on lance :c:func:" "`PyType_Ready`." -#: extending/newtypes.rst:227 +#: extending/newtypes.rst:239 msgid "" "No special processing is needed to record that an attribute was looked up or " "set, nor do actions need to be taken based on the value." msgstr "" -#: extending/newtypes.rst:230 +#: extending/newtypes.rst:242 msgid "" "Note that this list does not place any restrictions on the values of the " "attributes, when the values are computed, or how relevant data is stored." msgstr "" -#: extending/newtypes.rst:233 +#: extending/newtypes.rst:245 msgid "" "When :c:func:`PyType_Ready` is called, it uses three tables referenced by " "the type object to create :term:`descriptor`\\s which are placed in the " @@ -249,19 +255,19 @@ msgid "" "``NULL`` as well, allowing the base type to handle attributes." msgstr "" -#: extending/newtypes.rst:241 +#: extending/newtypes.rst:253 msgid "The tables are declared as three fields of the type object::" msgstr "" "Les tables sont déclarées sous la forme de trois champs de type objet ::" -#: extending/newtypes.rst:247 +#: extending/newtypes.rst:259 msgid "" "If :c:member:`~PyTypeObject.tp_methods` is not ``NULL``, it must refer to an " "array of :c:type:`PyMethodDef` structures. Each entry in the table is an " "instance of this structure::" msgstr "" -#: extending/newtypes.rst:258 +#: extending/newtypes.rst:270 msgid "" "One entry should be defined for each method provided by the type; no entries " "are needed for methods inherited from a base type. One additional entry is " @@ -269,7 +275,7 @@ msgid "" "attr:`ml_name` field of the sentinel must be ``NULL``." msgstr "" -#: extending/newtypes.rst:263 +#: extending/newtypes.rst:275 msgid "" "The second table is used to define attributes which map directly to data " "stored in the instance. A variety of primitive C types are supported, and " @@ -277,7 +283,7 @@ msgid "" "defined as::" msgstr "" -#: extending/newtypes.rst:275 +#: extending/newtypes.rst:287 msgid "" "For each entry in the table, a :term:`descriptor` will be constructed and " "added to the type which will be able to extract a value from the instance " @@ -288,53 +294,53 @@ msgid "" "accessed." msgstr "" -#: extending/newtypes.rst:282 +#: extending/newtypes.rst:294 msgid "" "The following flag constants are defined in :file:`structmember.h`; they may " "be combined using bitwise-OR." msgstr "" -#: extending/newtypes.rst:286 +#: extending/newtypes.rst:298 msgid "Constant" msgstr "Constante" -#: extending/newtypes.rst:286 +#: extending/newtypes.rst:298 msgid "Meaning" msgstr "Signification" -#: extending/newtypes.rst:288 +#: extending/newtypes.rst:300 msgid ":const:`READONLY`" msgstr ":const:`READONLY`" -#: extending/newtypes.rst:288 +#: extending/newtypes.rst:300 msgid "Never writable." msgstr "Jamais disponible en écriture." -#: extending/newtypes.rst:290 +#: extending/newtypes.rst:302 msgid ":const:`READ_RESTRICTED`" msgstr ":const:`READ_RESTRICTED`" -#: extending/newtypes.rst:290 +#: extending/newtypes.rst:302 msgid "Not readable in restricted mode." msgstr "Non disponible en lecture, dans le mode restreint." -#: extending/newtypes.rst:292 +#: extending/newtypes.rst:304 msgid ":const:`WRITE_RESTRICTED`" msgstr ":const:`WRITE_RESTRICTED`" -#: extending/newtypes.rst:292 +#: extending/newtypes.rst:304 msgid "Not writable in restricted mode." msgstr "Non disponible en écriture dans le mode restreint." -#: extending/newtypes.rst:294 +#: extending/newtypes.rst:306 msgid ":const:`RESTRICTED`" msgstr ":const:`RESTRICTED`" -#: extending/newtypes.rst:294 +#: extending/newtypes.rst:306 msgid "Not readable or writable in restricted mode." msgstr "Non disponible en lecture ou écriture, en mode restreint." -#: extending/newtypes.rst:303 +#: extending/newtypes.rst:315 msgid "" "An interesting advantage of using the :c:member:`~PyTypeObject.tp_members` " "table to build descriptors that are used at runtime is that any attribute " @@ -351,17 +357,17 @@ msgstr "" "descripteur de l'objet de classe, et utiliser son attribut :attr:`__doc__` " "pour renvoyer le *docstring*." -#: extending/newtypes.rst:309 +#: extending/newtypes.rst:321 msgid "" "As with the :c:member:`~PyTypeObject.tp_methods` table, a sentinel entry " "with a :attr:`name` value of ``NULL`` is required." msgstr "" -#: extending/newtypes.rst:323 +#: extending/newtypes.rst:335 msgid "Type-specific Attribute Management" msgstr "Gestion des attributs de type spécifiques" -#: extending/newtypes.rst:325 +#: extending/newtypes.rst:337 msgid "" "For simplicity, only the :c:type:`char\\*` version will be demonstrated " "here; the type of the name parameter is the only difference between the :c:" @@ -372,18 +378,18 @@ msgid "" "functionality, you'll understand what needs to be done." msgstr "" -#: extending/newtypes.rst:333 +#: extending/newtypes.rst:345 msgid "" "The :c:member:`~PyTypeObject.tp_getattr` handler is called when the object " "requires an attribute look-up. It is called in the same situations where " "the :meth:`__getattr__` method of a class would be called." msgstr "" -#: extending/newtypes.rst:337 +#: extending/newtypes.rst:349 msgid "Here is an example::" msgstr "Voici un exemple ::" -#: extending/newtypes.rst:353 +#: extending/newtypes.rst:365 msgid "" "The :c:member:`~PyTypeObject.tp_setattr` handler is called when the :meth:" "`__setattr__` or :meth:`__delattr__` method of a class instance would be " @@ -393,11 +399,11 @@ msgid "" "should be set to ``NULL``. ::" msgstr "" -#: extending/newtypes.rst:367 +#: extending/newtypes.rst:379 msgid "Object Comparison" msgstr "Comparaison des objets" -#: extending/newtypes.rst:373 +#: extending/newtypes.rst:385 msgid "" "The :c:member:`~PyTypeObject.tp_richcompare` handler is called when " "comparisons are needed. It is analogous to the :ref:`rich comparison " @@ -405,34 +411,34 @@ msgid "" "`PyObject_RichCompare` and :c:func:`PyObject_RichCompareBool`." msgstr "" -#: extending/newtypes.rst:378 +#: extending/newtypes.rst:390 msgid "" "This function is called with two Python objects and the operator as " "arguments, where the operator is one of ``Py_EQ``, ``Py_NE``, ``Py_LE``, " -"``Py_GT``, ``Py_LT`` or ``Py_GT``. It should compare the two objects with " +"``Py_GE``, ``Py_LT`` or ``Py_GT``. It should compare the two objects with " "respect to the specified operator and return ``Py_True`` or ``Py_False`` if " "the comparison is successful, ``Py_NotImplemented`` to indicate that " "comparison is not implemented and the other object's comparison method " "should be tried, or ``NULL`` if an exception was set." msgstr "" -#: extending/newtypes.rst:386 +#: extending/newtypes.rst:398 msgid "" "Here is a sample implementation, for a datatype that is considered equal if " "the size of an internal pointer is equal::" msgstr "" -#: extending/newtypes.rst:416 +#: extending/newtypes.rst:428 msgid "Abstract Protocol Support" msgstr "Support pour le protocole abstrait" -#: extending/newtypes.rst:418 +#: extending/newtypes.rst:430 msgid "" "Python supports a variety of *abstract* 'protocols;' the specific interfaces " "provided to use these interfaces are documented in :ref:`abstract`." msgstr "" -#: extending/newtypes.rst:422 +#: extending/newtypes.rst:434 msgid "" "A number of these abstract interfaces were defined early in the development " "of the Python implementation. In particular, the number, mapping, and " @@ -447,7 +453,7 @@ msgid "" "slot, but a slot may still be unfilled.) ::" msgstr "" -#: extending/newtypes.rst:437 +#: extending/newtypes.rst:449 msgid "" "If you wish your object to be able to act like a number, a sequence, or a " "mapping object, then you place the address of a structure that implements " @@ -458,13 +464,13 @@ msgid "" "distribution. ::" msgstr "" -#: extending/newtypes.rst:446 +#: extending/newtypes.rst:458 msgid "" "This function, if you choose to provide it, should return a hash number for " "an instance of your data type. Here is a simple example::" msgstr "" -#: extending/newtypes.rst:459 +#: extending/newtypes.rst:471 msgid "" ":c:type:`Py_hash_t` is a signed integer type with a platform-varying width. " "Returning ``-1`` from :c:member:`~PyTypeObject.tp_hash` indicates an error, " @@ -472,7 +478,7 @@ msgid "" "computation is successful, as seen above." msgstr "" -#: extending/newtypes.rst:468 +#: extending/newtypes.rst:480 msgid "" "This function is called when an instance of your data type is \"called\", " "for example, if ``obj1`` is an instance of your data type and the Python " @@ -480,23 +486,23 @@ msgid "" "handler is invoked." msgstr "" -#: extending/newtypes.rst:472 +#: extending/newtypes.rst:484 msgid "This function takes three arguments:" msgstr "Cette fonction prend trois arguments :" -#: extending/newtypes.rst:474 +#: extending/newtypes.rst:486 msgid "" "*self* is the instance of the data type which is the subject of the call. If " "the call is ``obj1('hello')``, then *self* is ``obj1``." msgstr "" -#: extending/newtypes.rst:477 +#: extending/newtypes.rst:489 msgid "" "*args* is a tuple containing the arguments to the call. You can use :c:func:" "`PyArg_ParseTuple` to extract the arguments." msgstr "" -#: extending/newtypes.rst:480 +#: extending/newtypes.rst:492 msgid "" "*kwds* is a dictionary of keyword arguments that were passed. If this is non-" "``NULL`` and you support keyword arguments, use :c:func:" @@ -505,11 +511,11 @@ msgid "" "`TypeError` with a message saying that keyword arguments are not supported." msgstr "" -#: extending/newtypes.rst:486 +#: extending/newtypes.rst:498 msgid "Here is a toy ``tp_call`` implementation::" msgstr "Ceci est une implémentation ``tp_call`` très simple ::" -#: extending/newtypes.rst:512 +#: extending/newtypes.rst:524 msgid "" "These functions provide support for the iterator protocol. Both handlers " "take exactly one parameter, the instance for which they are being called, " @@ -520,7 +526,7 @@ msgid "" "__next__` method." msgstr "" -#: extending/newtypes.rst:519 +#: extending/newtypes.rst:531 msgid "" "Any :term:`iterable` object must implement the :c:member:`~PyTypeObject." "tp_iter` handler, which must return an :term:`iterator` object. Here the " @@ -531,7 +537,7 @@ msgstr "" "`iterator`. Ici, les mêmes directives s'appliquent de la même façon que " "pour les classes *Python* :" -#: extending/newtypes.rst:523 +#: extending/newtypes.rst:535 msgid "" "For collections (such as lists and tuples) which can support multiple " "independent iterators, a new iterator should be created and returned by each " @@ -541,7 +547,7 @@ msgstr "" "implémenter plusieurs itérateurs indépendants, un nouvel itérateur doit être " "créé et renvoyé par chaque appel de type :c:member:`~PyTypeObject.tp_iter`." -#: extending/newtypes.rst:526 +#: extending/newtypes.rst:538 msgid "" "Objects which can only be iterated over once (usually due to side effects of " "iteration, such as file objects) can implement :c:member:`~PyTypeObject." @@ -549,7 +555,7 @@ msgid "" "therefore implement the :c:member:`~PyTypeObject.tp_iternext` handler." msgstr "" -#: extending/newtypes.rst:531 +#: extending/newtypes.rst:543 msgid "" "Any :term:`iterator` object should implement both :c:member:`~PyTypeObject." "tp_iter` and :c:member:`~PyTypeObject.tp_iternext`. An iterator's :c:member:" @@ -564,11 +570,11 @@ msgid "" "``NULL``." msgstr "" -#: extending/newtypes.rst:547 +#: extending/newtypes.rst:559 msgid "Weak Reference Support" msgstr "Prise en charge de la référence faible" -#: extending/newtypes.rst:549 +#: extending/newtypes.rst:561 msgid "" "One of the goals of Python's weak reference implementation is to allow any " "type to participate in the weak reference mechanism without incurring the " @@ -579,11 +585,11 @@ msgstr "" "faible sans avoir à supporter le surcoût de la performance critique des " "certains objets, tels que les nombres." -#: extending/newtypes.rst:554 +#: extending/newtypes.rst:566 msgid "Documentation for the :mod:`weakref` module." msgstr "Documentation pour le module :mod:`weakref`." -#: extending/newtypes.rst:556 +#: extending/newtypes.rst:568 msgid "" "For an object to be weakly referencable, the extension type must do two " "things:" @@ -591,7 +597,7 @@ msgstr "" "Pour qu'un objet soit faiblement référençable, le type d'extension doit " "faire deux choses :" -#: extending/newtypes.rst:558 +#: extending/newtypes.rst:570 msgid "" "Include a :c:type:`PyObject\\*` field in the C object structure dedicated to " "the weak reference mechanism. The object's constructor should leave it " @@ -603,7 +609,7 @@ msgstr "" "la valeur ``NULL`` (ce qui est automatique lorsque l'on utilise le champ par " "défaut :c:member:`~PyTypeObject.tp_alloc`)." -#: extending/newtypes.rst:563 +#: extending/newtypes.rst:575 msgid "" "Set the :c:member:`~PyTypeObject.tp_weaklistoffset` type member to the " "offset of the aforementioned field in the C object structure, so that the " @@ -614,7 +620,7 @@ msgstr "" "l'objet *C*, afin que l'interpréteur sache comment accéder à ce champ et le " "modifier." -#: extending/newtypes.rst:567 +#: extending/newtypes.rst:579 msgid "" "Concretely, here is how a trivial object structure would be augmented with " "the required field::" @@ -622,12 +628,12 @@ msgstr "" "Concrètement, voici comment une structure d'objet simple serait complétée " "par le champ requis ::" -#: extending/newtypes.rst:575 +#: extending/newtypes.rst:587 msgid "And the corresponding member in the statically-declared type object::" msgstr "" "Et le membre correspondant dans l'objet de type déclaré statiquement ::" -#: extending/newtypes.rst:583 +#: extending/newtypes.rst:595 msgid "" "The only further addition is that ``tp_dealloc`` needs to clear any weak " "references (by calling :c:func:`PyObject_ClearWeakRefs`) if the field is non-" @@ -637,11 +643,11 @@ msgstr "" "référence faible (en appelant :c:func:`PyObject_ClearWeakRefs`) si le champ " "est non ``NULL`` ::" -#: extending/newtypes.rst:599 +#: extending/newtypes.rst:611 msgid "More Suggestions" msgstr "Plus de suggestions" -#: extending/newtypes.rst:601 +#: extending/newtypes.rst:613 msgid "" "In order to learn how to implement any specific method for your new data " "type, get the :term:`CPython` source code. Go to the :file:`Objects` " @@ -656,7 +662,7 @@ msgstr "" "``tp_richcompare``). Vous trouverez des exemples de la fonction que vous " "voulez implémenter." -#: extending/newtypes.rst:607 +#: extending/newtypes.rst:619 msgid "" "When you need to verify that an object is a concrete instance of the type " "you are implementing, use the :c:func:`PyObject_TypeCheck` function. A " @@ -666,20 +672,20 @@ msgstr "" "du type que vous implémentez, utilisez la fonction :c:func:" "`PyObject_TypeCheck`. Voici un exemple de son utilisation ::" -#: extending/newtypes.rst:618 +#: extending/newtypes.rst:630 msgid "Download CPython source releases." msgstr "Télécharger les versions sources de *CPython*." -#: extending/newtypes.rst:618 +#: extending/newtypes.rst:630 msgid "https://www.python.org/downloads/source/" msgstr "https://www.python.org/downloads/source/" -#: extending/newtypes.rst:620 +#: extending/newtypes.rst:632 msgid "" "The CPython project on GitHub, where the CPython source code is developed." msgstr "" "Le projet *CPython* sur *GitHub*, où se trouve le code source *CPython*." -#: extending/newtypes.rst:621 +#: extending/newtypes.rst:633 msgid "https://github.com/python/cpython" msgstr "https://github.com/python/cpython" diff --git a/extending/newtypes_tutorial.po b/extending/newtypes_tutorial.po index 13887d06bb..fe680a9ed5 100644 --- a/extending/newtypes_tutorial.po +++ b/extending/newtypes_tutorial.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-06-17 10:15+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -16,7 +16,7 @@ msgstr "" #: extending/newtypes_tutorial.rst:7 msgid "Defining Extension Types: Tutorial" -msgstr "" +msgstr "Tutoriel : définir des types dans des extensions" #: extending/newtypes_tutorial.rst:14 msgid "" @@ -26,10 +26,15 @@ msgid "" "pattern, but there are some details that you need to understand before you " "can get started. This document is a gentle introduction to the topic." msgstr "" +"Python permet à l'auteur d'un module d'extension C de définir de nouveaux " +"types qui peuvent être manipulés depuis du code Python, à la manière des " +"types natifs :class:`str` et :class:`list`. Les implémentations de tous les " +"types d'extension ont des similarités, mais quelques subtilités doivent être " +"abordées avant de commencer." #: extending/newtypes_tutorial.rst:24 msgid "The Basics" -msgstr "" +msgstr "Les bases" #: extending/newtypes_tutorial.rst:26 msgid "" @@ -48,6 +53,8 @@ msgid "" "So, if you want to define a new extension type, you need to create a new " "type object." msgstr "" +"Donc, pour définir un nouveau type dans une extension, vous devez créer un " +"nouvel objet type." #: extending/newtypes_tutorial.rst:38 msgid "" @@ -55,6 +62,9 @@ msgid "" "but complete, module that defines a new type named :class:`Custom` inside a " "C extension module :mod:`custom`:" msgstr "" +"Ce genre de chose ne s'explique correctement qu'avec des exemples, voici " +"donc un module minimaliste mais suffisant qui définit un nouveau type nommé :" +"class:`Custom` dans le module d'extension :mod:`custom` :" #: extending/newtypes_tutorial.rst:43 msgid "" @@ -63,18 +73,27 @@ msgid "" "allows defining heap-allocated extension types using the :c:func:" "`PyType_FromSpec` function, which isn't covered in this tutorial." msgstr "" +"Ce qui est montré ici est la manière traditionnelle de définir des types " +"d'extension *statiques*, et cela convient dans la majorité des cas. L'API C " +"permet aussi de définir des types alloués sur le tas, via la fonction :c:" +"func:`PyType_FromSpec`, mais ce n'est pas couvert par ce tutoriel." #: extending/newtypes_tutorial.rst:50 msgid "" "Now that's quite a bit to take in at once, but hopefully bits will seem " "familiar from the previous chapter. This file defines three things:" msgstr "" +"C'est un peu long, mais vous devez déjà reconnaître quelques morceaux " +"expliqués au chapitre précédent. Ce fichier définit trois choses :" #: extending/newtypes_tutorial.rst:53 msgid "" "What a :class:`Custom` **object** contains: this is the ``CustomObject`` " "struct, which is allocated once for each :class:`Custom` instance." msgstr "" +"Ce qu'un **objet** :class:`Custom` contient : c'est la structure " +"``CustomObject``, qui est allouée une fois pour chaque instance de :class:" +"`Custom`." #: extending/newtypes_tutorial.rst:55 msgid "" @@ -82,24 +101,29 @@ msgid "" "which defines a set of flags and function pointers that the interpreter " "inspects when specific operations are requested." msgstr "" +"Comment le **type** :class:`Custom` se comporte : c'est la structure " +"``CustomType``, qui définit l'ensemble des options et pointeurs de fonction " +"utilisés par l'interpréteur." #: extending/newtypes_tutorial.rst:58 msgid "" "How to initialize the :mod:`custom` module: this is the ``PyInit_custom`` " "function and the associated ``custommodule`` struct." msgstr "" +"Comment initialiser le module :mod:`custom` : c'est la fonction " +"``PyInit_custom`` et la structure associée ``custommodule``." #: extending/newtypes_tutorial.rst:61 msgid "The first bit is::" -msgstr "" +msgstr "Commençons par ::" #: extending/newtypes_tutorial.rst:67 msgid "" "This is what a Custom object will contain. ``PyObject_HEAD`` is mandatory " "at the start of each object struct and defines a field called ``ob_base`` of " "type :c:type:`PyObject`, containing a pointer to a type object and a " -"reference count (these can be accessed using the macros :c:macro:`Py_REFCNT` " -"and :c:macro:`Py_TYPE` respectively). The reason for the macro is to " +"reference count (these can be accessed using the macros :c:macro:`Py_TYPE` " +"and :c:macro:`Py_REFCNT` respectively). The reason for the macro is to " "abstract away the layout and to enable additional fields in debug builds." msgstr "" @@ -108,6 +132,9 @@ msgid "" "There is no semicolon above after the :c:macro:`PyObject_HEAD` macro. Be " "wary of adding one by accident: some compilers will complain." msgstr "" +"Il n'y a pas de point-virgule après la macro :c:macro:`PyObject_HEAD`. " +"Attention à ne pas l'ajouter par accident : certains compilateurs pourraient " +"s'en plaindre." #: extending/newtypes_tutorial.rst:78 msgid "" @@ -115,10 +142,13 @@ msgid "" "``PyObject_HEAD`` boilerplate; for example, here is the definition for " "standard Python floats::" msgstr "" +"Bien sûr, les objets ajoutent généralement des données supplémentaires après " +"l'entête standard ``PyObject_HEAD``. Par exemple voici la définition du type " +"standard Python ``float`` ::" #: extending/newtypes_tutorial.rst:87 msgid "The second bit is the definition of the type object. ::" -msgstr "" +msgstr "La deuxième partie est la définition de l'objet type ::" #: extending/newtypes_tutorial.rst:100 msgid "" @@ -126,6 +156,10 @@ msgid "" "listing all the :c:type:`PyTypeObject` fields that you don't care about and " "also to avoid caring about the fields' declaration order." msgstr "" +"Nous recommandons d'utiliser la syntaxe d'initialisation nommée (C99) pour " +"remplir la structure, comme ci-dessus, afin d'éviter d'avoir à lister les " +"champs de :c:type:`PyTypeObject` dont vous n'avez pas besoin, et de ne pas " +"vous soucier de leur ordre." #: extending/newtypes_tutorial.rst:104 msgid "" @@ -134,22 +168,31 @@ msgid "" "fields will be filled with zeros by the C compiler, and it's common practice " "to not specify them explicitly unless you need them." msgstr "" +"La définition de :c:type:`PyTypeObject` dans :file:`object.h` contient en " +"fait bien plus de :ref:`champs ` que la définition ci-dessus. " +"Les champs restants sont mis à zéro par le compilateur C, et c'est une " +"pratique répandue de ne pas spécifier les champs dont vous n'avez pas besoin." #: extending/newtypes_tutorial.rst:109 msgid "We're going to pick it apart, one field at a time::" -msgstr "" +msgstr "Regardons les champs de cette structure, un par un ::" #: extending/newtypes_tutorial.rst:113 msgid "" "This line is mandatory boilerplate to initialize the ``ob_base`` field " "mentioned above. ::" msgstr "" +"Cette ligne, obligatoire, initialise le champ ``ob_base`` mentionné " +"précédemment." #: extending/newtypes_tutorial.rst:118 msgid "" "The name of our type. This will appear in the default textual " "representation of our objects and in some error messages, for example:" msgstr "" +"C'est le nom de notre type. Il apparaît dans la représentation textuelle par " +"défaut de nos objets, ainsi que dans quelques messages d'erreur, par " +"exemple :" #: extending/newtypes_tutorial.rst:128 msgid "" @@ -159,6 +202,11 @@ msgid "" "`custom.Custom`. Using the real dotted import path is important to make your " "type compatible with the :mod:`pydoc` and :mod:`pickle` modules. ::" msgstr "" +"Notez que le nom comporte un point : il inclut le nom du module et le nom du " +"type. Dans ce cas le module est :mod:`custom`, et le type est :class:" +"`Custom`, donc nous donnons comme nom :class:`custom.Custom`. Nommer " +"correctement son type, avec le point, est important pour le rendre " +"compatible avec :mod:`pydoc` et :mod:`pickle`. ::" #: extending/newtypes_tutorial.rst:137 msgid "" @@ -166,6 +214,10 @@ msgid "" "class:`Custom` instances. :c:member:`~PyTypeObject.tp_itemsize` is only " "used for variable-sized objects and should otherwise be zero." msgstr "" +"C'est pour que Python sache combien de mémoire allouer à la création d'une " +"nouvelle instance de :class:`Custom`. :c:member:`~PyTypeObject.tp_itemsize` " +"n'est utilisé que pour les objets de taille variable, sinon il doit rester à " +"zéro." #: extending/newtypes_tutorial.rst:143 msgid "" @@ -180,10 +232,22 @@ msgid "" "type will be :class:`object`, or else you will be adding data members to " "your base type, and therefore increasing its size." msgstr "" +"Si vous voulez qu'une classe en Python puisse hériter de votre type, et que " +"votre type a le même :c:member:`~PyTypeObject.tp_basicsize` que son parent, " +"vous rencontrerez des problèmes avec l'héritage multiple. Une sous-classe " +"Python de votre type devra lister votre type en premier dans son :attr:" +"`~class.__bases__`, sans quoi elle ne sera pas capable d'appeler la méthode :" +"meth:`__new__` de votre type sans erreur. Vous pouvez éviter ce problème en " +"vous assurant que votre type a un :c:member:`~PyTypeObject.tp_basicsize` " +"plus grand que son parent. La plupart du temps ce sera vrai (soit son parent " +"sera :class:`object`, soit vous ajouterez des attributs à votre type, " +"augmentant ainsi sa taille)." #: extending/newtypes_tutorial.rst:153 msgid "We set the class flags to :const:`Py_TPFLAGS_DEFAULT`. ::" msgstr "" +"On utilise la constante :const:`Py_TPFLAGS_DEFAULT` comme seule option de " +"type. ::" #: extending/newtypes_tutorial.rst:157 msgid "" @@ -191,11 +255,17 @@ msgid "" "the members defined until at least Python 3.3. If you need further members, " "you will need to OR the corresponding flags." msgstr "" +"Chaque type doit inclure cette constante dans ses options : elle active tous " +"les membres définis jusqu'à au moins Python 3.3. Si vous avez besoin de plus " +"de membres, vous pouvez la combiner à d'autres constantes avec un *ou* " +"binaire." #: extending/newtypes_tutorial.rst:161 msgid "" "We provide a doc string for the type in :c:member:`~PyTypeObject.tp_doc`. ::" msgstr "" +"On fournit une *docstring* pour ce type via le membre :c:member:" +"`~PyTypeObject.tp_doc`. ::" #: extending/newtypes_tutorial.rst:165 msgid "" @@ -205,12 +275,19 @@ msgid "" "use the default implementation provided by the API function :c:func:" "`PyType_GenericNew`. ::" msgstr "" +"Pour permettre la création d'une instance, nous devons fournir un *handler* :" +"c:member:`~PyTypeObject.tp_new`, qui est l'équivalent de la méthode Python :" +"meth:`__new__`, mais elle a besoin d'être spécifiée explicitement. Dans ce " +"cas, on se contente de l'implémentation par défaut fournie par la fonction :" +"c:func:`PyType_GenericNew` de l'API." #: extending/newtypes_tutorial.rst:172 msgid "" "Everything else in the file should be familiar, except for some code in :c:" "func:`PyInit_custom`::" msgstr "" +"Le reste du fichier doit vous être familier, en dehors du code de :c:func:" +"`PyInit_custom` ::" #: extending/newtypes_tutorial.rst:178 msgid "" @@ -218,18 +295,25 @@ msgid "" "the appropriate default values, including :attr:`ob_type` that we initially " "set to ``NULL``. ::" msgstr "" +"Il initialise le type :class:`Custom`, en assignant quelques membres à leurs " +"valeurs par défaut, tel que :attr:`ob_type` qui valait initialement " +"``NULL``. ::" #: extending/newtypes_tutorial.rst:189 msgid "" "This adds the type to the module dictionary. This allows us to create :" "class:`Custom` instances by calling the :class:`Custom` class:" msgstr "" +"Ici on ajoute le type au dictionnaire du module. Cela permet de créer une " +"instance de :class:`Custom` en appelant la classe :class:`Custom` :" #: extending/newtypes_tutorial.rst:197 msgid "" "That's it! All that remains is to build it; put the above code in a file " "called :file:`custom.c` and:" msgstr "" +"C'est tout ! Il ne reste plus qu'à compiler, placez le code ci-dessus dans " +"un fichier :file:`custom.c` et :" #: extending/newtypes_tutorial.rst:206 msgid "in a file called :file:`setup.py`; then typing" diff --git a/extending/windows.po b/extending/windows.po index 5ca7f168dd..f7f97af19d 100644 --- a/extending/windows.po +++ b/extending/windows.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-06-28 15:18+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -215,16 +215,16 @@ msgid "Using DLLs in Practice" msgstr "Utiliser les DLL en pratique" #: extending/windows.rst:108 +#, fuzzy msgid "" "Windows Python is built in Microsoft Visual C++; using other compilers may " -"or may not work (though Borland seems to). The rest of this section is MSVC+" -"+ specific." +"or may not work. The rest of this section is MSVC++ specific." msgstr "" "Le Python de Windows est construit en Microsoft Visual C++ ; utiliser " "d'autres compilateurs pourrait fonctionner, ou pas (cependant Borland a " "l'air de fonctionner). Le reste de cette section est spécifique à MSVC++." -#: extending/windows.rst:112 +#: extending/windows.rst:111 msgid "" "When creating DLLs in Windows, you must pass :file:`pythonXY.lib` to the " "linker. To build two DLLs, spam and ni (which uses C functions found in " @@ -234,7 +234,7 @@ msgstr "" "`pythonXY.lib` au lieur. Pour construire deux DLL, spam et ni (qui utilisent " "des fonctions C trouvées dans spam), vous pouvez utiliser ces commandes ::" -#: extending/windows.rst:119 +#: extending/windows.rst:118 msgid "" "The first command created three files: :file:`spam.obj`, :file:`spam.dll` " "and :file:`spam.lib`. :file:`Spam.dll` does not contain any Python " @@ -246,7 +246,7 @@ msgstr "" "Python (telles que :c:func:`PyArg_ParseTuple`), mais il sait comment trouver " "le code Python grâce à :file:`pythonXY.lib`." -#: extending/windows.rst:124 +#: extending/windows.rst:123 msgid "" "The second command created :file:`ni.dll` (and :file:`.obj` and :file:`." "lib`), which knows how to find the necessary functions from spam, and also " @@ -256,7 +256,7 @@ msgstr "" "qui sait comment trouver les fonctions nécessaires dans spam, ainsi qu'à " "partir de l'exécutable Python." -#: extending/windows.rst:128 +#: extending/windows.rst:127 msgid "" "Not every identifier is exported to the lookup table. If you want any other " "modules (including Python) to be able to see your identifiers, you have to " @@ -269,7 +269,7 @@ msgstr "" "``void _declspec(dllexport) initspam(void)`` ou ``PyObject " "_declspec(dllexport) *NiGetSpamData(void)``." -#: extending/windows.rst:133 +#: extending/windows.rst:132 msgid "" "Developer Studio will throw in a lot of import libraries that you do not " "really need, adding about 100K to your executable. To get rid of them, use " diff --git a/faq/design.po b/faq/design.po index d2f1c373ec..fa16d2c8c7 100644 --- a/faq/design.po +++ b/faq/design.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-11-07 16:24+0100\n" "Last-Translator: Mindiell \n" "Language-Team: FRENCH \n" @@ -521,7 +521,7 @@ msgstr "" "possibilités, vous pouvez créer un dictionnaire faisant correspondre des " "valeurs à des fonctions à appeler. Par exemple ::" -#: faq/design.rst:280 +#: faq/design.rst:277 msgid "" "For calling methods on objects, you can simplify yet further by using the :" "func:`getattr` built-in to retrieve methods with a particular name::" @@ -530,7 +530,7 @@ msgstr "" "en utilisant la fonction native :func:`getattr` pour récupérer les méthodes " "avec un nom donné ::" -#: faq/design.rst:292 +#: faq/design.rst:289 msgid "" "It's suggested that you use a prefix for the method names, such as " "``visit_`` in this example. Without such a prefix, if values are coming " @@ -542,7 +542,7 @@ msgstr "" "proviennent d'une source non fiable, un attaquant serait en mesure d'appeler " "n'importe quelle méthode sur votre objet." -#: faq/design.rst:298 +#: faq/design.rst:295 msgid "" "Can't you emulate threads in the interpreter instead of relying on an OS-" "specific thread implementation?" @@ -550,7 +550,7 @@ msgstr "" "Est-il possible d'émuler des fils d'exécution dans l'interpréteur plutôt que " "se baser sur les implémentations spécifique aux OS ?" -#: faq/design.rst:300 +#: faq/design.rst:297 msgid "" "Answer 1: Unfortunately, the interpreter pushes at least one C stack frame " "for each Python stack frame. Also, extensions can call back into Python at " @@ -563,7 +563,7 @@ msgstr "" "conséquent, une implémentation complète des fils d'exécution nécessiterai un " "support complet en C." -#: faq/design.rst:305 +#: faq/design.rst:302 msgid "" "Answer 2: Fortunately, there is `Stackless Python `_, which has a completely redesigned " @@ -573,12 +573,12 @@ msgstr "" "stackless-dev/stackless/wiki>`_, qui a complètement ré-architecturé la " "boucle principale de l'interpréteur afin de ne pas utiliser la pile C." -#: faq/design.rst:310 +#: faq/design.rst:307 msgid "Why can't lambda expressions contain statements?" msgstr "" "Pourquoi les expressions lambda ne peuvent pas contenir d'instructions ?" -#: faq/design.rst:312 +#: faq/design.rst:309 msgid "" "Python lambda expressions cannot contain statements because Python's " "syntactic framework can't handle statements nested inside expressions. " @@ -594,7 +594,7 @@ msgstr "" "Python sont seulement une notation concise si vous êtes trop paresseux pour " "définir une fonction." -#: faq/design.rst:318 +#: faq/design.rst:315 msgid "" "Functions are already first class objects in Python, and can be declared in " "a local scope. Therefore the only advantage of using a lambda instead of a " @@ -610,12 +610,12 @@ msgstr "" "variable locale à laquelle est affecté l'objet fonction (qui est exactement " "le même type d'objet qui donne une expression lambda) !" -#: faq/design.rst:326 +#: faq/design.rst:323 msgid "Can Python be compiled to machine code, C or some other language?" msgstr "" "Python peut-il être compilé en code machine, en C ou dans un autre langage ?" -#: faq/design.rst:328 +#: faq/design.rst:325 msgid "" "`Cython `_ compiles a modified version of Python with " "optional annotations into C extensions. `Nuitka `_ " @@ -629,11 +629,11 @@ msgstr "" "langage Python entièrement. Pour compiler en Java, vous pouvez regarder `VOC " "`_." -#: faq/design.rst:336 +#: faq/design.rst:333 msgid "How does Python manage memory?" msgstr "Comment Python gère la mémoire ?" -#: faq/design.rst:338 +#: faq/design.rst:335 msgid "" "The details of Python memory management depend on the implementation. The " "standard implementation of Python, :term:`CPython`, uses reference counting " @@ -652,7 +652,7 @@ msgstr "" "module :mod:`gc` fournit des fonctions pour lancer le ramasse-miettes, " "d'obtenir des statistiques de débogage et ajuster ses paramètres." -#: faq/design.rst:346 +#: faq/design.rst:343 msgid "" "Other implementations (such as `Jython `_ or `PyPy " "`_), however, can rely on a different mechanism such as " @@ -666,7 +666,7 @@ msgstr "" "subtils problèmes de portabilité si votre code Python dépend du comportement " "de l'implémentation du compteur de références." -#: faq/design.rst:352 +#: faq/design.rst:349 msgid "" "In some Python implementations, the following code (which is fine in " "CPython) will probably run out of file descriptors::" @@ -675,7 +675,7 @@ msgstr "" "parfaitement avec *CPython*) aurait probablement manqué de descripteurs de " "fichiers ::" -#: faq/design.rst:359 +#: faq/design.rst:356 msgid "" "Indeed, using CPython's reference counting and destructor scheme, each new " "assignment to *f* closes the previous file. With a traditional GC, however, " @@ -688,7 +688,7 @@ msgstr "" "(et fermés) à intervalles variables et possiblement avec de longs " "intervalles." -#: faq/design.rst:364 +#: faq/design.rst:361 msgid "" "If you want to write code that will work with any Python implementation, you " "should explicitly close the file or use the :keyword:`with` statement; this " @@ -699,12 +699,12 @@ msgstr "" "utiliser l'instruction :keyword:`with` ; ceci fonctionnera indépendamment du " "système de gestion de la mémoire ::" -#: faq/design.rst:374 +#: faq/design.rst:371 msgid "Why doesn't CPython use a more traditional garbage collection scheme?" msgstr "" "Pourquoi CPython n'utilise-il pas un ramasse-miette plus traditionnel ?" -#: faq/design.rst:376 +#: faq/design.rst:373 msgid "" "For one thing, this is not a C standard feature and hence it's not portable. " "(Yes, we know about the Boehm GC library. It has bits of assembler code for " @@ -719,7 +719,7 @@ msgstr "" "transparent, c'est loin d'être le cas, des correctifs sont nécessaires afin " "que Python fonctionne correctement avec.)" -#: faq/design.rst:382 +#: faq/design.rst:379 msgid "" "Traditional GC also becomes a problem when Python is embedded into other " "applications. While in a standalone Python it's fine to replace the " @@ -737,12 +737,12 @@ msgstr "" "fonctionne avec n'importe quelle implémentation correcte de ``malloc()`` et " "``free()``." -#: faq/design.rst:391 +#: faq/design.rst:388 msgid "Why isn't all memory freed when CPython exits?" msgstr "" "Pourquoi toute la mémoire n'est pas libérée lorsque *CPython* s'arrête ?" -#: faq/design.rst:393 +#: faq/design.rst:390 msgid "" "Objects referenced from the global namespaces of Python modules are not " "always deallocated when Python exits. This may happen if there are circular " @@ -759,7 +759,7 @@ msgstr "" "cependant, agressif sur le nettoyage de la mémoire en quittant et cherche à " "détruire chaque objet." -#: faq/design.rst:400 +#: faq/design.rst:397 msgid "" "If you want to force Python to delete certain things on deallocation use " "the :mod:`atexit` module to run a function that will force those deletions." @@ -768,12 +768,12 @@ msgstr "" "utilisez le module :mod:`texit` pour exécuter une fonction qui va forcer ces " "destructions." -#: faq/design.rst:405 +#: faq/design.rst:402 msgid "Why are there separate tuple and list data types?" msgstr "" "Pourquoi les *n*-uplets et les *list* sont deux types de données séparés ?" -#: faq/design.rst:407 +#: faq/design.rst:404 msgid "" "Lists and tuples, while similar in many respects, are generally used in " "fundamentally different ways. Tuples can be thought of as being similar to " @@ -790,7 +790,7 @@ msgstr "" "un repère cartésien est correctement représenté comme un *n*-uplet de deux " "ou trois nombres." -#: faq/design.rst:414 +#: faq/design.rst:411 msgid "" "Lists, on the other hand, are more like arrays in other languages. They " "tend to hold a varying number of objects all of which have the same type and " @@ -807,7 +807,7 @@ msgstr "" "problème que vous ajoutiez un ou deux fichiers supplémentaire dans le " "dossier." -#: faq/design.rst:421 +#: faq/design.rst:418 msgid "" "Tuples are immutable, meaning that once a tuple has been created, you can't " "replace any of its elements with a new value. Lists are mutable, meaning " @@ -822,11 +822,11 @@ msgstr "" "utilisés comme clés de dictionnaires, et donc de ``tuple`` et ``list`` seul " "des *n*-uplets peuvent être utilisés comme clés." -#: faq/design.rst:428 +#: faq/design.rst:425 msgid "How are lists implemented in CPython?" msgstr "Comment les listes sont-elles implémentées dans CPython ?" -#: faq/design.rst:430 +#: faq/design.rst:427 msgid "" "CPython's lists are really variable-length arrays, not Lisp-style linked " "lists. The implementation uses a contiguous array of references to other " @@ -839,7 +839,7 @@ msgstr "" "Elle conserve également un pointeur vers ce tableau et la longueur du " "tableau dans une structure de tête de liste." -#: faq/design.rst:434 +#: faq/design.rst:431 msgid "" "This makes indexing a list ``a[i]`` an operation whose cost is independent " "of the size of the list or the value of the index." @@ -847,7 +847,7 @@ msgstr "" "Cela rend l'indexation d'une liste ``a[i]`` une opération dont le coût est " "indépendant de la taille de la liste ou de la valeur de l'indice." -#: faq/design.rst:437 +#: faq/design.rst:434 msgid "" "When items are appended or inserted, the array of references is resized. " "Some cleverness is applied to improve the performance of appending items " @@ -860,11 +860,11 @@ msgstr "" "être étendu, un certain espace supplémentaire est alloué de sorte que pour " "la prochaine fois, ceci ne nécessite plus un redimensionnement effectif." -#: faq/design.rst:444 +#: faq/design.rst:441 msgid "How are dictionaries implemented in CPython?" msgstr "Comment les dictionnaires sont-ils implémentés dans CPython ?" -#: faq/design.rst:446 +#: faq/design.rst:443 msgid "" "CPython's dictionaries are implemented as resizable hash tables. Compared " "to B-trees, this gives better performance for lookup (the most common " @@ -876,7 +876,7 @@ msgstr "" "performances pour la recherche (l'opération la plus courante de loin) dans " "la plupart des circonstances, et leur implémentation est plus simple." -#: faq/design.rst:450 +#: faq/design.rst:447 msgid "" "Dictionaries work by computing a hash code for each key stored in the " "dictionary using the :func:`hash` built-in function. The hash code varies " @@ -901,11 +901,11 @@ msgstr "" "temps pour récupérer une clé est constant -- O(1), en notation grand O de " "Landau." -#: faq/design.rst:461 +#: faq/design.rst:458 msgid "Why must dictionary keys be immutable?" msgstr "Pourquoi les clés du dictionnaire sont immuables ?" -#: faq/design.rst:463 +#: faq/design.rst:460 msgid "" "The hash table implementation of dictionaries uses a hash value calculated " "from the key value to find the key. If the key were a mutable object, its " @@ -928,7 +928,7 @@ msgstr "" "chercher l'ancienne valeur, elle serait également introuvable car la valeur " "de l'objet trouvé dans cet emplacement de hachage serait différente." -#: faq/design.rst:472 +#: faq/design.rst:469 msgid "" "If you want a dictionary indexed with a list, simply convert the list to a " "tuple first; the function ``tuple(L)`` creates a tuple with the same entries " @@ -940,11 +940,11 @@ msgstr "" "uplet avec les mêmes entrées que la liste ``L``. Les *n*-uplets sont " "immuables et peuvent donc être utilisés comme clés du dictionnaire." -#: faq/design.rst:476 +#: faq/design.rst:473 msgid "Some unacceptable solutions that have been proposed:" msgstr "Certaines solutions insatisfaisantes qui ont été proposées :" -#: faq/design.rst:478 +#: faq/design.rst:475 msgid "" "Hash lists by their address (object ID). This doesn't work because if you " "construct a new list with the same value it won't be found; e.g.::" @@ -953,7 +953,7 @@ msgstr "" "fonctionne pas parce que si vous créez une nouvelle liste avec la même " "valeur, elle ne sera pas retrouvée; par exemple ::" -#: faq/design.rst:484 +#: faq/design.rst:481 msgid "" "would raise a :exc:`KeyError` exception because the id of the ``[1, 2]`` " "used in the second line differs from that in the first line. In other " @@ -965,7 +965,7 @@ msgstr "" "termes, les clés de dictionnaire doivent être comparées à l'aide du " "comparateur ``==`` et non à l'aide du mot clé :keyword:`is`." -#: faq/design.rst:488 +#: faq/design.rst:485 msgid "" "Make a copy when using a list as a key. This doesn't work because the list, " "being a mutable object, could contain a reference to itself, and then the " @@ -976,7 +976,7 @@ msgstr "" "une référence à elle-même ou avoir une boucle infinie au niveau du code " "copié." -#: faq/design.rst:492 +#: faq/design.rst:489 msgid "" "Allow lists as keys but tell the user not to modify them. This would allow " "a class of hard-to-track bugs in programs when you forgot or modified a list " @@ -989,7 +989,7 @@ msgstr "" "accident. Cela casse également un impératif important des dictionnaires : " "chaque valeur de ``d.keys()`` est utilisable comme clé du dictionnaire." -#: faq/design.rst:497 +#: faq/design.rst:494 msgid "" "Mark lists as read-only once they are used as a dictionary key. The problem " "is that it's not just the top-level object that could change its value; you " @@ -1007,7 +1007,7 @@ msgstr "" "encore une fois, les objets se faisant référence pourraient provoquer une " "boucle infinie." -#: faq/design.rst:503 +#: faq/design.rst:500 msgid "" "There is a trick to get around this if you need to, but use it at your own " "risk: You can wrap a mutable structure inside a class instance which has " @@ -1024,7 +1024,7 @@ msgstr "" "(ou une autre structure basée sur le hachage), restent fixes pendant que " "l'objet est dans le dictionnaire (ou une autre structure). ::" -#: faq/design.rst:527 +#: faq/design.rst:524 msgid "" "Note that the hash computation is complicated by the possibility that some " "members of the list may be unhashable and also by the possibility of " @@ -1034,7 +1034,7 @@ msgstr "" "certains membres de la liste peuvent être impossible à hacher et aussi par " "la possibilité de débordement arithmétique." -#: faq/design.rst:531 +#: faq/design.rst:528 msgid "" "Furthermore it must always be the case that if ``o1 == o2`` (ie ``o1." "__eq__(o2) is True``) then ``hash(o1) == hash(o2)`` (ie, ``o1.__hash__() == " @@ -1048,7 +1048,7 @@ msgstr "" "ne remplissez pas ces conditions, les dictionnaires et autres structures " "basées sur le hachage se comporteront mal." -#: faq/design.rst:536 +#: faq/design.rst:533 msgid "" "In the case of ListWrapper, whenever the wrapper object is in a dictionary " "the wrapped list must not change to avoid anomalies. Don't do this unless " @@ -1061,11 +1061,11 @@ msgstr "" "conséquences de ne pas satisfaire entièrement ces conditions. Vous avez été " "prévenus." -#: faq/design.rst:543 +#: faq/design.rst:540 msgid "Why doesn't list.sort() return the sorted list?" msgstr "Pourquoi ``list.sort()`` ne renvoie pas la liste triée ?" -#: faq/design.rst:545 +#: faq/design.rst:542 msgid "" "In situations where performance matters, making a copy of the list just to " "sort it would be wasteful. Therefore, :meth:`list.sort` sorts the list in " @@ -1081,7 +1081,7 @@ msgstr "" "accidentellement une liste lorsque vous avez besoin d’une copie triée, mais " "vous devrez également garder sous la main la version non triée." -#: faq/design.rst:551 +#: faq/design.rst:548 msgid "" "If you want to return a new list, use the built-in :func:`sorted` function " "instead. This function creates a new list from a provided iterable, sorts " @@ -1093,13 +1093,13 @@ msgstr "" "itérable fourni, la trie et la retourne. Par exemple, voici comment itérer " "sur les clefs d’un dictionnaire dans l’ordre trié ::" -#: faq/design.rst:561 +#: faq/design.rst:558 msgid "How do you specify and enforce an interface spec in Python?" msgstr "" "Comment spécifiez-vous et appliquez-vous une spécification d’interface en " "Python ?" -#: faq/design.rst:563 +#: faq/design.rst:560 msgid "" "An interface specification for a module as provided by languages such as C++ " "and Java describes the prototypes for the methods and functions of the " @@ -1111,7 +1111,7 @@ msgstr "" "module. Beaucoup estiment que la vérification au moment de la compilation " "des spécifications d'interface aide à la construction de grands programmes." -#: faq/design.rst:568 +#: faq/design.rst:565 msgid "" "Python 2.6 adds an :mod:`abc` module that lets you define Abstract Base " "Classes (ABCs). You can then use :func:`isinstance` and :func:`issubclass` " @@ -1128,7 +1128,7 @@ msgstr "" "Iterable`, :class:`~collections.abc.Container` et :class:`collections.abc." "MutableMapping`." -#: faq/design.rst:575 +#: faq/design.rst:572 msgid "" "For Python, many of the advantages of interface specifications can be " "obtained by an appropriate test discipline for components." @@ -1136,7 +1136,7 @@ msgstr "" "Pour Python, la plupart des avantages des spécifications d'interface peuvent " "être obtenus par une discipline de test appropriée pour les composants." -#: faq/design.rst:578 +#: faq/design.rst:575 msgid "" "A good test suite for a module can both provide a regression test and serve " "as a module interface specification and a set of examples. Many Python " @@ -1157,7 +1157,7 @@ msgstr "" "test tiers peuvent être utilisés pour construire des suites de tests " "exhaustives qui éprouvent chaque ligne de code dans un module." -#: faq/design.rst:586 +#: faq/design.rst:583 msgid "" "An appropriate testing discipline can help build large complex applications " "in Python as well as having interface specifications would. In fact, it can " @@ -1177,7 +1177,7 @@ msgstr "" "réellement le faire correctement, mais il est trivial de vérifier cette " "propriété dans une suite de tests." -#: faq/design.rst:594 +#: faq/design.rst:591 msgid "" "Writing test suites is very helpful, and you might want to design your code " "to make it easily tested. One increasingly popular technique, test-driven " @@ -1192,11 +1192,11 @@ msgstr "" "le code réel. Bien sûr, Python vous permet d'être laxiste et de ne pas " "écrire de test du tout." -#: faq/design.rst:602 +#: faq/design.rst:599 msgid "Why is there no goto?" msgstr "Pourquoi n'y a-t-il pas de ``goto`` en Python ?" -#: faq/design.rst:604 +#: faq/design.rst:601 msgid "" "In the 1970s people realized that unrestricted goto could lead to messy " "\"spaghetti\" code that was hard to understand and revise. In a high-level " @@ -1205,22 +1205,28 @@ msgid "" "expressions) and loop (with ``while`` and ``for`` statements, possibly " "containing ``continue`` and ``break``)." msgstr "" +"Dans les années 1970, les gens se sont aperçus que le foisonnement de *goto* " +"conduisait à du code « spaghetti » difficile à comprendre et à modifier. " +"Dans les langages de haut niveau, c'est d'autant moins nécessaire qu'il " +"existe différentes manières de créer des branches (en Python, les " +"instructions ``if`` et les expressions ``or``, ``and`` et ``if-else``) et de " +"boucler (avec les instructions ``while`` et ``for``, qui peuvent contenir " +"des ``continue`` et ``break``)." -#: faq/design.rst:611 -#, fuzzy +#: faq/design.rst:608 msgid "" "One can also use exceptions to provide a \"structured goto\" that works even " "across function calls. Many feel that exceptions can conveniently emulate " "all reasonable uses of the \"go\" or \"goto\" constructs of C, Fortran, and " "other languages. For example::" msgstr "" -"Vous pouvez utiliser les exceptions afin de mettre en place un \"``goto`` " -"structuré\" qui fonctionne même avec les appels de fonctions. Beaucoup de " -"personnes estiment que les exceptions peuvent émuler idéalement tout " -"utilisation raisonnable des constructions ``go`` ou ``goto`` en C, en " -"Fortran ou autres langages de programmation. Par exemple ::" +"Vous pouvez utiliser les exceptions afin de mettre en place un « *goto* " +"structuré » qui fonctionne même à travers les appels de fonctions. Beaucoup " +"de personnes estiment que les exceptions sont une façon commode d'émuler " +"l'utilisation raisonnable des constructions *go* ou *goto* du C, du Fortran " +"ou d'autres langages de programmation. Par exemple ::" -#: faq/design.rst:627 +#: faq/design.rst:624 msgid "" "This doesn't allow you to jump into the middle of a loop, but that's usually " "considered an abuse of goto anyway. Use sparingly." @@ -1229,13 +1235,13 @@ msgstr "" "tous les cas cela est généralement considéré comme un abus de ``goto``. À " "Utiliser avec parcimonie." -#: faq/design.rst:632 +#: faq/design.rst:629 msgid "Why can't raw strings (r-strings) end with a backslash?" msgstr "" "Pourquoi les chaînes de caractères brutes (r-strings) ne peuvent-elles pas " "se terminer par un *backslash* ?" -#: faq/design.rst:634 +#: faq/design.rst:631 msgid "" "More precisely, they can't end with an odd number of backslashes: the " "unpaired backslash at the end escapes the closing quote character, leaving " @@ -1245,7 +1251,7 @@ msgstr "" "*backslashes* : le *backslash* non appairé à la fin échappe le caractère de " "guillemet final, laissant une chaîne non terminée." -#: faq/design.rst:638 +#: faq/design.rst:635 msgid "" "Raw strings were designed to ease creating input for processors (chiefly " "regular expression engines) that want to do their own backslash escape " @@ -1263,29 +1269,29 @@ msgstr "" "chaîne en l'échappant avec un *antislash*. Ces règles fonctionnent bien " "lorsque les chaînes brutes sont utilisées pour leur but premier." -#: faq/design.rst:645 +#: faq/design.rst:642 msgid "" "If you're trying to build Windows pathnames, note that all Windows system " "calls accept forward slashes too::" msgstr "" "Si vous essayez de construire des chemins d'accès Windows, notez que tous " -"les appels système Windows acceptent également les *slashes* \"classiques" -"\" ::" +"les appels système Windows acceptent également les *slashes* " +"\"classiques\" ::" -#: faq/design.rst:650 +#: faq/design.rst:647 msgid "" "If you're trying to build a pathname for a DOS command, try e.g. one of ::" msgstr "" "Si vous essayez de construire un chemin d'accès pour une commande DOS, " "essayez par exemple l'un de ceux-là ::" -#: faq/design.rst:658 +#: faq/design.rst:655 msgid "Why doesn't Python have a \"with\" statement for attribute assignments?" msgstr "" "Pourquoi la déclaration ``with`` pour les assignations d'attributs n'existe " "pas en Python ?" -#: faq/design.rst:660 +#: faq/design.rst:657 msgid "" "Python has a 'with' statement that wraps the execution of a block, calling " "code on the entrance and exit from the block. Some languages have a " @@ -1295,11 +1301,11 @@ msgstr "" "appelant le code sur l'entrée et la sortie du bloc. Certains langages " "possèdent une construction qui ressemble à ceci ::" -#: faq/design.rst:668 +#: faq/design.rst:665 msgid "In Python, such a construct would be ambiguous." msgstr "En Python, une telle construction serait ambiguë." -#: faq/design.rst:670 +#: faq/design.rst:667 msgid "" "Other languages, such as Object Pascal, Delphi, and C++, use static types, " "so it's possible to know, in an unambiguous way, what member is being " @@ -1312,7 +1318,7 @@ msgstr "" "statique --le compilateur connaît *toujours* la portée de toutes les " "variables au moment de la compilation." -#: faq/design.rst:675 +#: faq/design.rst:672 msgid "" "Python uses dynamic types. It is impossible to know in advance which " "attribute will be referenced at runtime. Member attributes may be added or " @@ -1326,11 +1332,11 @@ msgstr "" "impossible de savoir, d'une simple lecture, quel attribut est référencé : " "s'il est local, global ou un attribut membre?" -#: faq/design.rst:681 +#: faq/design.rst:678 msgid "For instance, take the following incomplete snippet::" msgstr "Prenons par exemple l'extrait incomplet suivant ::" -#: faq/design.rst:687 +#: faq/design.rst:684 msgid "" "The snippet assumes that \"a\" must have a member attribute called \"x\". " "However, there is nothing in Python that tells the interpreter this. What " @@ -1344,7 +1350,7 @@ msgstr "" "\"x\" existe, sera-t-elle utilisée dans le bloc ``with`` ? Comme vous " "voyez, la nature dynamique du Python rend ces choix beaucoup plus difficiles." -#: faq/design.rst:693 +#: faq/design.rst:690 msgid "" "The primary benefit of \"with\" and similar language features (reduction of " "code volume) can, however, easily be achieved in Python by assignment. " @@ -1354,11 +1360,11 @@ msgstr "" "similaires (réduction du volume de code) peut, cependant, être facilement " "réalisé en Python par assignation. Au lieu de ::" -#: faq/design.rst:700 +#: faq/design.rst:697 msgid "write this::" msgstr "écrivez ceci ::" -#: faq/design.rst:707 +#: faq/design.rst:704 msgid "" "This also has the side-effect of increasing execution speed because name " "bindings are resolved at run-time in Python, and the second version only " @@ -1368,13 +1374,31 @@ msgstr "" "car les liaisons de noms sont résolues au moment de l'exécution en Python, " "et la deuxième version n'a besoin d'exécuter la résolution qu'une seule fois." -#: faq/design.rst:713 +#: faq/design.rst:710 +msgid "Why don't generators support the with statement?" +msgstr "" +"Pourquoi l'instruction ``with`` ne prend-elle pas en charge les générateurs ?" + +#: faq/design.rst:712 +msgid "" +"For technical reasons, a generator used directly as a context manager would " +"not work correctly. When, as is most common, a generator is used as an " +"iterator run to completion, no closing is needed. When it is, wrap it as " +"\"contextlib.closing(generator)\" in the 'with' statement." +msgstr "" +"Pour des raisons d'ordre technique, un générateur utilisé directement comme " +"gestionnaire de contexte ne pourrait pas fonctionner. Dans le cas le plus " +"courant, où un générateur est utilisé jusqu'à épuisement, il n'y a pas " +"besoin de le fermer. Sinon, on peut toujours mettre ``contextlib." +"closing(générateur)`` dans la ligne du ``with``." + +#: faq/design.rst:719 msgid "Why are colons required for the if/while/def/class statements?" msgstr "" "Pourquoi les deux-points sont-ils nécessaires pour les déclarations ``if/" "while/def/class`` ?" -#: faq/design.rst:715 +#: faq/design.rst:721 msgid "" "The colon is required primarily to enhance readability (one of the results " "of the experimental ABC language). Consider this::" @@ -1382,11 +1406,11 @@ msgstr "" "Le deux-points est principalement nécessaires pour améliorer la lisibilité " "(l'un des résultats du langage expérimental ABC). Considérez ceci ::" -#: faq/design.rst:721 +#: faq/design.rst:727 msgid "versus ::" msgstr "versus ::" -#: faq/design.rst:726 +#: faq/design.rst:732 msgid "" "Notice how the second one is slightly easier to read. Notice further how a " "colon sets off the example in this FAQ answer; it's a standard usage in " @@ -1396,7 +1420,7 @@ msgstr "" "aussi comment un deux-points introduit l'exemple dans cette réponse à la " "FAQ ; c'est un usage standard en anglais." -#: faq/design.rst:729 +#: faq/design.rst:735 msgid "" "Another minor reason is that the colon makes it easier for editors with " "syntax highlighting; they can look for colons to decide when indentation " @@ -1408,13 +1432,13 @@ msgstr "" "pour décider quand l'indentation doit être augmentée au lieu d'avoir à faire " "une analyse plus élaborée du texte du programme." -#: faq/design.rst:735 +#: faq/design.rst:741 msgid "Why does Python allow commas at the end of lists and tuples?" msgstr "" "Pourquoi Python permet-il les virgules à la fin des listes et des *n*-" "uplets ?" -#: faq/design.rst:737 +#: faq/design.rst:743 msgid "" "Python lets you add a trailing comma at the end of lists, tuples, and " "dictionaries::" @@ -1422,11 +1446,11 @@ msgstr "" "Python vous permet d'ajouter une virgule à la fin des listes, des *n*-uplets " "et des dictionnaires ::" -#: faq/design.rst:748 +#: faq/design.rst:754 msgid "There are several reasons to allow this." msgstr "Il y a plusieurs raisons d'accepter cela." -#: faq/design.rst:750 +#: faq/design.rst:756 msgid "" "When you have a literal value for a list, tuple, or dictionary spread across " "multiple lines, it's easier to add more elements because you don't have to " @@ -1439,7 +1463,7 @@ msgstr "" "virgule à la ligne précédente. Les lignes peuvent aussi être réorganisées " "sans créer une erreur de syntaxe." -#: faq/design.rst:755 +#: faq/design.rst:761 msgid "" "Accidentally omitting the comma can lead to errors that are hard to " "diagnose. For example::" @@ -1447,7 +1471,7 @@ msgstr "" "L'omission accidentelle de la virgule peut entraîner des erreurs difficiles " "à diagnostiquer, par exemple ::" -#: faq/design.rst:765 +#: faq/design.rst:771 msgid "" "This list looks like it has four elements, but it actually contains three: " "\"fee\", \"fiefoo\" and \"fum\". Always adding the comma avoids this source " @@ -1457,7 +1481,7 @@ msgstr "" "trois : \"*fee*\", \"*fiefoo*\" et \"*fum*\". Toujours ajouter la virgule " "permet d'éviter cette source d'erreur." -#: faq/design.rst:768 +#: faq/design.rst:774 msgid "" "Allowing the trailing comma may also make programmatic code generation " "easier." diff --git a/faq/extending.po b/faq/extending.po index fdfc986a35..702d32a31f 100644 --- a/faq/extending.po +++ b/faq/extending.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-03-03 19:27+0100\n" "Last-Translator: ZepmanBC \n" "Language-Team: FRENCH \n" @@ -49,10 +49,10 @@ msgstr "Puis-je créer mes propres fonctions en C++ ?" #: faq/extending.rst:28 msgid "" -"Yes, using the C compatibility features found in C++. Place ``extern \"C" -"\" { ... }`` around the Python include files and put ``extern \"C\"`` before " -"each function that is going to be called by the Python interpreter. Global " -"or static C++ objects with constructors are probably not a good idea." +"Yes, using the C compatibility features found in C++. Place ``extern " +"\"C\" { ... }`` around the Python include files and put ``extern \"C\"`` " +"before each function that is going to be called by the Python interpreter. " +"Global or static C++ objects with constructors are probably not a good idea." msgstr "" "Oui, en utilisant les fonctionnalités de compatibilité C existantes en C++. " "Placez ``extern \"C\" { ... }`` autour des fichiers Python inclus et mettez " @@ -337,10 +337,10 @@ msgid "" "work for C++ objects." msgstr "" "Selon vos besoins, de nombreuses approches sont possibles. Pour le faire " -"manuellement, commencez par lire :ref:`le document \"Extension et intégration" -"\" `. Sachez que pour le système d'exécution Python, il n'y " -"a pas beaucoup de différence entre C et C++ — donc la méthode pour " -"construire un nouveau type Python à partir d'une structure C (pointeur) " +"manuellement, commencez par lire :ref:`le document \"Extension et " +"intégration\" `. Sachez que pour le système d'exécution " +"Python, il n'y a pas beaucoup de différence entre C et C++ — donc la méthode " +"pour construire un nouveau type Python à partir d'une structure C (pointeur) " "fonctionne également avec des objets en C++." #: faq/extending.rst:212 @@ -414,13 +414,13 @@ msgstr "" msgid "For Debian, run ``apt-get install python-dev``." msgstr "Pour Debian, exécutez ``apt-get install python-dev``." -#: faq/extending.rst:259 +#: faq/extending.rst:258 msgid "How do I tell \"incomplete input\" from \"invalid input\"?" msgstr "" "Comment distinguer une « entrée incomplète » (*incomplete input*) d'une " "« entrée invalide » (*invalid input*) ?" -#: faq/extending.rst:261 +#: faq/extending.rst:260 msgid "" "Sometimes you want to emulate the Python interactive interpreter's behavior, " "where it gives you a continuation prompt when the input is incomplete (e.g. " @@ -434,7 +434,7 @@ msgstr "" "vous n'avez pas fermé vos parenthèses ou triple guillemets) mais il vous " "renvoie immédiatement une erreur syntaxique quand la saisie est incorrecte." -#: faq/extending.rst:267 +#: faq/extending.rst:266 msgid "" "In Python you can use the :mod:`codeop` module, which approximates the " "parser's behavior sufficiently. IDLE uses this, for example." @@ -442,7 +442,7 @@ msgstr "" "En Python, vous pouvez utiliser le module :mod:`codeop`, qui se rapproche " "assez du comportement de l'analyseur. Par exemple, IDLE l'utilise." -#: faq/extending.rst:270 +#: faq/extending.rst:269 msgid "" "The easiest way to do it in C is to call :c:func:`PyRun_InteractiveLoop` " "(perhaps in a separate thread) and let the Python interpreter handle the " @@ -458,50 +458,12 @@ msgstr "" "myreadline.c`` pour plus de conseils." #: faq/extending.rst:276 -msgid "" -"However sometimes you have to run the embedded Python interpreter in the " -"same thread as your rest application and you can't allow the :c:func:" -"`PyRun_InteractiveLoop` to stop while waiting for user input. The one " -"solution then is to call :c:func:`PyParser_ParseString` and test for ``e." -"error`` equal to ``E_EOF``, which means the input is incomplete. Here's a " -"sample code fragment, untested, inspired by code from Alex Farber::" -msgstr "" -"Cependant, vous devez parfois exécuter l'interpréteur Python intégré dans le " -"même fil d’exécution que le reste de votre application et vous ne pouvez pas " -"laisser :c:func:`PyRun_InteractiveLoop` attendre les entrées utilisateur. La " -"seule solution est alors d'appeler :c:func:`PyParser_ParseString` et de " -"tester si ``e.error`` égale ``E_EOF``, ce qui signifie que l'entrée est " -"incomplète. Voici un exemple de code, non testé, inspiré d'un code écrit par " -"Alex Farber ::" - -#: faq/extending.rst:310 -msgid "" -"Another solution is trying to compile the received string with :c:func:" -"`Py_CompileString`. If it compiles without errors, try to execute the " -"returned code object by calling :c:func:`PyEval_EvalCode`. Otherwise save " -"the input for later. If the compilation fails, find out if it's an error or " -"just more input is required - by extracting the message string from the " -"exception tuple and comparing it to the string \"unexpected EOF while parsing" -"\". Here is a complete example using the GNU readline library (you may want " -"to ignore **SIGINT** while calling readline())::" -msgstr "" -"Une autre solution est d'essayer de compiler la chaîne reçue avec :c:func:" -"`Py_CompileString`. Si cela se compile sans erreur, essayez d'exécuter " -"l'objet code renvoyé en appelant :c:func:`PyEval_EvalCode`. Sinon, " -"enregistrez l'entrée pour plus tard. Si la compilation échoue, vérifiez s'il " -"s'agit d'une erreur ou s'il faut juste plus de données — en extrayant la " -"chaîne de message du *n*-uplet d'exception et en la comparant à la chaîne *" -"\"unexpected EOF while parsing\"*. Voici un exemple complet d'utilisation de " -"la bibliothèque *readline* de GNU (il vous est possible d'ignorer **SIGINT** " -"lors de l'appel à ``readline()``) ::" - -#: faq/extending.rst:432 msgid "How do I find undefined g++ symbols __builtin_new or __pure_virtual?" msgstr "" "Comment puis-je trouver les symboles g++ indéfinis ``__builtin_new`` ou " "``__pure_virtual`` ?" -#: faq/extending.rst:434 +#: faq/extending.rst:278 msgid "" "To dynamically load g++ extension modules, you must recompile Python, relink " "it using g++ (change LINKCC in the Python Modules Makefile), and link your " @@ -513,7 +475,7 @@ msgstr "" "de votre module d'extension avec g++ (par exemple, ``g++ -shared -o mymodule." "so mymodule.o``)." -#: faq/extending.rst:440 +#: faq/extending.rst:284 msgid "" "Can I create an object class with some methods implemented in C and others " "in Python (e.g. through inheritance)?" @@ -521,7 +483,7 @@ msgstr "" "Puis-je créer une classe d'objets avec certaines méthodes implémentées en C " "et d'autres en Python (p. ex. en utilisant l'héritage) ?" -#: faq/extending.rst:442 +#: faq/extending.rst:286 msgid "" "Yes, you can inherit from built-in classes such as :class:`int`, :class:" "`list`, :class:`dict`, etc." @@ -529,7 +491,7 @@ msgstr "" "Oui, vous pouvez hériter de classes intégrées telles que :class:`int`, :" "class:`list`, :class:`dict`, etc." -#: faq/extending.rst:445 +#: faq/extending.rst:289 msgid "" "The Boost Python Library (BPL, http://www.boost.org/libs/python/doc/index." "html) provides a way of doing this from C++ (i.e. you can inherit from an " @@ -538,3 +500,40 @@ msgstr "" "La bibliothèque *Boost Python Library* (BPL, http://www.boost.org/libs/" "python/doc/index.html) fournit un moyen de le faire depuis C++ (c.-à-d. que " "vous pouvez hériter d'une classe d'extension écrite en C++ en utilisant BPL)." + +#~ msgid "" +#~ "However sometimes you have to run the embedded Python interpreter in the " +#~ "same thread as your rest application and you can't allow the :c:func:" +#~ "`PyRun_InteractiveLoop` to stop while waiting for user input. The one " +#~ "solution then is to call :c:func:`PyParser_ParseString` and test for ``e." +#~ "error`` equal to ``E_EOF``, which means the input is incomplete. Here's " +#~ "a sample code fragment, untested, inspired by code from Alex Farber::" +#~ msgstr "" +#~ "Cependant, vous devez parfois exécuter l'interpréteur Python intégré dans " +#~ "le même fil d’exécution que le reste de votre application et vous ne " +#~ "pouvez pas laisser :c:func:`PyRun_InteractiveLoop` attendre les entrées " +#~ "utilisateur. La seule solution est alors d'appeler :c:func:" +#~ "`PyParser_ParseString` et de tester si ``e.error`` égale ``E_EOF``, ce " +#~ "qui signifie que l'entrée est incomplète. Voici un exemple de code, non " +#~ "testé, inspiré d'un code écrit par Alex Farber ::" + +#~ msgid "" +#~ "Another solution is trying to compile the received string with :c:func:" +#~ "`Py_CompileString`. If it compiles without errors, try to execute the " +#~ "returned code object by calling :c:func:`PyEval_EvalCode`. Otherwise save " +#~ "the input for later. If the compilation fails, find out if it's an error " +#~ "or just more input is required - by extracting the message string from " +#~ "the exception tuple and comparing it to the string \"unexpected EOF while " +#~ "parsing\". Here is a complete example using the GNU readline library " +#~ "(you may want to ignore **SIGINT** while calling readline())::" +#~ msgstr "" +#~ "Une autre solution est d'essayer de compiler la chaîne reçue avec :c:func:" +#~ "`Py_CompileString`. Si cela se compile sans erreur, essayez d'exécuter " +#~ "l'objet code renvoyé en appelant :c:func:`PyEval_EvalCode`. Sinon, " +#~ "enregistrez l'entrée pour plus tard. Si la compilation échoue, vérifiez " +#~ "s'il s'agit d'une erreur ou s'il faut juste plus de données — en " +#~ "extrayant la chaîne de message du *n*-uplet d'exception et en la " +#~ "comparant à la chaîne *\"unexpected EOF while parsing\"*. Voici un " +#~ "exemple complet d'utilisation de la bibliothèque *readline* de GNU (il " +#~ "vous est possible d'ignorer **SIGINT** lors de l'appel à " +#~ "``readline()``) ::" diff --git a/faq/gui.po b/faq/gui.po index 5c0c5f0a63..d2f71a9f48 100644 --- a/faq/gui.po +++ b/faq/gui.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-09-04 11:44+0200\n" "Last-Translator: Zepmanbc \n" "Language-Team: FRENCH \n" @@ -28,34 +28,17 @@ msgid "General GUI Questions" msgstr "Questions générales sur l'interface graphique" #: faq/gui.rst:18 -msgid "What platform-independent GUI toolkits exist for Python?" -msgstr "" -"Quelles bibliothèques d'interfaces graphiques multi-plateformes existent en " -"Python ?" +msgid "What GUI toolkits exist for Python?" +msgstr "Quelles boîtes à outils IUG existent pour Python ?" #: faq/gui.rst:20 msgid "" -"Depending on what platform(s) you are aiming at, there are several. Some of " -"them haven't been ported to Python 3 yet. At least `Tkinter`_ and `Qt`_ are " -"known to be Python 3-compatible." -msgstr "" -"Selon les plateformes que vous comptez utiliser, il en existe plusieurs. " -"Certaines ne sont cependant pas encore disponibles en Python 3. A minima, " -"`Tkinter`_ et `Qt`_ sont connus pour être compatibles avec Python 3." - -#: faq/gui.rst:27 -msgid "Tkinter" -msgstr "*Tkinter*" - -#: faq/gui.rst:29 -msgid "" "Standard builds of Python include an object-oriented interface to the Tcl/Tk " "widget set, called :ref:`tkinter `. This is probably the easiest " "to install (since it comes included with most `binary distributions `_ of Python) and use. For more info about Tk, " "including pointers to the source, see the `Tcl/Tk home page `_. Tcl/Tk is fully portable to the Mac OS X, Windows, and Unix " -"platforms." +"tk>`_. Tcl/Tk is fully portable to the macOS, Windows, and Unix platforms." msgstr "" "Les versions standards de Python incluent une interface orientée objet pour " "le jeu d'objets graphiques *Tcl/Tk*, appelée :ref:`tkinter `. " @@ -63,187 +46,32 @@ msgstr "" "la plupart des `distributions binaires `_ " "de Python) et à utiliser. Pour plus d'informations sur *Tk*, y compris les " "liens vers les sources, voir la page d'accueil `Tcl/Tk `_. *Tcl/Tk* est entièrement portable sur les plates-formes Mac OS X, " +"tk>`_. *Tcl/Tk* est entièrement portable sur les plates-formes macOS, " "Windows et Unix." -#: faq/gui.rst:38 -msgid "wxWidgets" -msgstr "*wxWidgets*" - -#: faq/gui.rst:40 -msgid "" -"wxWidgets (https://www.wxwidgets.org) is a free, portable GUI class library " -"written in C++ that provides a native look and feel on a number of " -"platforms, with Windows, Mac OS X, GTK, X11, all listed as current stable " -"targets. Language bindings are available for a number of languages " -"including Python, Perl, Ruby, etc." -msgstr "" -"`wxWidgets` (https://www.wxwidgets.org) est une librairie de classe IUG " -"portable et gratuite écrite en C++ qui fournit une apparence native sur un " -"certain nombre de plates-formes, elle est notamment en version stable pour " -"Windows, Mac OS X, GTK et X11. Des clients sont disponibles pour un certain " -"nombre de langages, y compris Python, Perl, Ruby, etc." - -#: faq/gui.rst:46 -msgid "" -"`wxPython `_ is the Python binding for wxwidgets. " -"While it often lags slightly behind the official wxWidgets releases, it also " -"offers a number of features via pure Python extensions that are not " -"available in other language bindings. There is an active wxPython user and " -"developer community." -msgstr "" -"`wxPython `_ est le portage Python de *wxWidgets*. " -"Bien qu’il soit légèrement en retard sur les versions officielles de " -"*wxWidgets*, il offre également des fonctionnalités propres à Python qui ne " -"sont pas disponibles pour les clients d'autres langages. *WxPython* dispose " -"de plus, d’une communauté d’utilisateurs et de développeurs active." - -#: faq/gui.rst:52 -msgid "" -"Both wxWidgets and wxPython are free, open source, software with permissive " -"licences that allow their use in commercial products as well as in freeware " -"or shareware." -msgstr "" -"*wxWidgets* et *wxPython* sont tous deux des logiciels libres, open source, " -"avec des licences permissives qui permettent leur utilisation dans des " -"produits commerciaux ainsi que dans des logiciels gratuits ou contributifs " -"(*shareware*)." - -#: faq/gui.rst:58 -msgid "Qt" -msgstr "*Qt*" - -#: faq/gui.rst:60 -msgid "" -"There are bindings available for the Qt toolkit (using either `PyQt `_ or `PySide `_) and for KDE (`PyKDE4 `__). PyQt is currently more mature than PySide, but you must " -"buy a PyQt license from `Riverbank Computing `_ if you want to write proprietary " -"applications. PySide is free for all applications." -msgstr "" -"Il existe des liens disponibles pour la boîte à outils *Qt* (en utilisant " -"soit `PyQt `_ ou `PySide " -"`_) et pour *KDE* (`PyKDE4 `__). *PyQt* est actuellement plus mûre " -"que *PySide*, mais*PyQt* nécessite d'acheter une licence de `Riverbank " -"Computing `_ si " -"vous voulez écrire des applications propriétaires. *PySide* est gratuit " -"pour toutes les applications." - -#: faq/gui.rst:67 -msgid "" -"Qt 4.5 upwards is licensed under the LGPL license; also, commercial licenses " -"are available from `The Qt Company `_." -msgstr "" -"*Qt >= 4.5* est sous licence LGPL ; de plus, des licences commerciales sont " -"disponibles auprès de `The Qt Company `_." - -#: faq/gui.rst:71 -msgid "Gtk+" -msgstr "*Gtk+*" - -#: faq/gui.rst:73 -msgid "" -"The `GObject introspection bindings `_ for Python allow you to write GTK+ 3 applications. There is " -"also a `Python GTK+ 3 Tutorial `_." -msgstr "" -"Les `GObject introspection bindings `_ pour Python vous permettent d'écrire des applications GTK+ 3. " -"Il y a aussi un tutoriel `Python GTK+ 3 `_." - -#: faq/gui.rst:77 -msgid "" -"The older PyGtk bindings for the `Gtk+ 2 toolkit `_ " -"have been implemented by James Henstridge; see ." -msgstr "" -"Les anciennes versions de *PyGtk* pour le `Gtk+ 2 toolkit `_ ont été implémentées par James Henstridge ; voir ." - -#: faq/gui.rst:81 -msgid "Kivy" -msgstr "*Kivy*" - -#: faq/gui.rst:83 -msgid "" -"`Kivy `_ is a cross-platform GUI library supporting both " -"desktop operating systems (Windows, macOS, Linux) and mobile devices " -"(Android, iOS). It is written in Python and Cython, and can use a range of " -"windowing backends." -msgstr "" -"`*Kivy* `_ est une bibliothèque GUI multi-plateformes " -"disponible à la fois sur les systèmes d'exploitation de bureau (Windows, " -"MacOS, Linux) et les appareils mobiles (Android, iOS). Elle est écrite en " -"Python et Cython, et peut utiliser une série de fenêtres de *backends*." - -#: faq/gui.rst:88 -msgid "" -"Kivy is free and open source software distributed under the MIT license." -msgstr "" -"*Kivy* est un logiciel libre et open source distribué sous licence MIT." - -#: faq/gui.rst:91 -msgid "FLTK" -msgstr "*FLTK*" - -#: faq/gui.rst:93 -msgid "" -"Python bindings for `the FLTK toolkit `_, a simple yet " -"powerful and mature cross-platform windowing system, are available from `the " -"PyFLTK project `_." -msgstr "" -"Les liaisons Python pour `the FLTK toolkit `_, un " -"système de fenêtrage multi-plateformes simple mais puissant et mûr, sont " -"disponibles auprès de `the PyFLTK project `_." - -#: faq/gui.rst:98 -msgid "OpenGL" -msgstr "*OpenGL*" - -#: faq/gui.rst:100 -msgid "For OpenGL bindings, see `PyOpenGL `_." -msgstr "" -"Pour les clients OpenGL, voir `PyOpenGL `_." - -#: faq/gui.rst:104 -msgid "What platform-specific GUI toolkits exist for Python?" -msgstr "" -"Quelles boîtes à outils IUG spécifiques à la plate-forme existent pour " -"Python ?" - -#: faq/gui.rst:106 +#: faq/gui.rst:28 msgid "" -"By installing the `PyObjc Objective-C bridge `_, Python programs can use Mac OS X's Cocoa libraries." +"Depending on what platform(s) you are aiming at, there are also several " +"alternatives. A `list of cross-platform `_ and `platform-specific `_ GUI " +"frameworks can be found on the python wiki." msgstr "" -"En installant le `PyObjc Objective-C bridge `_, les programmes Python peuvent utiliser les bibliothèques Cocoa de Mac " -"OS X." +"D'autres outils existent. Le choix doit dépendre notamment de la ou des " +"plateformes que vous visez. Sur le Wiki Python se trouvent des listes de " +"bibliothèques graphiques `multiplateformes `_ et `pour une seule plate-forme " +"`_." -#: faq/gui.rst:110 -msgid "" -":ref:`Pythonwin ` by Mark Hammond includes an interface to the " -"Microsoft Foundation Classes and a Python programming environment that's " -"written mostly in Python using the MFC classes." -msgstr "" -":ref:`Pythonwin ` de Mark Hammond inclut une interface vers les " -"classes `Microsoft Foundation Classes` et un environnement de programmation " -"Python qui est écrit principalement en Python utilisant les classes *MFC*." - -#: faq/gui.rst:116 +#: faq/gui.rst:36 msgid "Tkinter questions" msgstr "Questions à propos de *Tkinter*" -#: faq/gui.rst:119 +#: faq/gui.rst:39 msgid "How do I freeze Tkinter applications?" msgstr "Comment puis-je geler (*freezer*) les applications *Tkinter* ?" -#: faq/gui.rst:121 +#: faq/gui.rst:41 msgid "" "Freeze is a tool to create stand-alone applications. When freezing Tkinter " "applications, the applications will not be truly stand-alone, as the " @@ -254,7 +82,7 @@ msgstr "" "autonomes, car l'application aura toujours besoin des bibliothèques Tcl et " "Tk." -#: faq/gui.rst:125 +#: faq/gui.rst:45 msgid "" "One solution is to ship the application with the Tcl and Tk libraries, and " "point to them at run-time using the :envvar:`TCL_LIBRARY` and :envvar:" @@ -264,7 +92,7 @@ msgstr "" "l'application et de les retrouver à l'exécution en utilisant les variables " "d'environnement :envvar:`TCL_LIBRARY` et :envvar:`TK_LIBRARY`." -#: faq/gui.rst:129 +#: faq/gui.rst:49 msgid "" "To get truly stand-alone applications, the Tcl scripts that form the library " "have to be integrated into the application as well. One tool supporting that " @@ -276,7 +104,7 @@ msgstr "" "Un outil supportant cela est *SAM* (modules autonomes), qui fait partie de " "la distribution *Tix* (http://tix.sourceforge.net/)." -#: faq/gui.rst:134 +#: faq/gui.rst:54 msgid "" "Build Tix with SAM enabled, perform the appropriate call to :c:func:" "`Tclsam_init`, etc. inside Python's :file:`Modules/tkappinit.c`, and link " @@ -287,11 +115,11 @@ msgstr "" "et liez avec *libtclsam* et *libtksam* (il est également possible d'inclure " "les bibliothèques *Tix*)." -#: faq/gui.rst:141 +#: faq/gui.rst:61 msgid "Can I have Tk events handled while waiting for I/O?" msgstr "Puis-je modifier des événements *Tk* pendant l'écoute des *E/S* ?" -#: faq/gui.rst:143 +#: faq/gui.rst:63 msgid "" "On platforms other than Windows, yes, and you don't even need threads! But " "you'll have to restructure your I/O code a bit. Tk has the equivalent of " @@ -306,13 +134,13 @@ msgstr "" "appelée par la boucle principale *Tk* lorsque des *E/S* sont disponibles sur " "un descripteur de fichier. Voir :ref:`tkinter-file-handlers`." -#: faq/gui.rst:151 +#: faq/gui.rst:71 msgid "I can't get key bindings to work in Tkinter: why?" msgstr "" "Je n'arrive pas à faire fonctionner les raccourcis clavier dans *Tkinter* : " "pourquoi ?" -#: faq/gui.rst:153 +#: faq/gui.rst:73 msgid "" "An often-heard complaint is that event handlers bound to events with the :" "meth:`bind` method don't get handled even when the appropriate key is " @@ -322,7 +150,7 @@ msgstr "" "évènements avec la méthode :meth:`bind` ne sont pas pris en charge même " "lorsque la touche appropriée est activée." -#: faq/gui.rst:156 +#: faq/gui.rst:76 msgid "" "The most common cause is that the widget to which the binding applies " "doesn't have \"keyboard focus\". Check out the Tk documentation for the " @@ -334,3 +162,171 @@ msgstr "" "la commande *focus*. Habituellement, un objet graphique reçoit le focus du " "clavier en cliquant dessus (mais pas pour les étiquettes ; voir l'option " "*takefocus*)." + +#~ msgid "What platform-independent GUI toolkits exist for Python?" +#~ msgstr "" +#~ "Quelles bibliothèques d'interfaces graphiques multi-plateformes existent " +#~ "en Python ?" + +#~ msgid "" +#~ "Depending on what platform(s) you are aiming at, there are several. Some " +#~ "of them haven't been ported to Python 3 yet. At least `Tkinter`_ and " +#~ "`Qt`_ are known to be Python 3-compatible." +#~ msgstr "" +#~ "Selon les plateformes que vous comptez utiliser, il en existe plusieurs. " +#~ "Certaines ne sont cependant pas encore disponibles en Python 3. A minima, " +#~ "`Tkinter`_ et `Qt`_ sont connus pour être compatibles avec Python 3." + +#~ msgid "Tkinter" +#~ msgstr "*Tkinter*" + +#~ msgid "wxWidgets" +#~ msgstr "*wxWidgets*" + +#~ msgid "" +#~ "wxWidgets (https://www.wxwidgets.org) is a free, portable GUI class " +#~ "library written in C++ that provides a native look and feel on a number " +#~ "of platforms, with Windows, Mac OS X, GTK, X11, all listed as current " +#~ "stable targets. Language bindings are available for a number of " +#~ "languages including Python, Perl, Ruby, etc." +#~ msgstr "" +#~ "`wxWidgets` (https://www.wxwidgets.org) est une librairie de classe IUG " +#~ "portable et gratuite écrite en C++ qui fournit une apparence native sur " +#~ "un certain nombre de plates-formes, elle est notamment en version stable " +#~ "pour Windows, Mac OS X, GTK et X11. Des clients sont disponibles pour un " +#~ "certain nombre de langages, y compris Python, Perl, Ruby, etc." + +#~ msgid "" +#~ "`wxPython `_ is the Python binding for " +#~ "wxwidgets. While it often lags slightly behind the official wxWidgets " +#~ "releases, it also offers a number of features via pure Python extensions " +#~ "that are not available in other language bindings. There is an active " +#~ "wxPython user and developer community." +#~ msgstr "" +#~ "`wxPython `_ est le portage Python de " +#~ "*wxWidgets*. Bien qu’il soit légèrement en retard sur les versions " +#~ "officielles de *wxWidgets*, il offre également des fonctionnalités " +#~ "propres à Python qui ne sont pas disponibles pour les clients d'autres " +#~ "langages. *WxPython* dispose de plus, d’une communauté d’utilisateurs et " +#~ "de développeurs active." + +#~ msgid "" +#~ "Both wxWidgets and wxPython are free, open source, software with " +#~ "permissive licences that allow their use in commercial products as well " +#~ "as in freeware or shareware." +#~ msgstr "" +#~ "*wxWidgets* et *wxPython* sont tous deux des logiciels libres, open " +#~ "source, avec des licences permissives qui permettent leur utilisation " +#~ "dans des produits commerciaux ainsi que dans des logiciels gratuits ou " +#~ "contributifs (*shareware*)." + +#~ msgid "Qt" +#~ msgstr "*Qt*" + +#~ msgid "" +#~ "There are bindings available for the Qt toolkit (using either `PyQt " +#~ "`_ or `PySide " +#~ "`_) and for KDE (`PyKDE4 `__). PyQt is currently more mature " +#~ "than PySide, but you must buy a PyQt license from `Riverbank Computing " +#~ "`_ if you want " +#~ "to write proprietary applications. PySide is free for all applications." +#~ msgstr "" +#~ "Il existe des liens disponibles pour la boîte à outils *Qt* (en utilisant " +#~ "soit `PyQt `_ ou " +#~ "`PySide `_) et pour *KDE* (`PyKDE4 `__). *PyQt* est " +#~ "actuellement plus mûre que *PySide*, mais*PyQt* nécessite d'acheter une " +#~ "licence de `Riverbank Computing `_ si vous voulez écrire des applications " +#~ "propriétaires. *PySide* est gratuit pour toutes les applications." + +#~ msgid "" +#~ "Qt 4.5 upwards is licensed under the LGPL license; also, commercial " +#~ "licenses are available from `The Qt Company `_." +#~ msgstr "" +#~ "*Qt >= 4.5* est sous licence LGPL ; de plus, des licences commerciales " +#~ "sont disponibles auprès de `The Qt Company `_." + +#~ msgid "Gtk+" +#~ msgstr "*Gtk+*" + +#~ msgid "" +#~ "The `GObject introspection bindings `_ for Python allow you to write GTK+ 3 applications. There is " +#~ "also a `Python GTK+ 3 Tutorial `_." +#~ msgstr "" +#~ "Les `GObject introspection bindings `_ pour Python vous permettent d'écrire des applications GTK+ " +#~ "3. Il y a aussi un tutoriel `Python GTK+ 3 `_." + +#~ msgid "" +#~ "The older PyGtk bindings for the `Gtk+ 2 toolkit `_ " +#~ "have been implemented by James Henstridge; see ." +#~ msgstr "" +#~ "Les anciennes versions de *PyGtk* pour le `Gtk+ 2 toolkit `_ ont été implémentées par James Henstridge ; voir ." + +#~ msgid "Kivy" +#~ msgstr "*Kivy*" + +#~ msgid "" +#~ "`Kivy `_ is a cross-platform GUI library supporting " +#~ "both desktop operating systems (Windows, macOS, Linux) and mobile devices " +#~ "(Android, iOS). It is written in Python and Cython, and can use a range " +#~ "of windowing backends." +#~ msgstr "" +#~ "`*Kivy* `_ est une bibliothèque GUI multi-plateformes " +#~ "disponible à la fois sur les systèmes d'exploitation de bureau (Windows, " +#~ "MacOS, Linux) et les appareils mobiles (Android, iOS). Elle est écrite " +#~ "en Python et Cython, et peut utiliser une série de fenêtres de *backends*." + +#~ msgid "" +#~ "Kivy is free and open source software distributed under the MIT license." +#~ msgstr "" +#~ "*Kivy* est un logiciel libre et open source distribué sous licence MIT." + +#~ msgid "FLTK" +#~ msgstr "*FLTK*" + +#~ msgid "" +#~ "Python bindings for `the FLTK toolkit `_, a simple " +#~ "yet powerful and mature cross-platform windowing system, are available " +#~ "from `the PyFLTK project `_." +#~ msgstr "" +#~ "Les liaisons Python pour `the FLTK toolkit `_, un " +#~ "système de fenêtrage multi-plateformes simple mais puissant et mûr, sont " +#~ "disponibles auprès de `the PyFLTK project `_." + +#~ msgid "OpenGL" +#~ msgstr "*OpenGL*" + +#~ msgid "" +#~ "For OpenGL bindings, see `PyOpenGL `_." +#~ msgstr "" +#~ "Pour les clients OpenGL, voir `PyOpenGL `_." + +#~ msgid "" +#~ "By installing the `PyObjc Objective-C bridge `_, Python programs can use Mac OS X's Cocoa libraries." +#~ msgstr "" +#~ "En installant le `PyObjc Objective-C bridge `_, les programmes Python peuvent utiliser les bibliothèques " +#~ "Cocoa de Mac OS X." + +#~ msgid "" +#~ ":ref:`Pythonwin ` by Mark Hammond includes an interface to " +#~ "the Microsoft Foundation Classes and a Python programming environment " +#~ "that's written mostly in Python using the MFC classes." +#~ msgstr "" +#~ ":ref:`Pythonwin ` de Mark Hammond inclut une interface vers " +#~ "les classes `Microsoft Foundation Classes` et un environnement de " +#~ "programmation Python qui est écrit principalement en Python utilisant les " +#~ "classes *MFC*." diff --git a/faq/installed.po b/faq/installed.po index 5e2e4c400d..f28a68a33d 100644 --- a/faq/installed.po +++ b/faq/installed.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-10-04 16:57+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -93,12 +93,12 @@ msgstr "" #: faq/installed.rst:32 msgid "" -"Many Unix-compatible operating systems, such as Mac OS X and some Linux " +"Many Unix-compatible operating systems, such as macOS and some Linux " "distributions, have Python installed by default; it's included in the base " "installation." msgstr "" -"Python est installé par défaut et à l'installation par de nombreux systèmes " -"Unix, comme Mac OS X et certaines distributions Linux." +"Python est installé par défaut sur de nombreux systèmes compatibles Unix, " +"comme macOS et certaines distributions Linux." #: faq/installed.rst:38 msgid "Can I delete Python?" diff --git a/faq/library.po b/faq/library.po index ec75211d29..726b1db8c4 100644 --- a/faq/library.po +++ b/faq/library.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-11-07 16:04+0100\n" "Last-Translator: Mindiell \n" "Language-Team: FRENCH \n" @@ -210,19 +210,11 @@ msgstr "" "qui n'ont que le *curses* de BSD mais, de nos jours, de tels systèmes " "d'exploitation ne semblent plus exister ou être maintenus." -#: faq/library.rst:109 -msgid "" -"For Windows: use `the consolelib module `_." -msgstr "" -"Pour Windows : utilisez le module `consolelib `_." - -#: faq/library.rst:114 +#: faq/library.rst:111 msgid "Is there an equivalent to C's onexit() in Python?" msgstr "Existe-t'il un équivalent à la fonction C ``onexit()`` en Python ?" -#: faq/library.rst:116 +#: faq/library.rst:113 msgid "" "The :mod:`atexit` module provides a register function that is similar to " "C's :c:func:`onexit`." @@ -230,11 +222,11 @@ msgstr "" "Le module :mod:`atexit` fournit une fonction d'enregistrement similaire à la " "fonction C :c:func:`onexit`." -#: faq/library.rst:121 +#: faq/library.rst:118 msgid "Why don't my signal handlers work?" msgstr "Pourquoi mes gestionnaires de signaux ne fonctionnent-t'ils pas ?" -#: faq/library.rst:123 +#: faq/library.rst:120 msgid "" "The most common problem is that the signal handler is declared with the " "wrong argument list. It is called as ::" @@ -242,19 +234,19 @@ msgstr "" "Le problème le plus courant est d'appeler le gestionnaire de signaux avec " "les mauvais arguments. Un gestionnaire est appelé de la façon suivante ::" -#: faq/library.rst:128 +#: faq/library.rst:125 msgid "so it should be declared with two parameters::" msgstr "donc il doit être déclaré avec deux paramètres ::" -#: faq/library.rst:135 +#: faq/library.rst:132 msgid "Common tasks" msgstr "Tâches fréquentes" -#: faq/library.rst:138 +#: faq/library.rst:135 msgid "How do I test a Python program or component?" msgstr "Comment tester un programme ou un composant Python ?" -#: faq/library.rst:140 +#: faq/library.rst:137 msgid "" "Python comes with two testing frameworks. The :mod:`doctest` module finds " "examples in the docstrings for a module and runs them, comparing the output " @@ -264,7 +256,7 @@ msgstr "" "exemples dans les *docstrings* d'un module et les exécute. Il compare alors " "la sortie avec la sortie attendue, telle que définie dans la *docstring*." -#: faq/library.rst:144 +#: faq/library.rst:141 msgid "" "The :mod:`unittest` module is a fancier testing framework modelled on Java " "and Smalltalk testing frameworks." @@ -272,7 +264,7 @@ msgstr "" "Le module :mod:`unittest` est un cadriciel un peu plus élaboré basé sur les " "cadriciels de test de Java et de Smalltalk." -#: faq/library.rst:147 +#: faq/library.rst:144 msgid "" "To make testing easier, you should use good modular design in your program. " "Your program should have almost all functionality encapsulated in either " @@ -291,16 +283,16 @@ msgstr "" "manipuler des variables globales, car ceci rend le test beaucoup plus " "difficile." -#: faq/library.rst:155 +#: faq/library.rst:152 msgid "The \"global main logic\" of your program may be as simple as ::" msgstr "" "La « logique générale » d'un programme devrait être aussi simple que ::" -#: faq/library.rst:160 +#: faq/library.rst:157 msgid "at the bottom of the main module of your program." msgstr "à la fin du module principal du programme." -#: faq/library.rst:162 +#: faq/library.rst:159 msgid "" "Once your program is organized as a tractable collection of function and " "class behaviours, you should write test functions that exercise the " @@ -322,7 +314,7 @@ msgstr "" "amusant, car ceci permet de trouver des bogues, voire des défauts de " "conception, plus facilement." -#: faq/library.rst:170 +#: faq/library.rst:167 msgid "" "\"Support modules\" that are not intended to be the main module of a program " "may include a self-test of the module. ::" @@ -330,7 +322,7 @@ msgstr "" "Les « modules auxiliaires » qui n'ont pas vocation à être le module " "principal du programme peuvent inclure un test pour se vérifier eux-mêmes. ::" -#: faq/library.rst:176 +#: faq/library.rst:173 msgid "" "Even programs that interact with complex external interfaces may be tested " "when the external interfaces are unavailable by using \"fake\" interfaces " @@ -340,11 +332,11 @@ msgstr "" "peuvent être testés même quand ces interfaces ne sont pas disponibles, en " "utilisant des interfaces « simulacres » implémentées en Python." -#: faq/library.rst:182 +#: faq/library.rst:179 msgid "How do I create documentation from doc strings?" msgstr "Comment générer la documentation à partir des *docstrings* ?" -#: faq/library.rst:184 +#: faq/library.rst:181 msgid "" "The :mod:`pydoc` module can create HTML from the doc strings in your Python " "source code. An alternative for creating API documentation purely from " @@ -357,11 +349,11 @@ msgstr "" ">`_. `Sphinx `_ peut également inclure du contenu " "provenant de *docstrings*." -#: faq/library.rst:191 +#: faq/library.rst:188 msgid "How do I get a single keypress at a time?" msgstr "Comment détecter qu'une touche est pressée ?" -#: faq/library.rst:193 +#: faq/library.rst:190 msgid "" "For Unix variants there are several solutions. It's straightforward to do " "this using curses, but curses is a fairly large module to learn." @@ -370,15 +362,15 @@ msgstr "" "en utilisant le module *curses*, mais *curses* est un module assez " "conséquent à apprendre." -#: faq/library.rst:237 +#: faq/library.rst:234 msgid "Threads" msgstr "Fils d'exécution" -#: faq/library.rst:240 +#: faq/library.rst:237 msgid "How do I program using threads?" msgstr "Comment programmer avec des fils d'exécution ?" -#: faq/library.rst:242 +#: faq/library.rst:239 msgid "" "Be sure to use the :mod:`threading` module and not the :mod:`_thread` " "module. The :mod:`threading` module builds convenient abstractions on top of " @@ -388,19 +380,11 @@ msgstr "" "`_thread`. Le module :mod:`threading` fournit une abstraction plus facile à " "manipuler que les primitives de bas-niveau du module :mod:`_thread`." -#: faq/library.rst:246 -msgid "" -"Aahz has a set of slides from his threading tutorial that are helpful; see " -"http://www.pythoncraft.com/OSCON2001/." -msgstr "" -"Un ensemble de diapositives issues du didacticiel de Aahz sur les fils " -"d'exécution est disponible à http://www.pythoncraft.com/OSCON2001/." - -#: faq/library.rst:251 +#: faq/library.rst:245 msgid "None of my threads seem to run: why?" msgstr "Aucun de mes fils ne semble s'exécuter : pourquoi ?" -#: faq/library.rst:253 +#: faq/library.rst:247 msgid "" "As soon as the main thread exits, all threads are killed. Your main thread " "is running too quickly, giving the threads no time to do any work." @@ -409,7 +393,7 @@ msgstr "" "fil principal s'exécute trop rapidement, sans laisser le temps aux autres " "fils de faire quoi que ce soit." -#: faq/library.rst:256 +#: faq/library.rst:250 msgid "" "A simple fix is to add a sleep to the end of the program that's long enough " "for all the threads to finish::" @@ -417,7 +401,7 @@ msgstr "" "Une correction simple consiste à ajouter un temps d'attente suffisamment " "long à la fin du programme pour que tous les fils puissent se terminer ::" -#: faq/library.rst:271 +#: faq/library.rst:265 msgid "" "But now (on many platforms) the threads don't run in parallel, but appear to " "run sequentially, one at a time! The reason is that the OS thread scheduler " @@ -428,13 +412,13 @@ msgstr "" "l'autre ! En réalité, l'ordonnanceur de fils du système d'exploitation ne " "démarre pas de nouveau fil avant que le précédent ne soit bloqué." -#: faq/library.rst:275 +#: faq/library.rst:269 msgid "A simple fix is to add a tiny sleep to the start of the run function::" msgstr "" "Une correction simple consiste à ajouter un petit temps d'attente au début " "de la fonction ::" -#: faq/library.rst:288 +#: faq/library.rst:282 msgid "" "Instead of trying to guess a good delay value for :func:`time.sleep`, it's " "better to use some kind of semaphore mechanism. One idea is to use the :mod:" @@ -449,13 +433,13 @@ msgstr "" "quand il se termine, et que le fil principal retire autant de jetons de la " "file qu'il y a de fils." -#: faq/library.rst:296 +#: faq/library.rst:290 msgid "How do I parcel out work among a bunch of worker threads?" msgstr "" "Comment découper et répartir une tâche au sein d'un ensemble de fils " "d'exécutions ?" -#: faq/library.rst:298 +#: faq/library.rst:292 msgid "" "The easiest way is to use the :mod:`concurrent.futures` module, especially " "the :mod:`~concurrent.futures.ThreadPoolExecutor` class." @@ -464,7 +448,7 @@ msgstr "" "futures`, en particulier la classe :mod:`~concurrent.futures." "ThreadPoolExecutor`." -#: faq/library.rst:301 +#: faq/library.rst:295 msgid "" "Or, if you want fine control over the dispatching algorithm, you can write " "your own logic manually. Use the :mod:`queue` module to create a queue " @@ -481,15 +465,15 @@ msgstr "" "pour les récupérer. La classe s'occupe de gérer les verrous pour que chaque " "tâche soit exécutée une et une seule fois." -#: faq/library.rst:308 +#: faq/library.rst:302 msgid "Here's a trivial example::" msgstr "Voici un exemple trivial ::" -#: faq/library.rst:346 +#: faq/library.rst:340 msgid "When run, this will produce the following output:" msgstr "Quand celui-ci est exécuté, il produit la sortie suivante :" -#: faq/library.rst:364 +#: faq/library.rst:358 msgid "" "Consult the module's documentation for more details; the :class:`~queue." "Queue` class provides a featureful interface." @@ -497,13 +481,13 @@ msgstr "" "Consultez la documentation du module pour plus de détails ; la classe :class:" "`~queue.Queue` fournit une interface pleine de fonctionnalités." -#: faq/library.rst:369 +#: faq/library.rst:363 msgid "What kinds of global value mutation are thread-safe?" msgstr "" "Quels types de mutations sur des variables globales sont compatibles avec " "les programmes à fils d'exécution multiples ? sécurisé ?" -#: faq/library.rst:371 +#: faq/library.rst:365 msgid "" "A :term:`global interpreter lock` (GIL) is used internally to ensure that " "only one thread runs in the Python VM at a time. In general, Python offers " @@ -521,7 +505,7 @@ msgstr "" "intermédiaire, et, par conséquent, tout le code C appelé par cette " "instruction est donc atomique du point de vue d'un programme Python." -#: faq/library.rst:378 +#: faq/library.rst:372 msgid "" "In theory, this means an exact accounting requires an exact understanding of " "the PVM bytecode implementation. In practice, it means that operations on " @@ -534,7 +518,7 @@ msgstr "" "listes, les dictionnaires etc.) qui « semblent atomiques » le sont " "réellement." -#: faq/library.rst:383 +#: faq/library.rst:377 msgid "" "For example, the following operations are all atomic (L, L1, L2 are lists, " "D, D1, D2 are dicts, x, y are objects, i, j are ints)::" @@ -543,11 +527,11 @@ msgstr "" "*L2* sont des listes, *D*, *D1* et *D2* sont des dictionnaires, *x* et *y* " "sont des objets, *i* et *j* des entiers) ::" -#: faq/library.rst:398 +#: faq/library.rst:392 msgid "These aren't::" msgstr "Les suivantes ne le sont pas ::" -#: faq/library.rst:405 +#: faq/library.rst:399 msgid "" "Operations that replace other objects may invoke those other objects' :meth:" "`__del__` method when their reference count reaches zero, and that can " @@ -560,11 +544,11 @@ msgstr "" "des changements massifs sur des dictionnaires ou des listes. En cas de " "doute, il vaut mieux utiliser un mutex." -#: faq/library.rst:412 +#: faq/library.rst:406 msgid "Can't we get rid of the Global Interpreter Lock?" msgstr "Pourquoi ne pas se débarrasser du verrou global de l'interpréteur ?" -#: faq/library.rst:416 +#: faq/library.rst:410 msgid "" "The :term:`global interpreter lock` (GIL) is often seen as a hindrance to " "Python's deployment on high-end multiprocessor server machines, because a " @@ -578,7 +562,7 @@ msgstr "" "Presque tout le code Python ne peut en effet être exécuté qu'avec le GIL " "acquis." -#: faq/library.rst:421 +#: faq/library.rst:415 msgid "" "Back in the days of Python 1.5, Greg Stein actually implemented a " "comprehensive patch set (the \"free threading\" patches) that removed the " @@ -598,7 +582,7 @@ msgstr "" "un seul fil d'exécution, à cause de la quantité de verrouillage plus " "granulaire nécessaire pour contrebalancer la suppression du GIL." -#: faq/library.rst:429 +#: faq/library.rst:423 msgid "" "This doesn't mean that you can't make good use of Python on multi-CPU " "machines! You just have to be creative with dividing the work up between " @@ -616,7 +600,7 @@ msgstr "" "le module :mod:`multiprocessing` fournit une API de plus bas-niveau pour un " "meilleur contrôle sur la distribution des tâches." -#: faq/library.rst:437 +#: faq/library.rst:431 msgid "" "Judicious use of C extensions will also help; if you use a C extension to " "perform a time-consuming task, the extension can release the GIL while the " @@ -630,7 +614,7 @@ msgstr "" "fils travailler. Des modules de la bibliothèque standard comme :mod:`zlib` " "ou :mod:`hashlib` utilisent cette technique." -#: faq/library.rst:443 +#: faq/library.rst:437 msgid "" "It has been suggested that the GIL should be a per-interpreter-state lock " "rather than truly global; interpreters then wouldn't be able to share " @@ -651,7 +635,7 @@ msgstr "" "ont leur propre liste de suppression, ces listes devraient être déplacées au " "niveau de l'interpréteur et ainsi de suite." -#: faq/library.rst:452 +#: faq/library.rst:446 msgid "" "And I doubt that it can even be done in finite time, because the same " "problem exists for 3rd party extensions. It is likely that 3rd party " @@ -663,7 +647,7 @@ msgstr "" "qu'il ne soit possible de les corriger pour les faire stocker leur état au " "niveau de l'interpréteur et non plus au niveau global." -#: faq/library.rst:457 +#: faq/library.rst:451 msgid "" "And finally, once you have multiple interpreters not sharing any state, what " "have you gained over running each interpreter in a separate process?" @@ -672,15 +656,15 @@ msgstr "" "partagent pas d'état, par rapport à faire tourner chaque interpréteur dans " "un processus différent ?" -#: faq/library.rst:462 +#: faq/library.rst:456 msgid "Input and Output" msgstr "Les entrées/sorties" -#: faq/library.rst:465 +#: faq/library.rst:459 msgid "How do I delete a file? (And other file questions...)" msgstr "Comment supprimer un fichier ? (et autres questions sur les fichiers…)" -#: faq/library.rst:467 +#: faq/library.rst:461 msgid "" "Use ``os.remove(filename)`` or ``os.unlink(filename)``; for documentation, " "see the :mod:`os` module. The two functions are identical; :func:`~os." @@ -691,7 +675,7 @@ msgstr "" "identiques, :func:`~os.unlink` n'est tout simplement que le nom de l'appel " "système à cette fonction sous Unix." -#: faq/library.rst:471 +#: faq/library.rst:465 msgid "" "To remove a directory, use :func:`os.rmdir`; use :func:`os.mkdir` to create " "one. ``os.makedirs(path)`` will create any intermediate directories in " @@ -705,12 +689,12 @@ msgstr "" "supprime les dossiers intermédiaires si ceux-ci sont vides. Pour supprimer " "une arborescence et tout son contenu, utilisez :func:`shutil.rmtree`." -#: faq/library.rst:477 +#: faq/library.rst:471 msgid "To rename a file, use ``os.rename(old_path, new_path)``." msgstr "" "``os.rename(ancien_chemin, nouveau_chemin)`` permet de renommer un fichier." -#: faq/library.rst:479 +#: faq/library.rst:473 msgid "" "To truncate a file, open it using ``f = open(filename, \"rb+\")``, and use " "``f.truncate(offset)``; offset defaults to the current seek position. " @@ -723,7 +707,7 @@ msgstr "" "existe aussi ``os.ftruncate(df, décalage)`` pour les fichiers ouverts avec :" "func:`os.open`, où *df* est le descripteur de fichier (un entier court)." -#: faq/library.rst:484 +#: faq/library.rst:478 msgid "" "The :mod:`shutil` module also contains a number of functions to work on " "files including :func:`~shutil.copyfile`, :func:`~shutil.copytree`, and :" @@ -733,11 +717,11 @@ msgstr "" "effectuer des opérations sur des fichiers comme :func:`~shutil.copyfile`, :" "func:`~shutil.copytree` et :func:`~shutil.rmtree`." -#: faq/library.rst:490 +#: faq/library.rst:484 msgid "How do I copy a file?" msgstr "Comment copier un fichier ?" -#: faq/library.rst:492 +#: faq/library.rst:486 msgid "" "The :mod:`shutil` module contains a :func:`~shutil.copyfile` function. Note " "that on MacOS 9 it doesn't copy the resource fork and Finder info." @@ -746,11 +730,11 @@ msgstr "" "MacOS 9, celle-ci ne copie pas le clonage de ressources ni les informations " "du chercheur." -#: faq/library.rst:497 +#: faq/library.rst:491 msgid "How do I read (or write) binary data?" msgstr "Comment lire (ou écrire) des données binaires ?" -#: faq/library.rst:499 +#: faq/library.rst:493 msgid "" "To read or write complex binary data formats, it's best to use the :mod:" "`struct` module. It allows you to take a string containing binary data " @@ -761,7 +745,7 @@ msgstr "" "une chaîne de caractères qui contient des données binaires, souvent des " "nombres, en objets Python, et vice-versa." -#: faq/library.rst:503 +#: faq/library.rst:497 msgid "" "For example, the following code reads two 2-byte integers and one 4-byte " "integer in big-endian format from a file::" @@ -769,7 +753,7 @@ msgstr "" "Par exemple, le code suivant lit, depuis un fichier, deux entiers codés sur " "2 octets et un entier codé sur 4 octets, en format gros-boutiste ::" -#: faq/library.rst:512 +#: faq/library.rst:506 msgid "" "The '>' in the format string forces big-endian data; the letter 'h' reads " "one \"short integer\" (2 bytes), and 'l' reads one \"long integer\" (4 " @@ -779,7 +763,7 @@ msgstr "" "mode gros-boutiste, la lettre « h » indique un entier court (2 octets) et la " "lettre « l » indique un entier long (4 octets)." -#: faq/library.rst:516 +#: faq/library.rst:510 msgid "" "For data that is more regular (e.g. a homogeneous list of ints or floats), " "you can also use the :mod:`array` module." @@ -788,7 +772,7 @@ msgstr "" "nombres à virgule flottante), il est possible d'utiliser le module :mod:" "`array`." -#: faq/library.rst:521 +#: faq/library.rst:515 msgid "" "To read and write binary data, it is mandatory to open the file in binary " "mode (here, passing ``\"rb\"`` to :func:`open`). If you use ``\"r\"`` " @@ -801,13 +785,13 @@ msgstr "" "en mode textuel et ``f.read()`` renvoie des objets :class:`str` au lieu " "d'objets :class:`bytes`." -#: faq/library.rst:529 +#: faq/library.rst:523 msgid "I can't seem to use os.read() on a pipe created with os.popen(); why?" msgstr "" "Il me semble impossible d'utiliser ``os.read()`` sur un tube créé avec ``os." "popen()`` ; pourquoi ?" -#: faq/library.rst:531 +#: faq/library.rst:525 msgid "" ":func:`os.read` is a low-level function which takes a file descriptor, a " "small integer representing the opened file. :func:`os.popen` creates a high-" @@ -822,34 +806,34 @@ msgstr "" "octets d'un tube *p* créé avec :func:`os.popen`, il faut utiliser ``p." "read(n)``." -#: faq/library.rst:618 +#: faq/library.rst:612 msgid "How do I access the serial (RS232) port?" msgstr "Comment accéder au port de transmission en série (RS-232) ?" -#: faq/library.rst:620 -msgid "For Win32, POSIX (Linux, BSD, etc.), Jython:" -msgstr "Pour Win32, POSIX (Linux, BSD, etc.) et Jython :" +#: faq/library.rst:614 +msgid "For Win32, OSX, Linux, BSD, Jython, IronPython:" +msgstr "Pour Win32, OSX, Linux, BSD, Jython et IronPython :" -#: faq/library.rst:622 -msgid "http://pyserial.sourceforge.net" -msgstr "http://pyserial.sourceforge.net" +#: faq/library.rst:616 +msgid "https://pypi.org/project/pyserial/" +msgstr "https://pypi.org/project/pyserial/" -#: faq/library.rst:624 +#: faq/library.rst:618 msgid "For Unix, see a Usenet post by Mitch Chapman:" msgstr "" "Pour Unix, référez-vous à une publication sur Usenet de Mitch Chapman :" -#: faq/library.rst:626 +#: faq/library.rst:620 msgid "https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com" msgstr "https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com" -#: faq/library.rst:630 +#: faq/library.rst:624 msgid "Why doesn't closing sys.stdout (stdin, stderr) really close it?" msgstr "" "Pourquoi fermer *sys.stdout*, *sys.stdin*, *sys.stderr* ne les ferme pas " "réellement ?" -#: faq/library.rst:632 +#: faq/library.rst:626 msgid "" "Python :term:`file objects ` are a high-level layer of " "abstraction on low-level C file descriptors." @@ -857,7 +841,7 @@ msgstr "" "Les :term:`objets fichiers ` en Python sont des abstractions de " "haut niveau sur les descripteurs de fichier C de bas niveau." -#: faq/library.rst:635 +#: faq/library.rst:629 msgid "" "For most file objects you create in Python via the built-in :func:`open` " "function, ``f.close()`` marks the Python file object as being closed from " @@ -871,7 +855,7 @@ msgstr "" "enclenché automatiquement dans le destructeur de ``f``, lorsque ``f`` est " "recyclé." -#: faq/library.rst:641 +#: faq/library.rst:635 msgid "" "But stdin, stdout and stderr are treated specially by Python, because of the " "special status also given to them by C. Running ``sys.stdout.close()`` " @@ -883,7 +867,7 @@ msgstr "" "close()`` marque l'objet fichier comme fermé du point de vue de Python, mais " "le descripteur de fichier C associé n'est *pas* fermé." -#: faq/library.rst:646 +#: faq/library.rst:640 msgid "" "To close the underlying C file descriptor for one of these three, you should " "first be sure that's what you really want to do (e.g., you may confuse " @@ -894,21 +878,21 @@ msgstr "" "exemple, perturber le bon fonctionnement de modules qui font des opérations " "d'entrée-sortie). Si c'est le cas, utilisez :func:`os.close` ::" -#: faq/library.rst:654 +#: faq/library.rst:648 msgid "Or you can use the numeric constants 0, 1 and 2, respectively." msgstr "" "Il est aussi possible de fermer respectivement les constantes numériques 0, " "1 ou 2." -#: faq/library.rst:658 +#: faq/library.rst:652 msgid "Network/Internet Programming" msgstr "Programmation réseau et Internet" -#: faq/library.rst:661 +#: faq/library.rst:655 msgid "What WWW tools are there for Python?" msgstr "Quels sont les outils Python dédiés à la Toile ?" -#: faq/library.rst:663 +#: faq/library.rst:657 msgid "" "See the chapters titled :ref:`internet` and :ref:`netdata` in the Library " "Reference Manual. Python has many modules that will help you build server-" @@ -918,7 +902,7 @@ msgstr "" "le manuel de référence de la bibliothèque. Python a de nombreux modules pour " "construire des applications de Toile côté client comme côté serveur." -#: faq/library.rst:669 +#: faq/library.rst:663 msgid "" "A summary of available frameworks is maintained by Paul Boddie at https://" "wiki.python.org/moin/WebProgramming\\ ." @@ -926,7 +910,7 @@ msgstr "" "Un résumé des cadriciels disponibles est maintenu par Paul Boddie à " "l'adresse https://wiki.python.org/moin/WebProgramming\\ ." -#: faq/library.rst:672 +#: faq/library.rst:666 msgid "" "Cameron Laird maintains a useful set of pages about Python web technologies " "at http://phaseit.net/claird/comp.lang.python/web_python." @@ -935,11 +919,11 @@ msgstr "" "technologies Python dédiées à la Toile à l'adresse http://phaseit.net/claird/" "comp.lang.python/web_python." -#: faq/library.rst:677 +#: faq/library.rst:671 msgid "How can I mimic CGI form submission (METHOD=POST)?" msgstr "Comment reproduire un envoi de formulaire CGI (``METHOD=POST``) ?" -#: faq/library.rst:679 +#: faq/library.rst:673 msgid "" "I would like to retrieve web pages that are the result of POSTing a form. Is " "there existing code that would let me do this easily?" @@ -947,11 +931,11 @@ msgstr "" "J'aimerais récupérer la page de retour d'un envoi de formulaire sur la " "Toile. Existe-t'il déjà du code qui pourrait m'aider à le faire facilement ?" -#: faq/library.rst:682 +#: faq/library.rst:676 msgid "Yes. Here's a simple example that uses :mod:`urllib.request`::" msgstr "Oui. Voici un exemple simple d'utilisation de :mod:`urllib.request` ::" -#: faq/library.rst:697 +#: faq/library.rst:691 msgid "" "Note that in general for percent-encoded POST operations, query strings must " "be quoted using :func:`urllib.parse.urlencode`. For example, to send " @@ -962,15 +946,15 @@ msgstr "" "`urllib.parse.urlencode`. Par exemple pour envoyer ``name=Guy Steele, Jr." "`` ::" -#: faq/library.rst:705 +#: faq/library.rst:699 msgid ":ref:`urllib-howto` for extensive examples." msgstr ":ref:`urllib-howto` pour des exemples complets." -#: faq/library.rst:709 +#: faq/library.rst:703 msgid "What module should I use to help with generating HTML?" msgstr "Quel module utiliser pour générer du HTML ?" -#: faq/library.rst:713 +#: faq/library.rst:707 msgid "" "You can find a collection of useful links on the `Web Programming wiki page " "`_." @@ -978,15 +962,15 @@ msgstr "" "La `page wiki de la programmation Toile `_ (en anglais) répertorie un ensemble de liens pertinents." -#: faq/library.rst:718 +#: faq/library.rst:712 msgid "How do I send mail from a Python script?" msgstr "Comment envoyer un courriel avec un script Python ?" -#: faq/library.rst:720 +#: faq/library.rst:714 msgid "Use the standard library module :mod:`smtplib`." msgstr "Utilisez le module :mod:`smtplib` de la bibliothèque standard." -#: faq/library.rst:722 +#: faq/library.rst:716 msgid "" "Here's a very simple interactive mail sender that uses it. This method will " "work on any host that supports an SMTP listener. ::" @@ -994,7 +978,7 @@ msgstr "" "Voici un exemple très simple d'un envoyeur de courriel qui l'utilise. Cette " "méthode fonctionne sur tous les serveurs qui implémentent SMTP. ::" -#: faq/library.rst:742 +#: faq/library.rst:736 msgid "" "A Unix-only alternative uses sendmail. The location of the sendmail program " "varies between systems; sometimes it is ``/usr/lib/sendmail``, sometimes ``/" @@ -1006,13 +990,13 @@ msgstr "" "sendmail`` ou ``/usr/sbin/sendmail``, la page de manuel de *sendmail* peut " "vous aider. Par exemple ::" -#: faq/library.rst:762 +#: faq/library.rst:756 msgid "How do I avoid blocking in the connect() method of a socket?" msgstr "" "Comment éviter de bloquer dans la méthode ``connect()`` d'un connecteur " "réseau ?" -#: faq/library.rst:764 +#: faq/library.rst:758 msgid "" "The :mod:`select` module is commonly used to help with asynchronous I/O on " "sockets." @@ -1020,7 +1004,7 @@ msgstr "" "Le module :mod:`select` est fréquemment utilisé pour effectuer des entrées-" "sorties asynchrones sur des connecteurs réseaux." -#: faq/library.rst:767 +#: faq/library.rst:761 msgid "" "To prevent the TCP connect from blocking, you can set the socket to non-" "blocking mode. Then when you do the :meth:`socket.connect`, you will either " @@ -1037,7 +1021,7 @@ msgstr "" "n'a pas encore aboutie. La valeur dépend du système d'exploitation, donc " "renseignez-vous sur la valeur utilisée par votre système." -#: faq/library.rst:774 +#: faq/library.rst:768 msgid "" "You can use the :meth:`socket.connect_ex` method to avoid creating an " "exception. It will just return the errno value. To poll, you can call :" @@ -1052,7 +1036,7 @@ msgstr "" "argument de :meth:`select.select` pour vérifier si le connecteur est prêt à " "recevoir des entrées." -#: faq/library.rst:780 +#: faq/library.rst:774 msgid "" "The :mod:`asyncio` module provides a general purpose single-threaded and " "concurrent asynchronous library, which can be used for writing non-blocking " @@ -1064,20 +1048,20 @@ msgstr "" "`Twisted `_ en est une alternative " "plébiscitée, avec un grand nombre de fonctionnalités." -#: faq/library.rst:788 +#: faq/library.rst:782 msgid "Databases" msgstr "Bases de données" -#: faq/library.rst:791 +#: faq/library.rst:785 msgid "Are there any interfaces to database packages in Python?" msgstr "" "Existe-t'il des modules Python pour s'interfacer avec des bases de données ?" -#: faq/library.rst:793 +#: faq/library.rst:787 msgid "Yes." msgstr "Oui." -#: faq/library.rst:795 +#: faq/library.rst:789 msgid "" "Interfaces to disk-based hashes such as :mod:`DBM ` and :mod:`GDBM " "` are also included with standard Python. There is also the :mod:" @@ -1089,7 +1073,7 @@ msgstr "" "aussi le module :mod:`sqlite3` qui implémente une base de données " "relationelle légère sur disque." -#: faq/library.rst:800 +#: faq/library.rst:794 msgid "" "Support for most relational databases is available. See the " "`DatabaseProgramming wiki page `_ pour plus de détails." -#: faq/library.rst:806 +#: faq/library.rst:800 msgid "How do you implement persistent objects in Python?" msgstr "Comment implémenter la persistance d'objets en Python ?" -#: faq/library.rst:808 +#: faq/library.rst:802 msgid "" "The :mod:`pickle` library module solves this in a very general way (though " "you still can't store things like open files, sockets or windows), and the :" @@ -1115,15 +1099,15 @@ msgstr "" "fenêtres par exemple), et le module :mod:`shelve` de la bibliothèque utilise " "*pickle* et *(g)dbm* pour créer des liens persistants vers des objets Python." -#: faq/library.rst:815 +#: faq/library.rst:809 msgid "Mathematics and Numerics" msgstr "Mathématiques et calcul numérique" -#: faq/library.rst:818 +#: faq/library.rst:812 msgid "How do I generate random numbers in Python?" msgstr "Comment générer des nombres aléatoires en Python ?" -#: faq/library.rst:820 +#: faq/library.rst:814 msgid "" "The standard module :mod:`random` implements a random number generator. " "Usage is simple::" @@ -1131,51 +1115,68 @@ msgstr "" "Le module :mod:`random` de la bibliothèque standard comprend un générateur " "de nombres aléatoires. Son utilisation est simple ::" -#: faq/library.rst:826 +#: faq/library.rst:820 msgid "This returns a random floating point number in the range [0, 1)." msgstr "" "Le code précédent renvoie un nombre à virgule flottante aléatoire dans " "l'intervalle [0, 1[." -#: faq/library.rst:828 +#: faq/library.rst:822 msgid "" "There are also many other specialized generators in this module, such as:" msgstr "Ce module fournit beaucoup d'autres générateurs spécialisés comme :" -#: faq/library.rst:830 +#: faq/library.rst:824 msgid "``randrange(a, b)`` chooses an integer in the range [a, b)." msgstr "``randrange(a, b)`` génère un entier dans l'intervalle [a, b[." -#: faq/library.rst:831 +#: faq/library.rst:825 msgid "``uniform(a, b)`` chooses a floating point number in the range [a, b)." msgstr "" "``uniform(a, b)`` génère un nombre à virgule flottante aléatoire dans " "l'intervalle [a, b[." -#: faq/library.rst:832 +#: faq/library.rst:826 msgid "" "``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution." msgstr "``normalvariate(mean, sdev)`` simule la loi normale (Gaussienne)." -#: faq/library.rst:834 +#: faq/library.rst:828 msgid "Some higher-level functions operate on sequences directly, such as:" msgstr "" "Des fonctions de haut niveau opèrent directement sur des séquences comme :" -#: faq/library.rst:836 +#: faq/library.rst:830 msgid "``choice(S)`` chooses a random element from a given sequence." msgstr "``choice(S)`` sélectionne au hasard un élément d'une séquence donnée." -#: faq/library.rst:837 +#: faq/library.rst:831 msgid "``shuffle(L)`` shuffles a list in-place, i.e. permutes it randomly." msgstr "" "``shuffle(L)`` mélange une liste en-place, c.-à-d. lui applique une " "permutation aléatoire." -#: faq/library.rst:839 +#: faq/library.rst:833 msgid "" "There's also a ``Random`` class you can instantiate to create independent " "multiple random number generators." msgstr "" "Il existe aussi une classe ``Random`` qu'il est possible d'instancier pour " "créer des générateurs aléatoires indépendants." + +#~ msgid "" +#~ "For Windows: use `the consolelib module `_." +#~ msgstr "" +#~ "Pour Windows : utilisez le module `consolelib `_." + +#~ msgid "" +#~ "Aahz has a set of slides from his threading tutorial that are helpful; " +#~ "see http://www.pythoncraft.com/OSCON2001/." +#~ msgstr "" +#~ "Un ensemble de diapositives issues du didacticiel de Aahz sur les fils " +#~ "d'exécution est disponible à http://www.pythoncraft.com/OSCON2001/." + +#~ msgid "http://pyserial.sourceforge.net" +#~ msgstr "http://pyserial.sourceforge.net" diff --git a/faq/programming.po b/faq/programming.po index 7229851aed..4e74bbb26d 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" -"PO-Revision-Date: 2021-01-28 15:40+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" +"PO-Revision-Date: 2021-05-19 22:42+0200\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -72,20 +72,19 @@ msgstr "" #: faq/programming.rst:31 msgid "" "PythonWin is a Python IDE that includes a GUI debugger based on pdb. The " -"Pythonwin debugger colors breakpoints and has quite a few cool features such " -"as debugging non-Pythonwin programs. Pythonwin is available as part of the " -"`Python for Windows Extensions `__ project and as a part of the ActivePython distribution (see https://www." -"activestate.com/activepython\\ )." +"PythonWin debugger colors breakpoints and has quite a few cool features such " +"as debugging non-PythonWin programs. PythonWin is available as part of " +"`pywin32 `_ project and as a part of " +"the `ActivePython `_ " +"distribution." msgstr "" "*PythonWin* est un environnement de développement intégré (EDI) Python qui " "embarque un débogueur graphique basé sur ``pdb``. Le débogueur *PythonWin* " "colore les points d'arrêts et possède quelques fonctionnalités sympathiques, " "comme la possibilité de déboguer des programmes développés sans " -"*PythonWin*. *PythonWin* est disponible dans le projet `Extensions Python " -"pour Windows `__ et fait partie " -"de la distribution ActivePython (voir https://www.activestate.com/" -"activepython\\ )." +"*PythonWin*. *PythonWin* est disponible dans le projet `pywin32 `_ et fait partie de la distribution " +"`ActivePython `_." #: faq/programming.rst:38 msgid "" @@ -97,15 +96,20 @@ msgstr "" #: faq/programming.rst:41 msgid "" -"Pydb is a version of the standard Python debugger pdb, modified for use with " -"DDD (Data Display Debugger), a popular graphical debugger front end. Pydb " -"can be found at http://bashdb.sourceforge.net/pydb/ and DDD can be found at " -"https://www.gnu.org/software/ddd." +"`trepan3k `_ is a gdb-like " +"debugger." msgstr "" -"Pydb est une version du débogueur standard Python pdb, modifié pour être " -"utilisé avec DDD (Data Display Debugger), un célèbre débogueur graphique. " -"Pydb est disponible sur http://bashdb.sourceforge.net/pydb/ et DDD est " -"disponible sur https://www.gnu.org/software/ddd." +"`trepan3k `_ est un débogueur " +"semblable à GDB." + +#: faq/programming.rst:43 +msgid "" +"`Visual Studio Code `_ is an IDE with " +"debugging tools that integrates with version-control software." +msgstr "" +"`Visual Studio Code `_ est un EDI qui " +"contient des outils de débogage. Il sait interagir avec les outils de " +"gestion de versions." #: faq/programming.rst:46 msgid "" @@ -116,16 +120,16 @@ msgstr "" "graphique. Notamment :" #: faq/programming.rst:49 -msgid "Wing IDE (https://wingware.com/)" -msgstr "Wing IDE (https://wingware.com/)" +msgid "`Wing IDE `_" +msgstr "`Wing IDE `_" #: faq/programming.rst:50 -msgid "Komodo IDE (https://komodoide.com/)" -msgstr "Komodo IDE (https://komodoide.com/)" +msgid "`Komodo IDE `_" +msgstr "`Komodo IDE `_ ;" #: faq/programming.rst:51 -msgid "PyCharm (https://www.jetbrains.com/pycharm/)" -msgstr "PyCharm (https://www.jetbrains.com/pycharm/)" +msgid "`PyCharm `_" +msgstr "`PyCharm `_ ;" #: faq/programming.rst:55 msgid "Are there tools to help find bugs or perform static analysis?" @@ -153,11 +157,11 @@ msgstr "" "pytype>`_ peuvent vérifier les indications de type dans du code source " "Python." -#: faq/programming.rst:70 +#: faq/programming.rst:72 msgid "How can I create a stand-alone binary from a Python script?" msgstr "Comment créer un binaire autonome à partir d'un script Python ?" -#: faq/programming.rst:72 +#: faq/programming.rst:74 msgid "" "You don't need the ability to compile Python to C code if all you want is a " "stand-alone program that users can download and run without having to " @@ -172,20 +176,21 @@ msgstr "" "requis par un programme et lient ces modules avec un binaire Python pour " "produire un seul exécutable." -#: faq/programming.rst:78 +#: faq/programming.rst:80 +#, fuzzy msgid "" "One is to use the freeze tool, which is included in the Python source tree " -"as ``Tools/freeze``. It converts Python byte code to C arrays; a C compiler " -"you can embed all your modules into a new program, which is then linked with " -"the standard Python modules." +"as ``Tools/freeze``. It converts Python byte code to C arrays; with a C " +"compiler you can embed all your modules into a new program, which is then " +"linked with the standard Python modules." msgstr "" -"Un de ces outils est freeze, qui se trouve dans ``Tools/freeze`` de " +"Un de ces outils est *freeze*, qui se trouve dans ``Tools/freeze`` de " "l'arborescence des sources de Python. Il convertit le code intermédiaire " "(*bytecode*) Python en tableaux C ; un compilateur C permet d'intégrer tous " "vos modules dans un nouveau programme, qui est ensuite lié aux modules " "standards Python." -#: faq/programming.rst:83 +#: faq/programming.rst:85 msgid "" "It works by scanning your source recursively for import statements (in both " "forms) and looking for the modules in the standard Python path as well as in " @@ -208,34 +213,54 @@ msgstr "" "généré et le lie au reste de l'interpréteur Python pour former un binaire " "autonome qui fait exactement la même chose que le script." -#: faq/programming.rst:92 +#: faq/programming.rst:94 msgid "" -"Obviously, freeze requires a C compiler. There are several other utilities " -"which don't. One is Thomas Heller's py2exe (Windows only) at" +"The following packages can help with the creation of console and GUI " +"executables:" msgstr "" -"Bien évidemment, freeze nécessite un compilateur C. Il existe d'autres " -"outils qui peuvent s'en passer. Un de ceux-ci est py2exe de Thomas Heller " -"(pour Windows uniquement) disponible sur" - -#: faq/programming.rst:95 -msgid "http://www.py2exe.org/" -msgstr "http://www.py2exe.org/" +"Voici quelques paquets qui permettent de créer des exécutables en ligne de " +"commande comme graphiques :" #: faq/programming.rst:97 +msgid "`Nuitka `_ (Cross-platform)" +msgstr "`Nuitka `_ (multiplateformes) ;" + +#: faq/programming.rst:98 +msgid "`PyInstaller `_ (Cross-platform)" +msgstr "" + +#: faq/programming.rst:99 msgid "" -"Another tool is Anthony Tuininga's `cx_Freeze `_." +"`PyOxidizer `_ (Cross-platform)" msgstr "" -"Un autre de ces outils est `cx_Freeze `_ d'Anthony Tuininga." +"`PyOxidizer `_ (multi-" +"plateforme) ;" + +#: faq/programming.rst:100 +msgid "" +"`cx_Freeze `_ (Cross-platform)" +msgstr "" +"`cx_Freeze `_ (multi-" +"plateforme) ;" #: faq/programming.rst:101 +msgid "`py2app `_ (macOS only)" +msgstr "" +"`py2app `_ (uniquement pour " +"macOS) ;" + +#: faq/programming.rst:102 +#, fuzzy +msgid "`py2exe `_ (Windows only)" +msgstr "http://www.py2exe.org/" + +#: faq/programming.rst:105 msgid "Are there coding standards or a style guide for Python programs?" msgstr "" "Existe-t-il des normes de développement ou un guide de style pour écrire des " "programmes Python ?" -#: faq/programming.rst:103 +#: faq/programming.rst:107 msgid "" "Yes. The coding style required for standard library modules is documented " "as :pep:`8`." @@ -243,16 +268,16 @@ msgstr "" "Oui. Le style de développement que les modules de la bibliothèque standard " "doivent obligatoirement respecter est documenté dans la :pep:`8`." -#: faq/programming.rst:108 +#: faq/programming.rst:112 msgid "Core Language" msgstr "Fondamentaux" -#: faq/programming.rst:111 +#: faq/programming.rst:115 msgid "Why am I getting an UnboundLocalError when the variable has a value?" msgstr "" "Pourquoi une UnboundLocalError est levée alors qu'une variable a une valeur ?" -#: faq/programming.rst:113 +#: faq/programming.rst:117 msgid "" "It can be a surprise to get the UnboundLocalError in previously working code " "when it is modified by adding an assignment statement somewhere in the body " @@ -262,19 +287,19 @@ msgstr "" "jusqu'à présent correct, quand celui-ci est modifié en ajoutant une " "instruction d'affectation quelque part dans le corps d'une fonction." -#: faq/programming.rst:117 +#: faq/programming.rst:121 msgid "This code:" msgstr "Le code suivant :" -#: faq/programming.rst:125 +#: faq/programming.rst:129 msgid "works, but this code:" msgstr "fonctionne, mais le suivant :" -#: faq/programming.rst:132 +#: faq/programming.rst:136 msgid "results in an UnboundLocalError:" msgstr "lève une UnboundLocalError :" -#: faq/programming.rst:139 +#: faq/programming.rst:143 msgid "" "This is because when you make an assignment to a variable in a scope, that " "variable becomes local to that scope and shadows any similarly named " @@ -290,7 +315,7 @@ msgstr "" "nouvelle variable. Par conséquent, quand le ``print(x)`` essaye d'afficher " "la variable non initialisée, une erreur se produit." -#: faq/programming.rst:146 +#: faq/programming.rst:150 msgid "" "In the example above you can access the outer scope variable by declaring it " "global:" @@ -298,7 +323,7 @@ msgstr "" "Dans l'exemple ci-dessus, la variable du contexte appelant reste accessible " "en la déclarant globale :" -#: faq/programming.rst:157 +#: faq/programming.rst:161 msgid "" "This explicit declaration is required in order to remind you that (unlike " "the superficially analogous situation with class and instance variables) you " @@ -309,7 +334,7 @@ msgstr "" "d'instance), c'est la valeur de la variable du contexte appelant qui est " "modifiée :" -#: faq/programming.rst:164 +#: faq/programming.rst:168 msgid "" "You can do a similar thing in a nested scope using the :keyword:`nonlocal` " "keyword:" @@ -317,12 +342,12 @@ msgstr "" "Une alternative dans un contexte imbriqué consiste à utiliser le mot-clé :" "keyword:`nonlocal` :" -#: faq/programming.rst:181 +#: faq/programming.rst:185 msgid "What are the rules for local and global variables in Python?" msgstr "" "Quelles sont les règles pour les variables locales et globales en Python ?" -#: faq/programming.rst:183 +#: faq/programming.rst:187 msgid "" "In Python, variables that are only referenced inside a function are " "implicitly global. If a variable is assigned a value anywhere within the " @@ -334,7 +359,7 @@ msgstr "" "valeur lui est affectée, elle est considérée locale (sauf si elle est " "explicitement déclarée globale)." -#: faq/programming.rst:187 +#: faq/programming.rst:191 msgid "" "Though a bit surprising at first, a moment's consideration explains this. " "On one hand, requiring :keyword:`global` for assigned variables provides a " @@ -353,7 +378,7 @@ msgstr "" "importé. Le codé serait alors truffé de déclarations ``global``, ce qui " "nuirait à leur raison d'être : identifier les effets de bords." -#: faq/programming.rst:197 +#: faq/programming.rst:201 msgid "" "Why do lambdas defined in a loop with different values all return the same " "result?" @@ -361,7 +386,7 @@ msgstr "" "Pourquoi des expressions lambda définies dans une boucle avec des valeurs " "différentes retournent-elles le même résultat ?" -#: faq/programming.rst:199 +#: faq/programming.rst:203 msgid "" "Assume you use a for loop to define a few different lambdas (or even plain " "functions), e.g.::" @@ -369,7 +394,7 @@ msgstr "" "Supposons que l'on utilise une boucle itérative pour définir des expressions " "lambda (voire même des fonctions) différentes, par exemple ::" -#: faq/programming.rst:206 +#: faq/programming.rst:210 msgid "" "This gives you a list that contains 5 lambdas that calculate ``x**2``. You " "might expect that, when called, they would return, respectively, ``0``, " @@ -380,7 +405,7 @@ msgstr "" "chacune ``x**2``. En les exécutant, on pourrait s'attendre à obtenir ``0``, " "``1``, ``4``, ``9`` et ``16``. Elles renvoient en réalité toutes ``16`` ::" -#: faq/programming.rst:216 +#: faq/programming.rst:220 msgid "" "This happens because ``x`` is not local to the lambdas, but is defined in " "the outer scope, and it is accessed when the lambda is called --- not when " @@ -395,7 +420,7 @@ msgstr "" "renvoient ``4*2``, c.-à-d. ``16``. Ceci se vérifie également en changeant la " "valeur de ``x`` et en constatant que les résultats sont modifiés ::" -#: faq/programming.rst:226 +#: faq/programming.rst:230 msgid "" "In order to avoid this, you need to save the values in variables local to " "the lambdas, so that they don't rely on the value of the global ``x``::" @@ -404,7 +429,7 @@ msgstr "" "variables locales aux expressions lambda pour que celles-ci ne se basent " "plus sur la variable globale ``x`` ::" -#: faq/programming.rst:233 +#: faq/programming.rst:237 msgid "" "Here, ``n=x`` creates a new variable ``n`` local to the lambda and computed " "when the lambda is defined so that it has the same value that ``x`` had at " @@ -419,7 +444,7 @@ msgstr "" "troisième et ainsi de suite. Chaque expression lambda renvoie donc le " "résultat correct ::" -#: faq/programming.rst:244 +#: faq/programming.rst:248 msgid "" "Note that this behaviour is not peculiar to lambdas, but applies to regular " "functions too." @@ -427,11 +452,11 @@ msgstr "" "Ce comportement n'est pas propre aux expressions lambda, mais s'applique " "aussi aux fonctions normales." -#: faq/programming.rst:249 +#: faq/programming.rst:253 msgid "How do I share global variables across modules?" msgstr "Comment partager des variables globales entre modules ?" -#: faq/programming.rst:251 +#: faq/programming.rst:255 msgid "" "The canonical way to share information across modules within a single " "program is to create a special module (often called config or cfg). Just " @@ -447,19 +472,19 @@ msgstr "" "de chaque module, tout changement dans l'instance est propagé partout. Par " "exemple :" -#: faq/programming.rst:257 +#: faq/programming.rst:261 msgid "config.py::" msgstr "*config.py* ::" -#: faq/programming.rst:261 +#: faq/programming.rst:265 msgid "mod.py::" msgstr "*mod.py* ::" -#: faq/programming.rst:266 +#: faq/programming.rst:270 msgid "main.py::" msgstr "*main.py* ::" -#: faq/programming.rst:272 +#: faq/programming.rst:276 msgid "" "Note that using a module is also the basis for implementing the Singleton " "design pattern, for the same reason." @@ -467,12 +492,12 @@ msgstr "" "Pour les mêmes raisons, l'utilisation d'un module est aussi à la base de " "l'implémentation du patron de conception singleton." -#: faq/programming.rst:277 +#: faq/programming.rst:281 msgid "What are the \"best practices\" for using import in a module?" msgstr "" "Quelles sont les « bonnes pratiques » pour utiliser import dans un module ?" -#: faq/programming.rst:279 +#: faq/programming.rst:283 msgid "" "In general, don't use ``from modulename import *``. Doing so clutters the " "importer's namespace, and makes it much harder for linters to detect " @@ -482,7 +507,7 @@ msgstr "" "encombre l'espace de nommage de l'importateur et rend la détection de noms " "non-définis beaucoup plus ardue pour les analyseurs de code." -#: faq/programming.rst:283 +#: faq/programming.rst:287 msgid "" "Import modules at the top of a file. Doing so makes it clear what other " "modules your code requires and avoids questions of whether the module name " @@ -495,17 +520,17 @@ msgstr "" "rend l'ajout et la suppression d'une importation de module plus aisé, mais " "importer plusieurs modules sur une même ligne prend moins d'espace." -#: faq/programming.rst:288 +#: faq/programming.rst:292 msgid "It's good practice if you import modules in the following order:" msgstr "Il est recommandé d'importer les modules dans l'ordre suivant :" -#: faq/programming.rst:290 +#: faq/programming.rst:294 msgid "standard library modules -- e.g. ``sys``, ``os``, ``getopt``, ``re``" msgstr "" "les modules de la bibliothèque standard — e.g. ``sys``, ``os``, ``getopt``, " "``re``" -#: faq/programming.rst:291 +#: faq/programming.rst:295 msgid "" "third-party library modules (anything installed in Python's site-packages " "directory) -- e.g. mx.DateTime, ZODB, PIL.Image, etc." @@ -513,11 +538,11 @@ msgstr "" "les modules externes (tout ce qui est installé dans le dossier *site-" "packages* de Python) — e.g. *mx.DateTime, ZODB, PIL.Image*, etc." -#: faq/programming.rst:293 +#: faq/programming.rst:297 msgid "locally-developed modules" msgstr "les modules développés en local" -#: faq/programming.rst:295 +#: faq/programming.rst:299 msgid "" "It is sometimes necessary to move imports to a function or class to avoid " "problems with circular imports. Gordon McMillan says:" @@ -526,7 +551,7 @@ msgstr "" "une classe pour éviter les problèmes d'importations circulaires. Comme le " "souligne Gordon McMillan :" -#: faq/programming.rst:298 +#: faq/programming.rst:302 msgid "" "Circular imports are fine where both modules use the \"import \" " "form of import. They fail when the 2nd module wants to grab a name out of " @@ -541,7 +566,7 @@ msgstr "" "fichier. Les noms du premier module ne sont en effet pas encore disponibles " "car le premier module est occupé à importer le second." -#: faq/programming.rst:304 +#: faq/programming.rst:308 msgid "" "In this case, if the second module is only used in one function, then the " "import can easily be moved into that function. By the time the import is " @@ -553,7 +578,7 @@ msgstr "" "où l'importation sera appelée, le premier module aura fini de s'initialiser " "et le second pourra faire son importation." -#: faq/programming.rst:309 +#: faq/programming.rst:313 msgid "" "It may also be necessary to move imports out of the top level of code if " "some of the modules are platform-specific. In that case, it may not even be " @@ -568,7 +593,7 @@ msgstr "" "recommandé d'importer les modules adéquats dans le code spécifique à la " "machine." -#: faq/programming.rst:314 +#: faq/programming.rst:318 msgid "" "Only move imports into a local scope, such as inside a function definition, " "if it's necessary to solve a problem such as avoiding a circular import or " @@ -594,11 +619,11 @@ msgstr "" "dictionnaire. Même si le nom du module est sorti du contexte courant, le " "module est probablement disponible dans :data:`sys.modules`." -#: faq/programming.rst:327 +#: faq/programming.rst:331 msgid "Why are default values shared between objects?" msgstr "Pourquoi les arguments par défaut sont-ils partagés entre les objets ?" -#: faq/programming.rst:329 +#: faq/programming.rst:333 msgid "" "This type of bug commonly bites neophyte programmers. Consider this " "function::" @@ -606,7 +631,7 @@ msgstr "" "C'est un problème que rencontrent souvent les programmeurs débutants. " "Examinons la fonction suivante ::" -#: faq/programming.rst:336 +#: faq/programming.rst:340 msgid "" "The first time you call this function, ``mydict`` contains a single item. " "The second time, ``mydict`` contains two items because when ``foo()`` begins " @@ -616,7 +641,7 @@ msgstr "" "élément. Au second appel, ``mydict`` contient deux éléments car quand " "``foo()`` commence son exécution, ``mydict`` contient déjà un élément." -#: faq/programming.rst:340 +#: faq/programming.rst:344 msgid "" "It is often expected that a function call creates new objects for default " "values. This is not what happens. Default values are created exactly once, " @@ -630,7 +655,7 @@ msgstr "" "définie. Si l'objet est modifié, comme le dictionnaire dans cet exemple, les " "appels suivants à cette fonction font référence à l'objet ainsi modifié." -#: faq/programming.rst:345 +#: faq/programming.rst:349 msgid "" "By definition, immutable objects such as numbers, strings, tuples, and " "``None``, are safe from change. Changes to mutable objects such as " @@ -638,10 +663,10 @@ msgid "" msgstr "" "Par définition, les objets immuables comme les nombres, les chaînes de " "caractères, les *n*-uplets et ``None`` ne sont pas modifiés. Les changements " -"sur des objets muables comme les dictionnaires, les listes et les instances " -"de classe peuvent porter à confusion." +"sur des objets modifiables comme les dictionnaires, les listes et les " +"instances de classe peuvent porter à confusion." -#: faq/programming.rst:349 +#: faq/programming.rst:353 msgid "" "Because of this feature, it is good programming practice to not use mutable " "objects as default values. Instead, use ``None`` as the default value and " @@ -649,16 +674,16 @@ msgid "" "list/dictionary/whatever if it is. For example, don't write::" msgstr "" "En raison de cette fonctionnalité, il vaut mieux ne pas utiliser d'objets " -"muables comme valeurs par défaut. Il vaut mieux utiliser ``None`` comme " +"modifiables comme valeurs par défaut. Il vaut mieux utiliser ``None`` comme " "valeur par défaut et, à l'intérieur de la fonction, vérifier si le paramètre " "est à ``None`` et créer une nouvelle liste, dictionnaire ou autre, le cas " "échéant. Par exemple, il ne faut pas écrire ::" -#: faq/programming.rst:357 +#: faq/programming.rst:361 msgid "but::" msgstr "mais plutôt ::" -#: faq/programming.rst:363 +#: faq/programming.rst:367 msgid "" "This feature can be useful. When you have a function that's time-consuming " "to compute, a common technique is to cache the parameters and the resulting " @@ -672,7 +697,7 @@ msgstr "" "appel est ré-effectué. C'est la technique dite de « mémoïsation », qui " "s'implémente de la manière suivante ::" -#: faq/programming.rst:378 +#: faq/programming.rst:382 msgid "" "You could use a global variable containing a dictionary instead of the " "default value; it's a matter of taste." @@ -680,13 +705,13 @@ msgstr "" "Il est possible d'utiliser une variable globale contenant un dictionnaire à " "la place de la valeur par défaut ; ce n'est qu'une question de goût." -#: faq/programming.rst:383 +#: faq/programming.rst:387 msgid "" "How can I pass optional or keyword parameters from one function to another?" msgstr "" "Comment passer des paramètres optionnels ou nommés d'une fonction à l'autre ?" -#: faq/programming.rst:385 +#: faq/programming.rst:389 msgid "" "Collect the arguments using the ``*`` and ``**`` specifiers in the " "function's parameter list; this gives you the positional arguments as a " @@ -699,11 +724,11 @@ msgstr "" "de dictionnaire. Ces arguments peuvent être passés à une autre fonction en " "utilisant ``*`` et ``**`` ::" -#: faq/programming.rst:404 +#: faq/programming.rst:408 msgid "What is the difference between arguments and parameters?" msgstr "Quelle est la différence entre les arguments et les paramètres ?" -#: faq/programming.rst:406 +#: faq/programming.rst:410 msgid "" ":term:`Parameters ` are defined by the names that appear in a " "function definition, whereas :term:`arguments ` are the values " @@ -717,7 +742,7 @@ msgstr "" "ci. Les paramètres définissent les types des arguments qu'une fonction " "accepte. Ainsi, avec la définition de fonction suivante ::" -#: faq/programming.rst:414 +#: faq/programming.rst:418 msgid "" "*foo*, *bar* and *kwargs* are parameters of ``func``. However, when calling " "``func``, for example::" @@ -725,30 +750,30 @@ msgstr "" "*foo*, *bar* et *kwargs* sont des paramètres de ``func``. Mais à l'appel de " "``func`` avec, par exemple ::" -#: faq/programming.rst:419 +#: faq/programming.rst:423 msgid "the values ``42``, ``314``, and ``somevar`` are arguments." msgstr "les valeurs ``42``, ``314``, et ``somevar`` sont des arguments." -#: faq/programming.rst:423 +#: faq/programming.rst:427 msgid "Why did changing list 'y' also change list 'x'?" msgstr "Pourquoi modifier la liste 'y' modifie aussi la liste 'x' ?" -#: faq/programming.rst:425 +#: faq/programming.rst:429 msgid "If you wrote code like::" msgstr "Si vous avez écrit du code comme ::" -#: faq/programming.rst:435 +#: faq/programming.rst:439 msgid "" "you might be wondering why appending an element to ``y`` changed ``x`` too." msgstr "" "vous vous demandez peut-être pourquoi l'ajout d'un élément à ``y`` a aussi " "changé ``x``." -#: faq/programming.rst:437 +#: faq/programming.rst:441 msgid "There are two factors that produce this result:" msgstr "Il y a deux raisons qui conduisent à ce comportement :" -#: faq/programming.rst:439 +#: faq/programming.rst:443 msgid "" "Variables are simply names that refer to objects. Doing ``y = x`` doesn't " "create a copy of the list -- it creates a new variable ``y`` that refers to " @@ -760,14 +785,14 @@ msgstr "" "variable ``y`` qui pointe sur le même objet que ``x``. Ceci signifie qu'il " "n'existe qu'un seul objet (la liste) auquel ``x`` et ``y`` font référence." -#: faq/programming.rst:443 +#: faq/programming.rst:447 msgid "" "Lists are :term:`mutable`, which means that you can change their content." msgstr "" "Les listes sont des :term:`muable`, ce qui signifie que leur contenu peut " "être modifié." -#: faq/programming.rst:445 +#: faq/programming.rst:449 msgid "" "After the call to :meth:`~list.append`, the content of the mutable object " "has changed from ``[]`` to ``[10]``. Since both the variables refer to the " @@ -778,11 +803,11 @@ msgstr "" "objet, il est possible d'accéder à la valeur modifiée ``[10]`` avec chacun " "des noms." -#: faq/programming.rst:449 +#: faq/programming.rst:453 msgid "If we instead assign an immutable object to ``x``::" msgstr "Si au contraire, on affecte un objet immuable à ``x`` ::" -#: faq/programming.rst:459 +#: faq/programming.rst:463 msgid "" "we can see that in this case ``x`` and ``y`` are not equal anymore. This is " "because integers are :term:`immutable`, and when we do ``x = x + 1`` we are " @@ -801,7 +826,7 @@ msgstr "" "(``x`` fait désormais référence à ``6`` mais ``y`` fait toujours référence à " "``5``)." -#: faq/programming.rst:467 +#: faq/programming.rst:471 msgid "" "Some operations (for example ``y.append(10)`` and ``y.sort()``) mutate the " "object, whereas superficially similar operations (for example ``y = y + " @@ -821,7 +846,7 @@ msgstr "" "obtenir une copie triée de ``y`` donne ``None``, ce qui conduit très souvent " "le programme à générer une erreur facile à diagnostiquer." -#: faq/programming.rst:476 +#: faq/programming.rst:480 msgid "" "However, there is one class of operations where the same operation sometimes " "has different behaviors with different types: the augmented assignment " @@ -831,17 +856,17 @@ msgid "" "1`` create new objects)." msgstr "" "Il existe cependant une classe d'opérations qui se comporte différemment " -"selon le type : les opérateurs d'affectation incrémentaux. Par exemple, ``" -"+=`` modifie les listes mais pas les *n*-uplets ni les entiers (``a_list += " -"[1, 2, 3]`` équivaut à ``a_list.extend([1, 2, 3])`` et modifie ``a_list``, " -"alors que ``some_tuple += (1, 2, 3)`` et ``some_int += 1`` créent de " -"nouveaux objets)." +"selon le type : les opérateurs d'affectation incrémentaux. Par exemple, " +"``+=`` modifie les listes mais pas les *n*-uplets ni les entiers (``a_list " +"+= [1, 2, 3]`` équivaut à ``a_list.extend([1, 2, 3])`` et modifie " +"``a_list``, alors que ``some_tuple += (1, 2, 3)`` et ``some_int += 1`` " +"créent de nouveaux objets)." -#: faq/programming.rst:483 +#: faq/programming.rst:487 msgid "In other words:" msgstr "En d'autres termes :" -#: faq/programming.rst:485 +#: faq/programming.rst:489 msgid "" "If we have a mutable object (:class:`list`, :class:`dict`, :class:`set`, " "etc.), we can use some specific operations to mutate it and all the " @@ -851,7 +876,7 @@ msgstr "" "class:`list`, :class:`dict`, :class:`set`, etc.) et toutes les variables qui " "y font référence verront le changement." -#: faq/programming.rst:488 +#: faq/programming.rst:492 msgid "" "If we have an immutable object (:class:`str`, :class:`int`, :class:`tuple`, " "etc.), all the variables that refer to it will always see the same value, " @@ -863,7 +888,7 @@ msgstr "" "opérations qui transforment cette valeur en une nouvelle valeur renvoient " "toujours un nouvel objet." -#: faq/programming.rst:493 +#: faq/programming.rst:497 msgid "" "If you want to know if two variables refer to the same object or not, you " "can use the :keyword:`is` operator, or the built-in function :func:`id`." @@ -871,13 +896,13 @@ msgstr "" "L'opérateur :keyword:`is` ou la fonction native :func:`id` permettent de " "savoir si deux variables font référence au même objet." -#: faq/programming.rst:498 +#: faq/programming.rst:502 msgid "How do I write a function with output parameters (call by reference)?" msgstr "" "Comment écrire une fonction qui modifie ses paramètres ? (passage par " "référence)" -#: faq/programming.rst:500 +#: faq/programming.rst:504 msgid "" "Remember that arguments are passed by assignment in Python. Since " "assignment just creates references to objects, there's no alias between an " @@ -890,15 +915,15 @@ msgstr "" "de passage par référence en soi. Il y a cependant plusieurs façons d'en " "émuler un." -#: faq/programming.rst:505 +#: faq/programming.rst:509 msgid "By returning a tuple of the results::" msgstr "En renvoyant un *n*-uplet de résultats ::" -#: faq/programming.rst:516 +#: faq/programming.rst:520 msgid "This is almost always the clearest solution." msgstr "C'est presque toujours la meilleure solution." -#: faq/programming.rst:518 +#: faq/programming.rst:522 msgid "" "By using global variables. This isn't thread-safe, and is not recommended." msgstr "" @@ -906,33 +931,33 @@ msgstr "" "des contextes à plusieurs fils d'exécution (elle n'est pas *thread-safe*), " "et n'est donc pas recommandée." -#: faq/programming.rst:520 +#: faq/programming.rst:524 msgid "By passing a mutable (changeable in-place) object::" msgstr "En passant un objet muable (modifiable sur place) ::" -#: faq/programming.rst:531 +#: faq/programming.rst:535 msgid "By passing in a dictionary that gets mutated::" msgstr "En passant un dictionnaire, qui sera modifié ::" -#: faq/programming.rst:542 +#: faq/programming.rst:546 msgid "Or bundle up values in a class instance::" msgstr "Ou regrouper les valeurs dans une instance de classe ::" -#: faq/programming.rst:559 +#: faq/programming.rst:563 msgid "There's almost never a good reason to get this complicated." msgstr "Faire quelque chose d'aussi compliqué est rarement une bonne idée." -#: faq/programming.rst:561 +#: faq/programming.rst:565 msgid "Your best choice is to return a tuple containing the multiple results." msgstr "" "La meilleure option reste de renvoyer un *n*-uplet contenant les différents " "résultats." -#: faq/programming.rst:565 +#: faq/programming.rst:569 msgid "How do you make a higher order function in Python?" msgstr "Comment construire une fonction d'ordre supérieur en Python ?" -#: faq/programming.rst:567 +#: faq/programming.rst:571 msgid "" "You have two choices: you can use nested scopes or you can use callable " "objects. For example, suppose you wanted to define ``linear(a,b)`` which " @@ -944,19 +969,19 @@ msgstr "" "``linear(a, b)`` qui renvoie une fonction ``f(x)`` qui calcule la valeur " "``a*x+b``. En utilisant les portées imbriquées ::" -#: faq/programming.rst:576 +#: faq/programming.rst:580 msgid "Or using a callable object::" msgstr "Ou en utilisant un objet appelable ::" -#: faq/programming.rst:586 +#: faq/programming.rst:590 msgid "In both cases, ::" msgstr "Dans les deux cas ::" -#: faq/programming.rst:590 +#: faq/programming.rst:594 msgid "gives a callable object where ``taxes(10e6) == 0.3 * 10e6 + 2``." msgstr "donne un objet appelable où ``taxes(10e6) == 0.3 * 10e6 + 2``." -#: faq/programming.rst:592 +#: faq/programming.rst:596 msgid "" "The callable object approach has the disadvantage that it is a bit slower " "and results in slightly longer code. However, note that a collection of " @@ -967,11 +992,11 @@ msgstr "" "collection d'objet appelables peuvent partager leurs signatures par " "héritage ::" -#: faq/programming.rst:601 +#: faq/programming.rst:605 msgid "Object can encapsulate state for several methods::" msgstr "Les objets peuvent encapsuler un état pour plusieurs méthodes ::" -#: faq/programming.rst:619 +#: faq/programming.rst:623 msgid "" "Here ``inc()``, ``dec()`` and ``reset()`` act like functions which share the " "same counting variable." @@ -979,11 +1004,11 @@ msgstr "" "Ici ``inc()``, ``dec()`` et ``reset()`` agissent comme des fonctions " "partageant une même variable compteur." -#: faq/programming.rst:624 +#: faq/programming.rst:628 msgid "How do I copy an object in Python?" msgstr "Comment copier un objet en Python ?" -#: faq/programming.rst:626 +#: faq/programming.rst:630 msgid "" "In general, try :func:`copy.copy` or :func:`copy.deepcopy` for the general " "case. Not all objects can be copied, but most can." @@ -991,7 +1016,7 @@ msgstr "" "En général, essayez :func:`copy.copy` ou :func:`copy.deepcopy`. Tous les " "objets ne peuvent pas être copiés, mais la plupart le peuvent." -#: faq/programming.rst:629 +#: faq/programming.rst:633 msgid "" "Some objects can be copied more easily. Dictionaries have a :meth:`~dict." "copy` method::" @@ -999,15 +1024,15 @@ msgstr "" "Certains objets peuvent être copiés plus facilement que d'autres. Les " "dictionnaires ont une méthode :meth:`~dict.copy` ::" -#: faq/programming.rst:634 +#: faq/programming.rst:638 msgid "Sequences can be copied by slicing::" msgstr "Les séquences peuvent être copiées via la syntaxe des tranches ::" -#: faq/programming.rst:640 +#: faq/programming.rst:644 msgid "How can I find the methods or attributes of an object?" msgstr "Comment récupérer les méthodes ou les attributs d'un objet ?" -#: faq/programming.rst:642 +#: faq/programming.rst:646 msgid "" "For an instance x of a user-defined class, ``dir(x)`` returns an " "alphabetized list of the names containing the instance attributes and " @@ -1017,11 +1042,11 @@ msgstr "" "renvoie une liste alphabétique des noms contenants les attributs de " "l'instance, et les attributs et méthodes définies par sa classe." -#: faq/programming.rst:648 +#: faq/programming.rst:652 msgid "How can my code discover the name of an object?" msgstr "Comment un code peut-il obtenir le nom d'un objet ?" -#: faq/programming.rst:650 +#: faq/programming.rst:654 msgid "" "Generally speaking, it can't, because objects don't really have names. " "Essentially, assignment always binds a name to a value; the same is true of " @@ -1034,7 +1059,7 @@ msgstr "" "différence près que, dans ce cas, la valeur est un appelable. Par exemple, " "dans le code suivant ::" -#: faq/programming.rst:666 +#: faq/programming.rst:670 msgid "" "Arguably the class has a name: even though it is bound to two names and " "invoked through the name B the created instance is still reported as an " @@ -1047,7 +1072,7 @@ msgstr "" "dire si le nom de l'instance est a ou b, les deux noms étant attachés à la " "même valeur." -#: faq/programming.rst:671 +#: faq/programming.rst:675 msgid "" "Generally speaking it should not be necessary for your code to \"know the " "names\" of particular values. Unless you are deliberately writing " @@ -1059,7 +1084,7 @@ msgstr "" "train d'écrire un programme introspectif, c'est souvent l'indication qu'un " "changement d'approche serait bénéfique." -#: faq/programming.rst:676 +#: faq/programming.rst:680 msgid "" "In comp.lang.python, Fredrik Lundh once gave an excellent analogy in answer " "to this question:" @@ -1067,7 +1092,7 @@ msgstr "" "Sur *comp.lang.python*, Fredrik Lundh a donné un jour une excellente " "analogie pour répondre à cette question :" -#: faq/programming.rst:679 +#: faq/programming.rst:683 msgid "" "The same way as you get the name of that cat you found on your porch: the " "cat (object) itself cannot tell you its name, and it doesn't really care -- " @@ -1079,7 +1104,7 @@ msgstr "" "­– alors le meilleur moyen de savoir comment il s'appelle est de demander à " "tous vos voisins (espaces de nommage) si c'est leur chat (objet)…" -#: faq/programming.rst:684 +#: faq/programming.rst:688 msgid "" "....and don't be surprised if you'll find that it's known by many names, or " "no name at all!" @@ -1087,16 +1112,16 @@ msgstr "" "…et ne soyez pas surpris si vous découvrez qu'il est connu sous plusieurs " "noms, ou s'il n'a pas de nom du tout !" -#: faq/programming.rst:689 +#: faq/programming.rst:693 msgid "What's up with the comma operator's precedence?" msgstr "Qu'en est-il de la précédence de l'opérateur virgule ?" -#: faq/programming.rst:691 +#: faq/programming.rst:695 msgid "Comma is not an operator in Python. Consider this session::" msgstr "" "La virgule n'est pas un opérateur en Python. Observez le code suivant ::" -#: faq/programming.rst:696 +#: faq/programming.rst:700 msgid "" "Since the comma is not an operator, but a separator between expressions the " "above is evaluated as if you had entered::" @@ -1105,11 +1130,11 @@ msgstr "" "expressions, l'expression ci-dessus est évaluée de la même façon que si vous " "aviez écrit ::" -#: faq/programming.rst:701 +#: faq/programming.rst:705 msgid "not::" msgstr "et non ::" -#: faq/programming.rst:705 +#: faq/programming.rst:709 msgid "" "The same is true of the various assignment operators (``=``, ``+=`` etc). " "They are not truly operators but syntactic delimiters in assignment " @@ -1119,15 +1144,15 @@ msgstr "" "ne sont pas vraiment des opérateurs mais plutôt des délimiteurs syntaxiques " "dans les instructions d'affectation." -#: faq/programming.rst:710 +#: faq/programming.rst:714 msgid "Is there an equivalent of C's \"?:\" ternary operator?" msgstr "Existe-t-il un équivalent à l'opérateur ternaire \"?:\" du C ?" -#: faq/programming.rst:712 +#: faq/programming.rst:716 msgid "Yes, there is. The syntax is as follows::" msgstr "Oui. Sa syntaxe est la suivante ::" -#: faq/programming.rst:719 +#: faq/programming.rst:723 msgid "" "Before this syntax was introduced in Python 2.5, a common idiom was to use " "logical operators::" @@ -1135,7 +1160,7 @@ msgstr "" "Avant l'introduction de cette syntaxe dans Python 2.5, il était courant " "d'utiliser les opérateurs de logique ::" -#: faq/programming.rst:724 +#: faq/programming.rst:728 msgid "" "However, this idiom is unsafe, as it can give wrong results when *on_true* " "has a false boolean value. Therefore, it is always better to use the ``... " @@ -1145,13 +1170,13 @@ msgstr "" "la valeur booléenne fausse. Il faut donc toujours utiliser la forme ``... " "if ... else ...``." -#: faq/programming.rst:730 +#: faq/programming.rst:734 msgid "Is it possible to write obfuscated one-liners in Python?" msgstr "" "Est-il possible d'écrire des programmes obscurcis (*obfuscated*) d'une ligne " "en Python ?" -#: faq/programming.rst:732 +#: faq/programming.rst:736 msgid "" "Yes. Usually this is done by nesting :keyword:`lambda` within :keyword:`!" "lambda`. See the following three examples, due to Ulf Bartelt::" @@ -1160,17 +1185,17 @@ msgstr "" "keyword:`!lambda`. Par exemple les trois morceaux de code suivants, créés " "par Ulf Bartelt ::" -#: faq/programming.rst:759 +#: faq/programming.rst:763 msgid "Don't try this at home, kids!" msgstr "Les enfants, ne faites pas ça chez vous !" -#: faq/programming.rst:765 +#: faq/programming.rst:769 msgid "What does the slash(/) in the parameter list of a function mean?" msgstr "" "Que signifie la barre oblique (/) dans la liste des paramètres d'une " "fonction ?" -#: faq/programming.rst:767 +#: faq/programming.rst:771 msgid "" "A slash in the argument list of a function denotes that the parameters prior " "to it are positional-only. Positional-only parameters are the ones without " @@ -1188,7 +1213,7 @@ msgstr "" "que des paramètres uniquement positionnels. Sa documentation est la " "suivante ::" -#: faq/programming.rst:780 +#: faq/programming.rst:784 msgid "" "The slash at the end of the parameter list means that both parameters are " "positional-only. Thus, calling :func:`divmod` with keyword arguments would " @@ -1198,15 +1223,15 @@ msgstr "" "paramètres sont uniquement positionnels. Et donc, appeler :func:`divmod` " "avec des arguments nommés provoque une erreur ::" -#: faq/programming.rst:791 +#: faq/programming.rst:795 msgid "Numbers and strings" msgstr "Nombres et chaînes de caractères" -#: faq/programming.rst:794 +#: faq/programming.rst:798 msgid "How do I specify hexadecimal and octal integers?" msgstr "Comment écrire des entiers hexadécimaux ou octaux ?" -#: faq/programming.rst:796 +#: faq/programming.rst:800 msgid "" "To specify an octal digit, precede the octal value with a zero, and then a " "lower or uppercase \"o\". For example, to set the variable \"a\" to the " @@ -1216,7 +1241,7 @@ msgstr "" "puis un \"o\" majuscule ou minuscule. Par exemple pour affecter la valeur " "octale \"10\" (8 en décimal) à la variable \"a\", tapez ::" -#: faq/programming.rst:804 +#: faq/programming.rst:808 msgid "" "Hexadecimal is just as easy. Simply precede the hexadecimal number with a " "zero, and then a lower or uppercase \"x\". Hexadecimal digits can be " @@ -1227,11 +1252,11 @@ msgstr "" "peuvent être écrits en majuscules ou en minuscules. Par exemple, dans " "l'interpréteur Python ::" -#: faq/programming.rst:817 +#: faq/programming.rst:821 msgid "Why does -22 // 10 return -3?" msgstr "Pourquoi ``-22 // 10`` donne-t-il ``-3`` ?" -#: faq/programming.rst:819 +#: faq/programming.rst:823 msgid "" "It's primarily driven by the desire that ``i % j`` have the same sign as " "``j``. If you want that, and also want::" @@ -1239,7 +1264,7 @@ msgstr "" "Cela est principalement dû à la volonté que ``i % j`` ait le même signe que " "j. Si vous voulez en plus que ::" -#: faq/programming.rst:824 +#: faq/programming.rst:828 msgid "" "then integer division has to return the floor. C also requires that " "identity to hold, and then compilers that truncate ``i // j`` need to make " @@ -1249,7 +1274,7 @@ msgstr "" "également que cette égalité soit vérifiée, et donc les compilateurs qui " "tronquent ``i // j`` ont besoin que ``i % j`` ait le même signe que ``i``." -#: faq/programming.rst:828 +#: faq/programming.rst:832 msgid "" "There are few real use cases for ``i % j`` when ``j`` is negative. When " "``j`` is positive, there are many, and in virtually all of them it's more " @@ -1263,11 +1288,31 @@ msgstr "" "10 h maintenant, qu'affichait-elle il y a 200 heures ? ``-190 % 12 == 2`` " "est utile ; ``-190 % 12 == -10`` est un bogue en puissance." -#: faq/programming.rst:836 +#: faq/programming.rst:840 +msgid "How do I get int literal attribute instead of SyntaxError?" +msgstr "" +"Pourquoi ai-je une erreur de syntaxe en essayant de lire un attribut d'un " +"entier littéral ?" + +#: faq/programming.rst:842 +msgid "" +"Trying to lookup an ``int`` literal attribute in the normal manner gives a " +"syntax error because the period is seen as a decimal point::" +msgstr "" + +#: faq/programming.rst:851 +msgid "" +"The solution is to separate the literal from the period with either a space " +"or parentheses." +msgstr "" +"Il faut séparer l'entier du point, soit avec une espace, soit avec des " +"parenthèses." + +#: faq/programming.rst:861 msgid "How do I convert a string to a number?" msgstr "Comment convertir une chaîne de caractères en nombre ?" -#: faq/programming.rst:838 +#: faq/programming.rst:863 msgid "" "For integers, use the built-in :func:`int` type constructor, e.g. " "``int('144') == 144``. Similarly, :func:`float` converts to floating-point, " @@ -1277,7 +1322,7 @@ msgstr "" "``int('144') == 144``. De façon similaire, :func:`float` donne la valeur " "flottante, par exemple ``float('144') == 144.0``." -#: faq/programming.rst:842 +#: faq/programming.rst:867 msgid "" "By default, these interpret the number as decimal, so that ``int('0144') == " "144`` holds true, and ``int('0x144')`` raises :exc:`ValueError`. " @@ -1293,7 +1338,7 @@ msgstr "" "donnée est 0, le nombre est interprété selon les règles Python : un préfixe " "``0o`` indique de l'octal et ``0x`` indique de l'hexadécimal." -#: faq/programming.rst:849 +#: faq/programming.rst:874 msgid "" "Do not use the built-in function :func:`eval` if all you need is to convert " "strings to numbers. :func:`eval` will be significantly slower and it " @@ -1309,7 +1354,7 @@ msgstr "" "pourrait passer ``__import__('os').system(\"rm -rf $HOME\")`` ce qui " "effacerait votre répertoire personnel." -#: faq/programming.rst:856 +#: faq/programming.rst:881 msgid "" ":func:`eval` also has the effect of interpreting numbers as Python " "expressions, so that e.g. ``eval('09')`` gives a syntax error because Python " @@ -1320,11 +1365,11 @@ msgstr "" "parce que Python ne permet pas les '0' en tête d'un nombre décimal (à " "l'exception du nombre '0')." -#: faq/programming.rst:862 +#: faq/programming.rst:887 msgid "How do I convert a number to a string?" msgstr "Comment convertir un nombre en chaîne de caractères ?" -#: faq/programming.rst:864 +#: faq/programming.rst:889 msgid "" "To convert, e.g., the number 144 to the string '144', use the built-in type " "constructor :func:`str`. If you want a hexadecimal or octal representation, " @@ -1338,14 +1383,14 @@ msgstr "" "représentation hexadécimale ou octale, il faut utiliser les fonctions " "natives :func:`hex` ou :func:`oct`. Pour des représentations non-" "conventionnelles, se référer aux sections :ref:`f-strings` et :ref:" -"`formatstrings`, e.g. ``\"{:04d}\".format(144)`` produit ``'0144'`` et ``" -"\"{:.3f}\".format(1.0/3.0)`` produit ``'0.333'``." +"`formatstrings`, e.g. ``\"{:04d}\".format(144)`` produit ``'0144'`` et " +"``\"{:.3f}\".format(1.0/3.0)`` produit ``'0.333'``." -#: faq/programming.rst:873 +#: faq/programming.rst:898 msgid "How do I modify a string in place?" msgstr "Comment modifier une chaîne de caractères « sur place » ?" -#: faq/programming.rst:875 +#: faq/programming.rst:900 msgid "" "You can't, because strings are immutable. In most situations, you should " "simply construct a new string from the various parts you want to assemble it " @@ -1359,17 +1404,17 @@ msgstr "" "capable de modifier de la donnée Unicode « sur place », essayez d'utiliser " "un objet :class:`io.StringIO` ou le module :mod:`array` ::" -#: faq/programming.rst:905 +#: faq/programming.rst:930 msgid "How do I use strings to call functions/methods?" msgstr "" "Comment utiliser des chaînes de caractères pour appeler des fonctions/" "méthodes ?" -#: faq/programming.rst:907 +#: faq/programming.rst:932 msgid "There are various techniques." msgstr "Il y a plusieurs façons de faire." -#: faq/programming.rst:909 +#: faq/programming.rst:934 msgid "" "The best is to use a dictionary that maps strings to functions. The primary " "advantage of this technique is that the strings do not need to match the " @@ -1379,14 +1424,14 @@ msgstr "" "La meilleure est d'utiliser un dictionnaire qui fait correspondre les " "chaînes de caractères à des fonctions. Le principal avantage de cette " "technique est que les chaînes n'ont pas besoin d'être égales aux noms de " -"fonctions. C'est aussi la façon principale d'imiter la construction \"case" -"\" ::" +"fonctions. C'est aussi la façon principale d'imiter la construction " +"\"case\" ::" -#: faq/programming.rst:924 +#: faq/programming.rst:949 msgid "Use the built-in function :func:`getattr`::" msgstr "Utiliser la fonction :func:`getattr` ::" -#: faq/programming.rst:929 +#: faq/programming.rst:954 msgid "" "Note that :func:`getattr` works on any object, including classes, class " "instances, modules, and so on." @@ -1394,17 +1439,17 @@ msgstr "" "Notez que :func:`getattr` marche sur n'importe quel objet, ceci inclut les " "classes, les instances de classes, les modules et ainsi de suite." -#: faq/programming.rst:932 +#: faq/programming.rst:957 msgid "This is used in several places in the standard library, like this::" msgstr "" "Ceci est utilisé à plusieurs reprises dans la bibliothèque standard, de " "cette façon ::" -#: faq/programming.rst:945 +#: faq/programming.rst:970 msgid "Use :func:`locals` to resolve the function name::" msgstr "Utilisez :func:`locals` pour résoudre le nom de la fonction ::" -#: faq/programming.rst:957 +#: faq/programming.rst:982 msgid "" "Is there an equivalent to Perl's chomp() for removing trailing newlines from " "strings?" @@ -1412,7 +1457,7 @@ msgstr "" "Existe-t-il un équivalent à la fonction ``chomp()`` de Perl, pour retirer " "les caractères de fin de ligne d'une chaîne de caractères ?" -#: faq/programming.rst:959 +#: faq/programming.rst:984 msgid "" "You can use ``S.rstrip(\"\\r\\n\")`` to remove all occurrences of any line " "terminator from the end of the string ``S`` without removing other trailing " @@ -1426,7 +1471,7 @@ msgstr "" "représente plus d'une ligne, avec plusieurs lignes vides, les marqueurs de " "fin de ligne de chaque ligne vide seront retirés ::" -#: faq/programming.rst:971 +#: faq/programming.rst:996 msgid "" "Since this is typically only desired when reading text one line at a time, " "using ``S.rstrip()`` this way works well." @@ -1434,15 +1479,15 @@ msgstr "" "Vu que cela ne sert presque qu'à lire un texte ligne à ligne, utiliser ``S." "rstrip()`` de cette manière fonctionne correctement." -#: faq/programming.rst:976 +#: faq/programming.rst:1001 msgid "Is there a scanf() or sscanf() equivalent?" msgstr "Existe-t-il un équivalent à ``scanf()`` ou ``sscanf()`` ?" -#: faq/programming.rst:978 +#: faq/programming.rst:1003 msgid "Not as such." msgstr "Pas exactement." -#: faq/programming.rst:980 +#: faq/programming.rst:1005 msgid "" "For simple input parsing, the easiest approach is usually to split the line " "into whitespace-delimited words using the :meth:`~str.split` method of " @@ -1459,7 +1504,7 @@ msgstr "" "paramètre optionnel \"sep\" qui est utile si la ligne utilise autre chose " "que des espaces comme séparateurs." -#: faq/programming.rst:986 +#: faq/programming.rst:1011 msgid "" "For more complicated input parsing, regular expressions are more powerful " "than C's :c:func:`sscanf` and better suited for the task." @@ -1468,24 +1513,24 @@ msgstr "" "puissantes que la fonction :c:func:`sscanf` de C et mieux adaptées à la " "tâche." -#: faq/programming.rst:991 +#: faq/programming.rst:1016 msgid "What does 'UnicodeDecodeError' or 'UnicodeEncodeError' error mean?" msgstr "" "Que signifient les erreurs ``UnicodeDecodeError`` ou ``UnicodeEncodeError`` ?" -#: faq/programming.rst:993 +#: faq/programming.rst:1018 msgid "See the :ref:`unicode-howto`." msgstr "Voir :ref:`unicode-howto`." -#: faq/programming.rst:997 +#: faq/programming.rst:1022 msgid "Performance" msgstr "Performances" -#: faq/programming.rst:1000 +#: faq/programming.rst:1025 msgid "My program is too slow. How do I speed it up?" msgstr "Mon programme est trop lent. Comment l'accélérer ?" -#: faq/programming.rst:1002 +#: faq/programming.rst:1027 msgid "" "That's a tough one, in general. First, here are a list of things to " "remember before diving further:" @@ -1493,7 +1538,7 @@ msgstr "" "Question difficile en général. Il faut garder en tête les points suivants " "avant d'aller plus loin :" -#: faq/programming.rst:1005 +#: faq/programming.rst:1030 msgid "" "Performance characteristics vary across Python implementations. This FAQ " "focuses on :term:`CPython`." @@ -1501,7 +1546,7 @@ msgstr "" "Les performances varient en fonction des implémentations de Python. Cette " "FAQ ne traite que de :term:`CPython`." -#: faq/programming.rst:1007 +#: faq/programming.rst:1032 msgid "" "Behaviour can vary across operating systems, especially when talking about I/" "O or multi-threading." @@ -1510,7 +1555,7 @@ msgstr "" "tout particulièrement quand il s'agit d'entrée/sortie ou de fils d'exécution " "multiples." -#: faq/programming.rst:1009 +#: faq/programming.rst:1034 msgid "" "You should always find the hot spots in your program *before* attempting to " "optimize any code (see the :mod:`profile` module)." @@ -1519,7 +1564,7 @@ msgstr "" "programme *avant* d'essayer d'optimiser du code (voir le module :mod:" "`profile`)." -#: faq/programming.rst:1011 +#: faq/programming.rst:1036 msgid "" "Writing benchmark scripts will allow you to iterate quickly when searching " "for improvements (see the :mod:`timeit` module)." @@ -1527,7 +1572,7 @@ msgstr "" "Écrire des scripts d'évaluation de performances permet de progresser " "rapidement dans la recherche d'améliorations (voir le module :mod:`timeit`)." -#: faq/programming.rst:1013 +#: faq/programming.rst:1038 msgid "" "It is highly recommended to have good code coverage (through unit testing or " "any other technique) before potentially introducing regressions hidden in " @@ -1537,7 +1582,7 @@ msgstr "" "des tests unitaires ou autre) avant d'ajouter des erreurs dans des " "optimisations sophistiquées." -#: faq/programming.rst:1017 +#: faq/programming.rst:1042 msgid "" "That being said, there are many tricks to speed up Python code. Here are " "some general principles which go a long way towards reaching acceptable " @@ -1547,7 +1592,7 @@ msgstr "" "Voici quelques principes généraux qui peuvent aider à atteindre des niveaux " "de performance satisfaisants :" -#: faq/programming.rst:1021 +#: faq/programming.rst:1046 msgid "" "Making your algorithms faster (or changing to faster ones) can yield much " "larger benefits than trying to sprinkle micro-optimization tricks all over " @@ -1557,7 +1602,7 @@ msgstr "" "produire de bien meilleurs résultats que d'optimiser ça et là de petites " "portions du code." -#: faq/programming.rst:1025 +#: faq/programming.rst:1050 msgid "" "Use the right data structures. Study documentation for the :ref:`bltin-" "types` and the :mod:`collections` module." @@ -1565,7 +1610,7 @@ msgstr "" "Utiliser les structures de données adaptées. Se référer à la documentation " "des :ref:`bltin-types` et du module :mod:`collections`." -#: faq/programming.rst:1028 +#: faq/programming.rst:1053 msgid "" "When the standard library provides a primitive for doing something, it is " "likely (although not guaranteed) to be faster than any alternative you may " @@ -1584,7 +1629,7 @@ msgstr "" "référer à la section :ref:`sortinghowto` pour des exemples d'utilisation " "courante)." -#: faq/programming.rst:1036 +#: faq/programming.rst:1061 msgid "" "Abstractions tend to create indirections and force the interpreter to work " "more. If the levels of indirection outweigh the amount of useful work done, " @@ -1598,7 +1643,7 @@ msgstr "" "éviter trop d'indirections, en particulier sous la forme de fonctions ou " "méthodes trop petites (qui nuisent aussi souvent à la clarté du code)." -#: faq/programming.rst:1042 +#: faq/programming.rst:1067 msgid "" "If you have reached the limit of what pure Python can allow, there are tools " "to take you further away. For example, `Cython `_ can " @@ -1619,7 +1664,7 @@ msgstr "" "vous pouvez aussi :ref:`écrire un module d'extension en C` " "vous-même." -#: faq/programming.rst:1052 +#: faq/programming.rst:1077 msgid "" "The wiki page devoted to `performance tips `_." @@ -1627,13 +1672,13 @@ msgstr "" "La page wiki dédiée aux `astuces de performance `_." -#: faq/programming.rst:1058 +#: faq/programming.rst:1083 msgid "What is the most efficient way to concatenate many strings together?" msgstr "" "Quelle est la manière la plus efficace de concaténer un grand nombre de " "chaînes de caractères ?" -#: faq/programming.rst:1060 +#: faq/programming.rst:1085 msgid "" ":class:`str` and :class:`bytes` objects are immutable, therefore " "concatenating many strings together is inefficient as each concatenation " @@ -1646,7 +1691,7 @@ msgstr "" "général, la complexité est quadratique par rapport à la taille totale de la " "chaîne." -#: faq/programming.rst:1065 +#: faq/programming.rst:1090 msgid "" "To accumulate many :class:`str` objects, the recommended idiom is to place " "them into a list and call :meth:`str.join` at the end::" @@ -1655,13 +1700,13 @@ msgstr "" "recommandée consiste à toutes les mettre dans une liste et appeler la " "méthode :meth:`str.join` à la fin ::" -#: faq/programming.rst:1073 +#: faq/programming.rst:1098 msgid "(another reasonably efficient idiom is to use :class:`io.StringIO`)" msgstr "" "(une autre technique relativement efficace consiste à utiliser :class:`io." "StringIO`)" -#: faq/programming.rst:1075 +#: faq/programming.rst:1100 msgid "" "To accumulate many :class:`bytes` objects, the recommended idiom is to " "extend a :class:`bytearray` object using in-place concatenation (the ``+=`` " @@ -1671,15 +1716,15 @@ msgstr "" "recommandée consiste à étendre un objet :class:`bytearray` en utilisant la " "concaténation en-place (l'opérateur ``+=``) ::" -#: faq/programming.rst:1084 +#: faq/programming.rst:1109 msgid "Sequences (Tuples/Lists)" msgstr "Séquences (*n*-uplets / listes)" -#: faq/programming.rst:1087 +#: faq/programming.rst:1112 msgid "How do I convert between tuples and lists?" msgstr "Comment convertir les listes en *n*-uplets et inversement ?" -#: faq/programming.rst:1089 +#: faq/programming.rst:1114 msgid "" "The type constructor ``tuple(seq)`` converts any sequence (actually, any " "iterable) into a tuple with the same items in the same order." @@ -1688,7 +1733,7 @@ msgstr "" "précisément, tout itérable) en un *n*-uplet avec les mêmes éléments dans le " "même ordre." -#: faq/programming.rst:1092 +#: faq/programming.rst:1117 msgid "" "For example, ``tuple([1, 2, 3])`` yields ``(1, 2, 3)`` and ``tuple('abc')`` " "yields ``('a', 'b', 'c')``. If the argument is a tuple, it does not make a " @@ -1701,7 +1746,7 @@ msgstr "" "fonction économique à appeler quand vous ne savez pas si votre objet est " "déjà un *n*-uplet." -#: faq/programming.rst:1097 +#: faq/programming.rst:1122 msgid "" "The type constructor ``list(seq)`` converts any sequence or iterable into a " "list with the same items in the same order. For example, ``list((1, 2, " @@ -1714,11 +1759,11 @@ msgstr "" "``['a','b','c']``. Si l'argument est une liste, il renvoie une copie, de la " "même façon que ``seq[:]``." -#: faq/programming.rst:1104 +#: faq/programming.rst:1129 msgid "What's a negative index?" msgstr "Qu'est-ce qu'un index négatif ?" -#: faq/programming.rst:1106 +#: faq/programming.rst:1131 msgid "" "Python sequences are indexed with positive numbers and negative numbers. " "For positive numbers 0 is the first index 1 is the second index and so " @@ -1732,7 +1777,7 @@ msgstr "" "dernier index, ``-2`` est le pénultième (avant-dernier), et ainsi de suite. " "On peut aussi dire que ``seq[-n]`` est équivalent à ``seq[len(seq)-n]``." -#: faq/programming.rst:1111 +#: faq/programming.rst:1136 msgid "" "Using negative indices can be very convenient. For example ``S[:-1]`` is " "all of the string except for its last character, which is useful for " @@ -1743,15 +1788,15 @@ msgstr "" "caractère, ce qui est pratique pour retirer un caractère de fin de ligne à " "la fin d'une chaîne." -#: faq/programming.rst:1117 +#: faq/programming.rst:1142 msgid "How do I iterate over a sequence in reverse order?" msgstr "Comment itérer à rebours sur une séquence ?" -#: faq/programming.rst:1119 +#: faq/programming.rst:1144 msgid "Use the :func:`reversed` built-in function::" msgstr "Utilisez la fonction native :func:`reversed` ::" -#: faq/programming.rst:1124 +#: faq/programming.rst:1149 msgid "" "This won't touch your original sequence, but build a new copy with reversed " "order to iterate over." @@ -1759,21 +1804,21 @@ msgstr "" "Cela ne modifie pas la séquence initiale, mais construit à la place une " "copie en ordre inverse pour itérer dessus." -#: faq/programming.rst:1129 +#: faq/programming.rst:1154 msgid "How do you remove duplicates from a list?" msgstr "Comment retirer les doublons d'une liste ?" -#: faq/programming.rst:1131 +#: faq/programming.rst:1156 msgid "See the Python Cookbook for a long discussion of many ways to do this:" msgstr "" "Lisez le « livre de recettes » Python pour trouver une longue discussion sur " "les nombreuses approches possibles :" -#: faq/programming.rst:1133 +#: faq/programming.rst:1158 msgid "https://code.activestate.com/recipes/52560/" msgstr "https://code.activestate.com/recipes/52560/" -#: faq/programming.rst:1135 +#: faq/programming.rst:1160 msgid "" "If you don't mind reordering the list, sort it and then scan from the end of " "the list, deleting duplicates as you go::" @@ -1782,7 +1827,7 @@ msgstr "" "celle-ci, puis parcourez-la d'un bout à l'autre, en supprimant les doublons " "trouvés en chemin ::" -#: faq/programming.rst:1147 +#: faq/programming.rst:1172 msgid "" "If all elements of the list may be used as set keys (i.e. they are all :term:" "`hashable`) this is often faster ::" @@ -1791,7 +1836,7 @@ msgstr "" "dictionnaire (c'est à dire, qu'elles sont toutes :term:`hachables " "`) ceci est souvent plus rapide ::" -#: faq/programming.rst:1152 +#: faq/programming.rst:1177 msgid "" "This converts the list into a set, thereby removing duplicates, and then " "back into a list." @@ -1799,11 +1844,11 @@ msgstr "" "Ceci convertit la liste en un ensemble, ce qui supprime automatiquement les " "doublons, puis la transforme à nouveau en liste." -#: faq/programming.rst:1157 +#: faq/programming.rst:1182 msgid "How do you remove multiple items from a list" msgstr "Comment retirer les doublons d'une liste" -#: faq/programming.rst:1159 +#: faq/programming.rst:1184 msgid "" "As with removing duplicates, explicitly iterating in reverse with a delete " "condition is one possibility. However, it is easier and faster to use slice " @@ -1815,19 +1860,19 @@ msgstr "" "plus rapide d’utiliser le remplacement des tranches par une itération avant, " "implicite ou explicite. Voici trois variantes. ::" -#: faq/programming.rst:1168 +#: faq/programming.rst:1193 msgid "The list comprehension may be fastest." msgstr "La liste en compréhension est peut-être la plus rapide ::" -#: faq/programming.rst:1172 +#: faq/programming.rst:1197 msgid "How do you make an array in Python?" msgstr "Comment construire un tableau en Python ?" -#: faq/programming.rst:1174 +#: faq/programming.rst:1199 msgid "Use a list::" msgstr "Utilisez une liste ::" -#: faq/programming.rst:1178 +#: faq/programming.rst:1203 msgid "" "Lists are equivalent to C or Pascal arrays in their time complexity; the " "primary difference is that a Python list can contain objects of many " @@ -1837,12 +1882,13 @@ msgstr "" "principale différence est qu'une liste Python peut contenir des objets de " "différents types." -#: faq/programming.rst:1181 +#: faq/programming.rst:1206 +#, fuzzy msgid "" "The ``array`` module also provides methods for creating arrays of fixed " "types with compact representations, but they are slower to index than " -"lists. Also note that the Numeric extensions and others define array-like " -"structures with various characteristics as well." +"lists. Also note that NumPy and other third party packages define array-" +"like structures with various characteristics as well." msgstr "" "Le module ``array`` fournit des méthodes pour créer des tableaux de types " "fixes dans une représentation compacte, mais ils sont plus lents à indexer " @@ -1850,14 +1896,14 @@ msgstr "" "fournissent différentes structures de type tableaux, avec des " "caractéristiques différentes." -#: faq/programming.rst:1186 +#: faq/programming.rst:1211 msgid "" "To get Lisp-style linked lists, you can emulate cons cells using tuples::" msgstr "" "Pour obtenir des listes chaînées à la sauce Lisp, vous pouvez émuler les " "*cons cells* en utilisant des *n*-uplets ::" -#: faq/programming.rst:1190 +#: faq/programming.rst:1215 msgid "" "If mutability is desired, you could use lists instead of tuples. Here the " "analogue of lisp car is ``lisp_list[0]`` and the analogue of cdr is " @@ -1870,27 +1916,27 @@ msgstr "" "ceci que si vous êtes réellement sûr d'en avoir besoin, cette méthode est en " "général bien plus lente que les listes Python." -#: faq/programming.rst:1199 +#: faq/programming.rst:1224 msgid "How do I create a multidimensional list?" msgstr "Comment créer une liste à plusieurs dimensions ?" -#: faq/programming.rst:1201 +#: faq/programming.rst:1226 msgid "You probably tried to make a multidimensional array like this::" msgstr "" "Vous avez probablement essayé de créer une liste à plusieurs dimensions de " "cette façon ::" -#: faq/programming.rst:1205 +#: faq/programming.rst:1230 msgid "This looks correct if you print it:" msgstr "Elle semble correcte si on l'affiche :" -#: faq/programming.rst:1216 +#: faq/programming.rst:1241 msgid "But when you assign a value, it shows up in multiple places:" msgstr "" "Mais quand vous affectez une valeur, celle-ci apparaît à plusieurs " "endroits ::" -#: faq/programming.rst:1228 +#: faq/programming.rst:1253 msgid "" "The reason is that replicating a list with ``*`` doesn't create copies, it " "only creates references to the existing objects. The ``*3`` creates a list " @@ -1903,7 +1949,7 @@ msgstr "" "dans une colonne apparaîtra donc dans toutes les colonnes, ce qui n'est très " "probablement pas ce que vous souhaitiez." -#: faq/programming.rst:1233 +#: faq/programming.rst:1258 msgid "" "The suggested approach is to create a list of the desired length first and " "then fill in each element with a newly created list::" @@ -1911,7 +1957,7 @@ msgstr "" "L'approche suggérée est d'abord de créer une liste de la longueur désirée, " "puis de remplir tous les éléments avec une nouvelle chaîne ::" -#: faq/programming.rst:1240 +#: faq/programming.rst:1265 msgid "" "This generates a list containing 3 different lists of length two. You can " "also use a list comprehension::" @@ -1920,7 +1966,7 @@ msgstr "" "longueur deux. Vous pouvez aussi utiliser la syntaxe des listes en " "compréhension ::" -#: faq/programming.rst:1246 +#: faq/programming.rst:1271 msgid "" "Or, you can use an extension that provides a matrix datatype; `NumPy `_ is the best known." @@ -1928,22 +1974,22 @@ msgstr "" "Vous pouvez aussi utiliser une extension qui fournit un type matriciel " "natif ; `NumPy `_ est la plus répandue." -#: faq/programming.rst:1251 +#: faq/programming.rst:1276 msgid "How do I apply a method to a sequence of objects?" msgstr "Comment appliquer une méthode à une séquence d'objets ?" -#: faq/programming.rst:1253 +#: faq/programming.rst:1278 msgid "Use a list comprehension::" msgstr "Utilisez une liste en compréhension ::" -#: faq/programming.rst:1260 +#: faq/programming.rst:1285 msgid "" "Why does a_tuple[i] += ['item'] raise an exception when the addition works?" msgstr "" "Pourquoi ``a_tuple[i] += ['item']`` lève-t-il une exception alors que " "l'addition fonctionne ?" -#: faq/programming.rst:1262 +#: faq/programming.rst:1287 msgid "" "This is because of a combination of the fact that augmented assignment " "operators are *assignment* operators, and the difference between mutable and " @@ -1953,7 +1999,7 @@ msgstr "" "d'affectation incrémentaux sont des opérateurs d'*affectation* et à la " "différence entre les objets muables et immuables en Python." -#: faq/programming.rst:1266 +#: faq/programming.rst:1291 msgid "" "This discussion applies in general when augmented assignment operators are " "applied to elements of a tuple that point to mutable objects, but we'll use " @@ -1963,11 +2009,11 @@ msgstr "" "incrémentale sont appliqués aux éléments d'un *n*-uplet qui pointe sur des " "objets muables, mais on prendra ``list`` et ``+=`` comme exemple." -#: faq/programming.rst:1270 +#: faq/programming.rst:1295 msgid "If you wrote::" msgstr "Si vous écrivez ::" -#: faq/programming.rst:1278 +#: faq/programming.rst:1303 msgid "" "The reason for the exception should be immediately clear: ``1`` is added to " "the object ``a_tuple[0]`` points to (``1``), producing the result object, " @@ -1981,7 +2027,7 @@ msgstr "" "l'élément ``0`` du *n*-uplet, on obtient une erreur car il est impossible de " "modifier la cible sur laquelle pointe un élément d'un *n*-uplet." -#: faq/programming.rst:1284 +#: faq/programming.rst:1309 msgid "" "Under the covers, what this augmented assignment statement is doing is " "approximately this::" @@ -1989,7 +2035,7 @@ msgstr "" "Sous le capot, une instruction d'affectation incrémentale fait à peu près " "ceci ::" -#: faq/programming.rst:1293 +#: faq/programming.rst:1318 msgid "" "It is the assignment part of the operation that produces the error, since a " "tuple is immutable." @@ -1997,11 +2043,11 @@ msgstr "" "C'est la partie de l'affectation de l'opération qui génère l'erreur, vu " "qu'un *n*-uplet est immuable." -#: faq/programming.rst:1296 +#: faq/programming.rst:1321 msgid "When you write something like::" msgstr "Quand vous écrivez un code du style ::" -#: faq/programming.rst:1304 +#: faq/programming.rst:1329 msgid "" "The exception is a bit more surprising, and even more surprising is the fact " "that even though there was an error, the append worked::" @@ -2009,7 +2055,7 @@ msgstr "" "L'exception est un peu plus surprenante et, chose encore plus étrange, " "malgré l'erreur, l'ajout a fonctionné ::" -#: faq/programming.rst:1310 +#: faq/programming.rst:1335 msgid "" "To see why this happens, you need to know that (a) if an object implements " "an ``__iadd__`` magic method, it gets called when the ``+=`` augmented " @@ -2026,11 +2072,11 @@ msgstr "" "renvoyer celle-ci. C'est pour cette raison que l'on dit que pour les listes, " "``+=`` est un \"raccourci\" pour ``list.extend`` ::" -#: faq/programming.rst:1322 +#: faq/programming.rst:1347 msgid "This is equivalent to::" msgstr "C’est équivalent à ::" -#: faq/programming.rst:1327 +#: faq/programming.rst:1352 msgid "" "The object pointed to by a_list has been mutated, and the pointer to the " "mutated object is assigned back to ``a_list``. The end result of the " @@ -2042,13 +2088,13 @@ msgstr "" "change rien, puisque c'est un pointeur vers le même objet que sur lequel " "pointait ``a_list``, mais l'affectation a tout de même lieu." -#: faq/programming.rst:1332 +#: faq/programming.rst:1357 msgid "Thus, in our tuple example what is happening is equivalent to::" msgstr "" "Donc, dans notre exemple avec un *n*-uplet, il se passe quelque chose " "équivalent à ::" -#: faq/programming.rst:1340 +#: faq/programming.rst:1365 msgid "" "The ``__iadd__`` succeeds, and thus the list is extended, but even though " "``result`` points to the same object that ``a_tuple[0]`` already points to, " @@ -2059,7 +2105,7 @@ msgstr "" "``result`` pointe sur le même objet que ``a_tuple[0]``, l'affectation finale " "échoue car les *n*-uplets ne sont pas muables." -#: faq/programming.rst:1346 +#: faq/programming.rst:1371 msgid "" "I want to do a complicated sort: can you do a Schwartzian Transform in " "Python?" @@ -2067,7 +2113,7 @@ msgstr "" "Je souhaite faire un classement compliqué : peut on faire une transformation " "de Schwartz en Python ?" -#: faq/programming.rst:1348 +#: faq/programming.rst:1373 msgid "" "The technique, attributed to Randal Schwartz of the Perl community, sorts " "the elements of a list by a metric which maps each element to its \"sort " @@ -2079,11 +2125,11 @@ msgstr "" "chaque élément à sa \"valeur de tri\". En Python, ceci est géré par " "l'argument ``key`` de la méthode :meth:`list.sort` ::" -#: faq/programming.rst:1357 +#: faq/programming.rst:1382 msgid "How can I sort one list by values from another list?" msgstr "Comment ordonner une liste en fonction des valeurs d'une autre liste ?" -#: faq/programming.rst:1359 +#: faq/programming.rst:1384 msgid "" "Merge them into an iterator of tuples, sort the resulting list, and then " "pick out the element you want. ::" @@ -2091,15 +2137,15 @@ msgstr "" "Fusionnez-les dans un itérateur de *n*-uplets, ordonnez la liste obtenue, " "puis choisissez l'élément que vous voulez ::" -#: faq/programming.rst:1374 +#: faq/programming.rst:1399 msgid "Objects" msgstr "Objets" -#: faq/programming.rst:1377 +#: faq/programming.rst:1402 msgid "What is a class?" msgstr "Qu'est-ce qu'une classe ?" -#: faq/programming.rst:1379 +#: faq/programming.rst:1404 msgid "" "A class is the particular object type created by executing a class " "statement. Class objects are used as templates to create instance objects, " @@ -2111,7 +2157,7 @@ msgstr "" "créer des objets, qui incarnent à la fois les données (attributs) et le code " "(méthodes) spécifiques à un type de données." -#: faq/programming.rst:1383 +#: faq/programming.rst:1408 msgid "" "A class can be based on one or more other classes, called its base " "class(es). It then inherits the attributes and methods of its base classes. " @@ -2129,11 +2175,11 @@ msgstr "" "``MaildirMailbox``, ``OutlookMailbox`` qui gèrent les plusieurs formats " "spécifiques de boîtes aux lettres." -#: faq/programming.rst:1392 +#: faq/programming.rst:1417 msgid "What is a method?" msgstr "Qu'est-ce qu'une méthode ?" -#: faq/programming.rst:1394 +#: faq/programming.rst:1419 msgid "" "A method is a function on some object ``x`` that you normally call as ``x." "name(arguments...)``. Methods are defined as functions inside the class " @@ -2143,11 +2189,11 @@ msgstr "" "générale sous la forme ``x.name(arguments…)``. Les méthodes sont définies " "comme des fonctions à l'intérieur de la définition de classe ::" -#: faq/programming.rst:1404 +#: faq/programming.rst:1429 msgid "What is self?" msgstr "Qu'est-ce que self ?" -#: faq/programming.rst:1406 +#: faq/programming.rst:1431 msgid "" "Self is merely a conventional name for the first argument of a method. A " "method defined as ``meth(self, a, b, c)`` should be called as ``x.meth(a, b, " @@ -2160,11 +2206,11 @@ msgstr "" "est définie ; tout se passe comme si la méthode était appelée comme " "``meth(x, a, b, c)``." -#: faq/programming.rst:1411 +#: faq/programming.rst:1436 msgid "See also :ref:`why-self`." msgstr "Voir aussi :ref:`why-self`." -#: faq/programming.rst:1415 +#: faq/programming.rst:1440 msgid "" "How do I check if an object is an instance of a given class or of a subclass " "of it?" @@ -2172,7 +2218,7 @@ msgstr "" "Comment vérifier si un objet est une instance d'une classe donnée ou d'une " "sous-classe de celle-ci ?" -#: faq/programming.rst:1417 +#: faq/programming.rst:1442 msgid "" "Use the built-in function ``isinstance(obj, cls)``. You can check if an " "object is an instance of any of a number of classes by providing a tuple " @@ -2187,7 +2233,21 @@ msgstr "" "l'un des types natifs de Python, par exemple ``isinstance(obj, str)`` ou " "``isinstance(obj, (int, float, complex))``." -#: faq/programming.rst:1423 +#: faq/programming.rst:1448 +msgid "" +"Note that :func:`isinstance` also checks for virtual inheritance from an :" +"term:`abstract base class`. So, the test will return ``True`` for a " +"registered class even if hasn't directly or indirectly inherited from it. " +"To test for \"true inheritance\", scan the :term:`MRO` of the class:" +msgstr "" +"Notez que :func:`isinstance` prend aussi en compte l'héritage virtuel d'une :" +"term:`classe mère abstraite `, c'est à dire qu'elle " +"renvoie ``True`` pour une classe A enregistrée auprès d'une classe mère " +"abstraite B même si A n'est pas directement ou indirectement une classe " +"fille de B. Pour vérifier l'héritage dans le sens plus restreint, parcourez " +"l'\\ :term:`ordre de résolution des méthodes ` de la classe :" + +#: faq/programming.rst:1483 msgid "" "Note that most programs do not use :func:`isinstance` on user-defined " "classes very often. If you are developing the classes yourself, a more " @@ -2203,7 +2263,7 @@ msgstr "" "plutôt que de vérifier la classe de l'objet et de faire un traitement ad-" "hoc. Par exemple, si vous avez une fonction qui fait quelque chose ::" -#: faq/programming.rst:1437 +#: faq/programming.rst:1497 msgid "" "A better approach is to define a ``search()`` method on all the classes and " "just call it::" @@ -2211,11 +2271,11 @@ msgstr "" "Une meilleure approche est de définir une méthode ``search()`` dans toutes " "les classes et qu'il suffit d'appeler de la manière suivante ::" -#: faq/programming.rst:1452 +#: faq/programming.rst:1512 msgid "What is delegation?" msgstr "Qu'est-ce que la délégation ?" -#: faq/programming.rst:1454 +#: faq/programming.rst:1514 msgid "" "Delegation is an object oriented technique (also called a design pattern). " "Let's say you have an object ``x`` and want to change the behaviour of just " @@ -2230,7 +2290,7 @@ msgstr "" "dans l'évolution et qui délègue toute autre méthode à la méthode " "correspondante de ``x``." -#: faq/programming.rst:1460 +#: faq/programming.rst:1520 msgid "" "Python programmers can easily implement delegation. For example, the " "following class implements a class that behaves like a file but converts all " @@ -2240,7 +2300,7 @@ msgstr "" "Par exemple, la classe suivante implémente une classe qui se comporte comme " "un fichier, mais convertit toutes les données écrites en majuscules ::" -#: faq/programming.rst:1475 +#: faq/programming.rst:1535 msgid "" "Here the ``UpperOut`` class redefines the ``write()`` method to convert the " "argument string to uppercase before calling the underlying ``self._outfile." @@ -2257,7 +2317,7 @@ msgstr "" "` pour plus d'informations sur la personnalisation de " "l’accès aux attributs." -#: faq/programming.rst:1482 +#: faq/programming.rst:1542 msgid "" "Note that for more general cases delegation can get trickier. When " "attributes must be set as well as retrieved, the class must define a :meth:" @@ -2271,7 +2331,7 @@ msgstr "" "et il doit le faire avec soin. La mise en œuvre basique de la méthode :meth:" "`__setattr__` est à peu près équivalent à ce qui suit ::" -#: faq/programming.rst:1493 +#: faq/programming.rst:1553 msgid "" "Most :meth:`__setattr__` implementations must modify ``self.__dict__`` to " "store local state for self without causing an infinite recursion." @@ -2280,7 +2340,7 @@ msgstr "" "``self.__dict__`` pour stocker l'état local de self sans provoquer une " "récursion infinie." -#: faq/programming.rst:1498 +#: faq/programming.rst:1558 msgid "" "How do I call a method defined in a base class from a derived class that " "overrides it?" @@ -2288,11 +2348,11 @@ msgstr "" "Comment appeler une méthode définie dans une classe de base depuis une " "classe dérivée qui la surcharge ?" -#: faq/programming.rst:1500 +#: faq/programming.rst:1560 msgid "Use the built-in :func:`super` function::" msgstr "Utilisez la fonction native :func:`super` ::" -#: faq/programming.rst:1506 +#: faq/programming.rst:1566 msgid "" "For version prior to 3.0, you may be using classic classes: For a class " "definition such as ``class Derived(Base): ...`` you can call method " @@ -2307,13 +2367,13 @@ msgstr "" "arguments...)``. Ici, ``Base.meth`` est une méthode non liée, il faut donc " "fournir l'argument ``self``." -#: faq/programming.rst:1514 +#: faq/programming.rst:1574 msgid "How can I organize my code to make it easier to change the base class?" msgstr "" "Comment organiser un code pour permettre de changer la classe de base plus " "facilement ?" -#: faq/programming.rst:1516 +#: faq/programming.rst:1576 msgid "" "You could assign the base class to an alias and derive from the alias. Then " "all you have to change is the value assigned to the alias. Incidentally, " @@ -2326,13 +2386,13 @@ msgstr "" "dynamiquement (par exemple en fonction de la disponibilité de certaines " "ressources) la classe de base à utiliser. Exemple ::" -#: faq/programming.rst:1531 +#: faq/programming.rst:1591 msgid "How do I create static class data and static class methods?" msgstr "" "Comment créer des données statiques de classe et des méthodes statiques de " "classe ?" -#: faq/programming.rst:1533 +#: faq/programming.rst:1593 msgid "" "Both static data and static methods (in the sense of C++ or Java) are " "supported in Python." @@ -2340,7 +2400,7 @@ msgstr "" "Les données statiques et les méthodes statiques (au sens C++ ou Java) sont " "prises en charge en Python." -#: faq/programming.rst:1536 +#: faq/programming.rst:1596 msgid "" "For static data, simply define a class attribute. To assign a new value to " "the attribute, you have to explicitly use the class name in the assignment::" @@ -2349,7 +2409,7 @@ msgstr "" "attribuer une nouvelle valeur à l'attribut, vous devez explicitement " "utiliser le nom de classe dans l'affectation ::" -#: faq/programming.rst:1548 +#: faq/programming.rst:1608 msgid "" "``c.count`` also refers to ``C.count`` for any ``c`` such that " "``isinstance(c, C)`` holds, unless overridden by ``c`` itself or by some " @@ -2360,7 +2420,7 @@ msgstr "" "une classe sur le chemin de recherche de classe de base de ``c.__class__`` " "jusqu'à ``C``." -#: faq/programming.rst:1552 +#: faq/programming.rst:1612 msgid "" "Caution: within a method of C, an assignment like ``self.count = 42`` " "creates a new and unrelated instance named \"count\" in ``self``'s own " @@ -2373,11 +2433,11 @@ msgstr "" "de classe doit toujours spécifier la classe, que l'on soit à l'intérieur " "d'une méthode ou non ::" -#: faq/programming.rst:1559 +#: faq/programming.rst:1619 msgid "Static methods are possible::" msgstr "Il est possible d'utiliser des méthodes statiques ::" -#: faq/programming.rst:1567 +#: faq/programming.rst:1627 msgid "" "However, a far more straightforward way to get the effect of a static method " "is via a simple module-level function::" @@ -2385,7 +2445,7 @@ msgstr "" "Cependant, d'une manière beaucoup plus simple pour obtenir l'effet d'une " "méthode statique se fait par une simple fonction au niveau du module ::" -#: faq/programming.rst:1573 +#: faq/programming.rst:1633 msgid "" "If your code is structured so as to define one class (or tightly related " "class hierarchy) per module, this supplies the desired encapsulation." @@ -2394,11 +2454,11 @@ msgstr "" "hiérarchie des classes connexes) par module, ceci fournira l'encapsulation " "souhaitée." -#: faq/programming.rst:1578 +#: faq/programming.rst:1638 msgid "How can I overload constructors (or methods) in Python?" msgstr "Comment surcharger les constructeurs (ou méthodes) en Python ?" -#: faq/programming.rst:1580 +#: faq/programming.rst:1640 msgid "" "This answer actually applies to all methods, but the question usually comes " "up first in the context of constructors." @@ -2406,11 +2466,11 @@ msgstr "" "Cette réponse s'applique en fait à toutes les méthodes, mais la question se " "pose généralement dans le contexte des constructeurs." -#: faq/programming.rst:1583 +#: faq/programming.rst:1643 msgid "In C++ you'd write" msgstr "En C++, on écrirait" -#: faq/programming.rst:1592 +#: faq/programming.rst:1652 msgid "" "In Python you have to write a single constructor that catches all cases " "using default arguments. For example::" @@ -2418,29 +2478,29 @@ msgstr "" "En Python, vous devez écrire un constructeur unique qui considère tous les " "cas en utilisant des arguments par défaut. Par exemple ::" -#: faq/programming.rst:1602 +#: faq/programming.rst:1662 msgid "This is not entirely equivalent, but close enough in practice." msgstr "" "Ce n'est pas tout à fait équivalent, mais suffisamment proche dans la " "pratique." -#: faq/programming.rst:1604 +#: faq/programming.rst:1664 msgid "You could also try a variable-length argument list, e.g. ::" msgstr "" "Vous pouvez aussi utiliser une liste d'arguments de longueur variable, par " "exemple ::" -#: faq/programming.rst:1609 +#: faq/programming.rst:1669 msgid "The same approach works for all method definitions." msgstr "La même approche fonctionne pour toutes les définitions de méthode." -#: faq/programming.rst:1613 +#: faq/programming.rst:1673 msgid "I try to use __spam and I get an error about _SomeClassName__spam." msgstr "" "J'essaie d'utiliser ``__spam`` et j'obtiens une erreur à propos de " "``_SomeClassName__spam``." -#: faq/programming.rst:1615 +#: faq/programming.rst:1675 msgid "" "Variable names with double leading underscores are \"mangled\" to provide a " "simple but effective way to define class private variables. Any identifier " @@ -2456,7 +2516,7 @@ msgstr "" "remplacé par ``_classname__spam``, où ``classname`` est le nom de la classe " "en cours sans les éventuels tirets bas du début." -#: faq/programming.rst:1621 +#: faq/programming.rst:1681 msgid "" "This doesn't guarantee privacy: an outside user can still deliberately " "access the \"_classname__spam\" attribute, and private values are visible in " @@ -2468,17 +2528,17 @@ msgstr "" "privées sont visibles dans l'objet ``__dict__``. De nombreux programmeurs " "Python ne prennent jamais la peine d'utiliser des noms de variable privés." -#: faq/programming.rst:1628 +#: faq/programming.rst:1688 msgid "My class defines __del__ but it is not called when I delete the object." msgstr "" "Ma classe définit ``__del__`` mais elle n'est pas appelée lorsque je " "supprime l'objet." -#: faq/programming.rst:1630 +#: faq/programming.rst:1690 msgid "There are several possible reasons for this." msgstr "Il y a plusieurs explications possibles." -#: faq/programming.rst:1632 +#: faq/programming.rst:1692 msgid "" "The del statement does not necessarily call :meth:`__del__` -- it simply " "decrements the object's reference count, and if this reaches zero :meth:" @@ -2488,7 +2548,7 @@ msgstr "" "simplement le compteur de références de l'objet et, si celui-ci arrive à " "zéro, :meth:`__del__` est appelée." -#: faq/programming.rst:1636 +#: faq/programming.rst:1696 msgid "" "If your data structures contain circular links (e.g. a tree where each child " "has a parent reference and each parent has a list of children) the reference " @@ -2514,7 +2574,7 @@ msgstr "" "miettes avec la fonction :func:`gc.collect`, mais il existe certains cas où " "les objets ne seront jamais nettoyés." -#: faq/programming.rst:1647 +#: faq/programming.rst:1707 msgid "" "Despite the cycle collector, it's still a good idea to define an explicit " "``close()`` method on objects to be called whenever you're done with them. " @@ -2531,7 +2591,7 @@ msgstr "" "`__del__` devrait appeler la méthode ``close()`` et ``close()`` doit pouvoir " "être appelée plusieurs fois sur le même objet." -#: faq/programming.rst:1654 +#: faq/programming.rst:1714 msgid "" "Another way to avoid cyclical references is to use the :mod:`weakref` " "module, which allows you to point to objects without incrementing their " @@ -2544,7 +2604,7 @@ msgstr "" "d'arbres devraient utiliser des références faibles entre pères et fils (si " "nécessaire !)." -#: faq/programming.rst:1667 +#: faq/programming.rst:1727 msgid "" "Finally, if your :meth:`__del__` method raises an exception, a warning " "message is printed to :data:`sys.stderr`." @@ -2552,11 +2612,11 @@ msgstr "" "Enfin, si la méthode :meth:`__del__` lève une exception, un message " "d'avertissement s'affiche dans :data:`sys.stderr`." -#: faq/programming.rst:1672 +#: faq/programming.rst:1732 msgid "How do I get a list of all instances of a given class?" msgstr "Comment obtenir toutes les instances d'une classe ?" -#: faq/programming.rst:1674 +#: faq/programming.rst:1734 msgid "" "Python does not keep track of all instances of a class (or of a built-in " "type). You can program the class's constructor to keep track of all " @@ -2567,13 +2627,13 @@ msgstr "" "constructeur de la classe de façon à tenir un tel registre, en maintenant " "une liste de références faibles vers chaque instance." -#: faq/programming.rst:1680 +#: faq/programming.rst:1740 msgid "Why does the result of ``id()`` appear to be not unique?" msgstr "" "Pourquoi le résultat de ``id()`` peut-il être le même pour deux objets " "différents ?" -#: faq/programming.rst:1682 +#: faq/programming.rst:1742 msgid "" "The :func:`id` builtin returns an integer that is guaranteed to be unique " "during the lifetime of the object. Since in CPython, this is the object's " @@ -2587,7 +2647,7 @@ msgstr "" "à une adresse mémoire identique à celle d'un objet venant d'être supprimé. " "Comme l'illustre le code suivant :" -#: faq/programming.rst:1693 +#: faq/programming.rst:1753 msgid "" "The two ids belong to different integer objects that are created before, and " "deleted immediately after execution of the ``id()`` call. To be sure that " @@ -2599,15 +2659,178 @@ msgstr "" "objets dont on veut examiner les identifiants sont toujours en vie, créons " "une nouvelle référence à l'objet :" -#: faq/programming.rst:1706 +#: faq/programming.rst:1766 +msgid "When can I rely on identity tests with the *is* operator?" +msgstr "Quand puis-je raisonnablement utiliser le test d'identité *is* ?" + +#: faq/programming.rst:1768 +msgid "" +"The ``is`` operator tests for object identity. The test ``a is b`` is " +"equivalent to ``id(a) == id(b)``." +msgstr "" +"L'opérateur ``is`` détermine si deux objets sont identiques, c'est-à-dire le " +"même objet. Le test ``a is b`` est équivalent à ``id(a) == id(b)``." + +#: faq/programming.rst:1771 +msgid "" +"The most important property of an identity test is that an object is always " +"identical to itself, ``a is a`` always returns ``True``. Identity tests are " +"usually faster than equality tests. And unlike equality tests, identity " +"tests are guaranteed to return a boolean ``True`` or ``False``." +msgstr "" +"La propriété la plus importante du test d'identité est qu'un objet est " +"toujours identique à lui-même. Quelle que soit la valeur de *a*, ``a is a`` " +"vaut toujours ``True``. Un test d'identité est généralement plus rapide " +"qu'un test d'égalité. De plus, contrairement à l'opérateur ``==``, " +"l'opérateur ``is`` renvoie toujours un booléen, ``True`` ou ``False``." + +#: faq/programming.rst:1776 +msgid "" +"However, identity tests can *only* be substituted for equality tests when " +"object identity is assured. Generally, there are three circumstances where " +"identity is guaranteed:" +msgstr "" +"Cependant, les tests d'identité ne peuvent remplacer les tests d'égalité que " +"si l'identité est garantie. C'est le cas dans les trois situations " +"suivantes :" + +#: faq/programming.rst:1780 +msgid "" +"1) Assignments create new names but do not change object identity. After " +"the assignment ``new = old``, it is guaranteed that ``new is old``." +msgstr "" +"1) Les affectations créent de nouvelles variables, mais pas de nouveaux " +"objets. Après l'affectation ``nouveau = ancien``, ``nouveau is ancien`` vaut " +"toujours ``True``." + +#: faq/programming.rst:1783 +msgid "" +"2) Putting an object in a container that stores object references does not " +"change object identity. After the list assignment ``s[0] = x``, it is " +"guaranteed that ``s[0] is x``." +msgstr "" +"Le stockage d'un objet dans un conteneur qui fonctionne avec des références " +"n'altère pas l'identité. Si ``s`` est une liste, alors après l'affectation " +"de *x* à l'indice 0, ``s[0] = x``, le test ``s[0] is x`` s'évalue forcément " +"à ``True``." + +#: faq/programming.rst:1787 +msgid "" +"3) If an object is a singleton, it means that only one instance of that " +"object can exist. After the assignments ``a = None`` and ``b = None``, it " +"is guaranteed that ``a is b`` because ``None`` is a singleton." +msgstr "" +"3) Les singletons sont des objets spéciaux qui ne sont jamais dupliqués. " +"Après les affectations ``a = None`` et ``b = None``, on a forcément ``a is " +"b``, puisque ``None`` est un singleton." + +#: faq/programming.rst:1791 +msgid "" +"In most other circumstances, identity tests are inadvisable and equality " +"tests are preferred. In particular, identity tests should not be used to " +"check constants such as :class:`int` and :class:`str` which aren't " +"guaranteed to be singletons::" +msgstr "" +"Dans la plupart des autres cas, un test d'identité n'est pas approprié par " +"rapport à un test d'égalité. En particulier, il ne faut pas utiliser ``is`` " +"pour comparer à des constantes comme les entiers (type :class:`int`) ou des " +"chaînes de caractères (type :class:`str`) car ces valeurs ne sont pas " +"nécessairement des singletons ::" + +#: faq/programming.rst:1808 +msgid "Likewise, new instances of mutable containers are never identical::" +msgstr "" +"De même, deux instances fraîchement créées d'un type de conteneurs muables " +"ne sont jamais identiques ::" + +#: faq/programming.rst:1815 +msgid "" +"In the standard library code, you will see several common patterns for " +"correctly using identity tests:" +msgstr "" +"Voici quelques exemples de la bibliothèque standard qui illustrent comment " +"utiliser correctement les tests d'identité dans certaines situations " +"particulières :" + +#: faq/programming.rst:1818 +msgid "" +"1) As recommended by :pep:`8`, an identity test is the preferred way to " +"check for ``None``. This reads like plain English in code and avoids " +"confusion with other objects that may have boolean values that evaluate to " +"false." +msgstr "" +"1) Comme recommandé par la :pep:`8`, il est préférable de comparer avec " +"``None`` par identité. Le test se lit comme de la prose anglaise (``x is " +"None``, ``x is not None``), et cela évite des surprises avec les objets dont " +"la valeur booléenne est ``False``." + +#: faq/programming.rst:1822 +msgid "" +"2) Detecting optional arguments can be tricky when ``None`` is a valid input " +"value. In those situations, you can create a singleton sentinel object " +"guaranteed to be distinct from other objects. For example, here is how to " +"implement a method that behaves like :meth:`dict.pop`::" +msgstr "" +"2) Savoir si un paramètre facultatif a été passé ou pas peut nécessiter un " +"peu de subtilité lorsque ``None`` est une valeur acceptable pour le " +"paramètre. Dans ces cas, il faut créer un objet singleton dit " +"« sentinelle », distinct de toute valeur acceptable. Voici par exemple " +"comment écrire une méthode qui émule :meth:`dict.pop` :" + +#: faq/programming.rst:1838 +msgid "" +"3) Container implementations sometimes need to augment equality tests with " +"identity tests. This prevents the code from being confused by objects such " +"as ``float('NaN')`` that are not equal to themselves." +msgstr "" +"3) Il arrive que l'implémentation d'un type de conteneurs doive ajouter des " +"tests d'identité aux tests d'égalité, ceci afin d'éviter un comportement non " +"souhaité avec les objets comme ``float('NaN')`` qui ne sont pas égaux à eux-" +"mêmes." + +#: faq/programming.rst:1842 +msgid "" +"For example, here is the implementation of :meth:`collections.abc.Sequence." +"__contains__`::" +msgstr "" +"Par exemple, l'implémentation de :meth:`collections.abc.Sequence." +"__contains__` est ::" + +#: faq/programming.rst:1853 +msgid "" +"How can a subclass control what data is stored in an immutable instance?" +msgstr "" +"Comment définir dans une classe fille les attributs d'une instance immuable ?" + +#: faq/programming.rst:1855 +msgid "" +"When subclassing an immutable type, override the :meth:`__new__` method " +"instead of the :meth:`__init__` method. The latter only runs *after* an " +"instance is created, which is too late to alter data in an immutable " +"instance." +msgstr "" + +#: faq/programming.rst:1860 +msgid "" +"All of these immutable classes have a different signature than their parent " +"class:" +msgstr "" +"Toutes les classes d'objets immuables suivantes ont des signatures de " +"constructeur différentes de leur classe mère :" + +#: faq/programming.rst:1886 +msgid "The classes can be used like this:" +msgstr "Ces classes s'utilisent comme ceci :" + +#: faq/programming.rst:1901 msgid "Modules" msgstr "Modules" -#: faq/programming.rst:1709 +#: faq/programming.rst:1904 msgid "How do I create a .pyc file?" msgstr "Comment créer des fichiers ``.pyc`` ?" -#: faq/programming.rst:1711 +#: faq/programming.rst:1906 msgid "" "When a module is imported for the first time (or when the source file has " "changed since the current compiled file was created) a ``.pyc`` file " @@ -2625,7 +2848,7 @@ msgstr "" "centrale qui dépend du binaire ``python`` qui l'a créé (voir la :pep:`3147` " "pour de plus amples précisions)." -#: faq/programming.rst:1719 +#: faq/programming.rst:1914 msgid "" "One reason that a ``.pyc`` file may not be created is a permissions problem " "with the directory containing the source file, meaning that the " @@ -2640,7 +2863,7 @@ msgstr "" "utilisateur, mais que le code est exécuté en tant qu'un autre utilisateur, " "par exemple pour tester un serveur Web." -#: faq/programming.rst:1724 +#: faq/programming.rst:1919 msgid "" "Unless the :envvar:`PYTHONDONTWRITEBYTECODE` environment variable is set, " "creation of a .pyc file is automatic if you're importing a module and Python " @@ -2654,7 +2877,7 @@ msgstr "" "sous-répertoire, à moins que la variable d'environnement :envvar:" "`PYTHONDONTWRITEBYTECODE` soit définie." -#: faq/programming.rst:1729 +#: faq/programming.rst:1924 msgid "" "Running Python on a top level script is not considered an import and no ``." "pyc`` will be created. For example, if you have a top-level module ``foo." @@ -2670,7 +2893,7 @@ msgstr "" "console), un fichier ``.pyc`` est créé pour ``xyz`` mais pas pour ``foo`` " "car ``foo.py`` n'est pas importé." -#: faq/programming.rst:1736 +#: faq/programming.rst:1931 msgid "" "If you need to create a ``.pyc`` file for ``foo`` -- that is, to create a ``." "pyc`` file for a module that is not imported -- you can, using the :mod:" @@ -2680,7 +2903,7 @@ msgstr "" "``.pyc`` pour un module qui n'est pas importé — il existe les modules :mod:" "`py_compile` et :mod:`compileall`." -#: faq/programming.rst:1740 +#: faq/programming.rst:1935 msgid "" "The :mod:`py_compile` module can manually compile any module. One way is to " "use the ``compile()`` function in that module interactively::" @@ -2689,7 +2912,7 @@ msgstr "" "manuellement. Il est ainsi possible d'appeler la fonction ``compile()`` de " "manière interactive ::" -#: faq/programming.rst:1746 +#: faq/programming.rst:1941 msgid "" "This will write the ``.pyc`` to a ``__pycache__`` subdirectory in the same " "location as ``foo.py`` (or you can override that with the optional parameter " @@ -2699,7 +2922,7 @@ msgstr "" "de ``foo.py`` (le paramètre optionnel ``cfile`` permet de changer ce " "comportement)." -#: faq/programming.rst:1750 +#: faq/programming.rst:1945 msgid "" "You can also automatically compile all files in a directory or directories " "using the :mod:`compileall` module. You can do it from the shell prompt by " @@ -2711,11 +2934,11 @@ msgstr "" "en exécutant ``compileall.py`` avec le chemin du dossier contenant les " "fichiers Python à compiler ::" -#: faq/programming.rst:1759 +#: faq/programming.rst:1954 msgid "How do I find the current module name?" msgstr "Comment obtenir le nom du module actuel ?" -#: faq/programming.rst:1761 +#: faq/programming.rst:1956 msgid "" "A module can find out its own module name by looking at the predefined " "global variable ``__name__``. If this has the value ``'__main__'``, the " @@ -2730,62 +2953,62 @@ msgstr "" "interface en ligne de commande ou un test automatique. Ils n'exécutent cette " "portion du code qu'après avoir vérifié la valeur de ``__name__`` ::" -#: faq/programming.rst:1776 +#: faq/programming.rst:1971 msgid "How can I have modules that mutually import each other?" msgstr "Comment avoir des modules qui s'importent mutuellement ?" -#: faq/programming.rst:1778 +#: faq/programming.rst:1973 msgid "Suppose you have the following modules:" msgstr "Considérons les modules suivants :" -#: faq/programming.rst:1780 +#: faq/programming.rst:1975 msgid "foo.py::" msgstr "*foo.py* ::" -#: faq/programming.rst:1785 +#: faq/programming.rst:1980 msgid "bar.py::" msgstr "*bar.py* ::" -#: faq/programming.rst:1790 +#: faq/programming.rst:1985 msgid "The problem is that the interpreter will perform the following steps:" msgstr "Le problème réside dans les étapes que l'interpréteur va réaliser :" -#: faq/programming.rst:1792 +#: faq/programming.rst:1987 msgid "main imports foo" msgstr "*main* importe *foo*" -#: faq/programming.rst:1793 +#: faq/programming.rst:1988 msgid "Empty globals for foo are created" msgstr "Les variables globales (vides) de *foo* sont créées" -#: faq/programming.rst:1794 +#: faq/programming.rst:1989 msgid "foo is compiled and starts executing" msgstr "*foo* est compilé et commence à s'exécuter" -#: faq/programming.rst:1795 +#: faq/programming.rst:1990 msgid "foo imports bar" msgstr "*foo* importe *bar*" -#: faq/programming.rst:1796 +#: faq/programming.rst:1991 msgid "Empty globals for bar are created" msgstr "Les variables globales (vides) de *bar* sont créées" -#: faq/programming.rst:1797 +#: faq/programming.rst:1992 msgid "bar is compiled and starts executing" msgstr "*bar* est compilé et commence à s'exécuter" -#: faq/programming.rst:1798 +#: faq/programming.rst:1993 msgid "" "bar imports foo (which is a no-op since there already is a module named foo)" msgstr "" "*bar* importe *foo* (en réalité, rien ne passe car il y a déjà un module " "appelé *foo*)" -#: faq/programming.rst:1799 +#: faq/programming.rst:1994 msgid "bar.foo_var = foo.foo_var" msgstr "bar.foo_var = foo.foo_var" -#: faq/programming.rst:1801 +#: faq/programming.rst:1996 msgid "" "The last step fails, because Python isn't done with interpreting ``foo`` yet " "and the global symbol dictionary for ``foo`` is still empty." @@ -2793,7 +3016,7 @@ msgstr "" "La dernière étape échoue car Python n'a pas fini d'interpréter ``foo`` et le " "dictionnaire global des symboles de ``foo`` est encore vide." -#: faq/programming.rst:1804 +#: faq/programming.rst:1999 msgid "" "The same thing happens when you use ``import foo``, and then try to access " "``foo.foo_var`` in global code." @@ -2801,11 +3024,11 @@ msgstr "" "Le même phénomène arrive quand on utilise ``import foo``, et qu'on essaye " "ensuite d'accéder à ``foo.foo_var`` dans le code global." -#: faq/programming.rst:1807 +#: faq/programming.rst:2002 msgid "There are (at least) three possible workarounds for this problem." msgstr "Il y a (au moins) trois façons de contourner ce problème." -#: faq/programming.rst:1809 +#: faq/programming.rst:2004 msgid "" "Guido van Rossum recommends avoiding all uses of ``from import ..." "``, and placing all code inside functions. Initializations of global " @@ -2819,14 +3042,14 @@ msgstr "" "des fonctions natives. Ceci implique que tout ce qui est fourni par un " "module soit référencé par ``.``." -#: faq/programming.rst:1814 +#: faq/programming.rst:2009 msgid "" "Jim Roskind suggests performing steps in the following order in each module:" msgstr "" "Jim Roskind recommande d'effectuer les étapes suivantes dans cet ordre dans " "chaque module :" -#: faq/programming.rst:1816 +#: faq/programming.rst:2011 msgid "" "exports (globals, functions, and classes that don't need imported base " "classes)" @@ -2834,26 +3057,27 @@ msgstr "" "les exportations (variables globales, fonctions et les classes qui ne " "nécessitent d'importer des classes de base)" -#: faq/programming.rst:1818 +#: faq/programming.rst:2013 msgid "``import`` statements" msgstr "les instructions ``import``" -#: faq/programming.rst:1819 +#: faq/programming.rst:2014 msgid "" "active code (including globals that are initialized from imported values)." msgstr "" "le code (avec les variables globales qui sont initialisées à partir de " "valeurs importées)." -#: faq/programming.rst:1821 +#: faq/programming.rst:2016 +#, fuzzy msgid "" -"van Rossum doesn't like this approach much because the imports appear in a " +"Van Rossum doesn't like this approach much because the imports appear in a " "strange place, but it does work." msgstr "" "van Rossum désapprouve cette approche car les importations se trouvent à un " "endroit bizarre, mais cela fonctionne." -#: faq/programming.rst:1824 +#: faq/programming.rst:2019 msgid "" "Matthias Urlichs recommends restructuring your code so that the recursive " "import is not necessary in the first place." @@ -2861,16 +3085,16 @@ msgstr "" "Matthias Urlichs conseille de restructurer le code pour éviter les " "importations récursives." -#: faq/programming.rst:1827 +#: faq/programming.rst:2022 msgid "These solutions are not mutually exclusive." msgstr "Ces solutions peuvent être combinées." -#: faq/programming.rst:1831 +#: faq/programming.rst:2026 msgid "__import__('x.y.z') returns ; how do I get z?" msgstr "" "``__import__('x.y.z')`` renvoie ```` ; comment accéder à ``z`` ?" -#: faq/programming.rst:1833 +#: faq/programming.rst:2028 msgid "" "Consider using the convenience function :func:`~importlib.import_module` " "from :mod:`importlib` instead::" @@ -2878,7 +3102,7 @@ msgstr "" "Utilisez plutôt la fonction :func:`~importlib.import_module` de :mod:" "`importlib` ::" -#: faq/programming.rst:1840 +#: faq/programming.rst:2035 msgid "" "When I edit an imported module and reimport it, the changes don't show up. " "Why does this happen?" @@ -2886,7 +3110,7 @@ msgstr "" "Quand j'édite un module et que je le réimporte, je ne vois pas les " "changements. Pourquoi ?" -#: faq/programming.rst:1842 +#: faq/programming.rst:2037 msgid "" "For reasons of efficiency as well as consistency, Python only reads the " "module file on the first time a module is imported. If it didn't, in a " @@ -2901,7 +3125,7 @@ msgstr "" "ré-analysé un très grand nombre de fois. Pour forcer la relecture d'un " "module, il faut faire ::" -#: faq/programming.rst:1852 +#: faq/programming.rst:2047 msgid "" "Warning: this technique is not 100% fool-proof. In particular, modules " "containing statements like ::" @@ -2909,7 +3133,7 @@ msgstr "" "Attention, cette technique ne marche pas systématiquement. En particulier, " "les modules qui contiennent des instructions comme ::" -#: faq/programming.rst:1857 +#: faq/programming.rst:2052 msgid "" "will continue to work with the old version of the imported objects. If the " "module contains class definitions, existing class instances will *not* be " @@ -2921,7 +3145,7 @@ msgstr "" "celle-ci ne sont *pas* mises à jour avec la nouvelle définition de la " "classe. Ceci peut conduire au comportement paradoxal suivant ::" -#: faq/programming.rst:1870 +#: faq/programming.rst:2065 msgid "" "The nature of the problem is made clear if you print out the \"identity\" of " "the class objects::" @@ -2929,6 +3153,36 @@ msgstr "" "La nature du problème apparaît clairement en affichant « l'identité » des " "objets de la classe ::" +#, fuzzy +#~ msgid "" +#~ "Obviously, freeze requires a C compiler. There are several other " +#~ "utilities which don't:" +#~ msgstr "" +#~ "Bien évidemment, *freeze* nécessite un compilateur C. Il existe d'autres " +#~ "outils qui peuvent s'en passer. Un de ceux-ci est py2exe de Thomas Heller " +#~ "(pour Windows uniquement) disponible sur" + +#~ msgid "" +#~ "Pydb is a version of the standard Python debugger pdb, modified for use " +#~ "with DDD (Data Display Debugger), a popular graphical debugger front " +#~ "end. Pydb can be found at http://bashdb.sourceforge.net/pydb/ and DDD " +#~ "can be found at https://www.gnu.org/software/ddd." +#~ msgstr "" +#~ "*Pydb* est une version du débogueur standard Python *pdb*, modifié pour " +#~ "être utilisé avec DDD (Data Display Debugger), un célèbre débogueur " +#~ "graphique. *Pydb* est disponible sur http://bashdb.sourceforge.net/pydb/ " +#~ "et DDD est disponible sur https://www.gnu.org/software/ddd." + +#~ msgid "Komodo IDE (https://komodoide.com/)" +#~ msgstr "Komodo IDE (https://komodoide.com/)" + +#~ msgid "" +#~ "Another tool is Anthony Tuininga's `cx_Freeze `_." +#~ msgstr "" +#~ "Un autre de ces outils est `cx_Freeze `_ d'Anthony Tuininga." + #~ msgid "" #~ "Note: Using :func:`eval` is slow and dangerous. If you don't have " #~ "absolute control over the contents of the string, someone could pass a " diff --git a/faq/windows.po b/faq/windows.po index 2428900242..7244d0e8ed 100644 --- a/faq/windows.po +++ b/faq/windows.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-01-28 16:02+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -40,19 +40,19 @@ msgstr "" #: faq/windows.rst:28 msgid "" "Unless you use some sort of integrated development environment, you will end " -"up *typing* Windows commands into what is variously referred to as a \"DOS " -"window\" or \"Command prompt window\". Usually you can create such a window " -"from your search bar by searching for ``cmd``. You should be able to " -"recognize when you have started such a window because you will see a Windows " -"\"command prompt\", which usually looks like this:" +"up *typing* Windows commands into what is referred to as a \"Command prompt " +"window\". Usually you can create such a window from your search bar by " +"searching for ``cmd``. You should be able to recognize when you have " +"started such a window because you will see a Windows \"command prompt\", " +"which usually looks like this:" msgstr "" "À moins que vous n'utilisiez une sorte d'environnement de développement, " -"vous finirez par *taper* des commandes Windows dans ce qui est diversement " -"appelé une \"fenêtre DOS\" ou \"invite de commande Windows\". En général " -"vous pouvez ouvrir un telle fenêtre depuis votre barre de recherche en " -"cherchant ``cmd``. Vous devriez être capable de reconnaitre quand vous avez " -"lancé une telle fenêtre parce que vous verrez une invite de commande " -"Windows, qui en en général ressemble à ça :" +"vous finirez par *taper* des commandes Windows dans ce qui est appelé une " +"« invite de commande Windows ». En général vous pouvez ouvrir un telle " +"fenêtre depuis votre barre de recherche en cherchant ``cmd``. Vous devriez " +"être capable de reconnaître quand vous avez lancé une telle fenêtre parce " +"que vous verrez une « invite de commande » Windows, qui en en général " +"ressemble à ça :" #: faq/windows.rst:39 msgid "" @@ -230,24 +230,17 @@ msgstr "Comment construire un exécutable depuis un script Python ?" #: faq/windows.rst:143 msgid "" -"See `cx_Freeze `_ for a " -"distutils extension that allows you to create console and GUI executables " -"from Python code. `py2exe `_, the most popular " -"extension for building Python 2.x-based executables, does not yet support " -"Python 3 but a version that does is in development." +"See :ref:`faq-create-standalone-binary` for a list of tools that can be used " +"to make executables." msgstr "" -"Regardez `cx_Freeze `_ pour une " -"extension *distutils* qui permet de créer des exécutables console et IUG à " -"partir de code Python. `py2exe `_ est l'extension la " -"plus populaire pour transformer du code Python 2 en exécutable, mais ne elle " -"prend pas en charge Python 3 (l'implémentation est en cours de " -"développement)." +"Voir :ref:`faq-create-standalone-binary` pour une liste d'outils qui créent " +"des exécutables." -#: faq/windows.rst:151 +#: faq/windows.rst:148 msgid "Is a ``*.pyd`` file the same as a DLL?" msgstr "Est-ce qu'un fichier ``*.pyd`` est la même chose qu'une DLL ?" -#: faq/windows.rst:153 +#: faq/windows.rst:150 msgid "" "Yes, .pyd files are dll's, but there are a few differences. If you have a " "DLL named ``foo.pyd``, then it must have a function ``PyInit_foo()``. You " @@ -264,7 +257,7 @@ msgstr "" "l'initialiser. Ne liez pas votre *.exe* avec *foo.lib* car dans ce cas " "Windows aura besoin de la DLL." -#: faq/windows.rst:160 +#: faq/windows.rst:157 msgid "" "Note that the search path for foo.pyd is PYTHONPATH, not the same as the " "path that Windows uses to search for foo.dll. Also, foo.pyd need not be " @@ -283,11 +276,11 @@ msgstr "" "``__declspec(dllexport)``. Dans un *.pyd* la liaison est définie dans une " "liste de fonctions disponibles." -#: faq/windows.rst:169 +#: faq/windows.rst:166 msgid "How can I embed Python into a Windows application?" msgstr "Comment puis-je intégrer Python dans une application Windows ?" -#: faq/windows.rst:171 +#: faq/windows.rst:168 msgid "" "Embedding the Python interpreter in a Windows app can be summarized as " "follows:" @@ -295,7 +288,7 @@ msgstr "" "L'intégration de l'interpréteur Python dans une application Windows peut se " "résumer comme suit :" -#: faq/windows.rst:173 +#: faq/windows.rst:170 msgid "" "Do _not_ build Python into your .exe file directly. On Windows, Python must " "be a DLL to handle importing modules that are themselves DLL's. (This is " @@ -310,7 +303,7 @@ msgstr "" "est généralement placé dans ``C:\\Windows\\System``. *NN* étant la version " "Python, par exemple « 33 » pour Python 3.3." -#: faq/windows.rst:179 +#: faq/windows.rst:176 msgid "" "You can link to Python in two different ways. Load-time linking means " "linking against :file:`python{NN}.lib`, while run-time linking means linking " @@ -325,7 +318,7 @@ msgstr "" "lib* » correspondant à :file:`python{NN}.dll`. Il définit simplement des " "liens symboliques pour l'éditeur de liens.)" -#: faq/windows.rst:185 +#: faq/windows.rst:182 msgid "" "Run-time linking greatly simplifies link options; everything happens at run " "time. Your code must load :file:`python{NN}.dll` using the Windows " @@ -344,15 +337,7 @@ msgstr "" "peuvent rendre l'utilisation de ces pointeurs transparente à tout code C qui " "appelle des routines dans l'API C de Python." -#: faq/windows.rst:192 -msgid "" -"Borland note: convert :file:`python{NN}.lib` to OMF format using Coff2Omf." -"exe first." -msgstr "" -"Note Borland : convertir :file:`python{NN}.lib` au format OMF en utilisant " -"*Coff2Omf.exe* en premier." - -#: faq/windows.rst:197 +#: faq/windows.rst:191 msgid "" "If you use SWIG, it is easy to create a Python \"extension module\" that " "will make the app's data and methods available to Python. SWIG will handle " @@ -367,7 +352,7 @@ msgstr "" "n'avez **pas** besoin de créer un fichier DLL, et cela simplifie également " "la liaison." -#: faq/windows.rst:203 +#: faq/windows.rst:197 msgid "" "SWIG will create an init function (a C function) whose name depends on the " "name of the extension module. For example, if the name of the module is " @@ -382,7 +367,7 @@ msgstr "" "appelée *initleoc()*. Ceci initialise une classe auxiliaire invisible " "utilisée par la classe *shadow*." -#: faq/windows.rst:209 +#: faq/windows.rst:203 msgid "" "The reason you can link the C code in step 2 into your .exe file is that " "calling the initialization function is equivalent to importing the module " @@ -392,7 +377,7 @@ msgstr "" "*fichier.exe* est que l'appel de la fonction d'initialisation équivaut à " "importer le module dans Python ! (C'est le deuxième fait clé non documenté.)" -#: faq/windows.rst:213 +#: faq/windows.rst:207 msgid "" "In short, you can use the following code to initialize the Python " "interpreter with your extension module." @@ -400,7 +385,7 @@ msgstr "" "En bref, vous pouvez utiliser le code suivant pour initialiser " "l'interpréteur Python avec votre module d'extension." -#: faq/windows.rst:224 +#: faq/windows.rst:218 msgid "" "There are two problems with Python's C API which will become apparent if you " "use a compiler other than MSVC, the compiler used to build pythonNN.dll." @@ -409,7 +394,7 @@ msgstr "" "utilisez un compilateur autre que MSVC, le compilateur utilisé pour " "construire *pythonNN.dll*." -#: faq/windows.rst:227 +#: faq/windows.rst:221 msgid "" "Problem 1: The so-called \"Very High Level\" functions that take FILE * " "arguments will not work in a multi-compiler environment because each " @@ -422,7 +407,7 @@ msgstr "" "structure de FILE. Du point de vue de l'implémentation, il s'agit de " "fonctions de très bas niveau." -#: faq/windows.rst:232 +#: faq/windows.rst:226 msgid "" "Problem 2: SWIG generates the following code when generating wrappers to " "void functions:" @@ -430,7 +415,7 @@ msgstr "" "Problème 2 : SWIG génère le code suivant lors de la génération " "*d'encapsuleurs* pour annuler les fonctions :" -#: faq/windows.rst:241 +#: faq/windows.rst:235 msgid "" "Alas, Py_None is a macro that expands to a reference to a complex data " "structure called _Py_NoneStruct inside pythonNN.dll. Again, this code will " @@ -441,7 +426,7 @@ msgstr "" "une fois, ce code échouera dans un environnement multi-compilateur. " "Remplacez ce code par :" -#: faq/windows.rst:249 +#: faq/windows.rst:243 msgid "" "It may be possible to use SWIG's ``%typemap`` command to make the change " "automatically, though I have not been able to get this to work (I'm a " @@ -451,7 +436,7 @@ msgstr "" "le changement automatiquement, bien que je n'ai pas réussi à le faire " "fonctionner (je suis un débutant complet avec SWIG)." -#: faq/windows.rst:253 +#: faq/windows.rst:247 msgid "" "Using a Python shell script to put up a Python interpreter window from " "inside your Windows app is not a good idea; the resulting window will be " @@ -472,13 +457,13 @@ msgstr "" "dont vous avez besoin est un objet Python (défini dans votre module " "d'extension) qui contient les méthodes *read()* et *write()*." -#: faq/windows.rst:262 +#: faq/windows.rst:256 msgid "How do I keep editors from inserting tabs into my Python source?" msgstr "" "Comment empêcher mon éditeur d'utiliser des tabulations dans mes fichiers " "Python ?" -#: faq/windows.rst:264 +#: faq/windows.rst:258 msgid "" "The FAQ does not recommend using tabs, and the Python style guide, :pep:`8`, " "recommends 4 spaces for distributed Python code; this is also the Emacs " @@ -489,7 +474,7 @@ msgstr "" "dans les codes Python. C'est aussi le comportement par défaut d'Emacs avec " "Python." -#: faq/windows.rst:268 +#: faq/windows.rst:262 msgid "" "Under any editor, mixing tabs and spaces is a bad idea. MSVC is no " "different in this respect, and is easily configured to use spaces: Take :" @@ -503,7 +488,7 @@ msgstr "" "Tabs` et pour le type de fichier par défaut, vous devez mettre *Tab size* et " "*Indent size* à 4, puis sélectionner *Insert spaces*." -#: faq/windows.rst:273 +#: faq/windows.rst:267 msgid "" "Python raises :exc:`IndentationError` or :exc:`TabError` if mixed tabs and " "spaces are causing problems in leading whitespace. You may also run the :mod:" @@ -513,13 +498,13 @@ msgstr "" "tabulation et d’indentation pose problème en début de ligne. Vous pouvez " "aussi utiliser le module :mod:`tabnanny` pour détecter ces erreurs." -#: faq/windows.rst:280 +#: faq/windows.rst:274 msgid "How do I check for a keypress without blocking?" msgstr "" "Comment puis-je vérifier de manière non bloquante qu'une touche a été " "pressée ?" -#: faq/windows.rst:282 +#: faq/windows.rst:276 msgid "" "Use the :mod:`msvcrt` module. This is a standard Windows-specific extension " "module. It defines a function ``kbhit()`` which checks whether a keyboard " @@ -529,3 +514,24 @@ msgstr "" "Windows, qui définit une fonction ``kbhit()`` qui vérifie si une pression de " "touche s'est produite, et ``getch()`` qui récupère le caractère sans " "l'afficher." + +#~ msgid "" +#~ "Borland note: convert :file:`python{NN}.lib` to OMF format using Coff2Omf." +#~ "exe first." +#~ msgstr "" +#~ "Note Borland : convertir :file:`python{NN}.lib` au format OMF en " +#~ "utilisant *Coff2Omf.exe* en premier." + +#~ msgid "" +#~ "See `cx_Freeze `_ for a " +#~ "distutils extension that allows you to create console and GUI executables " +#~ "from Python code. `py2exe `_, the most popular " +#~ "extension for building Python 2.x-based executables, does not yet support " +#~ "Python 3 but a version that does is in development." +#~ msgstr "" +#~ "Regardez `cx_Freeze `_ pour " +#~ "une extension *distutils* qui permet de créer des exécutables console et " +#~ "IUG à partir de code Python. `py2exe `_ est " +#~ "l'extension la plus populaire pour transformer du code Python 2 en " +#~ "exécutable, mais ne elle prend pas en charge Python 3 (l'implémentation " +#~ "est en cours de développement)." diff --git a/glossary.po b/glossary.po index f4b7f2ac5e..ae7a718c9b 100644 --- a/glossary.po +++ b/glossary.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-03-19 15:49+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -419,8 +419,8 @@ msgstr "" "variables. La documentation parle de ceux-ci comme des *read-write bytes-" "like objects*. Par exemple, :class:`bytearray` ou une :class:`memoryview` " "d'un :class:`bytearray` en font partie. D'autres opérations nécessitent de " -"travailler sur des données binaires stockées dans des objets immuables (*" -"\"read-only bytes-like objects\"*), par exemples :class:`bytes` ou :class:" +"travailler sur des données binaires stockées dans des objets immuables " +"(*\"read-only bytes-like objects\"*), par exemples :class:`bytes` ou :class:" "`memoryview` d'un objet :class:`byte`." #: glossary.rst:177 @@ -1031,28 +1031,29 @@ msgstr "__future__" #: glossary.rst:429 msgid "" -"A pseudo-module which programmers can use to enable new language features " -"which are not compatible with the current interpreter." -msgstr "" -"Pseudo-module que les développeurs peuvent utiliser pour activer de " -"nouvelles fonctionnalités du langage qui ne sont pas compatibles avec " -"l'interpréteur utilisé." - -#: glossary.rst:432 -msgid "" -"By importing the :mod:`__future__` module and evaluating its variables, you " -"can see when a new feature was first added to the language and when it " -"becomes the default::" -msgstr "" -"En important le module :mod:`__future__` et en affichant ses variables, vous " -"pouvez voir à quel moment une nouvelle fonctionnalité a été rajoutée dans le " -"langage et quand elle devient le comportement par défaut ::" - -#: glossary.rst:439 +"A :ref:`future statement `, ``from __future__ import ``, " +"directs the compiler to compile the current module using syntax or semantics " +"that will become standard in a future release of Python. The :mod:" +"`__future__` module documents the possible values of *feature*. By " +"importing this module and evaluating its variables, you can see when a new " +"feature was first added to the language and when it will (or did) become the " +"default::" +msgstr "" +"Une :ref:`importation depuis le futur ` s'écrit ``from __future__ " +"import ``. Lorsqu'une importation du futur est active dans " +"un module, Python compile ce module avec une certaine modification de la " +"syntaxe ou du comportement qui est vouée à devenir standard dans une version " +"ultérieure. Le module :mod:`__future__` documente les possibilités pour " +"*fonctionnalité*. L'importation a aussi l'effet normal d'importer une " +"variable du module. Cette variable contient des informations utiles sur la " +"fonctionnalité en question, notamment la version de Python dans laquelle " +"elle a été ajoutée, et celle dans laquelle elle deviendra standard ::" + +#: glossary.rst:440 msgid "garbage collection" msgstr "ramasse-miettes" -#: glossary.rst:441 +#: glossary.rst:442 msgid "" "The process of freeing memory when it is not used anymore. Python performs " "garbage collection via reference counting and a cyclic garbage collector " @@ -1065,11 +1066,11 @@ msgstr "" "et casser les références circulaires. Le ramasse-miettes peut être contrôlé " "en utilisant le module :mod:`gc`." -#: glossary.rst:447 +#: glossary.rst:448 msgid "generator" msgstr "générateur" -#: glossary.rst:449 +#: glossary.rst:450 msgid "" "A function which returns a :term:`generator iterator`. It looks like a " "normal function except that it contains :keyword:`yield` expressions for " @@ -1081,7 +1082,7 @@ msgstr "" "expressions :keyword:`yield` produisant une série de valeurs utilisable dans " "une boucle *for* ou récupérées une à une via la fonction :func:`next`." -#: glossary.rst:454 +#: glossary.rst:455 msgid "" "Usually refers to a generator function, but may refer to a *generator " "iterator* in some contexts. In cases where the intended meaning isn't " @@ -1092,15 +1093,15 @@ msgstr "" "cas où le sens voulu n'est pas clair, utiliser les termes complets lève " "l’ambiguïté." -#: glossary.rst:457 +#: glossary.rst:458 msgid "generator iterator" msgstr "itérateur de générateur" -#: glossary.rst:459 +#: glossary.rst:460 msgid "An object created by a :term:`generator` function." msgstr "Objet créé par une fonction :term:`générateur`." -#: glossary.rst:461 +#: glossary.rst:462 msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " "location execution state (including local variables and pending try-" @@ -1113,11 +1114,11 @@ msgstr "" "il en était (contrairement à une fonction qui prendrait un nouveau départ à " "chaque invocation)." -#: glossary.rst:468 +#: glossary.rst:469 msgid "generator expression" msgstr "expression génératrice" -#: glossary.rst:470 +#: glossary.rst:471 msgid "" "An expression that returns an iterator. It looks like a normal expression " "followed by a :keyword:`!for` clause defining a loop variable, range, and an " @@ -1129,11 +1130,11 @@ msgstr "" "intervalle et une clause :keyword:`!if` optionnelle. Toute cette expression " "génère des valeurs pour la fonction qui l'entoure ::" -#: glossary.rst:477 +#: glossary.rst:478 msgid "generic function" msgstr "fonction générique" -#: glossary.rst:479 +#: glossary.rst:480 msgid "" "A function composed of multiple functions implementing the same operation " "for different types. Which implementation should be used during a call is " @@ -1143,7 +1144,7 @@ msgstr "" "pour différents types. L'implémentation à utiliser est déterminée lors de " "l'appel par l'algorithme de répartition." -#: glossary.rst:483 +#: glossary.rst:484 msgid "" "See also the :term:`single dispatch` glossary entry, the :func:`functools." "singledispatch` decorator, and :pep:`443`." @@ -1151,41 +1152,43 @@ msgstr "" "Voir aussi :term:`single dispatch`, le décorateur :func:`functools." "singledispatch` et la :pep:`443`." -#: glossary.rst:485 +#: glossary.rst:486 msgid "generic type" msgstr "type générique" -#: glossary.rst:487 +#: glossary.rst:488 msgid "" -"A :term:`type` that can be parameterized; typically a container like :class:" -"`list`. Used for :term:`type hints ` and :term:`annotations " -"`." +"A :term:`type` that can be parameterized; typically a :ref:`container " +"class` such as :class:`list` or :class:`dict`. Used for :" +"term:`type hints ` and :term:`annotations `." msgstr "" -"Un :term:`type` qui peut être paramétré ; typiquement un conteneur comme " -"une :class:`list`. Utilisé pour les :term:`indications de type ` " -"et les :term:`annotations `." +"Un :term:`type` qui peut être paramétré ; généralement un :ref:`conteneur " +"` comme :class:`list` ou :class:`dict`. Utilisé pour les :" +"term:`indications de type ` et les :term:`annotations " +"`." -#: glossary.rst:491 +#: glossary.rst:493 msgid "" -"See :pep:`483` for more details, and :mod:`typing` or :ref:`generic alias " -"type ` for its uses." +"For more details, see :ref:`generic alias types`, :pep:" +"`483`, :pep:`484`, :pep:`585`, and the :mod:`typing` module." msgstr "" -"Voir la :pep:`483` pour plus de détails, et :mod:`typing` ou :ref:`alias " -"générique de type ` pour ses utilisations." +"Pour plus de détails, voir :ref:`types alias génériques ` et le module :mod:`typing`. On trouvera l'historique de " +"cette fonctionnalité dans les :pep:`483`, :pep:`484` et :pep:`585`." -#: glossary.rst:493 +#: glossary.rst:495 msgid "GIL" msgstr "GIL" -#: glossary.rst:495 +#: glossary.rst:497 msgid "See :term:`global interpreter lock`." msgstr "Voir :term:`global interpreter lock`." -#: glossary.rst:496 +#: glossary.rst:498 msgid "global interpreter lock" msgstr "verrou global de l'interpréteur" -#: glossary.rst:498 +#: glossary.rst:500 msgid "" "The mechanism used by the :term:`CPython` interpreter to assure that only " "one thread executes Python :term:`bytecode` at a time. This simplifies the " @@ -1205,7 +1208,7 @@ msgstr "" "au détriment malheureusement de beaucoup du parallélisme possible sur les " "machines ayant plusieurs processeurs." -#: glossary.rst:507 +#: glossary.rst:509 msgid "" "However, some extension modules, either standard or third-party, are " "designed so as to release the GIL when doing computationally-intensive tasks " @@ -1217,7 +1220,7 @@ msgstr "" "compression ou le hachage. De la même manière, le GIL est toujours libéré " "lors des entrées / sorties." -#: glossary.rst:512 +#: glossary.rst:514 msgid "" "Past efforts to create a \"free-threaded\" interpreter (one which locks " "shared data at a much finer granularity) have not been successful because " @@ -1231,11 +1234,11 @@ msgstr "" "corriger ce problème de performance induit mènerait à une implémentation " "beaucoup plus compliquée et donc plus coûteuse à maintenir." -#: glossary.rst:518 +#: glossary.rst:520 msgid "hash-based pyc" msgstr "*pyc* utilisant le hachage" -#: glossary.rst:520 +#: glossary.rst:522 msgid "" "A bytecode cache file that uses the hash rather than the last-modified time " "of the corresponding source file to determine its validity. See :ref:`pyc-" @@ -1246,11 +1249,11 @@ msgstr "" "source correspondant pour déterminer sa validité. Voir :ref:`pyc-" "invalidation`." -#: glossary.rst:523 +#: glossary.rst:525 msgid "hashable" msgstr "hachable" -#: glossary.rst:525 +#: glossary.rst:527 msgid "" "An object is *hashable* if it has a hash value which never changes during " "its lifetime (it needs a :meth:`__hash__` method), and can be compared to " @@ -1263,7 +1266,7 @@ msgstr "" "hachables dont la comparaison par ``__eq__`` est vraie doivent avoir la même " "empreinte." -#: glossary.rst:530 +#: glossary.rst:532 msgid "" "Hashability makes an object usable as a dictionary key and a set member, " "because these data structures use the hash value internally." @@ -1272,7 +1275,7 @@ msgstr "" "en tant que membre d'un ensemble (type *set*), car ces structures de données " "utilisent ce *hash*." -#: glossary.rst:533 +#: glossary.rst:535 msgid "" "Most of Python's immutable built-in objects are hashable; mutable containers " "(such as lists or dictionaries) are not; immutable containers (such as " @@ -1289,11 +1292,11 @@ msgstr "" "considérées différentes (sauf avec elles-mêmes) et leur valeur de hachage " "est calculée à partir de leur :func:`id`." -#: glossary.rst:540 +#: glossary.rst:542 msgid "IDLE" msgstr "IDLE" -#: glossary.rst:542 +#: glossary.rst:544 msgid "" "An Integrated Development Environment for Python. IDLE is a basic editor " "and interpreter environment which ships with the standard distribution of " @@ -1302,11 +1305,11 @@ msgstr "" "Environnement de développement intégré pour Python. IDLE est un éditeur " "basique et un interpréteur livré avec la distribution standard de Python." -#: glossary.rst:545 +#: glossary.rst:547 msgid "immutable" msgstr "immuable" -#: glossary.rst:547 +#: glossary.rst:549 msgid "" "An object with a fixed value. Immutable objects include numbers, strings " "and tuples. Such an object cannot be altered. A new object has to be " @@ -1320,11 +1323,11 @@ msgstr "" "quand une valeur de *hash* constante est requise, typiquement en clé de " "dictionnaire." -#: glossary.rst:552 +#: glossary.rst:554 msgid "import path" msgstr "chemin des importations" -#: glossary.rst:554 +#: glossary.rst:556 msgid "" "A list of locations (or :term:`path entries `) that are searched " "by the :term:`path based finder` for modules to import. During import, this " @@ -1337,21 +1340,21 @@ msgstr "" "pour les sous-paquets, elle peut aussi venir de l'attribut ``__path__`` du " "paquet parent." -#: glossary.rst:559 +#: glossary.rst:561 msgid "importing" msgstr "importing" -#: glossary.rst:561 +#: glossary.rst:563 msgid "" "The process by which Python code in one module is made available to Python " "code in another module." msgstr "Processus rendant le code Python d'un module disponible dans un autre." -#: glossary.rst:563 +#: glossary.rst:565 msgid "importer" msgstr "importateur" -#: glossary.rst:565 +#: glossary.rst:567 msgid "" "An object that both finds and loads a module; both a :term:`finder` and :" "term:`loader` object." @@ -1359,11 +1362,11 @@ msgstr "" "Objet qui trouve et charge un module, en même temps un :term:`chercheur " "` et un :term:`chargeur `." -#: glossary.rst:567 +#: glossary.rst:569 msgid "interactive" msgstr "interactif" -#: glossary.rst:569 +#: glossary.rst:571 msgid "" "Python has an interactive interpreter which means you can enter statements " "and expressions at the interpreter prompt, immediately execute them and see " @@ -1378,11 +1381,11 @@ msgstr "" "de votre ordinateur). C'est un moyen puissant pour tester de nouvelles idées " "ou étudier de nouveaux modules (souvenez-vous de ``help(x)``)." -#: glossary.rst:575 +#: glossary.rst:577 msgid "interpreted" msgstr "interprété" -#: glossary.rst:577 +#: glossary.rst:579 msgid "" "Python is an interpreted language, as opposed to a compiled one, though the " "distinction can be blurry because of the presence of the bytecode compiler. " @@ -1399,11 +1402,11 @@ msgstr "" "développement / débogage plus court que les langages compilés. Cependant, " "ils s'exécutent généralement plus lentement. Voir aussi :term:`interactif`." -#: glossary.rst:584 +#: glossary.rst:586 msgid "interpreter shutdown" msgstr "arrêt de l'interpréteur" -#: glossary.rst:586 +#: glossary.rst:588 msgid "" "When asked to shut down, the Python interpreter enters a special phase where " "it gradually releases all allocated resources, such as modules and various " @@ -1424,7 +1427,7 @@ msgstr "" "fonctionner, (typiquement les modules des bibliothèques ou le mécanisme de " "*warning*)." -#: glossary.rst:595 +#: glossary.rst:597 msgid "" "The main reason for interpreter shutdown is that the ``__main__`` module or " "the script being run has finished executing." @@ -1432,11 +1435,11 @@ msgstr "" "La principale raison d'arrêt de l'interpréteur est que le module " "``__main__`` ou le script en cours d'exécution a terminé de s'exécuter." -#: glossary.rst:597 +#: glossary.rst:599 msgid "iterable" msgstr "itérable" -#: glossary.rst:599 +#: glossary.rst:601 msgid "" "An object capable of returning its members one at a time. Examples of " "iterables include all sequence types (such as :class:`list`, :class:`str`, " @@ -1451,7 +1454,7 @@ msgstr "" "tout objet d'une classe ayant une méthode :meth:`__iter__` ou :meth:" "`__getitem__` qui implémente la sémantique d'une :term:`Sequence`." -#: glossary.rst:606 +#: glossary.rst:608 msgid "" "Iterables can be used in a :keyword:`for` loop and in many other places " "where a sequence is needed (:func:`zip`, :func:`map`, ...). When an " @@ -1474,11 +1477,11 @@ msgstr "" "temporaire anonyme pour garder l'itérateur durant la boucle. Voir aussi :" "term:`itérateur`, :term:`séquence` et :term:`générateur`." -#: glossary.rst:616 +#: glossary.rst:618 msgid "iterator" msgstr "itérateur" -#: glossary.rst:618 +#: glossary.rst:620 msgid "" "An object representing a stream of data. Repeated calls to the iterator's :" "meth:`~iterator.__next__` method (or passing it to the built-in function :" @@ -1511,15 +1514,15 @@ msgstr "" "itérateur donnerait simplement le même objet itérateur épuisé utilisé dans " "son itération précédente, le faisant ressembler à un conteneur vide." -#: glossary.rst:633 +#: glossary.rst:635 msgid "More information can be found in :ref:`typeiter`." msgstr "Vous trouverez davantage d'informations dans :ref:`typeiter`." -#: glossary.rst:634 +#: glossary.rst:636 msgid "key function" msgstr "fonction clé" -#: glossary.rst:636 +#: glossary.rst:638 msgid "" "A key function or collation function is a callable that returns a value used " "for sorting or ordering. For example, :func:`locale.strxfrm` is used to " @@ -1530,7 +1533,7 @@ msgstr "" "utilisée pour générer une clé de classement prenant en compte les " "conventions de classement spécifiques aux paramètres régionaux courants." -#: glossary.rst:641 +#: glossary.rst:643 msgid "" "A number of tools in Python accept key functions to control how elements are " "ordered or grouped. They include :func:`min`, :func:`max`, :func:`sorted`, :" @@ -1543,7 +1546,7 @@ msgstr "" "merge`, :func:`heapq.nsmallest`, :func:`heapq.nlargest` et :func:`itertools." "groupby`." -#: glossary.rst:647 +#: glossary.rst:649 msgid "" "There are several ways to create a key function. For example. the :meth:" "`str.lower` method can serve as a key function for case insensitive sorts. " @@ -1564,19 +1567,19 @@ msgstr "" "Trier ` pour des exemples de création et d'utilisation de " "fonctions clefs." -#: glossary.rst:655 +#: glossary.rst:657 msgid "keyword argument" msgstr "argument nommé" -#: glossary.rst:934 +#: glossary.rst:936 msgid "See :term:`argument`." msgstr "Voir :term:`argument`." -#: glossary.rst:658 +#: glossary.rst:660 msgid "lambda" msgstr "lambda" -#: glossary.rst:660 +#: glossary.rst:662 msgid "" "An anonymous inline function consisting of a single :term:`expression` which " "is evaluated when the function is called. The syntax to create a lambda " @@ -1587,11 +1590,11 @@ msgstr "" "syntaxe pour créer des fonctions lambda est : ``lambda [parameters]: " "expression``" -#: glossary.rst:663 +#: glossary.rst:665 msgid "LBYL" msgstr "LBYL" -#: glossary.rst:665 +#: glossary.rst:667 msgid "" "Look before you leap. This coding style explicitly tests for pre-conditions " "before making calls or lookups. This style contrasts with the :term:`EAFP` " @@ -1603,7 +1606,7 @@ msgstr "" "appels ou des accès. Ce style contraste avec le style :term:`EAFP` et se " "caractérise par la présence de beaucoup d'instructions :keyword:`if`." -#: glossary.rst:670 +#: glossary.rst:672 msgid "" "In a multi-threaded environment, the LBYL approach can risk introducing a " "race condition between \"the looking\" and \"the leaping\". For example, " @@ -1619,11 +1622,11 @@ msgstr "" "l'accès. Ce problème peut être résolu avec des verrous (*locks*) ou avec " "l'approche EAFP." -#: glossary.rst:675 +#: glossary.rst:677 msgid "list" msgstr "list" -#: glossary.rst:677 +#: glossary.rst:679 msgid "" "A built-in Python :term:`sequence`. Despite its name it is more akin to an " "array in other languages than to a linked list since access to elements is " @@ -1633,11 +1636,11 @@ msgstr "" "``list`` ressemble plus à un tableau (*array* dans la plupart des langages) " "qu'à une liste chaînée puisque les accès se font en O(1)." -#: glossary.rst:680 +#: glossary.rst:682 msgid "list comprehension" msgstr "liste en compréhension (ou liste en intention)" -#: glossary.rst:682 +#: glossary.rst:684 msgid "" "A compact way to process all or part of the elements in a sequence and " "return a list with the results. ``result = ['{:#04x}'.format(x) for x in " @@ -1652,11 +1655,11 @@ msgstr "" "hexadécimal (``0x…``). La clause :keyword:`if` est optionnelle. Si elle est " "omise, tous les éléments du ``range(256)`` seront utilisés." -#: glossary.rst:688 +#: glossary.rst:690 msgid "loader" msgstr "chargeur" -#: glossary.rst:690 +#: glossary.rst:692 msgid "" "An object that loads a module. It must define a method named :meth:" "`load_module`. A loader is typically returned by a :term:`finder`. See :pep:" @@ -1668,19 +1671,19 @@ msgstr "" "`. Voir la :pep:`302` pour plus de détails et :class:`importlib.ABC." "Loader` pour sa :term:`classe de base abstraite`." -#: glossary.rst:694 +#: glossary.rst:696 msgid "magic method" msgstr "méthode magique" -#: glossary.rst:698 +#: glossary.rst:700 msgid "An informal synonym for :term:`special method`." msgstr "Un synonyme informel de :term:`special method`." -#: glossary.rst:699 +#: glossary.rst:701 msgid "mapping" msgstr "tableau de correspondances" -#: glossary.rst:701 +#: glossary.rst:703 msgid "" "A container object that supports arbitrary key lookups and implements the " "methods specified in the :class:`~collections.abc.Mapping` or :class:" @@ -1697,11 +1700,11 @@ msgstr "" "`dict`, :class:`collections.defaultdict`, :class:`collections.OrderedDict` " "et :class:`collections.Counter`." -#: glossary.rst:707 +#: glossary.rst:709 msgid "meta path finder" msgstr "chercheur dans les méta-chemins" -#: glossary.rst:709 +#: glossary.rst:711 msgid "" "A :term:`finder` returned by a search of :data:`sys.meta_path`. Meta path " "finders are related to, but different from :term:`path entry finders `." -#: glossary.rst:713 +#: glossary.rst:715 msgid "" "See :class:`importlib.abc.MetaPathFinder` for the methods that meta path " "finders implement." @@ -1719,11 +1722,11 @@ msgstr "" "Voir :class:`importlib.abc.MetaPathFinder` pour les méthodes que les " "chercheurs dans les méta-chemins doivent implémenter." -#: glossary.rst:715 +#: glossary.rst:717 msgid "metaclass" msgstr "métaclasse" -#: glossary.rst:717 +#: glossary.rst:719 msgid "" "The class of a class. Class definitions create a class name, a class " "dictionary, and a list of base classes. The metaclass is responsible for " @@ -1747,15 +1750,15 @@ msgstr "" "*multi-threads*, suivre la création d'objets, implémenter des singletons et " "bien d'autres tâches." -#: glossary.rst:727 +#: glossary.rst:729 msgid "More information can be found in :ref:`metaclasses`." msgstr "Plus d'informations sont disponibles dans : :ref:`metaclasses`." -#: glossary.rst:728 +#: glossary.rst:730 msgid "method" msgstr "méthode" -#: glossary.rst:730 +#: glossary.rst:732 msgid "" "A function which is defined inside a class body. If called as an attribute " "of an instance of that class, the method will get the instance object as its " @@ -1767,11 +1770,11 @@ msgstr "" "premier :term:`argument` (qui, par convention, est habituellement nommé " "``self``). Voir :term:`function` et :term:`nested scope`." -#: glossary.rst:734 +#: glossary.rst:736 msgid "method resolution order" msgstr "ordre de résolution des méthodes" -#: glossary.rst:736 +#: glossary.rst:738 msgid "" "Method Resolution Order is the order in which base classes are searched for " "a member during lookup. See `The Python 2.3 Method Resolution Order `_ pour plus de détails sur l'algorithme utilisé par " "l'interpréteur Python depuis la version 2.3." -#: glossary.rst:740 +#: glossary.rst:742 msgid "module" msgstr "module" -#: glossary.rst:742 +#: glossary.rst:744 msgid "" "An object that serves as an organizational unit of Python code. Modules " "have a namespace containing arbitrary Python objects. Modules are loaded " @@ -1799,15 +1802,15 @@ msgstr "" "modules ont un espace de nommage et peuvent contenir n'importe quels objets " "Python. Charger des modules est appelé :term:`importer `." -#: glossary.rst:746 +#: glossary.rst:748 msgid "See also :term:`package`." msgstr "Voir aussi :term:`paquet`." -#: glossary.rst:747 +#: glossary.rst:749 msgid "module spec" msgstr "spécificateur de module" -#: glossary.rst:749 +#: glossary.rst:751 msgid "" "A namespace containing the import-related information used to load a module. " "An instance of :class:`importlib.machinery.ModuleSpec`." @@ -1816,19 +1819,19 @@ msgstr "" "utilisées pour charger un module. C'est une instance de la classe :class:" "`importlib.machinery.ModuleSpec`." -#: glossary.rst:751 +#: glossary.rst:753 msgid "MRO" msgstr "MRO" -#: glossary.rst:753 +#: glossary.rst:755 msgid "See :term:`method resolution order`." msgstr "Voir :term:`ordre de résolution des méthodes`." -#: glossary.rst:754 +#: glossary.rst:756 msgid "mutable" msgstr "muable" -#: glossary.rst:756 +#: glossary.rst:758 msgid "" "Mutable objects can change their value but keep their :func:`id`. See also :" "term:`immutable`." @@ -1836,11 +1839,11 @@ msgstr "" "Un objet muable peut changer de valeur tout en gardant le même :func:`id`. " "Voir aussi :term:`immuable`." -#: glossary.rst:758 +#: glossary.rst:760 msgid "named tuple" msgstr "n-uplet nommé" -#: glossary.rst:760 +#: glossary.rst:762 msgid "" "The term \"named tuple\" applies to any type or class that inherits from " "tuple and whose indexable elements are also accessible using named " @@ -1851,7 +1854,7 @@ msgstr "" "accessibles en utilisant des attributs nommés. Les types et classes peuvent " "avoir aussi d'autres caractéristiques." -#: glossary.rst:764 +#: glossary.rst:766 msgid "" "Several built-in types are named tuples, including the values returned by :" "func:`time.localtime` and :func:`os.stat`. Another example is :data:`sys." @@ -1861,7 +1864,7 @@ msgstr "" "retournées par :func:`time.localtime` et :func:`os.stat`. Un autre exemple " "est :data:`sys.float_info` ::" -#: glossary.rst:775 +#: glossary.rst:777 msgid "" "Some named tuples are built-in types (such as the above examples). " "Alternatively, a named tuple can be created from a regular class definition " @@ -1878,11 +1881,11 @@ msgstr "" "méthodes supplémentaires qui ne seront pas trouvées dans celles écrites à la " "main ni dans les n-uplets nommés natifs." -#: glossary.rst:782 +#: glossary.rst:784 msgid "namespace" msgstr "espace de nommage" -#: glossary.rst:784 +#: glossary.rst:786 msgid "" "The place where a variable is stored. Namespaces are implemented as " "dictionaries. There are the local, global and built-in namespaces as well " @@ -1906,11 +1909,11 @@ msgstr "" "implémentées respectivement dans les modules :mod:`random` et :mod:" "`itertools`." -#: glossary.rst:794 +#: glossary.rst:796 msgid "namespace package" msgstr "paquet-espace de nommage" -#: glossary.rst:796 +#: glossary.rst:798 msgid "" "A :pep:`420` :term:`package` which serves only as a container for " "subpackages. Namespace packages may have no physical representation, and " @@ -1922,15 +1925,15 @@ msgstr "" "aucune représentation physique et, plus spécifiquement, ne sont pas comme " "un :term:`paquet classique` puisqu'ils n'ont pas de fichier ``__init__.py``." -#: glossary.rst:801 +#: glossary.rst:803 msgid "See also :term:`module`." msgstr "Voir aussi :term:`module`." -#: glossary.rst:802 +#: glossary.rst:804 msgid "nested scope" msgstr "portée imbriquée" -#: glossary.rst:804 +#: glossary.rst:806 msgid "" "The ability to refer to a variable in an enclosing definition. For " "instance, a function defined inside another function can refer to variables " @@ -1948,11 +1951,11 @@ msgstr "" "dans l'espace de nommage global, le mot clef :keyword:`nonlocal` permet " "d'écrire dans l'espace de nommage dans lequel est déclarée la variable." -#: glossary.rst:811 +#: glossary.rst:813 msgid "new-style class" msgstr "nouvelle classe" -#: glossary.rst:813 +#: glossary.rst:815 msgid "" "Old name for the flavor of classes now used for all class objects. In " "earlier Python versions, only new-style classes could use Python's newer, " @@ -1965,11 +1968,11 @@ msgstr "" "__slots__`, les descripteurs, les propriétés, :meth:`__getattribute__`, les " "méthodes de classe et les méthodes statiques." -#: glossary.rst:817 +#: glossary.rst:819 msgid "object" msgstr "objet" -#: glossary.rst:819 +#: glossary.rst:821 msgid "" "Any data with state (attributes or value) and defined behavior (methods). " "Also the ultimate base class of any :term:`new-style class`." @@ -1979,11 +1982,11 @@ msgstr "" "l'ancêtre commun à absolument toutes les :term:`nouvelles classes `." -#: glossary.rst:822 +#: glossary.rst:824 msgid "package" msgstr "paquet" -#: glossary.rst:824 +#: glossary.rst:826 msgid "" "A Python :term:`module` which can contain submodules or recursively, " "subpackages. Technically, a package is a Python module with an ``__path__`` " @@ -1993,15 +1996,15 @@ msgstr "" "paquets. Techniquement, un paquet est un module qui possède un attribut " "``__path__``." -#: glossary.rst:828 +#: glossary.rst:830 msgid "See also :term:`regular package` and :term:`namespace package`." msgstr "Voir aussi :term:`paquet classique` et :term:`namespace package`." -#: glossary.rst:829 +#: glossary.rst:831 msgid "parameter" msgstr "paramètre" -#: glossary.rst:831 +#: glossary.rst:833 msgid "" "A named entity in a :term:`function` (or method) definition that specifies " "an :term:`argument` (or in some cases, arguments) that the function can " @@ -2011,7 +2014,7 @@ msgstr "" "décrivant un :term:`argument` (ou dans certains cas des arguments) que la " "fonction accepte. Il existe cinq sortes de paramètres :" -#: glossary.rst:835 +#: glossary.rst:837 msgid "" ":dfn:`positional-or-keyword`: specifies an argument that can be passed " "either :term:`positionally ` or as a :term:`keyword argument " @@ -2023,7 +2026,7 @@ msgstr "" "C'est le type de paramètre par défaut. Par exemple, *foo* et *bar* dans " "l'exemple suivant ::" -#: glossary.rst:844 +#: glossary.rst:846 msgid "" ":dfn:`positional-only`: specifies an argument that can be supplied only by " "position. Positional-only parameters can be defined by including a ``/`` " @@ -2035,7 +2038,7 @@ msgstr "" "un caractère \"/\" dans la liste de paramètres de la définition de fonction " "après eux. Par exemple : *posonly1* et *posonly2* dans le code suivant ::" -#: glossary.rst:853 +#: glossary.rst:855 msgid "" ":dfn:`keyword-only`: specifies an argument that can be supplied only by " "keyword. Keyword-only parameters can be defined by including a single var-" @@ -2049,7 +2052,7 @@ msgstr "" "liste des paramètres avant eux. Par exemple, *kw_only1* et *kw_only2* dans " "le code suivant ::" -#: glossary.rst:861 +#: glossary.rst:863 msgid "" ":dfn:`var-positional`: specifies that an arbitrary sequence of positional " "arguments can be provided (in addition to any positional arguments already " @@ -2062,7 +2065,7 @@ msgstr "" "d'autres paramètres). Un tel paramètre peut être défini en préfixant son nom " "par une ``*``. Par exemple *args* ci-après ::" -#: glossary.rst:869 +#: glossary.rst:871 msgid "" ":dfn:`var-keyword`: specifies that arbitrarily many keyword arguments can be " "provided (in addition to any keyword arguments already accepted by other " @@ -2074,7 +2077,7 @@ msgstr "" "d'autres paramètres). Un tel paramètre est défini en préfixant le nom du " "paramètre par ``**``. Par exemple, *kwargs* ci-dessus." -#: glossary.rst:875 +#: glossary.rst:877 msgid "" "Parameters can specify both optional and required arguments, as well as " "default values for some optional arguments." @@ -2082,7 +2085,7 @@ msgstr "" "Les paramètres peuvent spécifier des arguments obligatoires ou optionnels, " "ainsi que des valeurs par défaut pour les arguments optionnels." -#: glossary.rst:878 +#: glossary.rst:880 msgid "" "See also the :term:`argument` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " @@ -2094,11 +2097,11 @@ msgstr "" "parameter>` dans la FAQ, la classe :class:`inspect.Parameter`, la section :" "ref:`function` et la :pep:`362`." -#: glossary.rst:882 +#: glossary.rst:884 msgid "path entry" msgstr "entrée de chemin" -#: glossary.rst:884 +#: glossary.rst:886 msgid "" "A single location on the :term:`import path` which the :term:`path based " "finder` consults to find modules for importing." @@ -2107,11 +2110,11 @@ msgstr "" "path* en anglais, d'où le *path*) que le :term:`chercheur basé sur les " "chemins ` consulte pour trouver des modules à importer." -#: glossary.rst:886 +#: glossary.rst:888 msgid "path entry finder" msgstr "chercheur de chemins" -#: glossary.rst:888 +#: glossary.rst:890 msgid "" "A :term:`finder` returned by a callable on :data:`sys.path_hooks` (i.e. a :" "term:`path entry hook`) which knows how to locate modules given a :term:" @@ -2122,7 +2125,7 @@ msgstr "" "path `) qui sait où trouver des modules lorsqu'on lui donne " "une :term:`entrée de path `." -#: glossary.rst:892 +#: glossary.rst:894 msgid "" "See :class:`importlib.abc.PathEntryFinder` for the methods that path entry " "finders implement." @@ -2130,11 +2133,11 @@ msgstr "" "Voir :class:`importlib.abc.PathEntryFinder` pour les méthodes qu'un " "chercheur d'entrée dans *path* doit implémenter." -#: glossary.rst:894 +#: glossary.rst:896 msgid "path entry hook" msgstr "point d'entrée pour la recherche dans *path*" -#: glossary.rst:896 +#: glossary.rst:898 msgid "" "A callable on the :data:`sys.path_hook` list which returns a :term:`path " "entry finder` if it knows how to find modules on a specific :term:`path " @@ -2144,11 +2147,11 @@ msgstr "" "d'entrée dans path ` s'il sait où trouver des modules " "pour une :term:`entrée dans path ` donnée." -#: glossary.rst:899 +#: glossary.rst:901 msgid "path based finder" msgstr "chercheur basé sur les chemins" -#: glossary.rst:901 +#: glossary.rst:903 msgid "" "One of the default :term:`meta path finders ` which " "searches an :term:`import path` for modules." @@ -2157,11 +2160,11 @@ msgstr "" "défaut qui cherche des modules dans un :term:`chemin des importations " "`." -#: glossary.rst:903 +#: glossary.rst:905 msgid "path-like object" msgstr "objet simili-chemin" -#: glossary.rst:905 +#: glossary.rst:907 msgid "" "An object representing a file system path. A path-like object is either a :" "class:`str` or :class:`bytes` object representing a path, or an object " @@ -2181,11 +2184,11 @@ msgstr "" "peuvent être utilisées, respectivement, pour garantir un résultat de type :" "class:`str` ou :class:`bytes` à la place. A été Introduit par la :pep:`519`." -#: glossary.rst:913 +#: glossary.rst:915 msgid "PEP" msgstr "PEP" -#: glossary.rst:915 +#: glossary.rst:917 msgid "" "Python Enhancement Proposal. A PEP is a design document providing " "information to the Python community, or describing a new feature for Python " @@ -2198,7 +2201,7 @@ msgstr "" "ou son environnement. Les PEP doivent fournir une spécification technique " "concise et une justification des fonctionnalités proposées." -#: glossary.rst:921 +#: glossary.rst:923 msgid "" "PEPs are intended to be the primary mechanisms for proposing major new " "features, for collecting community input on an issue, and for documenting " @@ -2213,15 +2216,15 @@ msgstr "" "l’établissement d’un consensus au sein de la communauté et de documenter les " "opinions contradictoires." -#: glossary.rst:927 +#: glossary.rst:929 msgid "See :pep:`1`." msgstr "Voir :pep:`1`." -#: glossary.rst:928 +#: glossary.rst:930 msgid "portion" msgstr "portion" -#: glossary.rst:930 +#: glossary.rst:932 msgid "" "A set of files in a single directory (possibly stored in a zip file) that " "contribute to a namespace package, as defined in :pep:`420`." @@ -2230,15 +2233,15 @@ msgstr "" "fichier zip) qui contribue à l'espace de nommage d'un paquet, tel que défini " "dans la :pep:`420`." -#: glossary.rst:932 +#: glossary.rst:934 msgid "positional argument" msgstr "argument positionnel" -#: glossary.rst:935 +#: glossary.rst:937 msgid "provisional API" msgstr "API provisoire" -#: glossary.rst:937 +#: glossary.rst:939 msgid "" "A provisional API is one which has been deliberately excluded from the " "standard library's backwards compatibility guarantees. While major changes " @@ -2257,7 +2260,7 @@ msgstr "" "surviendront que si de sérieux problèmes sont découverts et qu'ils n'avaient " "pas été identifiés avant l'ajout de l'API." -#: glossary.rst:946 +#: glossary.rst:948 msgid "" "Even for provisional APIs, backwards incompatible changes are seen as a " "\"solution of last resort\" - every attempt will still be made to find a " @@ -2268,7 +2271,7 @@ msgstr "" "possible sera fait pour tenter de résoudre les problèmes en conservant la " "rétrocompatibilité." -#: glossary.rst:950 +#: glossary.rst:952 msgid "" "This process allows the standard library to continue to evolve over time, " "without locking in problematic design errors for extended periods of time. " @@ -2278,19 +2281,19 @@ msgstr "" "le temps, sans se bloquer longtemps sur des erreurs d'architecture. Voir la :" "pep:`411` pour plus de détails." -#: glossary.rst:953 +#: glossary.rst:955 msgid "provisional package" msgstr "paquet provisoire" -#: glossary.rst:955 +#: glossary.rst:957 msgid "See :term:`provisional API`." msgstr "Voir :term:`provisional API`." -#: glossary.rst:956 +#: glossary.rst:958 msgid "Python 3000" msgstr "Python 3000" -#: glossary.rst:958 +#: glossary.rst:960 msgid "" "Nickname for the Python 3.x release line (coined long ago when the release " "of version 3 was something in the distant future.) This is also abbreviated " @@ -2299,11 +2302,11 @@ msgstr "" "Surnom donné à la série des Python 3.x (très vieux surnom donné à l'époque " "où Python 3 représentait un futur lointain). Aussi abrégé *Py3k*." -#: glossary.rst:961 +#: glossary.rst:963 msgid "Pythonic" msgstr "*Pythonique*" -#: glossary.rst:963 +#: glossary.rst:965 msgid "" "An idea or piece of code which closely follows the most common idioms of the " "Python language, rather than implementing code using concepts common to " @@ -2319,16 +2322,16 @@ msgstr "" "les gens qui ne sont pas habitués à Python utilisent parfois un compteur " "numérique à la place ::" -#: glossary.rst:973 +#: glossary.rst:975 msgid "As opposed to the cleaner, Pythonic method::" msgstr "" "Plutôt qu'utiliser la méthode, plus propre et élégante, donc *Pythonique* ::" -#: glossary.rst:977 +#: glossary.rst:979 msgid "qualified name" msgstr "nom qualifié" -#: glossary.rst:979 +#: glossary.rst:981 msgid "" "A dotted name showing the \"path\" from a module's global scope to a class, " "function or method defined in that module, as defined in :pep:`3155`. For " @@ -2340,7 +2343,7 @@ msgstr "" "module, tel que défini dans la :pep:`3155`. Pour les fonctions et classes de " "premier niveau, le nom qualifié est le même que le nom de l'objet ::" -#: glossary.rst:996 +#: glossary.rst:998 msgid "" "When used to refer to modules, the *fully qualified name* means the entire " "dotted path to the module, including any parent packages, e.g. ``email.mime." @@ -2351,11 +2354,11 @@ msgstr "" "par des points) vers le module, incluant tous les paquets parents. Par " "exemple : ``email.mime.text`` ::" -#: glossary.rst:1003 +#: glossary.rst:1005 msgid "reference count" msgstr "nombre de références" -#: glossary.rst:1005 +#: glossary.rst:1007 msgid "" "The number of references to an object. When the reference count of an " "object drops to zero, it is deallocated. Reference counting is generally " @@ -2371,11 +2374,11 @@ msgstr "" "func:`~sys.getrefcount` que les développeurs peuvent utiliser pour obtenir " "le nombre de références à un objet donné." -#: glossary.rst:1011 +#: glossary.rst:1013 msgid "regular package" msgstr "paquet classique" -#: glossary.rst:1013 +#: glossary.rst:1015 msgid "" "A traditional :term:`package`, such as a directory containing an ``__init__." "py`` file." @@ -2383,15 +2386,15 @@ msgstr "" ":term:`paquet` traditionnel, tel qu'un dossier contenant un fichier " "``__init__.py``." -#: glossary.rst:1016 +#: glossary.rst:1018 msgid "See also :term:`namespace package`." msgstr "Voir aussi :term:`paquet-espace de nommage `." -#: glossary.rst:1017 +#: glossary.rst:1019 msgid "__slots__" msgstr "__slots__" -#: glossary.rst:1019 +#: glossary.rst:1021 msgid "" "A declaration inside a class that saves memory by pre-declaring space for " "instance attributes and eliminating instance dictionaries. Though popular, " @@ -2406,11 +2409,11 @@ msgstr "" "nombre d'instances dans une application devient un sujet critique pour la " "mémoire." -#: glossary.rst:1024 +#: glossary.rst:1026 msgid "sequence" msgstr "séquence" -#: glossary.rst:1026 +#: glossary.rst:1028 msgid "" "An :term:`iterable` which supports efficient element access using integer " "indices via the :meth:`__getitem__` special method and defines a :meth:" @@ -2429,7 +2432,7 @@ msgstr "" "*mapping* plutôt qu'une séquence, car ses accès se font par une clé " "arbitraire :term:`immuable` plutôt qu'un nombre entier." -#: glossary.rst:1035 +#: glossary.rst:1037 msgid "" "The :class:`collections.abc.Sequence` abstract base class defines a much " "richer interface that goes beyond just :meth:`__getitem__` and :meth:" @@ -2443,11 +2446,11 @@ msgstr "" "et :meth:`__reversed__`. Les types qui implémentent cette interface étendue " "peuvent s'enregistrer explicitement en utilisant :func:`~abc.register`." -#: glossary.rst:1042 +#: glossary.rst:1044 msgid "set comprehension" msgstr "ensemble en compréhension (ou ensemble en intension)" -#: glossary.rst:1044 +#: glossary.rst:1046 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a set with the results. ``results = {c for c in 'abracadabra' if c " @@ -2459,11 +2462,11 @@ msgstr "" "'abracadabra' if c not in 'abc'}`` génère l'ensemble contenant les lettres " "« r » et « d » ``{'r', 'd'}``. Voir :ref:`comprehensions`." -#: glossary.rst:1048 +#: glossary.rst:1050 msgid "single dispatch" msgstr "distribution simple" -#: glossary.rst:1050 +#: glossary.rst:1052 msgid "" "A form of :term:`generic function` dispatch where the implementation is " "chosen based on the type of a single argument." @@ -2472,11 +2475,11 @@ msgstr "" "générique>`, où l'implémentation est choisie en fonction du type d'un seul " "argument." -#: glossary.rst:1052 +#: glossary.rst:1054 msgid "slice" msgstr "tranche" -#: glossary.rst:1054 +#: glossary.rst:1056 msgid "" "An object usually containing a portion of a :term:`sequence`. A slice is " "created using the subscript notation, ``[]`` with colons between numbers " @@ -2489,11 +2492,11 @@ msgstr "" "``variable_name[1:3:5]``. Cette notation utilise des objets :class:`slice` " "en interne." -#: glossary.rst:1058 +#: glossary.rst:1060 msgid "special method" msgstr "méthode spéciale" -#: glossary.rst:1062 +#: glossary.rst:1064 msgid "" "A method that is called implicitly by Python to execute a certain operation " "on a type, such as addition. Such methods have names starting and ending " @@ -2505,11 +2508,11 @@ msgstr "" "ont des noms commençant et terminant par des doubles tirets bas. Les " "méthodes spéciales sont documentées dans :ref:`specialnames`." -#: glossary.rst:1066 +#: glossary.rst:1068 msgid "statement" msgstr "instruction" -#: glossary.rst:1068 +#: glossary.rst:1070 msgid "" "A statement is part of a suite (a \"block\" of code). A statement is either " "an :term:`expression` or one of several constructs with a keyword, such as :" @@ -2520,21 +2523,43 @@ msgstr "" "constructions basées sur un mot-clé, comme :keyword:`if`, :keyword:`while` " "ou :keyword:`for`." -#: glossary.rst:1071 +#: glossary.rst:1073 msgid "text encoding" msgstr "encodage de texte" -#: glossary.rst:1073 -msgid "A codec which encodes Unicode strings to bytes." +#: glossary.rst:1075 +msgid "" +"A string in Python is a sequence of Unicode code points (in range " +"``U+0000``--``U+10FFFF``). To store or transfer a string, it needs to be " +"serialized as a sequence of bytes." +msgstr "" +"Une chaîne de caractères en Python est une suite de points de code Unicode " +"(dans l'intervalle ``U+0000``--``U+10FFFF``). Pour stocker ou transmettre " +"une chaîne, il est nécessaire de la sérialiser en suite d'octets." + +#: glossary.rst:1079 +msgid "" +"Serializing a string into a sequence of bytes is known as \"encoding\", and " +"recreating the string from the sequence of bytes is known as \"decoding\"." +msgstr "" +"Sérialiser une chaîne de caractères en une suite d'octets s'appelle " +"« encoder » et recréer la chaîne à partir de la suite d'octets s'appelle " +"« décoder »." + +#: glossary.rst:1082 +msgid "" +"There are a variety of different text serialization :ref:`codecs `, which are collectively referred to as \"text encodings\"." msgstr "" -"Codec (codeur-décodeur) qui convertit des chaînes de caractères Unicode en " -"octets (classe *bytes*)." +"Il existe de multiples :ref:`codecs ` pour la " +"sérialisation de texte, que l'on regroupe sous l'expression « encodages de " +"texte »." -#: glossary.rst:1074 +#: glossary.rst:1085 msgid "text file" msgstr "fichier texte" -#: glossary.rst:1076 +#: glossary.rst:1087 msgid "" "A :term:`file object` able to read and write :class:`str` objects. Often, a " "text file actually accesses a byte-oriented datastream and handles the :term:" @@ -2549,7 +2574,7 @@ msgstr "" "ou ``'w'``), :data:`sys.stdin`, :data:`sys.stdout` et les instances de :" "class:`io.StringIO`." -#: glossary.rst:1083 +#: glossary.rst:1094 msgid "" "See also :term:`binary file` for a file object able to read and write :term:" "`bytes-like objects `." @@ -2557,11 +2582,11 @@ msgstr "" "Voir aussi :term:`binary file` pour un objet fichier capable de lire et " "d'écrire :term:`bytes-like objects `." -#: glossary.rst:1085 +#: glossary.rst:1096 msgid "triple-quoted string" msgstr "chaîne entre triple guillemets" -#: glossary.rst:1087 +#: glossary.rst:1098 msgid "" "A string which is bound by three instances of either a quotation mark (\") " "or an apostrophe ('). While they don't provide any functionality not " @@ -2576,15 +2601,15 @@ msgstr "" "qui ne soit pas disponible avec une chaîne entre guillemets, elle est utile " "pour de nombreuses raisons. Elle vous autorise à insérer des guillemets " "simples et doubles dans une chaîne sans avoir à les protéger et elle peut " -"s'étendre sur plusieurs lignes sans avoir à terminer chaque ligne par un ``" -"\\``. Elle est ainsi particulièrement utile pour les chaînes de " +"s'étendre sur plusieurs lignes sans avoir à terminer chaque ligne par un " +"``\\``. Elle est ainsi particulièrement utile pour les chaînes de " "documentation (*docstrings*)." -#: glossary.rst:1094 +#: glossary.rst:1105 msgid "type" msgstr "type" -#: glossary.rst:1096 +#: glossary.rst:1107 msgid "" "The type of a Python object determines what kind of object it is; every " "object has a type. An object's type is accessible as its :attr:`~instance." @@ -2594,15 +2619,15 @@ msgstr "" "objets ont un type. Le type d'un objet peut être obtenu via son attribut :" "attr:`~instance.__class__` ou via ``type(obj)``." -#: glossary.rst:1100 +#: glossary.rst:1111 msgid "type alias" msgstr "alias de type" -#: glossary.rst:1102 +#: glossary.rst:1113 msgid "A synonym for a type, created by assigning the type to an identifier." msgstr "Synonyme d'un type, créé en affectant le type à un identifiant." -#: glossary.rst:1104 +#: glossary.rst:1115 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" @@ -2610,19 +2635,19 @@ msgstr "" "Les alias de types sont utiles pour simplifier les :term:`indications de " "types `. Par exemple ::" -#: glossary.rst:1111 +#: glossary.rst:1122 msgid "could be made more readable like this::" msgstr "pourrait être rendu plus lisible comme ceci ::" -#: glossary.rst:1132 +#: glossary.rst:1143 msgid "See :mod:`typing` and :pep:`484`, which describe this functionality." msgstr "Voir :mod:`typing` et :pep:`484`, qui décrivent cette fonctionnalité." -#: glossary.rst:1119 +#: glossary.rst:1130 msgid "type hint" msgstr "indication de type" -#: glossary.rst:1121 +#: glossary.rst:1132 msgid "" "An :term:`annotation` that specifies the expected type for a variable, a " "class attribute, or a function parameter or return value." @@ -2630,7 +2655,7 @@ msgstr "" "Le :term:`annotation` qui spécifie le type attendu pour une variable, un " "attribut de classe, un paramètre de fonction ou une valeur de retour." -#: glossary.rst:1124 +#: glossary.rst:1135 msgid "" "Type hints are optional and are not enforced by Python but they are useful " "to static type analysis tools, and aid IDEs with code completion and " @@ -2641,7 +2666,7 @@ msgstr "" "statique et aident les IDE à compléter et à réusiner (*code refactoring* en " "anglais) le code." -#: glossary.rst:1128 +#: glossary.rst:1139 msgid "" "Type hints of global variables, class attributes, and functions, but not " "local variables, can be accessed using :func:`typing.get_type_hints`." @@ -2650,11 +2675,11 @@ msgstr "" "fonctions, mais pas de variables locales, peuvent être consultés en " "utilisant :func:`typing.get_type_hints`." -#: glossary.rst:1133 +#: glossary.rst:1144 msgid "universal newlines" msgstr "retours à la ligne universels" -#: glossary.rst:1135 +#: glossary.rst:1146 msgid "" "A manner of interpreting text streams in which all of the following are " "recognized as ending a line: the Unix end-of-line convention ``'\\n'``, the " @@ -2668,22 +2693,22 @@ msgstr "" "``'\\r'``. Voir la :pep:`278` et la :pep:`3116`, ainsi que la fonction :func:" "`bytes.splitlines` pour d'autres usages." -#: glossary.rst:1140 +#: glossary.rst:1151 msgid "variable annotation" msgstr "annotation de variable" -#: glossary.rst:1142 +#: glossary.rst:1153 msgid "An :term:`annotation` of a variable or a class attribute." msgstr ":term:`annotation` d'une variable ou d'un attribut de classe." -#: glossary.rst:1144 +#: glossary.rst:1155 msgid "" "When annotating a variable or a class attribute, assignment is optional::" msgstr "" "Lorsque vous annotez une variable ou un attribut de classe, l'affectation " "est facultative ::" -#: glossary.rst:1149 +#: glossary.rst:1160 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" @@ -2692,13 +2717,13 @@ msgstr "" "`indications de types ` : par exemple, cette variable devrait " "prendre des valeurs de type :class:`int` ::" -#: glossary.rst:1155 +#: glossary.rst:1166 msgid "Variable annotation syntax is explained in section :ref:`annassign`." msgstr "" "La syntaxe d'annotation de la variable est expliquée dans la section :ref:" "`annassign`." -#: glossary.rst:1157 +#: glossary.rst:1168 msgid "" "See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " "this functionality." @@ -2706,11 +2731,11 @@ msgstr "" "Reportez-vous à :term:`function annotation`, à la :pep:`484` et à la :pep:" "`526` qui décrivent cette fonctionnalité." -#: glossary.rst:1159 +#: glossary.rst:1170 msgid "virtual environment" msgstr "environnement virtuel" -#: glossary.rst:1161 +#: glossary.rst:1172 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " @@ -2722,15 +2747,15 @@ msgstr "" "des paquets sans interférer avec d'autres applications Python fonctionnant " "sur le même système." -#: glossary.rst:1166 +#: glossary.rst:1177 msgid "See also :mod:`venv`." msgstr "Voir aussi :mod:`venv`." -#: glossary.rst:1167 +#: glossary.rst:1178 msgid "virtual machine" msgstr "machine virtuelle" -#: glossary.rst:1169 +#: glossary.rst:1180 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." @@ -2739,11 +2764,11 @@ msgstr "" "(*virtual machine*) de Python exécute le :term:`bytecode` produit par le " "compilateur de *bytecode*." -#: glossary.rst:1171 +#: glossary.rst:1182 msgid "Zen of Python" msgstr "Le zen de Python" -#: glossary.rst:1173 +#: glossary.rst:1184 msgid "" "Listing of Python design principles and philosophies that are helpful in " "understanding and using the language. The listing can be found by typing " @@ -2752,3 +2777,32 @@ msgstr "" "Liste de principes et de préceptes utiles pour comprendre et utiliser le " "langage. Cette liste peut être obtenue en tapant \"``import this``\" dans " "une invite Python interactive." + +#~ msgid "" +#~ "A pseudo-module which programmers can use to enable new language features " +#~ "which are not compatible with the current interpreter." +#~ msgstr "" +#~ "Pseudo-module que les développeurs peuvent utiliser pour activer de " +#~ "nouvelles fonctionnalités du langage qui ne sont pas compatibles avec " +#~ "l'interpréteur utilisé." + +#~ msgid "" +#~ "By importing the :mod:`__future__` module and evaluating its variables, " +#~ "you can see when a new feature was first added to the language and when " +#~ "it becomes the default::" +#~ msgstr "" +#~ "En important le module :mod:`__future__` et en affichant ses variables, " +#~ "vous pouvez voir à quel moment une nouvelle fonctionnalité a été rajoutée " +#~ "dans le langage et quand elle devient le comportement par défaut ::" + +#~ msgid "" +#~ "See :pep:`483` for more details, and :mod:`typing` or :ref:`generic alias " +#~ "type ` for its uses." +#~ msgstr "" +#~ "Voir la :pep:`483` pour plus de détails, et :mod:`typing` ou :ref:`alias " +#~ "générique de type ` pour ses utilisations." + +#~ msgid "A codec which encodes Unicode strings to bytes." +#~ msgstr "" +#~ "Codec (codeur-décodeur) qui convertit des chaînes de caractères Unicode " +#~ "en octets (classe *bytes*)." diff --git a/howto/argparse.po b/howto/argparse.po index 07f93a5363..ae0b563899 100644 --- a/howto/argparse.po +++ b/howto/argparse.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-07-25 16:44+0200\n" "Last-Translator: Antonin Décimo \n" "Language-Team: FRENCH \n" @@ -429,9 +429,9 @@ msgid "" "Yes, it's now more of a flag (similar to ``action=\"store_true\"``) in the " "previous version of our script. That should explain the complaint." msgstr "" -"Oui, c'est maintenant d'avantage une option (similaire à ``action=" -"\"store_true\"``) de la version précédente de notre script. Cela devrait " -"expliquer le message d'erreur." +"Oui, c'est maintenant d'avantage une option (similaire à " +"``action=\"store_true\"``) de la version précédente de notre script. Cela " +"devrait expliquer le message d'erreur." #: howto/argparse.rst:501 msgid "It also behaves similar to \"store_true\" action." diff --git a/howto/clinic.po b/howto/clinic.po index 256f358ad3..319195f556 100644 --- a/howto/clinic.po +++ b/howto/clinic.po @@ -5,19 +5,19 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2019-03-26 17:29+0100\n" -"Last-Translator: Julien Palard \n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" +"PO-Revision-Date: 2021-06-04 15:16+0200\n" +"Last-Translator: Mindiell \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.6\n" +"X-Generator: Poedit 2.2.1\n" #: howto/clinic.rst:5 msgid "Argument Clinic How-To" -msgstr "" +msgstr "Guide Argument Clinic" #: howto/clinic.rst:0 msgid "author" @@ -25,7 +25,7 @@ msgstr "auteur" #: howto/clinic.rst:7 msgid "Larry Hastings" -msgstr "" +msgstr "Larry Hastings" #: howto/clinic.rst:None msgid "Abstract" @@ -44,7 +44,7 @@ msgstr "" "d'analyse d'arguments pour les modules natifs. Ce document vous montre " "comment convertir votre première fonction C de façon à ce qu'elle fonctionne " "avec Argument Clinic, avant d'introduire des usages plus avancés d'Argument " -"Clinic. " +"Clinic." #: howto/clinic.rst:19 msgid "" @@ -81,12 +81,12 @@ msgid "" msgstr "" "Le premier objectif d'Argument Clinic est de prendre en charge toute " "l'analyse d'arguments à l'intérieur de CPython. Cela signifie que si vous " -"convertissez une fonction pour fonctionner avec Argument Clinic, cette " -"fonction n'a plus du tout besoin d'analyser ses propres arguments. Le code " -"généré par Argument Clinic doit être une « boîte noire » avec en entrée " -"l'appel de CPython, et en sortie l'appel à votre code. Entre les deux, " -"``PyObject *args`` (et éventuellement ``PyObject *kwargs``) sont convertis " -"magiquement dans les variables et types C dont vous avez besoin." +"convertissez une fonction pour utiliser Argument Clinic, cette fonction n'a " +"plus du tout besoin d'analyser ses propres arguments. Le code généré par " +"Argument Clinic doit être une « boîte noire » avec en entrée l'appel de " +"CPython, et en sortie l'appel à votre code. Entre les deux, ``PyObject " +"*args`` (et éventuellement ``PyObject *kwargs``) sont convertis magiquement " +"dans les variables et types C dont vous avez besoin." #: howto/clinic.rst:41 msgid "" @@ -113,15 +113,15 @@ msgid "" "parsing library. That would make for the fastest argument parsing possible!)" msgstr "" "Certainement, personne ne voudrait utiliser Argument Clinic s'il ne réglait " -"pas leur problème -- sans en créer de nouveaux. Il est donc de la première " +"pas son problème sans en créer de nouveaux. Il est donc de la première " "importance qu'Argument Clinic génère du code correct. Il est aussi " "souhaitable que le code soit aussi plus rapide. Au minimum, il ne doit pas " "introduire de régression significative sur la vitesse d'exécution. (Au bout " -"du compte, Argument Clinic *devrait* permettre une accélération importante " -"-- on pourrait ré-écrire son générateur de code pour produire du code " -"d'analyse d'argument adapté au mieux, plutôt que d'utiliser la bibliothèque " -"d'analyse d'argument générique. On aurait ainsi l'analyse d'argument la plus " -"rapide possible !)" +"du compte, Argument Clinic *devrait* permettre une accélération importante, " +"on pourrait ré-écrire son générateur de code pour produire du code d'analyse " +"d'arguments adapté au mieux, plutôt que d'utiliser la bibliothèque d'analyse " +"d'arguments générique. On aurait ainsi l'analyse d'arguments la plus rapide " +"possible !)" #: howto/clinic.rst:59 msgid "" @@ -131,8 +131,8 @@ msgid "" msgstr "" "De plus, Argument Clinic doit être suffisamment flexible pour s'accommoder " "d'approches différentes de l'analyse d'arguments. Il y a des fonctions dans " -"Python dont le traitement des arguments est très étrange ; le but d'Argument " -"Clinic est de les gérer toutes. " +"Python dont le traitement des arguments est très étrange ; le but d'Argument " +"Clinic est de les gérer toutes." #: howto/clinic.rst:64 msgid "" @@ -141,11 +141,11 @@ msgid "" "introspection query functions would throw an exception if you passed in a " "builtin. With Argument Clinic, that's a thing of the past!" msgstr "" -"Finalement, la motivation première d'Argument Clinic était de fournir des « " -"signatures » pour l'introspection des composants natifs de CPython. " +"Finalement, la motivation première d'Argument Clinic était de fournir des " +"« signatures » pour l'introspection des composants natifs de CPython. " "Précédemment, les fonctions d'introspection levaient une exception si vous " "passiez un composant natif. Grâce à Argument Clinic, ce comportement " -"appartient au passé !" +"appartient au passé !" #: howto/clinic.rst:70 msgid "" @@ -159,7 +159,7 @@ msgstr "" "lui donnez de détails, meilleur sera son boulot. Argument Clinic est bien " "sûr assez simple pour le moment. Mais à mesure qu'il évoluera et deviendra " "plus sophistiqué, il sera capable de faire beaucoup de choses intéressantes " -"et intelligentes à partir de l'information que vous lui fournissez." +"et intelligentes à partir de l'information à sa disposition." #: howto/clinic.rst:80 msgid "Basic Concepts And Usage" @@ -170,22 +170,22 @@ msgid "" "Argument Clinic ships with CPython; you'll find it in ``Tools/clinic/clinic." "py``. If you run that script, specifying a C file as an argument:" msgstr "" -"Argument Clinic est livré avec CPython; vous le trouverez dans ``Tools/" +"Argument Clinic est livré avec CPython ; vous le trouverez dans ``Tools/" "clinic/clinic.py``. Si vous exécutez ce script, en spécifiant un fichier C " -"comme argument : " +"comme argument :" #: howto/clinic.rst:89 msgid "" "Argument Clinic will scan over the file looking for lines that look exactly " "like this:" -msgstr "Argument Clinic va parcourir le fichier en cherchant cette ligne :" +msgstr "Argument Clinic va parcourir le fichier en cherchant cette ligne :" #: howto/clinic.rst:96 msgid "" "When it finds one, it reads everything up to a line that looks exactly like " "this:" msgstr "" -"Lorsqu'il en trouve une, il lit tout ce qui suit, jusqu'à cette ligne :" +"Lorsqu'il en trouve une, il lit tout ce qui suit, jusqu'à cette ligne :" #: howto/clinic.rst:103 msgid "" @@ -195,7 +195,7 @@ msgid "" msgstr "" "Tout ce qui se trouve entre ces deux lignes est une entrée pour Argument " "Clinic. Toutes ces lignes, en incluant les commentaires de début et de fin, " -"sont appelées collectivement un « bloc » d'Argument Clinic. " +"sont appelées collectivement un « bloc » d'Argument Clinic." #: howto/clinic.rst:107 msgid "" @@ -207,7 +207,7 @@ msgstr "" "Lorsque *Argument Clinic* analyse l'un de ces blocs, il produit une sortie. " "Cette sortie est réécrite dans le fichier C immédiatement après le bloc, " "suivie par un commentaire contenant une somme de contrôle. Le bloc Argument " -"Clinic ressemble maintenant à cela :" +"Clinic ressemble maintenant à cela :" #: howto/clinic.rst:120 msgid "" @@ -219,7 +219,7 @@ msgstr "" "Si vous exécutez de nouveau Argument Clinic sur ce même fichier, Argument " "Clinic supprime la vieille sortie, et écrit la nouvelle sortie avec une " "ligne de somme de contrôle mise à jour. Cependant, si l'entrée n'a pas " -"changé, la sortie ne change pas non plus. " +"changé, la sortie ne change pas non plus." #: howto/clinic.rst:124 msgid "" @@ -239,7 +239,7 @@ msgstr "" msgid "" "For the sake of clarity, here's the terminology we'll use with Argument " "Clinic:" -msgstr "Par souci de clarté, voilà la terminologie que nous emploierons :" +msgstr "Par souci de clarté, voilà la terminologie que nous emploierons :" #: howto/clinic.rst:131 msgid "" @@ -262,7 +262,7 @@ msgid "" "*checksum line*." msgstr "" "La dernière ligne (``/*[clinic end generated code: checksum=...]*/``) est la " -"*ligne de contrôle*. " +"*ligne de contrôle*." #: howto/clinic.rst:134 msgid "In between the start line and the end line is the *input*." @@ -313,7 +313,7 @@ msgstr "" #: howto/clinic.rst:154 msgid "Let's dive in!" -msgstr "En route !" +msgstr "En route !" #: howto/clinic.rst:156 msgid "" @@ -329,8 +329,8 @@ msgid "" "func:`PyArg_ParseTupleAndKeywords`, and hasn't been converted to work with " "Argument Clinic yet. For my example I'm using ``_pickle.Pickler.dump()``." msgstr "" -"Trouvez une fonction native de Python qui fait appel à :c:func:" -"`PyArg_ParseTuple` ou :c:func:`PyArg_ParseTupleAndKeywords`, et n'a pas " +"Trouvez une fonction native de Python qui fait appel à :c:func:" +"`PyArg_ParseTuple` ou :c:func:`PyArg_ParseTupleAndKeywords`, et n'a pas " "encore été convertie par Argument Clinic. Pour cet exemple, j'utilise " "``_pickle.Pickler.dump()``." @@ -338,7 +338,7 @@ msgstr "" msgid "" "If the call to the ``PyArg_Parse`` function uses any of the following format " "units:" -msgstr "Si l'appel à ``PyArg_Parse`` utilise l'un des formats suivants :" +msgstr "Si l'appel à ``PyArg_Parse`` utilise l'un des formats suivants :" #: howto/clinic.rst:176 msgid "" @@ -347,8 +347,8 @@ msgid "" "scenarios. But these are advanced topics—let's do something simpler for " "your first function." msgstr "" -"ou s'il y a de multiples appels à :c:func:`PyArg_ParseTuple`, choisissez une " -"fonction différente. Argument Clinic gère tous ces scénarios, mais se sont " +"ou s'il y a de multiples appels à :c:func:`PyArg_ParseTuple`, choisissez une " +"fonction différente. Argument Clinic gère tous ces scénarios, mais ce sont " "des sujets trop avancés pour notre première fonction." #: howto/clinic.rst:181 @@ -360,8 +360,8 @@ msgid "" "to Argument Clinic. Argument Clinic doesn't support generic functions or " "polymorphic parameters." msgstr "" -"Par ailleurs, si la fonction a des appels multiples à :c:func:" -"`PyArg_ParseTuple` ou :c:func:`PyArg_ParseTupleAndKeywords` dans lesquels " +"Par ailleurs, si la fonction a des appels multiples à :c:func:" +"`PyArg_ParseTuple` ou :c:func:`PyArg_ParseTupleAndKeywords` dans lesquels " "elle permet différents types pour les mêmes arguments, il n'est probablement " "pas possible de la convertir pour Argument Clinic. Argument Clinic ne gère " "pas les fonctions génériques ou les paramètres polymorphes." @@ -410,8 +410,8 @@ msgid "" "paragraph consisting of a single 80-column line at the beginning of the " "docstring." msgstr "" -"Si votre *docstring* ne contient pas de ligne « résumé », Argument Clinic va " -"se plaindre. Assurons-nous donc qu'il y en a une. La ligne « résumé » doit " +"Si votre *docstring* ne contient pas de ligne « résumé », Argument Clinic va " +"se plaindre. Assurons-nous donc qu'il y en a une. La ligne « résumé » doit " "être un paragraphe consistant en une seule ligne de 80 colonnes au début de " "la *docstring*." @@ -431,7 +431,7 @@ msgid "" "module, include any sub-modules, and if the function is a method on a class " "it should include the class name too." msgstr "" -"Au dessus de la *docstring*, entrez le nom de la fonction, suivi d'une ligne " +"Au-dessus de la *docstring*, entrez le nom de la fonction, suivi d'une ligne " "vide. Ce doit être le nom de la fonction en Python et être le chemin complet " "jusqu'à la fonction. Il doit commencer par le nom du module, suivi de tous " "les sous-modules, puis, si la fonction est une méthode de classe, inclure " @@ -449,7 +449,7 @@ msgstr "" "Si c'est la première fois que ce module ou cette classe est utilisée avec " "Argument Clinic dans ce fichier C, vous devez déclarer votre module et/ou " "votre classe. Pour suivre de bonnes pratiques avec Argument Clinic, il vaut " -"mieux faire ces déclaration quelque part en tête du fichier C, comme les " +"mieux faire ces déclarations quelque part en tête du fichier C, comme les " "fichiers inclus et les statiques (dans cet extrait, nous montrons les deux " "blocs à côté l'un de l'autre)." @@ -460,7 +460,7 @@ msgid "" "`PyTypeObject` as appropriate." msgstr "" "Le nom de la classe et du module doivent être les mêmes que ceux vus par " -"Python. Selon le cas, référez-vous à :c:type:`PyModuleDef` ou :c:type:" +"Python. Selon le cas, référez-vous à :c:type:`PyModuleDef` ou :c:type:" "`PyTypeObject`" #: howto/clinic.rst:246 @@ -470,8 +470,8 @@ msgid "" "class, and a pointer to the :c:type:`PyTypeObject` for this class." msgstr "" "Quand vous déclarez une classe, vous devez aussi spécifier deux aspects de " -"son type en C: la déclaration de type que vous utiliseriez pour un pointeur " -"vers une instance de cette classe et un pointeur vers le :c:type:" +"son type en C : la déclaration de type que vous utiliseriez pour un pointeur " +"vers une instance de cette classe et un pointeur vers le :c:type:" "`PyTypeObject` de cette classe." #: howto/clinic.rst:266 @@ -486,13 +486,13 @@ msgstr "" #: howto/clinic.rst:270 msgid "The general form of these parameter lines is as follows:" -msgstr "La forme générale de ces paramètres est la suivante :" +msgstr "La forme générale de ces paramètres est la suivante :" #: howto/clinic.rst:276 msgid "If the parameter has a default value, add that after the converter:" msgstr "" "Si le paramètre a une valeur par défaut, ajoutez ceci après le " -"convertisseur :" +"convertisseur :" #: howto/clinic.rst:283 msgid "" @@ -500,8 +500,8 @@ msgid "" "please see :ref:`the section below on default values ` for " "more information." msgstr "" -"Argument Clinic peut traiter les « valeurs par défaut » de manière assez " -"sophistiquée; voyez :ref:`la section ci-dessous sur les valeurs par défaut " +"Argument Clinic peut traiter les « valeurs par défaut » de manière assez " +"sophistiquée ; voyez :ref:`la section ci-dessous sur les valeurs par défaut " "` pour plus de détails." #: howto/clinic.rst:287 @@ -516,10 +516,10 @@ msgid "" "convenience syntax intended to make porting old code into Argument Clinic " "easier." msgstr "" -"Que fait le « convertisseur » ? Il établit à la fois le type de variable " +"Que fait le « convertisseur » ? Il établit à la fois le type de variable " "utilisé en C et la méthode pour convertir la valeur Python en valeur C lors " -"de l'exécution. Pour le moment, vous allez utiliser ce qui s'appelle un « " -"convertisseur hérité » -- une syntaxe de convenance qui facilite le portage " +"de l'exécution. Pour le moment, vous allez utiliser ce qui s'appelle un " +"« convertisseur hérité », une syntaxe de convenance qui facilite le portage " "de vieux code dans Argument Clinic." #: howto/clinic.rst:296 @@ -531,21 +531,21 @@ msgid "" "parsing function what the type of the variable is and how to convert it. " "For more on format units please see :ref:`arg-parsing`.)" msgstr "" -"Pour chaque paramètre, copiez l'« unité de format » de ce paramètre à partir " -"de l'argument de ``PyArg_Parse()`` et spécifiez *ça* comme convertisseur, " -"entre guillemets. (l'« unité de format » est le nom formel pour la partie du " -"paramètre ``format``, de un à trois caractères, qui indique à la fonction " -"d'analyse d'arguments quel est le type de la variable et comment la " -"convertir. Pour plus d'information sur les unités de format, voyez :ref:`arg-" -"parsing`.)" +"Pour chaque paramètre, copiez la « spécification de format » de ce paramètre " +"à partir de l'argument de ``PyArg_Parse()`` et spécifiez *ça* comme " +"convertisseur, entre guillemets. (la « spécification de format » est le nom " +"formel pour la partie du paramètre ``format``, de un à trois caractères, qui " +"indique à la fonction d'analyse d'arguments quel est le type de la variable " +"et comment la convertir. Pour plus d'information sur les spécifications de " +"format, voyez :ref:`arg-parsing`.)" #: howto/clinic.rst:305 msgid "" "For multicharacter format units like ``z#``, use the entire two-or-three " "character string." msgstr "" -"Pour des unités de format de plusieurs caractères, comme ``z#``, utilisez " -"l'ensemble des 2 ou 3 caractères de la chaîne. " +"Pour des spécifications de format de plusieurs caractères, comme ``z#``, " +"utilisez l'ensemble des 2 ou 3 caractères de la chaîne." #: howto/clinic.rst:323 msgid "" @@ -581,9 +581,9 @@ msgid "" "c:func:`PyArg_ParseTupleAndKeywords`), then all its arguments are positional-" "only." msgstr "" -"Si la fonction C existante appelle :c:func:`PyArg_ParseTuple` (et pas :c:" +"Si la fonction C existante appelle :c:func:`PyArg_ParseTuple` (et pas :c:" "func:`PyArg_ParseTupleAndKeywords`), alors tous ses arguments sont " -"uniquement positionnels. " +"uniquement positionnels." #: howto/clinic.rst:340 msgid "" @@ -601,9 +601,9 @@ msgid "" "or none of them are. (In the future Argument Clinic may relax this " "restriction.)" msgstr "" -"Pour le moment, c'est tout ou rien ; soit tous les paramètres sont " +"Pour le moment, c'est tout ou rien ; soit tous les paramètres sont " "uniquement positionnels, ou aucun ne l'est. (Dans le futur, Argument Clinic " -"supprimera peut être cette restriction.)" +"supprimera peut-être cette restriction.)" #: howto/clinic.rst:364 msgid "" @@ -611,7 +611,7 @@ msgid "" "parameter docstrings are optional; you can skip this step if you prefer." msgstr "" "Il est utile d'ajouter une *docstring* pour chaque paramètre, mais c'est " -"optionnel; vous pouvez passer cette étape si vous préférez." +"optionnel ; vous pouvez passer cette étape si vous préférez." #: howto/clinic.rst:368 msgid "" @@ -625,9 +625,9 @@ msgstr "" "Voici comment ajouter la *docstring* d'un paramètre. La première ligne doit " "être plus indentée que la définition du paramètre. La marge gauche de cette " "première ligne établit la marge gauche pour l'ensemble de la *docstring* de " -"ce paramètre; tout le texte que vous écrivez sera indenté de cette quantité. " -"Vous pouvez écrire autant de texte que vous le souhaitez, sur plusieurs " -"lignes." +"ce paramètre ; tout le texte que vous écrivez sera indenté de cette " +"quantité. Vous pouvez écrire autant de texte que vous le souhaitez, sur " +"plusieurs lignes." #: howto/clinic.rst:392 msgid "" @@ -665,7 +665,7 @@ msgid "" "Double-check that the argument-parsing code Argument Clinic generated looks " "basically the same as the existing code." msgstr "" -"Vérifiez bien que le code d'analyse d'argument généré par Argument Clinic " +"Vérifiez bien que le code d'analyse d'arguments généré par Argument Clinic " "ressemble bien au code existant." #: howto/clinic.rst:424 @@ -676,8 +676,8 @@ msgid "" "Clinic calls the *exact* same function." msgstr "" "Assurez vous premièrement que les deux codes utilisent la même fonction pour " -"analyser les arguments. Le code existant doit appeler soit :c:func:" -"`PyArg_ParseTuple` soit :c:func:`PyArg_ParseTupleAndKeywords`; assurez vous " +"analyser les arguments. Le code existant doit appeler soit :c:func:" +"`PyArg_ParseTuple` soit :c:func:`PyArg_ParseTupleAndKeywords` ; assurez vous " "que le code généré par Argument Clinic appelle *exactement* la même fonction." #: howto/clinic.rst:430 @@ -686,8 +686,8 @@ msgid "" "`PyArg_ParseTupleAndKeywords` should be *exactly* the same as the hand-" "written one in the existing function, up to the colon or semi-colon." msgstr "" -"Deuxièmement, la chaîne de caractère du format passée dans :c:func:" -"`PyArg_ParseTuple` ou :c:func:`PyArg_ParseTupleAndKeywords` doit être " +"Deuxièmement, la chaîne de caractère du format passée dans :c:func:" +"`PyArg_ParseTuple` ou :c:func:`PyArg_ParseTupleAndKeywords` doit être " "*exactement* la même que celle écrite à la main, jusqu'aux deux points ou au " "point virgule." @@ -698,7 +698,7 @@ msgid "" "``;``, to provide usage help, this change is harmless—don't worry about it.)" msgstr "" "(Argument Clinic génère toujours ses chaînes de format avec ``:`` suivi du " -"nom de la fonction. Si la chaîne de format du code existant termine par ``;" +"nom de la fonction. Si la chaîne de format du code existant termine par `` ;" "``, pour fournir une aide sur l'utilisation, ce changement n'a aucun effet, " "ne vous en souciez pas.)" @@ -709,9 +709,9 @@ msgid "" "function), ensure that the second argument is *exactly* the same between the " "two invocations." msgstr "" -"Troisièmement, pour des paramètres dont l'unité de format nécessite deux " -"arguments (comme une variable de longueur, ou une chaîne d'encodage, ou un " -"pointeur vers une fonction de conversion), assurez vous que ce deuxième " +"Troisièmement, pour des paramètres dont la spécification de format nécessite " +"deux arguments (comme une variable de longueur, ou une chaîne d'encodage, ou " +"un pointeur vers une fonction de conversion), assurez vous que ce deuxième " "argument est *exactement* le même entre les deux invocations." #: howto/clinic.rst:445 @@ -721,7 +721,7 @@ msgid "" "this builtin::" msgstr "" "Quatrièmement, à l'intérieur de la section sortie du bloc, vous trouverez " -"une macro pré-processeur qui définit les structures statiques :c:type:" +"une macro pré-processeur qui définit les structures statiques :c:type:" "`PyMethodDef` appropriées pour ce module natif ::" #: howto/clinic.rst:452 @@ -730,7 +730,7 @@ msgid "" "type:`PyMethodDef` structure for this builtin." msgstr "" "Cette structure statique doit être *exactement* la même que la structure " -"statique :c:type:`PyMethodDef` existante pour ce module natif." +"statique :c:type:`PyMethodDef` existante pour ce module natif." #: howto/clinic.rst:455 msgid "" @@ -753,13 +753,13 @@ msgid "" "used different names for these variables, fix it." msgstr "" "Notez que la dernière ligne de cette sortie est la déclaration de votre " -"fonction ``impl``. C'est là que va l'implémentation de la fonction native. " -"Supprimez le prototype de la fonction que vous modifiez, mais laissez " -"l'accolade ouverte. Maintenant, supprimez tout le code d'analyse d'argument " -"et les déclarations de toutes les variables auxquelles il assigne les " -"arguments. Vous voyez que désormais, les arguments Python sont ceux de cette " -"fonction ``impl``; si l'implémentation utilise des noms différents pour ces " -"variables, corrigez-les." +"fonction ``impl``. C'est là que se trouve l'implémentation de la fonction " +"native. Supprimez le prototype de la fonction que vous modifiez, mais " +"laissez l'accolade ouverte. Maintenant, supprimez tout le code d'analyse " +"d'arguments et les déclarations de toutes les variables auxquelles il " +"assigne les arguments. Vous voyez que désormais les arguments Python sont " +"ceux de cette fonction ``impl`` ; si l'implémentation utilise des noms " +"différents pour ces variables, corrigez-les." #: howto/clinic.rst:468 msgid "" @@ -776,7 +776,7 @@ msgid "" "function, and the implementation inside." msgstr "" "Argument Clinic génère une ligne de contrôle et la fonction prototype juste " -"au dessus. Vous devez écrire les accolades d'ouverture (et de fermeture) " +"au-dessus. Vous devez écrire les accolades d'ouverture (et de fermeture) " "pour la fonction, et l’implémentation à l'intérieur." #: howto/clinic.rst:522 @@ -788,12 +788,12 @@ msgid "" "builtin is a class method, this will probably be below but relatively near " "to the implementation.)" msgstr "" -"Vous vous souvenez de la macro avec la structure :c:type:`PyMethodDef` pour " -"cette fonction ? Trouvez la structure :c:type:`PyMethodDef` existante pour " +"Vous vous souvenez de la macro avec la structure :c:type:`PyMethodDef` pour " +"cette fonction ? Trouvez la structure :c:type:`PyMethodDef` existante pour " "cette fonction et remplacez là par une référence à cette macro. (Si la " "fonction native est définie au niveau d'un module, vous le trouverez " -"certainement vers la fin du fichier; s'il s'agît d'une méthode de classe, se " -"sera sans doute plus bas, mais relativement près de l'implémentation.)" +"certainement vers la fin du fichier ; s'il s'agit d'une méthode de classe, " +"se sera sans doute plus bas, mais relativement près de l'implémentation.)" #: howto/clinic.rst:529 msgid "" @@ -802,7 +802,7 @@ msgid "" "*don't* add a comma to the end." msgstr "" "Notez que le corps de la macro contient une virgule finale. Donc, lorsque " -"vous remplacez la structure statique :c:type:`PyMethodDef` par la macro, " +"vous remplacez la structure statique :c:type:`PyMethodDef` par la macro, " "*n'ajoutez pas* de virgule à la fin." #: howto/clinic.rst:542 @@ -821,8 +821,8 @@ msgid "" "Well, except for one difference: ``inspect.signature()`` run on your " "function should now provide a valid signature!" msgstr "" -"Enfin, à part pour une différence : si vous exécutez ``inspect.signature()`` " -"sur votre fonction, vous obtiendrez maintenant une signature valide !" +"Enfin, à part pour une différence : si vous exécutez ``inspect.signature()`` " +"sur votre fonction, vous obtiendrez maintenant une signature valide !" #: howto/clinic.rst:549 msgid "" @@ -830,7 +830,7 @@ msgid "" "Clinic!" msgstr "" "Félicitations, vous avez adapté votre première fonction pour qu'elle utilise " -"Argument Clinic !" +"Argument Clinic !" #: howto/clinic.rst:552 msgid "Advanced Topics" @@ -894,7 +894,7 @@ msgstr "" #: howto/clinic.rst:578 msgid "Renaming the C functions and variables generated by Argument Clinic" -msgstr "" +msgstr "Renommer les fonctions et variables C générées par Argument Clinic" #: howto/clinic.rst:580 msgid "" @@ -907,6 +907,14 @@ msgid "" "function, then add ``\"_impl\"`` to the end and use that for the name of the " "impl function." msgstr "" +"Argument Clinic nomme automatiquement les fonctions qu'il génère. Parfois, " +"cela peut poser des problèmes, si le nom généré entre en collision avec le " +"nom d'une fonction C existante. Il y a une solution simple : surcharger les " +"noms utilisés par les fonctions C. Ajoutez simplement le mot clef ``\"as\"`` " +"sur la ligne de la déclaration de la fonction, suivi par le nom de la " +"fonction que vous souhaitez utiliser. Argument Clinic utilisera ce nom de " +"fonction pour la fonction de base (celle générée), et ajoutera ``\"_impl\"`` " +"à la fin et utilisera ce nom pour la fonction ``impl``." #: howto/clinic.rst:588 msgid "" @@ -922,7 +930,7 @@ msgid "" "function would now be named ``pickler_dumper_impl()``." msgstr "" "La fonction de base sera maintenant nommée ``pickler_dumper()``, et la " -"fonction *impl* serait maintenant nommé ``pickler_dumper_impl()``." +"fonction ``impl`` sera maintenant nommée ``pickler_dumper_impl()``." #: howto/clinic.rst:600 msgid "" @@ -941,6 +949,8 @@ msgid "" "Here, the name used in Python (in the signature and the ``keywords`` array) " "would be ``file``, but the C variable would be named ``file_obj``." msgstr "" +"Ici, le nom utilisé en Python (dans la signature ainsi que le tableau des " +"``keywords``) sera ``file``, et la variable C s'appellera ``file_obj``." #: howto/clinic.rst:617 msgid "You can use this to rename the ``self`` parameter too!" @@ -958,13 +968,19 @@ msgid "" "appropriate. All arguments should be marked positional-only (add a ``/`` on " "a line by itself after the last argument)." msgstr "" +"Afin de convertir une fonction analysant ses arguments via :c:func:" +"`PyArg_UnpackTuple`, écrivez simplement tous les arguments, en les " +"spécifiant comme des ``object``. Vous pouvez spécifier également le ``type`` " +"d'argument afin de le forcer au type approprié. Tous les arguments devraient " +"être marqués comme seulement positionnels (ajoutez un ``/`` seul sur la " +"ligne après le dernier argument)." #: howto/clinic.rst:629 msgid "" "Currently the generated code will use :c:func:`PyArg_ParseTuple`, but this " "will change soon." msgstr "" -"Actuellement, le code généré utilise :c:func:`PyArg_ParseTuple`, mais cela " +"Actuellement, le code généré utilise :c:func:`PyArg_ParseTuple`, mais cela " "va bientôt changer." #: howto/clinic.rst:633 @@ -981,6 +997,14 @@ msgid "" "optional arguments back before :c:func:`PyArg_ParseTupleAndKeywords` was " "created." msgstr "" +"Certaines fonctions de base ont une approche particulière pour analyser " +"leurs arguments : elles comptent le nombre d'arguments positionnels, puis " +"elles utilisent une condition ``switch`` basée sur le nombre d'arguments " +"présents pour appeler différentes :c:func:`PyArg_ParseTuple` disponibles " +"(ces fonctions ne peuvent pas avoir des arguments passés uniquement en tant " +"qu'arguments nommés). Cette approche était utilisée pour simuler des " +"arguments optionnels avant que :c:func:`PyArg_ParseTupleAndKeywords` ne soit " +"créée." #: howto/clinic.rst:642 msgid "" @@ -995,6 +1019,17 @@ msgid "" "the function passing in ``x``, you must also pass in ``y``—and if you don't " "pass in ``x`` you may not pass in ``y`` either.)" msgstr "" +"Alors que les fonctions utilisant cette approche peuvent normalement être " +"converties pour utiliser :c:func:`PyArg_ParseTupleAndKeywords`, des " +"arguments optionnels et des valeurs par défaut, ce n'est pas toujours " +"possible. Certaines fonctions classiques ne peuvent pas être gérées par :c:" +"func:`PyArg_ParseTupleAndKeywords`. L'exemple le plus évident est la " +"fonction native ``range()``, qui possède un argument optionnel à *gauche* de " +"ses arguments requis ! Un autre exemple est la fonction ``curses.window." +"addch()``, qui possède un groupe de deux arguments qui doivent toujours être " +"spécifiés ensemble (ces arguments s'appellent ``x`` et ``y`` ; si vous " +"appelez la fonction en passant ``x``, vous devez passer ``y`` et si vous ne " +"passez pas ``x``, vous ne devez pas passer ``y`` non plus)." #: howto/clinic.rst:654 msgid "" @@ -1005,6 +1040,14 @@ msgid "" "all be passed in together. They can be to the left or the right of the " "required arguments. They can *only* be used with positional-only parameters." msgstr "" +"Dans tous les cas, le but d'Argument Clinic est de prendre en charge " +"l'analyse des arguments pour toutes les fonctions natives de CPython sans " +"avoir besoin de les modifier. C'est pourquoi Argument Clinic propose cette " +"autre approche pour l'analyse, en utilisant ce qu'on appelle les *groupes " +"optionnels*. Les groupes optionnels sont des groupes d'arguments qui doivent " +"tous être transmis ensemble. Ils peuvent être situés à droite ou à gauche " +"des arguments requis. Ils ne peuvent être utilisés *seulement* qu'en tant " +"que paramètres positionnels." #: howto/clinic.rst:662 msgid "" @@ -1016,6 +1059,14 @@ msgid "" "doesn't understand the concept. Please avoid using optional groups wherever " "possible." msgstr "" +"Les groupes optionnels sont *uniquement* prévus pour convertir les fonctions " +"faisant des appels multiples à :c:func:`PyArg_ParseTuple` ! Les fonctions " +"qui utilisent *au moins une* des autres approches ne doivent *presque " +"jamais* être converties à Argument Clinic en utilisant les groupes " +"optionnels. Les fonctions utilisant ces groupes n'ont pas actuellement de " +"signature précise en Python, parce que celui-ci ne peut simplement pas " +"comprendre ce concept. Tâchez d'éviter au maximum d'utiliser ces groupes " +"optionnels si possible." #: howto/clinic.rst:671 msgid "" @@ -1025,6 +1076,11 @@ msgid "" "optional groups to make the first two parameters and the last parameter " "optional::" msgstr "" +"Afin de signaler un groupe optionnel, ajoutez un ``[`` seul sur une ligne " +"avant les paramètres que vous souhaitez inclure dans le groupe, puis un " +"``]`` seul sur une ligne après ces paramètres. Voici, par exemple, comment " +"``curses.window.addch`` utilise les groupes optionnels pour rendre optionnel " +"les deux premiers paramètres ainsi que le dernier :" #: howto/clinic.rst:700 msgid "Notes:" @@ -1042,6 +1098,16 @@ msgid "" "was unused, and set to non-zero if this group was used. (By used or unused, " "I mean whether or not the parameters received arguments in this invocation.)" msgstr "" +"Pour chaque groupe optionnel, un paramètre additionnel sera passé à la " +"fonction ``impl`` représentant le groupe. Ce paramètre sera un entier nommé " +"``group_{direction}_{number}``, où ``{direction}`` peut être soit ``right`` " +"ou ``left`` suivant que le groupe est situé avant ou après les paramètres " +"requis, et ``{number}`` sera un entier incrémenté (débutant à 1) indiquant " +"la distance entre le groupe et les paramètres requis. Quand la fonction " +"``impl`` est appelée, ce paramètre est positionné à zéro si le groupe n'a " +"pas été utilisé, et positionné à un nombre entier positif sinon (par " +"inutilisé, on entend que les paramètres n'ont pas reçu de valeur lors de cet " +"appel)." #: howto/clinic.rst:713 msgid "" @@ -1056,10 +1122,13 @@ msgid "" "In the case of ambiguity, the argument parsing code favors parameters on the " "left (before the required parameters)." msgstr "" +"En cas d'ambiguïté, le code d'analyse des arguments favorise ceux situés à " +"gauche (avant les paramètres obligatoires)." #: howto/clinic.rst:719 msgid "Optional groups can only contain positional-only parameters." msgstr "" +"Les groupes optionnels ne peuvent contenir que des arguments positionnels." #: howto/clinic.rst:721 msgid "" @@ -1072,6 +1141,8 @@ msgstr "" #: howto/clinic.rst:726 msgid "Using real Argument Clinic converters, instead of \"legacy converters\"" msgstr "" +"Utilisation des adaptateurs d'Argument Clinic, en lieu et place des " +"« adaptateurs de base »" #: howto/clinic.rst:728 msgid "" @@ -1081,17 +1152,25 @@ msgid "" "explicitly to make porting existing code to Argument Clinic easier. And to " "be clear, their use is acceptable when porting code for Python 3.4." msgstr "" +"Afin de gagner du temps, et pour minimiser la courbe d'apprentissage pour " +"pouvoir utiliser Argument Clinic, le guide ci-dessus préconise les " +"« adaptateurs de base ». Ceux-ci sont un moyen simple conçu pour porter " +"facilement du code existant sous Argument Clinic. Et pour être clair, leur " +"utilisation est tout à fait acceptable pour porter du code Python 3.4." #: howto/clinic.rst:735 msgid "" "However, in the long term we probably want all our blocks to use Argument " "Clinic's real syntax for converters. Why? A couple reasons:" msgstr "" +"Cependant, sur le long terme, il est certainement préférable que tous vos " +"blocs utilisent la syntaxe réelle des adaptateurs d'Argument Clinic. " +"Pourquoi ? Voici quelques raisons :" #: howto/clinic.rst:739 msgid "" "The proper converters are far easier to read and clearer in their intent." -msgstr "" +msgstr "Les adaptateurs sont plus simples et plus clairs." #: howto/clinic.rst:740 msgid "" @@ -1099,6 +1178,9 @@ msgid "" "because they require arguments, and the legacy converter syntax doesn't " "support specifying arguments." msgstr "" +"Il existe des formats qui ne sont pas gérés par les « adaptateurs de base », " +"parce qu'ils nécessitent des arguments, et la syntaxe de ces adaptateurs ne " +"supporte pas cela." #: howto/clinic.rst:743 msgid "" @@ -1106,12 +1188,18 @@ msgid "" "restricted to what :c:func:`PyArg_ParseTuple` supports; this flexibility " "won't be available to parameters using legacy converters." msgstr "" +"Dans le futur, on pourrait avoir une nouvelle bibliothèque d'analyse des " +"arguments qui ne serait pas limitée à ce que :c:func:`PyArg_ParseTuple` " +"accepte ; cette flexibilité ne serait pas accessible aux paramètres " +"utilisant des adaptateurs de base." #: howto/clinic.rst:747 msgid "" "Therefore, if you don't mind a little extra effort, please use the normal " "converters instead of legacy converters." msgstr "" +"Ainsi, si vous n'êtes pas contre un petit effort supplémentaire, vous " +"devriez utiliser les adaptateurs normaux plutôt que ceux de base." #: howto/clinic.rst:750 msgid "" @@ -1120,44 +1208,59 @@ msgid "" "the function (all functions take their default values), you may omit the " "parentheses. Thus ``bool`` and ``bool()`` are exactly the same converters." msgstr "" +"En bref, la syntaxe des adaptateurs d'Argument Clinic ressemble à un appel " +"de fonction Python. Mais, s'il n'y a pas d'argument explicite à la fonction " +"(celle-ci utilisant ses valeurs par défaut), vous pouvez omettre les " +"parenthèses. Ainsi ``bool`` et ``bool()`` représentent le même adaptateur." #: howto/clinic.rst:756 msgid "" "All arguments to Argument Clinic converters are keyword-only. All Argument " "Clinic converters accept the following arguments:" msgstr "" +"Tous les arguments passés aux adaptateurs d'Argument Clinic sont nommés. " +"Tous les adaptateurs d'Argument Clinic acceptent les arguments suivants :" #: howto/clinic.rst:1252 msgid "``c_default``" -msgstr "" +msgstr "``c_default``" #: howto/clinic.rst:760 msgid "" "The default value for this parameter when defined in C. Specifically, this " -"will be the initializer for the variable declared in the \"parse function" -"\". See :ref:`the section on default values ` for how to " -"use this. Specified as a string." +"will be the initializer for the variable declared in the \"parse " +"function\". See :ref:`the section on default values ` for " +"how to use this. Specified as a string." msgstr "" +"La valeur par défaut de cet argument lorsqu'il est défini en C. Typiquement, " +"il servira à initialiser la variable déclarée dans la « fonction " +"d'analyse ». Voir la section relative aux :ref:`valeurs par défaut " +"` pour apprendre à l'utiliser. Spécifié en tant que chaîne " +"de caractères." #: howto/clinic.rst:769 msgid "``annotation``" -msgstr "" +msgstr "``annotation``" #: howto/clinic.rst:767 msgid "" "The annotation value for this parameter. Not currently supported, because :" "pep:`8` mandates that the Python library may not use annotations." msgstr "" +"La valeur annotée pour ce paramètre. Actuellement non géré, car la :pep:`8` " +"exige que les bibliothèques Python n'utilisent pas d'annotations." #: howto/clinic.rst:771 msgid "" "In addition, some converters accept additional arguments. Here is a list of " "these arguments, along with their meanings:" msgstr "" +"De plus, certains adaptateurs acceptent des arguments additionnels. Voici la " +"liste de ces arguments, avec leur explication :" #: howto/clinic.rst:780 msgid "``accept``" -msgstr "" +msgstr "``accept``" #: howto/clinic.rst:775 msgid "" @@ -1166,14 +1269,18 @@ msgid "" "purpose facility; as a rule it only supports specific lists of types as " "shown in the legacy converter table.)" msgstr "" +"Un ensemble de types Python (et potentiellement des pseudo-types) ; cela " +"restreint l'argument Python autorisé aux valeurs de ces types (ce n'est pas " +"destiné à une utilisation généralisée ; en fait, il gère seulement les types " +"listés dans la table des adaptateurs de base)." #: howto/clinic.rst:780 msgid "To accept ``None``, add ``NoneType`` to this set." -msgstr "" +msgstr "Pour accepter ``None``, ajouter ``NoneType`` à cet ensemble." #: howto/clinic.rst:785 msgid "``bitwise``" -msgstr "" +msgstr "``bitwise``" #: howto/clinic.rst:783 msgid "" @@ -1181,10 +1288,13 @@ msgid "" "Python argument will be written to the parameter without any range checking, " "even for negative values." msgstr "" +"Autorisé seulement pour les entiers non signés. La valeur native de cet " +"argument Python sera transcrite dans le paramètre sans aucune vérification " +"de plage, même pour des valeurs négatives." #: howto/clinic.rst:1266 msgid "``converter``" -msgstr "" +msgstr "``converter``" #: howto/clinic.rst:788 msgid "" @@ -1192,6 +1302,9 @@ msgid "" "\"converter function\" ` to use to convert this object to a " "native type." msgstr "" +"Autorisé seulement pour l'adaptateur ``object``. Spécifie le nom d'une :ref:" +"`« fonction de conversion » depuis C ` à utiliser pour " +"convertir cet objet en type natif." #: howto/clinic.rst:795 msgid "``encoding``" @@ -1202,16 +1315,21 @@ msgid "" "Only supported for strings. Specifies the encoding to use when converting " "this string from a Python str (Unicode) value into a C ``char *`` value." msgstr "" +"Autorisé seulement pour les chaînes de caractères. Spécifie l'encodage à " +"utiliser lors de la conversion de cette chaîne depuis une valeur de type " +"Python ``str`` (Unicode) en valeur C ``char *``." #: howto/clinic.rst:799 msgid "``subclass_of``" -msgstr "" +msgstr "``subclass_of``" #: howto/clinic.rst:798 msgid "" "Only supported for the ``object`` converter. Requires that the Python value " "be a subclass of a Python type, as expressed in C." msgstr "" +"Autorisé seulement pour l'adaptateur ``object``. Nécessite que la valeur " +"Python soit une sous-classe d'un type Python, telle qu'exprimée en C." #: howto/clinic.rst:1238 msgid "``type``" @@ -1220,13 +1338,16 @@ msgstr "``type``" #: howto/clinic.rst:802 msgid "" "Only supported for the ``object`` and ``self`` converters. Specifies the C " -"type that will be used to declare the variable. Default value is ``" -"\"PyObject *\"``." +"type that will be used to declare the variable. Default value is " +"``\"PyObject *\"``." msgstr "" +"Autorisé seulement pour les adaptateurs ``object`` et ``self``. Spécifie le " +"type C qui sera utilisé pour déclarer la variable. La valeur par défaut est " +"``\"PyObject *\"``." #: howto/clinic.rst:810 msgid "``zeroes``" -msgstr "" +msgstr "``zeroes``" #: howto/clinic.rst:807 msgid "" @@ -1235,6 +1356,10 @@ msgid "" "the impl function, just after the string parameter, as a parameter named " "``_length``." msgstr "" +"Autorisé seulement pour les chaînes de caractères. Si vrai, les octets NUL " +"(``'\\\\0'``) sont permis au sein de la valeur. La taille de la chaîne sera " +"passée à la fonction ``impl``, juste après le paramètre chaîne, en tant que " +"paramètre nommé ``_length``." #: howto/clinic.rst:812 msgid "" @@ -1246,6 +1371,14 @@ msgid "" "any existing format unit. So Argument Clinic doesn't support it. (Or, at " "least, not yet.)" msgstr "" +"Attention de bien noter que toutes les combinaisons d'arguments ne " +"fonctionnent pas. Normalement, ces arguments sont mis en place via des " +"*formats* ``PyArg_ParseTuple`` au comportement spécifique. Par exemple, à " +"l'heure actuelle vous ne pouvez pas appeler ``unsigned_short`` sans " +"spécifier également ``bitwise=True``. Bien qu'il soit parfaitement " +"raisonnable de penser que ça puisse fonctionner, cette écriture ne " +"correspond à aucun format. Donc Argument Clinic ne le gère pas (en tous cas, " +"pas pour le moment)." #: howto/clinic.rst:820 msgid "" @@ -1253,6 +1386,9 @@ msgid "" "Clinic converters. On the left is the legacy converter, on the right is the " "text you'd replace it with." msgstr "" +"Vous pouvez voir, ci-dessous, une table présentant la correspondance entre " +"les adaptateurs de base et ceux d'Argument Clinic. À gauche, sont listés les " +"adaptateurs de base et, à droite, le texte qui les remplace." #: howto/clinic.rst:825 msgid "``'B'``" @@ -1260,7 +1396,7 @@ msgstr "``'B'``" #: howto/clinic.rst:825 msgid "``unsigned_char(bitwise=True)``" -msgstr "" +msgstr "``unsigned_char(bitwise=True)``" #: howto/clinic.rst:826 msgid "``'b'``" @@ -1268,7 +1404,7 @@ msgstr "``'b'``" #: howto/clinic.rst:826 msgid "``unsigned_char``" -msgstr "" +msgstr "``unsigned_char``" #: howto/clinic.rst:827 msgid "``'c'``" @@ -1276,15 +1412,15 @@ msgstr "``'c'``" #: howto/clinic.rst:827 msgid "``char``" -msgstr "" +msgstr "``char``" #: howto/clinic.rst:828 msgid "``'C'``" -msgstr "" +msgstr "``'C'``" #: howto/clinic.rst:828 msgid "``int(accept={str})``" -msgstr "" +msgstr "``int(accept={str})``" #: howto/clinic.rst:829 msgid "``'d'``" @@ -1292,7 +1428,7 @@ msgstr "``'d'``" #: howto/clinic.rst:829 msgid "``double``" -msgstr "" +msgstr "``double``" #: howto/clinic.rst:830 msgid "``'D'``" @@ -1300,41 +1436,43 @@ msgstr "``'D'``" #: howto/clinic.rst:830 msgid "``Py_complex``" -msgstr "" +msgstr "``Py_complex``" #: howto/clinic.rst:831 msgid "``'es'``" -msgstr "" +msgstr "``'es'``" #: howto/clinic.rst:831 msgid "``str(encoding='name_of_encoding')``" -msgstr "" +msgstr "``str(encoding='name_of_encoding')``" #: howto/clinic.rst:832 msgid "``'es#'``" -msgstr "" +msgstr "``'es#'``" #: howto/clinic.rst:832 msgid "``str(encoding='name_of_encoding', zeroes=True)``" -msgstr "" +msgstr "``str(encoding='name_of_encoding', zeroes=True)``" #: howto/clinic.rst:833 msgid "``'et'``" -msgstr "" +msgstr "``'et'``" #: howto/clinic.rst:833 msgid "``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``" -msgstr "" +msgstr "``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``" #: howto/clinic.rst:834 msgid "``'et#'``" -msgstr "" +msgstr "``'et#'``" #: howto/clinic.rst:834 msgid "" "``str(encoding='name_of_encoding', accept={bytes, bytearray, str}, " "zeroes=True)``" msgstr "" +"``str(encoding='name_of_encoding', accept={bytes, bytearray, str}, " +"zeroes=True)``" #: howto/clinic.rst:835 msgid "``'f'``" @@ -1342,7 +1480,7 @@ msgstr "``'f'``" #: howto/clinic.rst:835 msgid "``float``" -msgstr "" +msgstr "``float``" #: howto/clinic.rst:836 msgid "``'h'``" @@ -1350,7 +1488,7 @@ msgstr "``'h'``" #: howto/clinic.rst:836 msgid "``short``" -msgstr "" +msgstr "``short``" #: howto/clinic.rst:837 msgid "``'H'``" @@ -1358,7 +1496,7 @@ msgstr "``'H'``" #: howto/clinic.rst:837 msgid "``unsigned_short(bitwise=True)``" -msgstr "" +msgstr "``unsigned_short(bitwise=True)``" #: howto/clinic.rst:838 msgid "``'i'``" @@ -1374,23 +1512,23 @@ msgstr "``'I'``" #: howto/clinic.rst:839 msgid "``unsigned_int(bitwise=True)``" -msgstr "" +msgstr "``unsigned_int(bitwise=True)``" #: howto/clinic.rst:840 msgid "``'k'``" -msgstr "" +msgstr "``'k'``" #: howto/clinic.rst:840 msgid "``unsigned_long(bitwise=True)``" -msgstr "" +msgstr "``unsigned_long(bitwise=True)``" #: howto/clinic.rst:841 msgid "``'K'``" -msgstr "" +msgstr "``'K'``" #: howto/clinic.rst:841 msgid "``unsigned_long_long(bitwise=True)``" -msgstr "" +msgstr "``unsigned_long_long(bitwise=True)``" #: howto/clinic.rst:842 msgid "``'l'``" @@ -1406,7 +1544,7 @@ msgstr "``'L'``" #: howto/clinic.rst:843 msgid "``long long``" -msgstr "" +msgstr "``long long``" #: howto/clinic.rst:844 msgid "``'n'``" @@ -1414,39 +1552,39 @@ msgstr "``'n'``" #: howto/clinic.rst:844 msgid "``Py_ssize_t``" -msgstr "" +msgstr "``Py_ssize_t``" #: howto/clinic.rst:845 msgid "``'O'``" -msgstr "" +msgstr "``'O'``" #: howto/clinic.rst:845 msgid "``object``" -msgstr "" +msgstr "``object``" #: howto/clinic.rst:846 msgid "``'O!'``" -msgstr "" +msgstr "``'O!'``" #: howto/clinic.rst:846 msgid "``object(subclass_of='&PySomething_Type')``" -msgstr "" +msgstr "``object(subclass_of='&PySomething_Type')``" #: howto/clinic.rst:847 msgid "``'O&'``" -msgstr "" +msgstr "``'O&'``" #: howto/clinic.rst:847 msgid "``object(converter='name_of_c_function')``" -msgstr "" +msgstr "``object(converter='name_of_c_function')``" #: howto/clinic.rst:848 msgid "``'p'``" -msgstr "" +msgstr "``'p'``" #: howto/clinic.rst:848 msgid "``bool``" -msgstr "" +msgstr "``bool``" #: howto/clinic.rst:849 msgid "``'S'``" @@ -1454,7 +1592,7 @@ msgstr "``'S'``" #: howto/clinic.rst:849 msgid "``PyBytesObject``" -msgstr "" +msgstr "``PyBytesObject``" #: howto/clinic.rst:850 msgid "``'s'``" @@ -1462,23 +1600,23 @@ msgstr "``'s'``" #: howto/clinic.rst:850 msgid "``str``" -msgstr "" +msgstr "``str``" #: howto/clinic.rst:851 msgid "``'s#'``" -msgstr "" +msgstr "``'s#'``" #: howto/clinic.rst:851 msgid "``str(zeroes=True)``" -msgstr "" +msgstr "``str(zeroes=True)``" #: howto/clinic.rst:852 msgid "``'s*'``" -msgstr "" +msgstr "``'s*'``" #: howto/clinic.rst:852 msgid "``Py_buffer(accept={buffer, str})``" -msgstr "" +msgstr "``Py_buffer(accept={buffer, str})``" #: howto/clinic.rst:853 msgid "``'U'``" @@ -1486,7 +1624,7 @@ msgstr "``'U'``" #: howto/clinic.rst:853 msgid "``unicode``" -msgstr "" +msgstr "``unicode``" #: howto/clinic.rst:854 msgid "``'u'``" @@ -1494,101 +1632,103 @@ msgstr "``'u'``" #: howto/clinic.rst:854 msgid "``Py_UNICODE``" -msgstr "" +msgstr "``Py_UNICODE``" #: howto/clinic.rst:855 msgid "``'u#'``" -msgstr "" +msgstr "``'u#'``" #: howto/clinic.rst:855 msgid "``Py_UNICODE(zeroes=True)``" -msgstr "" +msgstr "``Py_UNICODE(zeroes=True)``" #: howto/clinic.rst:856 msgid "``'w*'``" -msgstr "" +msgstr "``'w*'``" #: howto/clinic.rst:856 msgid "``Py_buffer(accept={rwbuffer})``" -msgstr "" +msgstr "``Py_buffer(accept={rwbuffer})``" #: howto/clinic.rst:857 msgid "``'Y'``" -msgstr "" +msgstr "``'Y'``" #: howto/clinic.rst:857 msgid "``PyByteArrayObject``" -msgstr "" +msgstr "``PyByteArrayObject``" #: howto/clinic.rst:858 msgid "``'y'``" -msgstr "" +msgstr "``'y'``" #: howto/clinic.rst:858 msgid "``str(accept={bytes})``" -msgstr "" +msgstr "``str(accept={bytes})``" #: howto/clinic.rst:859 msgid "``'y#'``" -msgstr "" +msgstr "``'y#'``" #: howto/clinic.rst:859 msgid "``str(accept={robuffer}, zeroes=True)``" -msgstr "" +msgstr "``str(accept={robuffer}, zeroes=True)``" #: howto/clinic.rst:860 msgid "``'y*'``" -msgstr "" +msgstr "``'y*'``" #: howto/clinic.rst:860 msgid "``Py_buffer``" -msgstr "" +msgstr "``Py_buffer``" #: howto/clinic.rst:861 msgid "``'Z'``" -msgstr "" +msgstr "``'Z'``" #: howto/clinic.rst:861 msgid "``Py_UNICODE(accept={str, NoneType})``" -msgstr "" +msgstr "``Py_UNICODE(accept={str, NoneType})``" #: howto/clinic.rst:862 msgid "``'Z#'``" -msgstr "" +msgstr "``'Z#'``" #: howto/clinic.rst:862 msgid "``Py_UNICODE(accept={str, NoneType}, zeroes=True)``" -msgstr "" +msgstr "``Py_UNICODE(accept={str, NoneType}, zeroes=True)``" #: howto/clinic.rst:863 msgid "``'z'``" -msgstr "" +msgstr "``'z'``" #: howto/clinic.rst:863 msgid "``str(accept={str, NoneType})``" -msgstr "" +msgstr "``str(accept={str, NoneType})``" #: howto/clinic.rst:864 msgid "``'z#'``" -msgstr "" +msgstr "``'z#'``" #: howto/clinic.rst:864 msgid "``str(accept={str, NoneType}, zeroes=True)``" -msgstr "" +msgstr "``str(accept={str, NoneType}, zeroes=True)``" #: howto/clinic.rst:865 msgid "``'z*'``" -msgstr "" +msgstr "``'z*'``" #: howto/clinic.rst:865 msgid "``Py_buffer(accept={buffer, str, NoneType})``" -msgstr "" +msgstr "``Py_buffer(accept={buffer, str, NoneType})``" #: howto/clinic.rst:868 msgid "" "As an example, here's our sample ``pickle.Pickler.dump`` using the proper " "converter::" msgstr "" +"Par exemple, voici notre code ``pickle.Pickler.dump`` via l'adaptateur " +"approprié ::" #: howto/clinic.rst:881 msgid "" @@ -1598,6 +1738,11 @@ msgid "" "default behavior performs range checking on the value, and they won't accept " "negative numbers. You just can't do that with a legacy converter!" msgstr "" +"Un avantage des adaptateurs réels est qu'ils sont plus flexibles que les " +"adaptateurs de base. Par exemple, l'adaptateur ``unsigned_int`` (ainsi que " +"tous les adaptateurs ``unsigned_``) peut être utilisé sans ``bitwise=True``. " +"Leur comportement par défaut contrôle la valeur, et n'acceptera pas de " +"nombres négatifs. On ne peut pas faire ça avec les adaptateurs de base !" #: howto/clinic.rst:887 msgid "" @@ -1606,10 +1751,14 @@ msgid "" "default value for each parameter. Just run ``Tools/clinic/clinic.py --" "converters`` to see the full list." msgstr "" +"Argument Clinic sait lister tous les adaptateurs disponibles. Pour chaque " +"adaptateur, il vous liste également l'ensemble des paramètres qu'ils " +"acceptent, ainsi que les valeurs par défaut de chacun. Utilisez simplement " +"la commande ``Tools/clinic/clinic.py --converters`` pour afficher la liste." #: howto/clinic.rst:893 msgid "Py_buffer" -msgstr "" +msgstr "Py_buffer" #: howto/clinic.rst:895 msgid "" @@ -1618,16 +1767,23 @@ msgid "" "`PyBuffer_Release` on the provided buffer. Argument Clinic generates code " "that does it for you (in the parsing function)." msgstr "" +"Lorsque vous utilisez l'adaptateur ``Py_buffer`` (ou bien les adaptateurs de " +"base ``'s*'``, ``'w*'``, ``'*y'``, ou ``'z*'``), vous *ne devez pas* " +"appeler :c:func:`PyBuffer_Release` sur le tampon fourni. Argument Clinic " +"génère du code qui le fait pour vous (dans la fonction d'analyse)." #: howto/clinic.rst:903 msgid "Advanced converters" -msgstr "" +msgstr "Adaptateurs avancés" #: howto/clinic.rst:905 msgid "" "Remember those format units you skipped for your first time because they " "were advanced? Here's how to handle those too." msgstr "" +"Vous vous souvenez de ces spécifications de format que vous avez laissées de " +"côté la première fois parce qu'il s'agissait de notions avancées ? Voici " +"comment les utiliser." #: howto/clinic.rst:908 msgid "" @@ -1639,6 +1795,14 @@ msgid "" "``O&``), ``subclass_of`` (for ``O!``), or ``encoding`` (for all the format " "units that start with ``e``)." msgstr "" +"L'astuce est que toutes ces spécifications de format acceptent des arguments " +"— aussi bien des fonctions de conversion que des types, ou des chaînes " +"spécifiant un encodage. (mais les « adaptateurs de base » ne gèrent pas les " +"arguments. C'est pourquoi nous les avions laissés de côté pour votre " +"première fonction.) L'argument que vous aviez spécifié à la spécification de " +"format est désormais un argument du convertisseur ; cet argument est soit " +"``converter`` (pour ``O&``), ``subclass_of`` (pour ``O!``), ou ``encoding`` " +"(pour toutes les spécifications de format qui commencent par ``e``)." #: howto/clinic.rst:916 msgid "" @@ -1648,6 +1812,12 @@ msgid "" "is a subclass of ``PyUnicode_Type``, you probably want to use the converter " "``object(type='PyUnicodeObject *', subclass_of='&PyUnicode_Type')``." msgstr "" +"Lorsque vous utilisez ``subclass_of``, vous pouvez également vouloir " +"utiliser les autres arguments usuels pour ``object()`` : ``type``, qui vous " +"laisse spécifier le type à utiliser pour l'argument. Par exemple, si vous " +"voulez vous assurer que l'objet est une sous-classe de ``PyUnicode_Type``, " +"vous utiliserez probablement le convertisseur ``object(type='PyUnicodeObject " +"*', subclass_of='&PyUnicode_Type')``." #: howto/clinic.rst:922 msgid "" @@ -1661,30 +1831,46 @@ msgid "" "unreasonable; CPython itself always passes in static hard-coded encoding " "strings for parameters whose format units start with ``e``." msgstr "" +"Mentionnons un problème potentiel d'utiliser *Argument Clinic* : cela retire " +"la flexibilité des spécifications de format commençant par ``e``. Lorsque " +"vous faites un appel à ``PyArg_Parse`` à la main, vous pourriez " +"théoriquement décider quelle chaîne d'encodage passer à :c:func:" +"`PyArg_ParseTuple`. Mais désormais cette chaîne doit être codée en dur au " +"moment du pré-processus d'Argument-Clinic. Cette limitation est délibérée ; " +"elle permet une gestion plus simple de cette spécification de format, et " +"peut permettre de futures optimisations. Cette restriction ne semble pas " +"déraisonnable ; CPython lui-même utilise toujours des chaînes d'encodage en " +"dur pour les paramètres dont les spécifications de format commencent par " +"``e``." #: howto/clinic.rst:935 msgid "Parameter default values" -msgstr "" +msgstr "Valeurs par défaut des paramètres" #: howto/clinic.rst:937 msgid "" "Default values for parameters can be any of a number of values. At their " "simplest, they can be string, int, or float literals:" msgstr "" +"Les valeurs par défaut des paramètres peuvent être n'importe quelle valeur. " +"Au plus simple, ce sont des chaînes, des entiers ou des nombres flottants :" #: howto/clinic.rst:946 msgid "They can also use any of Python's built-in constants:" msgstr "" +"Vous pouvez également utiliser n'importe quelle constante native de Python :" #: howto/clinic.rst:954 msgid "" "There's also special support for a default value of ``NULL``, and for simple " "expressions, documented in the following sections." msgstr "" +"La valeur ``NULL`` est également acceptée, ainsi que des expressions " +"simples, comme expliqué dans les sections suivantes." #: howto/clinic.rst:959 msgid "The ``NULL`` default value" -msgstr "" +msgstr "La valeur par défaut ``NULL``" #: howto/clinic.rst:961 msgid "" @@ -1695,10 +1881,16 @@ msgid "" "behaves like a default value of ``None``, but the C variable is initialized " "with ``NULL``." msgstr "" +"Pour les paramètres chaînes et objets, vous pouvez les positionner à " +"``None`` pour indiquer qu'il n'y a pas de valeur par défaut. Pour autant, " +"cela signifie que la variable C sera initialisée à ``Py_None``. Par " +"commodité, il existe une valeur spécifique appelée ``NULL`` juste pour cette " +"raison : du point de vue de Python, cette valeur se comporte comme la valeur " +"par défaut ``None``, mais la variable C est initialisée à ``NULL``." #: howto/clinic.rst:969 msgid "Expressions specified as default values" -msgstr "" +msgstr "Expressions spécifiées comme valeurs par défaut" #: howto/clinic.rst:971 msgid "" @@ -1707,6 +1899,10 @@ msgid "" "on objects. However, this support isn't exactly simple, because of some non-" "obvious semantics." msgstr "" +"La valeur par défaut d'un paramètre peut être plus qu'une simple valeur " +"littérale. Il peut s'agir d'une expression, utilisant des opérateurs " +"mathématiques et des attributs d'objets. Cependant, cette possibilité n'est " +"pas aussi simple, notamment à cause de sémantiques peu évidentes." #: howto/clinic.rst:976 msgid "Consider the following example:" @@ -1761,11 +1957,11 @@ msgstr "" #: howto/clinic.rst:1018 msgid "Function calls." -msgstr "" +msgstr "des appels de fonction." #: howto/clinic.rst:1019 msgid "Inline if statements (``3 if foo else 5``)." -msgstr "" +msgstr "des instructions *if* en ligne (``3 if foo else 5``) ;" #: howto/clinic.rst:1020 msgid "Automatic sequence unpacking (``*[1, 2, 3]``)." @@ -1944,8 +2140,8 @@ msgstr "" #: howto/clinic.rst:1143 msgid "" "All the code inside the Python block is executed at the time it's parsed. " -"All text written to stdout inside the block is redirected into the \"output" -"\" after the block." +"All text written to stdout inside the block is redirected into the " +"\"output\" after the block." msgstr "" #: howto/clinic.rst:1147 @@ -2108,9 +2304,9 @@ msgstr "" #: howto/clinic.rst:1290 msgid "" "This block adds a converter to Argument Clinic named ``ssize_t``. " -"Parameters declared as ``ssize_t`` will be declared as type ``Py_ssize_t``, " -"and will be parsed by the ``'O&'`` format unit, which will call the " -"``ssize_t_converter`` converter function. ``ssize_t`` variables " +"Parameters declared as ``ssize_t`` will be declared as type :c:type:" +"`Py_ssize_t`, and will be parsed by the ``'O&'`` format unit, which will " +"call the ``ssize_t_converter`` converter function. ``ssize_t`` variables " "automatically support default values." msgstr "" @@ -2251,9 +2447,9 @@ msgid "" "of statement the field is. Field names that end in ``\"_prototype\"`` " "represent forward declarations of that thing, without the actual body/data " "of the thing; field names that end in ``\"_definition\"`` represent the " -"actual definition of the thing, with the body/data of the thing. (``" -"\"methoddef\"`` is special, it's the only one that ends with ``\"_define" -"\"``, representing that it's a preprocessor #define.)" +"actual definition of the thing, with the body/data of the thing. " +"(``\"methoddef\"`` is special, it's the only one that ends with " +"``\"_define\"``, representing that it's a preprocessor #define.)" msgstr "" #: howto/clinic.rst:1437 diff --git a/howto/cporting.po b/howto/cporting.po index fbbfff18e4..071aec715a 100644 --- a/howto/cporting.po +++ b/howto/cporting.po @@ -5,8 +5,8 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2019-12-13 14:14+0100\n" -"Last-Translator: Andy Kwok \n" +"PO-Revision-Date: 2021-04-27 15:29+0200\n" +"Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -23,6 +23,8 @@ msgid "" "We recommend the following resources for porting extension modules to Python " "3:" msgstr "" +"Nous recommandons les ressources suivantes pour migrer les modules " +"d'extensions vers Python 3 :" #: howto/cporting.rst:11 msgid "" @@ -30,12 +32,17 @@ msgid "" "guide*, a book on moving from Python 2 to Python 3 in general, guides the " "reader through porting an extension module." msgstr "" +"Le chapitre `Migrating C extension`_ du livre *Supporting Python 3: An in-" +"depth guide* (un livre sur le portage de Python 2 à Python 3) guide le " +"lecteur souhaitant porter un module d'extension." #: howto/cporting.rst:15 msgid "" "The `Porting guide`_ from the *py3c* project provides opinionated " "suggestions with supporting code." msgstr "" +"Le `Porting guide`_ du projet *py3c* fournit des suggestions argumentées " +"avec le code correspondant." #: howto/cporting.rst:17 msgid "" @@ -44,3 +51,7 @@ msgid "" "library then handles differences between various Python versions and " "implementations." msgstr "" +"Les bibliothèques `Cython`_ et `CFFI`_ fournissent des abstractions de l'API " +"C de Python. Les extensions ont généralement besoin d'être réécrites pour " +"profiter de ces bibliothèques, mais elles prennent en charge les différences " +"entre versions et implémentations de Python." diff --git a/howto/curses.po b/howto/curses.po index d52a828860..f71a97ce19 100644 --- a/howto/curses.po +++ b/howto/curses.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-09-04 23:34+0200\n" "Last-Translator: Khaïs COLIN \n" "Language-Team: FRENCH \n" @@ -139,23 +139,17 @@ msgstr "" msgid "" "The Windows version of Python doesn't include the :mod:`curses` module. A " "ported version called `UniCurses `_ is " -"available. You could also try `the Console module `_ written by Fredrik Lundh, which doesn't use the same " -"API as curses but provides cursor-addressable text output and full support " -"for mouse and keyboard input." +"available." msgstr "" "La version Windows de Python n'inclut pas le module :mod:`curses`. Une " "version portée appelée `UniCurses `_ est " -"disponible. Vous pouvez également essayer le `Windows console driver `_ écrit par Fredrik Lundh, qui n'utilise " -"pas la même API que *curses*, mais fournit une sortie texte avec gestion du " -"curseur et une prise en charge complète de la souris et du clavier." +"disponible." -#: howto/curses.rst:66 +#: howto/curses.rst:62 msgid "The Python curses module" msgstr "Le module *curses* de Python" -#: howto/curses.rst:68 +#: howto/curses.rst:64 msgid "" "The Python module is a fairly simple wrapper over the C functions provided " "by curses; if you're already familiar with curses programming in C, it's " @@ -173,7 +167,7 @@ msgstr "" "`mvaddstr` et :c:func:`mvwaddstr` en une seule méthode :meth:`~curses.window." "addstr`. Nous voyons cela plus en détail ci-après." -#: howto/curses.rst:76 +#: howto/curses.rst:72 msgid "" "This HOWTO is an introduction to writing text-mode programs with curses and " "Python. It doesn't attempt to be a complete guide to the curses API; for " @@ -186,11 +180,11 @@ msgstr "" "Python sur *ncurses* et les pages du manuel C pour *ncurses*. Il vous donne " "cependant les idées de base." -#: howto/curses.rst:83 +#: howto/curses.rst:79 msgid "Starting and ending a curses application" msgstr "Lancement et arrêt une application *curses*" -#: howto/curses.rst:85 +#: howto/curses.rst:81 msgid "" "Before doing anything, curses must be initialized. This is done by calling " "the :func:`~curses.initscr` function, which will determine the terminal " @@ -206,7 +200,7 @@ msgstr "" "renvoie un objet fenêtre représentant l'écran entier ; il est généralement " "appelé ``stdscr`` d'après le nom de la variable C correspondante. ::" -#: howto/curses.rst:96 +#: howto/curses.rst:92 msgid "" "Usually curses applications turn off automatic echoing of keys to the " "screen, in order to be able to read keys and only display them under certain " @@ -217,7 +211,7 @@ msgstr "" "dans certaines circonstances. Cela nécessite d'appeler la fonction :func:" "`~curses.noecho`. ::" -#: howto/curses.rst:103 +#: howto/curses.rst:99 msgid "" "Applications will also commonly need to react to keys instantly, without " "requiring the Enter key to be pressed; this is called cbreak mode, as " @@ -228,7 +222,7 @@ msgstr "" "qu'on appelle le mode *cbreak*, par opposition au mode d'entrée habituel " "avec un tampon. ::" -#: howto/curses.rst:109 +#: howto/curses.rst:105 msgid "" "Terminals usually return special keys, such as the cursor keys or navigation " "keys such as Page Up and Home, as a multibyte escape sequence. While you " @@ -245,7 +239,7 @@ msgstr "" "renvoyant une valeur spéciale telle que :const:`curses.KEY_LEFT`. Pour que " "*curses* fasse le travail, vous devez activer le mode *keypad*. ::" -#: howto/curses.rst:118 +#: howto/curses.rst:114 msgid "" "Terminating a curses application is much easier than starting one. You'll " "need to call::" @@ -253,7 +247,7 @@ msgstr "" "Arrêter une application *curses* est beaucoup plus facile que d'en démarrer " "une. Appelez ::" -#: howto/curses.rst:125 +#: howto/curses.rst:121 msgid "" "to reverse the curses-friendly terminal settings. Then call the :func:" "`~curses.endwin` function to restore the terminal to its original operating " @@ -263,7 +257,7 @@ msgstr "" "appelez la fonction :func:`~curses.enddwin` pour restaurer le terminal dans " "son mode de fonctionnement original. ::" -#: howto/curses.rst:131 +#: howto/curses.rst:127 msgid "" "A common problem when debugging a curses application is to get your terminal " "messed up when the application dies without restoring the terminal to its " @@ -279,7 +273,7 @@ msgstr "" "exemple, ce qui rend l'utilisation de l'interface de commande du *shell* " "difficile." -#: howto/curses.rst:137 +#: howto/curses.rst:133 msgid "" "In Python you can avoid these complications and make debugging much easier " "by importing the :func:`curses.wrapper` function and using it like this::" @@ -287,7 +281,7 @@ msgstr "" "En Python, vous pouvez éviter ces complications et faciliter le débogage en " "important la fonction :func:`curses.wrapper` et en l'utilisant comme suit ::" -#: howto/curses.rst:156 +#: howto/curses.rst:152 msgid "" "The :func:`~curses.wrapper` function takes a callable object and does the " "initializations described above, also initializing colors if color support " @@ -309,11 +303,11 @@ msgstr "" "pas dans un drôle d'état au moment de l'exception et vous pourrez lire le " "message de l'exception et la trace de la pile d'appels." -#: howto/curses.rst:168 +#: howto/curses.rst:164 msgid "Windows and Pads" msgstr "Fenêtres et tampons (*pads* en anglais)" -#: howto/curses.rst:170 +#: howto/curses.rst:166 msgid "" "Windows are the basic abstraction in curses. A window object represents a " "rectangular area of the screen, and supports methods to display text, erase " @@ -324,7 +318,7 @@ msgstr "" "afficher du texte, l'effacer, permettre à l'utilisateur de saisir des " "chaînes, etc." -#: howto/curses.rst:174 +#: howto/curses.rst:170 msgid "" "The ``stdscr`` object returned by the :func:`~curses.initscr` function is a " "window object that covers the entire screen. Many programs may need only " @@ -340,7 +334,7 @@ msgstr "" "séparément. La fonction :func:`~curses.newwin` crée une nouvelle fenêtre " "d'une taille donnée, renvoyant le nouvel objet fenêtre. ::" -#: howto/curses.rst:185 +#: howto/curses.rst:181 msgid "" "Note that the coordinate system used in curses is unusual. Coordinates are " "always passed in the order *y,x*, and the top-left corner of a window is " @@ -357,7 +351,7 @@ msgstr "" "applications informatiques, mais elle fait partie de *curses* depuis qu'il a " "été écrit et il est trop tard pour changer les choses maintenant." -#: howto/curses.rst:193 +#: howto/curses.rst:189 msgid "" "Your application can determine the size of the screen by using the :data:" "`curses.LINES` and :data:`curses.COLS` variables to obtain the *y* and *x* " @@ -369,7 +363,7 @@ msgstr "" "tailles *y* et *x*. Les coordonnées licites s'étendent alors de ``(0,0)`` à " "``(curses.LINES - 1, curses.COLS - 1)``." -#: howto/curses.rst:198 +#: howto/curses.rst:194 msgid "" "When you call a method to display or erase text, the effect doesn't " "immediately show up on the display. Instead you must call the :meth:" @@ -379,7 +373,7 @@ msgstr "" "l'affichage ne le reflète pas immédiatement. Vous devez appeler la méthode :" "meth:`~curses.window.refresh` des objets fenêtre pour mettre à jour l'écran." -#: howto/curses.rst:203 +#: howto/curses.rst:199 msgid "" "This is because curses was originally written with slow 300-baud terminal " "connections in mind; with these terminals, minimizing the time required to " @@ -398,7 +392,7 @@ msgstr "" "fenêtre, il n'est pas nécessaire de l'afficher puisqu'il ne sera jamais " "visible." -#: howto/curses.rst:212 +#: howto/curses.rst:208 msgid "" "In practice, explicitly telling curses to redraw a window doesn't really " "complicate programming with curses much. Most programs go into a flurry of " @@ -416,7 +410,7 @@ msgstr "" "appelant d'abord ``stdscr.refresh()`` ou la méthode :meth:`refresh` de la " "fenêtre adéquate." -#: howto/curses.rst:220 +#: howto/curses.rst:216 msgid "" "A pad is a special case of a window; it can be larger than the actual " "display screen, and only a portion of the pad displayed at a time. Creating " @@ -431,7 +425,7 @@ msgstr "" "devez fournir les coordonnées de la zone de l'écran où une partie du tampon " "sera affichée." -#: howto/curses.rst:241 +#: howto/curses.rst:237 msgid "" "The :meth:`refresh` call displays a section of the pad in the rectangle " "extending from coordinate (5,5) to coordinate (20,75) on the screen; the " @@ -445,7 +439,7 @@ msgstr "" "tampon. À part cette différence, les tampons sont exactement comme les " "fenêtres ordinaires et gèrent les mêmes méthodes." -#: howto/curses.rst:247 +#: howto/curses.rst:243 msgid "" "If you have multiple windows and pads on screen there is a more efficient " "way to update the screen and prevent annoying screen flicker as each part of " @@ -455,7 +449,7 @@ msgstr "" "plus efficace pour rafraîchir l'écran et éviter des scintillements agaçants " "à chaque mise à jour. :meth:`refresh` effectue en fait deux choses :" -#: howto/curses.rst:252 +#: howto/curses.rst:248 msgid "" "Calls the :meth:`~curses.window.noutrefresh` method of each window to update " "an underlying data structure representing the desired state of the screen." @@ -464,7 +458,7 @@ msgstr "" "pour mettre à jour les données sous-jacentes qui permettent d'obtenir " "l'affichage voulu ;" -#: howto/curses.rst:255 +#: howto/curses.rst:251 msgid "" "Calls the function :func:`~curses.doupdate` function to change the physical " "screen to match the desired state recorded in the data structure." @@ -472,7 +466,7 @@ msgstr "" "elle appelle la fonction :func:`~curses.doupdate` pour modifier l'écran " "physique afin de correspondre à l'état défini par les données sous-jacentes." -#: howto/curses.rst:258 +#: howto/curses.rst:254 msgid "" "Instead you can call :meth:`noutrefresh` on a number of windows to update " "the data structure, and then call :func:`doupdate` to update the screen." @@ -481,11 +475,11 @@ msgstr "" "voulez mettre à jour des données, puis :func:`doupdate` pour mettre à jour " "l'écran." -#: howto/curses.rst:264 +#: howto/curses.rst:260 msgid "Displaying Text" msgstr "Affichage de texte" -#: howto/curses.rst:266 +#: howto/curses.rst:262 msgid "" "From a C programmer's point of view, curses may sometimes look like a twisty " "maze of functions, all subtly different. For example, :c:func:`addstr` " @@ -504,7 +498,7 @@ msgstr "" "d'utiliser ``stdscr`` par défaut. :c:func:`mvwaddstr` permet de spécifier à " "la fois les coordonnées et la fenêtre." -#: howto/curses.rst:275 +#: howto/curses.rst:271 msgid "" "Fortunately the Python interface hides all these details. ``stdscr`` is a " "window object like any other, and methods such as :meth:`~curses.window." @@ -516,27 +510,27 @@ msgstr "" "window.addstr` acceptent leurs arguments sous de multiples formes, " "habituellement quatre." -#: howto/curses.rst:281 +#: howto/curses.rst:277 msgid "Form" msgstr "Forme" -#: howto/curses.rst:350 +#: howto/curses.rst:346 msgid "Description" msgstr "Description" -#: howto/curses.rst:283 +#: howto/curses.rst:279 msgid "*str* or *ch*" msgstr "*str* ou *ch*" -#: howto/curses.rst:283 +#: howto/curses.rst:279 msgid "Display the string *str* or character *ch* at the current position" msgstr "Affiche la chaîne *str* ou le caractère *ch* à la position actuelle" -#: howto/curses.rst:286 +#: howto/curses.rst:282 msgid "*str* or *ch*, *attr*" msgstr "*str* ou *ch*, *attr*" -#: howto/curses.rst:286 +#: howto/curses.rst:282 msgid "" "Display the string *str* or character *ch*, using attribute *attr* at the " "current position" @@ -544,21 +538,21 @@ msgstr "" "Affiche la chaîne *str* ou le caractère *ch*, en utilisant l'attribut *attr* " "à la position actuelle" -#: howto/curses.rst:290 +#: howto/curses.rst:286 msgid "*y*, *x*, *str* or *ch*" msgstr "*y*, *x*, *str* ou *ch*" -#: howto/curses.rst:290 +#: howto/curses.rst:286 msgid "Move to position *y,x* within the window, and display *str* or *ch*" msgstr "" "Se déplace à la position *y,x* dans la fenêtre et affiche la chaîne *str* ou " "le caractère *ch*" -#: howto/curses.rst:293 +#: howto/curses.rst:289 msgid "*y*, *x*, *str* or *ch*, *attr*" msgstr "*y*, *x*, *str* ou *ch*, *attr*" -#: howto/curses.rst:293 +#: howto/curses.rst:289 msgid "" "Move to position *y,x* within the window, and display *str* or *ch*, using " "attribute *attr*" @@ -566,7 +560,7 @@ msgstr "" "Se déplace à la position *y,x* dans la fenêtre et affiche la chaîne *str* ou " "le caractère *ch* en utilisant l'attribut *attr*" -#: howto/curses.rst:297 +#: howto/curses.rst:293 msgid "" "Attributes allow displaying text in highlighted forms such as boldface, " "underline, reverse code, or in color. They'll be explained in more detail " @@ -576,7 +570,7 @@ msgstr "" "vidéo inversé ou en couleur. Nous les voyons plus en détail dans la section " "suivante." -#: howto/curses.rst:302 +#: howto/curses.rst:298 msgid "" "The :meth:`~curses.window.addstr` method takes a Python string or bytestring " "as the value to be displayed. The contents of bytestrings are sent to the " @@ -591,7 +585,7 @@ msgstr "" "l'encodage du système tel que renvoyé par :func:`locale." "getpreferredencoding`." -#: howto/curses.rst:309 +#: howto/curses.rst:305 msgid "" "The :meth:`~curses.window.addch` methods take a character, which can be " "either a string of length 1, a bytestring of length 1, or an integer." @@ -600,7 +594,7 @@ msgstr "" "la forme d'une chaîne de longueur 1, d'une chaîne d'octets de longueur 1 ou " "d'un entier." -#: howto/curses.rst:312 +#: howto/curses.rst:308 msgid "" "Constants are provided for extension characters; these constants are " "integers greater than 255. For example, :const:`ACS_PLMINUS` is a +/- " @@ -613,7 +607,7 @@ msgstr "" "haut et à gauche d'une boîte (utile pour dessiner des encadrements). Vous " "pouvez aussi utiliser les caractères Unicode adéquats." -#: howto/curses.rst:318 +#: howto/curses.rst:314 msgid "" "Windows remember where the cursor was left after the last operation, so if " "you leave out the *y,x* coordinates, the string or character will be " @@ -632,7 +626,7 @@ msgstr "" "l'utilisateur (il peut être déroutant d'avoir un curseur qui clignote à des " "endroits apparemment aléatoires)." -#: howto/curses.rst:326 +#: howto/curses.rst:322 msgid "" "If your application doesn't need a blinking cursor at all, you can call " "``curs_set(False)`` to make it invisible. For compatibility with older " @@ -649,11 +643,11 @@ msgstr "" "curseur clignotant et vous n'avez plus besoin de vous soucier de le laisser " "trainer à des endroits bizarres." -#: howto/curses.rst:335 +#: howto/curses.rst:331 msgid "Attributes and Color" msgstr "Attributs et couleurs" -#: howto/curses.rst:337 +#: howto/curses.rst:333 msgid "" "Characters can be displayed in different ways. Status lines in a text-based " "application are commonly shown in reverse video, or a text viewer may need " @@ -666,7 +660,7 @@ msgstr "" "À ces fins, *curses* vous permet de spécifier un attribut pour chaque " "caractère à l'écran." -#: howto/curses.rst:342 +#: howto/curses.rst:338 msgid "" "An attribute is an integer, each bit representing a different attribute. " "You can try to display text with multiple attribute bits set, but curses " @@ -683,59 +677,59 @@ msgstr "" "se cantonner aux attributs les plus communément utilisés, dont la liste est " "fournie ci-dessous." -#: howto/curses.rst:350 +#: howto/curses.rst:346 msgid "Attribute" msgstr "Attribut" -#: howto/curses.rst:352 +#: howto/curses.rst:348 msgid ":const:`A_BLINK`" msgstr ":const:`A_BLINK`" -#: howto/curses.rst:352 +#: howto/curses.rst:348 msgid "Blinking text" msgstr "Texte clignotant" -#: howto/curses.rst:354 +#: howto/curses.rst:350 msgid ":const:`A_BOLD`" msgstr ":const:`A_BOLD`" -#: howto/curses.rst:354 +#: howto/curses.rst:350 msgid "Extra bright or bold text" msgstr "Texte en surbrillance ou en gras" -#: howto/curses.rst:356 +#: howto/curses.rst:352 msgid ":const:`A_DIM`" msgstr ":const:`A_DIM`" -#: howto/curses.rst:356 +#: howto/curses.rst:352 msgid "Half bright text" msgstr "Texte en demi-ton" -#: howto/curses.rst:358 +#: howto/curses.rst:354 msgid ":const:`A_REVERSE`" msgstr ":const:`A_REVERSE`" -#: howto/curses.rst:358 +#: howto/curses.rst:354 msgid "Reverse-video text" msgstr "Texte en mode vidéo inversé" -#: howto/curses.rst:360 +#: howto/curses.rst:356 msgid ":const:`A_STANDOUT`" msgstr ":const:`A_STANDOUT`" -#: howto/curses.rst:360 +#: howto/curses.rst:356 msgid "The best highlighting mode available" msgstr "Le meilleur mode de mis en valeur pour le texte" -#: howto/curses.rst:362 +#: howto/curses.rst:358 msgid ":const:`A_UNDERLINE`" msgstr ":const:`A_UNDERLINE`" -#: howto/curses.rst:362 +#: howto/curses.rst:358 msgid "Underlined text" msgstr "Texte souligné" -#: howto/curses.rst:365 +#: howto/curses.rst:361 msgid "" "So, to display a reverse-video status line on the top line of the screen, " "you could code::" @@ -743,7 +737,7 @@ msgstr "" "Ainsi, pour mettre la ligne de statut située en haut de l'écran en mode " "vidéo inversé, vous pouvez coder ::" -#: howto/curses.rst:372 +#: howto/curses.rst:368 msgid "" "The curses library also supports color on those terminals that provide it. " "The most common such terminal is probably the Linux console, followed by " @@ -753,7 +747,7 @@ msgstr "" "compatibles. Le plus répandu de ces terminaux est sûrement la console Linux, " "suivie par *xterm* en couleurs." -#: howto/curses.rst:376 +#: howto/curses.rst:372 msgid "" "To use color, you must call the :func:`~curses.start_color` function soon " "after calling :func:`~curses.initscr`, to initialize the default color set " @@ -773,7 +767,7 @@ msgstr "" "*colour* ; si vous êtes habitué à l'orthographe britannique, vous devrez " "vous résigner à mal l'orthographier tant que vous utilisez *curses*)." -#: howto/curses.rst:386 +#: howto/curses.rst:382 msgid "" "The curses library maintains a finite number of color pairs, containing a " "foreground (or text) color and a background color. You can get the " @@ -790,13 +784,13 @@ msgstr "" "autres attributs tels que :const:`A_REVERSE`,mais là encore, de telles " "combinaisons risquent de ne pas fonctionner sur tous les terminaux." -#: howto/curses.rst:393 +#: howto/curses.rst:389 msgid "An example, which displays a line of text using color pair 1::" msgstr "" "Un exemple d'affichage d'une ligne de texte en utilisant la paire de couleur " "1 ::" -#: howto/curses.rst:398 +#: howto/curses.rst:394 msgid "" "As I said before, a color pair consists of a foreground and background " "color. The ``init_pair(n, f, b)`` function changes the definition of color " @@ -809,7 +803,7 @@ msgstr "" "texte à *f* et la couleur de fond à *b*. La paire de couleurs 0 est codée en " "dur à blanc sur noir et ne peut être modifiée." -#: howto/curses.rst:403 +#: howto/curses.rst:399 msgid "" "Colors are numbered, and :func:`start_color` initializes 8 basic colors when " "it activates color mode. They are: 0:black, 1:red, 2:green, 3:yellow, 4:" @@ -825,14 +819,14 @@ msgstr "" "chacune de ces couleurs : :const:`curses.COLOR_BLACK`, :const:`curses." "COLOR_RED` et ainsi de suite." -#: howto/curses.rst:409 +#: howto/curses.rst:405 msgid "" "Let's put all this together. To change color 1 to red text on a white " "background, you would call::" msgstr "" "Testons tout ça. Pour changer la couleur 1 à rouge sur fond blanc, appelez ::" -#: howto/curses.rst:414 +#: howto/curses.rst:410 msgid "" "When you change a color pair, any text already displayed using that color " "pair will change to the new colors. You can also display new text in this " @@ -842,7 +836,7 @@ msgstr "" "utilise cette paire de couleur voit les nouvelles couleurs s'appliquer à " "lui. Vous pouvez aussi afficher du nouveau texte dans cette couleur avec ::" -#: howto/curses.rst:420 +#: howto/curses.rst:416 msgid "" "Very fancy terminals can change the definitions of the actual colors to a " "given RGB value. This lets you change color 1, which is usually red, to " @@ -863,11 +857,11 @@ msgstr "" "chance d'avoir un terminal aussi perfectionné, consultez les pages du manuel " "de votre système pour obtenir plus d'informations." -#: howto/curses.rst:431 +#: howto/curses.rst:427 msgid "User Input" msgstr "Entrées de l'utilisateur" -#: howto/curses.rst:433 +#: howto/curses.rst:429 msgid "" "The C curses library offers only very simple input mechanisms. Python's :mod:" "`curses` module adds a basic text-input widget. (Other libraries such as " @@ -879,11 +873,11 @@ msgstr "" "d'entrée de texte (d'autres bibliothèques telles que `Urwid `_ ont un ensemble de *widgets* plus conséquent)." -#: howto/curses.rst:438 +#: howto/curses.rst:434 msgid "There are two methods for getting input from a window:" msgstr "Il y a deux méthodes pour obtenir des entrées dans une fenêtre :" -#: howto/curses.rst:440 +#: howto/curses.rst:436 msgid "" ":meth:`~curses.window.getch` refreshes the screen and then waits for the " "user to hit a key, displaying the key if :func:`~curses.echo` has been " @@ -895,7 +889,7 @@ msgstr "" "appelé auparavant. Vous pouvez en option spécifier des coordonnées où " "positionner le curseur avant la mise en pause ;" -#: howto/curses.rst:445 +#: howto/curses.rst:441 msgid "" ":meth:`~curses.window.getkey` does the same thing but converts the integer " "to a string. Individual characters are returned as 1-character strings, and " @@ -908,7 +902,7 @@ msgstr "" "renvoient des chaînes plus longues contenant le nom de la touche (tel que " "``KEY_UP`` ou ``^G``)." -#: howto/curses.rst:450 +#: howto/curses.rst:446 msgid "" "It's possible to not wait for the user using the :meth:`~curses.window." "nodelay` window method. After ``nodelay(True)``, :meth:`getch` and :meth:" @@ -929,7 +923,7 @@ msgstr "" "aucune entrée n'est disponible dans le délai spécifié (mesuré en dixièmes de " "seconde), *curses* lève une exception." -#: howto/curses.rst:460 +#: howto/curses.rst:456 msgid "" "The :meth:`getch` method returns an integer; if it's between 0 and 255, it " "represents the ASCII code of the key pressed. Values greater than 255 are " @@ -946,7 +940,7 @@ msgstr "" "La boucle principale de votre programme pourrait ressembler à quelque chose " "comme ::" -#: howto/curses.rst:476 +#: howto/curses.rst:472 msgid "" "The :mod:`curses.ascii` module supplies ASCII class membership functions " "that take either integer or 1-character string arguments; these may be " @@ -963,7 +957,7 @@ msgstr "" "type correspondant au nom de la fonction. Par exemple, :func:`curses.ascii." "ctrl` renvoie le caractère de contrôle correspondant à son paramètre." -#: howto/curses.rst:483 +#: howto/curses.rst:479 msgid "" "There's also a method to retrieve an entire string, :meth:`~curses.window." "getstr`. It isn't used very often, because its functionality is quite " @@ -977,7 +971,7 @@ msgstr "" "arrière et la touche Entrée, qui termine la chaîne. Elle peut, en option, " "être limitée à un nombre fixé de caractères. ::" -#: howto/curses.rst:494 +#: howto/curses.rst:490 msgid "" "The :mod:`curses.textpad` module supplies a text box that supports an Emacs-" "like set of keybindings. Various methods of the :class:`~curses.textpad." @@ -990,18 +984,18 @@ msgstr "" "des entrées et le regroupement de l'entrée avec ou sans les espaces de début " "et de fin. Par exemple ::" -#: howto/curses.rst:518 +#: howto/curses.rst:514 msgid "" "See the library documentation on :mod:`curses.textpad` for more details." msgstr "" "Consultez la documentation de la bibliothèque pour plus de détails sur :mod:" "`curses.textpad`." -#: howto/curses.rst:522 +#: howto/curses.rst:518 msgid "For More Information" msgstr "Pour aller plus loin" -#: howto/curses.rst:524 +#: howto/curses.rst:520 msgid "" "This HOWTO doesn't cover some advanced topics, such as reading the contents " "of the screen or capturing mouse events from an xterm instance, but the " @@ -1014,7 +1008,7 @@ msgstr "" "`curses` est maintenant suffisamment complète. Nous vous encourageons à la " "parcourir." -#: howto/curses.rst:529 +#: howto/curses.rst:525 msgid "" "If you're in doubt about the detailed behavior of the curses functions, " "consult the manual pages for your curses implementation, whether it's " @@ -1029,7 +1023,7 @@ msgstr "" "listes complètes des fonctions, attributs et codes :const:`ACS_\\*` des " "caractères disponibles." -#: howto/curses.rst:536 +#: howto/curses.rst:532 msgid "" "Because the curses API is so large, some functions aren't supported in the " "Python interface. Often this isn't because they're difficult to implement, " @@ -1047,7 +1041,7 @@ msgstr "" "du développeur Python `_ pour apprendre " "comment soumettre des améliorations à Python." -#: howto/curses.rst:544 +#: howto/curses.rst:540 msgid "" "`Writing Programs with NCURSES `_: a lengthy tutorial for C programmers." @@ -1056,18 +1050,18 @@ msgstr "" "intro.html>`_ : un long tutoriel pour les programmeurs C (ressource en " "anglais)." -#: howto/curses.rst:546 +#: howto/curses.rst:542 msgid "`The ncurses man page `_" msgstr "`La page de manuel ncurses `_" -#: howto/curses.rst:547 +#: howto/curses.rst:543 msgid "" "`The ncurses FAQ `_" msgstr "" "`La FAQ ncurses `_ " "(ressource en anglais)" -#: howto/curses.rst:548 +#: howto/curses.rst:544 msgid "" "`\"Use curses... don't swear\" `_: video of a PyCon 2013 talk on controlling terminals using " @@ -1077,7 +1071,7 @@ msgstr "" "v=eN1eZtjLEnU>`_ : vidéo d'une conférence lors de la PyCon 2013 sur la " "gestion des terminaux à l'aide de *curses* et *Urwid* (vidéo en anglais)." -#: howto/curses.rst:550 +#: howto/curses.rst:546 msgid "" "`\"Console Applications with Urwid\" `_: video of a PyCon CA 2012 talk " @@ -1086,3 +1080,19 @@ msgstr "" "`\"Console Applications with Urwid\" `_ : vidéo d'une conférence lors de PyCon CA " "2012 montrant quelques applications utilisant *Urwid*." + +#~ msgid "" +#~ "The Windows version of Python doesn't include the :mod:`curses` module. " +#~ "A ported version called `UniCurses `_ " +#~ "is available. You could also try `the Console module `_ written by Fredrik Lundh, which doesn't use the " +#~ "same API as curses but provides cursor-addressable text output and full " +#~ "support for mouse and keyboard input." +#~ msgstr "" +#~ "La version Windows de Python n'inclut pas le module :mod:`curses`. Une " +#~ "version portée appelée `UniCurses `_ " +#~ "est disponible. Vous pouvez également essayer le `Windows console driver " +#~ "`_ écrit par Fredrik Lundh, qui " +#~ "n'utilise pas la même API que *curses*, mais fournit une sortie texte " +#~ "avec gestion du curseur et une prise en charge complète de la souris et " +#~ "du clavier." diff --git a/howto/descriptor.po b/howto/descriptor.po index 907073bb4d..ca0d533152 100644 --- a/howto/descriptor.po +++ b/howto/descriptor.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-12-17 21:41+0100\n" "Last-Translator: Mathieu Dupuy \n" "Language-Team: FRENCH \n" @@ -44,22 +44,29 @@ msgid "" ":term:`Descriptors ` let objects customize attribute lookup, " "storage, and deletion." msgstr "" +"Les :term:`descripteurs ` permettent de personnaliser la " +"recherche, le stockage et la suppression des attributs des objets." #: howto/descriptor.rst:16 msgid "This guide has four major sections:" -msgstr "" +msgstr "Ce guide comporte quatre parties principales :" #: howto/descriptor.rst:18 msgid "" "The \"primer\" gives a basic overview, moving gently from simple examples, " "adding one feature at a time. Start here if you're new to descriptors." msgstr "" +"l'« introduction » donne un premier aperçu, en partant d'exemples simples, " +"puis en ajoutant une fonctionnalité à la fois. Commencez par là si vous " +"débutez avec les descripteurs ;" #: howto/descriptor.rst:21 msgid "" "The second section shows a complete, practical descriptor example. If you " "already know the basics, start there." msgstr "" +"la deuxième partie montre un exemple de descripteur complet et pratique. Si " +"vous connaissez déjà les bases, commencez par là ;" #: howto/descriptor.rst:24 msgid "" @@ -67,6 +74,9 @@ msgid "" "detailed mechanics of how descriptors work. Most people don't need this " "level of detail." msgstr "" +"la troisième partie fournit un didacticiel plus technique qui décrit de " +"manière détaillée comment fonctionnent les descripteurs. La plupart des gens " +"n'ont pas besoin de ce niveau de détail ;" #: howto/descriptor.rst:28 msgid "" @@ -75,20 +85,27 @@ msgid "" "bound methods or about the implementation of common tools like :func:" "`classmethod`, :func:`staticmethod`, :func:`property`, and :term:`__slots__`." msgstr "" +"la dernière partie contient des équivalents en pur Python des descripteurs " +"natifs écrits en C. Lisez ceci si vous êtes curieux de savoir comment les " +"fonctions se transforment en méthodes liées ou si vous voulez connaître " +"l'implémentation d'outils courants comme :func:`classmethod`, :func:" +"`staticmethod`, :func:`property` et :term:`__slots__`." #: howto/descriptor.rst:36 msgid "Primer" -msgstr "" +msgstr "Introduction" #: howto/descriptor.rst:38 msgid "" "In this primer, we start with the most basic possible example and then we'll " "add new capabilities one by one." msgstr "" +"Dans cette introduction, nous commençons par l'exemple le plus simple " +"possible, puis nous ajoutons de nouvelles fonctionnalités une par une." #: howto/descriptor.rst:43 msgid "Simple example: A descriptor that returns a constant" -msgstr "" +msgstr "Un exemple simple : un descripteur qui renvoie une constante" #: howto/descriptor.rst:45 msgid "" @@ -101,12 +118,16 @@ msgid "" "To use the descriptor, it must be stored as a class variable in another " "class:" msgstr "" +"Pour utiliser le descripteur, il doit être stocké en tant que variable de " +"classe dans une autre classe :" #: howto/descriptor.rst:62 msgid "" "An interactive session shows the difference between normal attribute lookup " "and descriptor lookup:" msgstr "" +"Une session interactive montre la différence entre la recherche d'attribut " +"normale et la recherche *via* un descripteur :" #: howto/descriptor.rst:73 msgid "" @@ -121,33 +142,45 @@ msgid "" "Note that the value ``10`` is not stored in either the class dictionary or " "the instance dictionary. Instead, the value ``10`` is computed on demand." msgstr "" +"Notez que la valeur ``10`` n'est stockée ni dans le dictionnaire de classe " +"ni dans le dictionnaire d'instance. Non, la valeur ``10`` est calculée à la " +"demande." #: howto/descriptor.rst:81 msgid "" "This example shows how a simple descriptor works, but it isn't very useful. " "For retrieving constants, normal attribute lookup would be better." msgstr "" +"Cet exemple montre comment fonctionne un descripteur simple, mais il n'est " +"pas très utile. Pour récupérer des constantes, une recherche d'attribut " +"normale est préférable." #: howto/descriptor.rst:84 msgid "" "In the next section, we'll create something more useful, a dynamic lookup." msgstr "" +"Dans la section suivante, nous allons créer quelque chose de plus utile, une " +"recherche dynamique." #: howto/descriptor.rst:88 msgid "Dynamic lookups" -msgstr "" +msgstr "Recherches dynamiques" #: howto/descriptor.rst:90 msgid "" "Interesting descriptors typically run computations instead of returning " "constants:" msgstr "" +"Les descripteurs intéressants exécutent généralement des calculs au lieu de " +"renvoyer des constantes :" #: howto/descriptor.rst:109 msgid "" "An interactive session shows that the lookup is dynamic — it computes " "different, updated answers each time::" msgstr "" +"Une session interactive montre que la recherche est dynamique — elle calcule " +"des réponses différentes, mises à jour à chaque fois ::" #: howto/descriptor.rst:122 msgid "" @@ -158,10 +191,16 @@ msgid "" "that lets the :meth:`__get__` method learn the target directory. The " "*objtype* parameter is the class *Directory*." msgstr "" +"En plus de montrer comment les descripteurs peuvent exécuter des calculs, " +"cet exemple révèle également le but des paramètres de :meth:`__get__`. Le " +"paramètre *self* est *size*, une instance de *DirectorySize*. Le paramètre " +"*obj* est soit *g* soit *s*, une instance de *Directory*. C'est le paramètre " +"*obj* qui permet à la méthode :meth:`__get__` de connaître le répertoire " +"cible. Le paramètre *objtype* est la classe *Directory*." #: howto/descriptor.rst:131 msgid "Managed attributes" -msgstr "" +msgstr "Attributs gérés" #: howto/descriptor.rst:133 msgid "" @@ -171,6 +210,12 @@ msgid "" "dictionary. The descriptor's :meth:`__get__` and :meth:`__set__` methods " "are triggered when the public attribute is accessed." msgstr "" +"Une utilisation courante des descripteurs est la gestion de l'accès aux " +"données d'instances. Le descripteur est affecté à un attribut public dans le " +"dictionnaire de classe tandis que les données réelles sont stockées en tant " +"qu'attribut privé dans le dictionnaire d'instance. Les méthodes :meth:" +"`__get__` et :meth:`__set__` du descripteur sont déclenchées lors de l'accès " +"à l'attribut public." #: howto/descriptor.rst:139 msgid "" @@ -178,12 +223,18 @@ msgid "" "private attribute. When the public attribute is accessed, the descriptor " "logs the lookup or update:" msgstr "" +"Dans l'exemple qui suit, *age* est l'attribut public et *_age* est " +"l'attribut privé. Lors de l'accès à l'attribut public, le descripteur " +"journalise la recherche ou la mise à jour :" #: howto/descriptor.rst:172 msgid "" "An interactive session shows that all access to the managed attribute *age* " "is logged, but that the regular attribute *name* is not logged:" msgstr "" +"Une session interactive montre que tous les accès à l'attribut géré *age* " +"sont consignés, mais que rien n'est journalisé pour l'attribut normal " +"*name* :" #: howto/descriptor.rst:206 msgid "" @@ -192,16 +243,22 @@ msgid "" "only have one logged attribute and that its name is unchangeable. In the " "next example, we'll fix that problem." msgstr "" +"Un problème majeur avec cet exemple est que le nom privé *_age* est écrit en " +"dur dans la classe *LoggedAgeAccess*. Cela signifie que chaque instance ne " +"peut avoir qu'un seul attribut journalisé et que son nom est immuable. Dans " +"l'exemple suivant, nous allons résoudre ce problème." #: howto/descriptor.rst:213 msgid "Customized names" -msgstr "" +msgstr "Noms personnalisés" #: howto/descriptor.rst:215 msgid "" "When a class uses descriptors, it can inform each descriptor about which " "variable name was used." msgstr "" +"Lorsqu'une classe utilise des descripteurs, elle peut informer chaque " +"descripteur du nom de variable utilisé." #: howto/descriptor.rst:218 msgid "" @@ -211,6 +268,11 @@ msgid "" "can be recorded, giving each descriptor its own *public_name* and " "*private_name*:" msgstr "" +"Dans cet exemple, la classe :class:`Person` a deux instances de " +"descripteurs, *name* et *age*. Lorsque la classe :class:`Person` est " +"définie, :meth:`__set_name__` est appelée automatiquement dans " +"*LoggedAccess* afin que les noms de champs puissent être enregistrés, en " +"donnant à chaque descripteur ses propres *public_name* et *private_name* :" #: howto/descriptor.rst:256 msgid "" @@ -218,192 +280,241 @@ msgid "" "`__set_name__` so that the field names would be recorded. Here we call :" "func:`vars` to look up the descriptor without triggering it:" msgstr "" +"Une session interactive montre que la classe :class:`Person` a appelé :meth:" +"`__set_name__` pour que les noms des champs soient enregistrés. Ici, nous " +"appelons :func:`vars` pour rechercher le descripteur sans le déclencher :" #: howto/descriptor.rst:267 msgid "The new class now logs access to both *name* and *age*:" msgstr "" +"La nouvelle classe enregistre désormais l'accès à la fois à *name* et *age* :" #: howto/descriptor.rst:284 -msgid "The two *Person* instances contain only the private names::" -msgstr "" +msgid "The two *Person* instances contain only the private names:" +msgstr "Les deux instances de *Person* ne contiennent que les noms privés :" -#: howto/descriptor.rst:293 +#: howto/descriptor.rst:295 msgid "Closing thoughts" -msgstr "" +msgstr "Réflexions finales" -#: howto/descriptor.rst:295 +#: howto/descriptor.rst:297 msgid "" "A :term:`descriptor` is what we call any object that defines :meth:" "`__get__`, :meth:`__set__`, or :meth:`__delete__`." msgstr "" +"Nous appelons :term:`descripteur ` tout objet qui définit :meth:" +"`__get__`, :meth:`__set__` ou :meth:`__delete__`." -#: howto/descriptor.rst:298 +#: howto/descriptor.rst:300 msgid "" "Optionally, descriptors can have a :meth:`__set_name__` method. This is " "only used in cases where a descriptor needs to know either the class where " "it was created or the name of class variable it was assigned to. (This " "method, if present, is called even if the class is not a descriptor.)" msgstr "" +"Facultativement, les descripteurs peuvent avoir une méthode :meth:" +"`__set_name__`. Elle n'est utile que dans les cas où un descripteur doit " +"connaître soit la classe dans laquelle il a été créé, soit le nom de la " +"variable de classe à laquelle il a été affecté (cette méthode, si elle est " +"présente, est appelée même si la classe n'est pas un descripteur)." -#: howto/descriptor.rst:303 +#: howto/descriptor.rst:305 msgid "" "Descriptors get invoked by the dot \"operator\" during attribute lookup. If " "a descriptor is accessed indirectly with ``vars(some_class)" "[descriptor_name]``, the descriptor instance is returned without invoking it." msgstr "" -#: howto/descriptor.rst:307 +#: howto/descriptor.rst:309 msgid "" "Descriptors only work when used as class variables. When put in instances, " "they have no effect." msgstr "" +"Les descripteurs ne fonctionnent que lorsqu'ils sont utilisés comme " +"variables de classe. Lorsqu'ils sont placés dans des instances, ils n'ont " +"aucun effet." -#: howto/descriptor.rst:310 +#: howto/descriptor.rst:312 msgid "" "The main motivation for descriptors is to provide a hook allowing objects " "stored in class variables to control what happens during attribute lookup." msgstr "" +"La principale raison d'être des descripteurs est de fournir un point " +"d'entrée permettant aux objets stockés dans des variables de classe de " +"contrôler ce qui se passe lors de la recherche d'attributs." -#: howto/descriptor.rst:313 +#: howto/descriptor.rst:315 msgid "" "Traditionally, the calling class controls what happens during lookup. " "Descriptors invert that relationship and allow the data being looked-up to " "have a say in the matter." msgstr "" +"Traditionnellement, la classe appelante contrôle ce qui se passe pendant la " +"recherche. Les descripteurs inversent cette relation et permettent aux " +"données recherchées d'avoir leur mot à dire." -#: howto/descriptor.rst:317 +#: howto/descriptor.rst:319 msgid "" "Descriptors are used throughout the language. It is how functions turn into " "bound methods. Common tools like :func:`classmethod`, :func:" "`staticmethod`, :func:`property`, and :func:`functools.cached_property` are " "all implemented as descriptors." msgstr "" +"Les descripteurs sont utilisés partout dans le langage. C'est ainsi que les " +"fonctions se transforment en méthodes liées. Les outils courants tels que :" +"func:`classmethod`, :func:`staticmethod`, :func:`property` et :func:" +"`functools.cached_property` sont tous implémentés en tant que descripteurs." -#: howto/descriptor.rst:324 +#: howto/descriptor.rst:326 msgid "Complete Practical Example" -msgstr "" +msgstr "Exemple complet pratique" -#: howto/descriptor.rst:326 +#: howto/descriptor.rst:328 msgid "" "In this example, we create a practical and powerful tool for locating " "notoriously hard to find data corruption bugs." msgstr "" +"Dans cet exemple, nous créons un outil pratique et puissant pour localiser " +"les bogues de corruption de données notoirement difficiles à trouver." -#: howto/descriptor.rst:331 +#: howto/descriptor.rst:333 msgid "Validator class" -msgstr "" +msgstr "Classe « validateur »" -#: howto/descriptor.rst:333 +#: howto/descriptor.rst:335 msgid "" "A validator is a descriptor for managed attribute access. Prior to storing " "any data, it verifies that the new value meets various type and range " "restrictions. If those restrictions aren't met, it raises an exception to " "prevent data corruption at its source." msgstr "" +"Un validateur est un descripteur pour l'accès aux attributs gérés. Avant de " +"stocker des données, il vérifie que la nouvelle valeur respecte différentes " +"restrictions de type et de plage. Si ces restrictions ne sont pas " +"respectées, il lève une exception pour empêcher la corruption des données à " +"la source." -#: howto/descriptor.rst:338 +#: howto/descriptor.rst:340 msgid "" "This :class:`Validator` class is both an :term:`abstract base class` and a " "managed attribute descriptor:" msgstr "" +"Cette classe :class:`Validator` est à la fois une :term:`classe mère " +"abstraite ` et un descripteur d'attributs gérés :" -#: howto/descriptor.rst:361 +#: howto/descriptor.rst:363 msgid "" "Custom validators need to inherit from :class:`Validator` and must supply a :" "meth:`validate` method to test various restrictions as needed." msgstr "" +"Les validateurs personnalisés doivent hériter de :class:`Validator` et " +"doivent fournir une méthode :meth:`validate` pour tester diverses " +"restrictions adaptées aux besoins." -#: howto/descriptor.rst:366 +#: howto/descriptor.rst:368 msgid "Custom validators" -msgstr "" +msgstr "Validateurs personnalisés" -#: howto/descriptor.rst:368 +#: howto/descriptor.rst:370 msgid "Here are three practical data validation utilities:" -msgstr "" +msgstr "Voici trois utilitaires concrets de validation de données :" -#: howto/descriptor.rst:370 +#: howto/descriptor.rst:372 msgid "" ":class:`OneOf` verifies that a value is one of a restricted set of options." msgstr "" +":class:`OneOf` vérifie qu'une valeur fait partie d'un ensemble limité de " +"valeurs ;" -#: howto/descriptor.rst:372 +#: howto/descriptor.rst:374 msgid "" ":class:`Number` verifies that a value is either an :class:`int` or :class:" "`float`. Optionally, it verifies that a value is between a given minimum or " "maximum." msgstr "" +":class:`Number` vérifie qu'une valeur est soit un :class:`int` soit un :" +"class:`float`. Facultativement, il vérifie qu'une valeur se situe entre un " +"minimum ou un maximum donnés ;" -#: howto/descriptor.rst:376 +#: howto/descriptor.rst:378 msgid "" ":class:`String` verifies that a value is a :class:`str`. Optionally, it " "validates a given minimum or maximum length. It can validate a user-defined " "`predicate `_ " "as well." msgstr "" +":class:`String` vérifie qu'une valeur est une :class:`chaîne de caractères " +"`. Éventuellement, il valide les longueurs minimale ou maximale " +"données. Il peut également valider un `prédicat `_ défini par l'utilisateur." -#: howto/descriptor.rst:435 +#: howto/descriptor.rst:437 msgid "Practical application" -msgstr "" +msgstr "Application pratique" -#: howto/descriptor.rst:437 +#: howto/descriptor.rst:439 msgid "Here's how the data validators can be used in a real class:" msgstr "" +"Voici comment les validateurs de données peuvent être utilisés par une " +"classe réelle :" -#: howto/descriptor.rst:452 +#: howto/descriptor.rst:454 msgid "The descriptors prevent invalid instances from being created:" -msgstr "" +msgstr "Les descripteurs empêchent la création d'instances non valides :" -#: howto/descriptor.rst:479 +#: howto/descriptor.rst:481 msgid "Technical Tutorial" -msgstr "" +msgstr "Tutoriel technique" -#: howto/descriptor.rst:481 +#: howto/descriptor.rst:483 msgid "" "What follows is a more technical tutorial for the mechanics and details of " "how descriptors work." msgstr "" +"Ce qui suit est un tutoriel plus technique relatif aux mécanismes et détails " +"de fonctionnement des descripteurs." -#: howto/descriptor.rst:486 +#: howto/descriptor.rst:488 msgid "Abstract" msgstr "Résumé" -#: howto/descriptor.rst:488 +#: howto/descriptor.rst:490 msgid "" "Defines descriptors, summarizes the protocol, and shows how descriptors are " "called. Provides an example showing how object relational mappings work." msgstr "" +"Ce tutoriel définit des descripteurs, résume le protocole et montre comment " +"les descripteurs sont appelés. Il fournit un exemple montrant comment " +"fonctionnent les correspondances relationnelles entre objets." -#: howto/descriptor.rst:491 -#, fuzzy +#: howto/descriptor.rst:493 msgid "" "Learning about descriptors not only provides access to a larger toolset, it " "creates a deeper understanding of how Python works." msgstr "" "L'apprentissage des descripteurs permet non seulement d'accéder à un " "ensemble d'outils plus vaste, mais aussi de mieux comprendre le " -"fonctionnement de Python et d'apprécier l'élégance de sa conception." +"fonctionnement de Python." -#: howto/descriptor.rst:496 +#: howto/descriptor.rst:498 #, fuzzy msgid "Definition and introduction" msgstr "Définition et introduction" -#: howto/descriptor.rst:498 -#, fuzzy +#: howto/descriptor.rst:500 msgid "" "In general, a descriptor is an attribute value that has one of the methods " "in the descriptor protocol. Those methods are :meth:`__get__`, :meth:" "`__set__`, and :meth:`__delete__`. If any of those methods are defined for " "an attribute, it is said to be a :term:`descriptor`." msgstr "" -"En général, un descripteur est un attribut objet avec un \"comportement " -"contraignant\", dont l'accès à l'attribut a été remplacé par des méthodes " -"dans le protocole du descripteur. Ces méthodes sont : :meth:`__get__`, :" -"meth:`__set__`, et :meth:`__delete__`. Si l'une de ces méthodes est définie " -"pour un objet, il s'agit d'un descripteur." +"En général, un descripteur est la valeur d'un attribut qui possède une des " +"méthodes définies dans le « protocole descripteur ». Ces méthodes sont : :" +"meth:`__get__`, :meth:`__set__` et :meth:`__delete__`. Si l'une de ces " +"méthodes est définie pour un attribut, il s'agit d'un :term:`descripteur " +"`." -#: howto/descriptor.rst:503 -#, fuzzy +#: howto/descriptor.rst:505 msgid "" "The default behavior for attribute access is to get, set, or delete the " "attribute from an object's dictionary. For instance, ``a.x`` has a lookup " @@ -415,17 +526,16 @@ msgid "" "methods were defined." msgstr "" "Le comportement par défaut pour l'accès aux attributs consiste à obtenir, " -"définir ou supprimer l'attribut du dictionnaire d'un objet. Par exemple, " -"``a. x`` a une chaîne de recherche commençant par ``a. __dict__ ['x']``, " -"puis ``type (a). __dict__ ['x']``, et continuant à travers les classes de " -"base de ``type (a)`` À l'exclusion des sous-classes. Si la valeur recherchée " -"est un objet définissant l'une des méthodes de descripteur, Python peut " -"substituer le comportement par défaut et appeler à la place la méthode " -"Descriptor. Lorsque cela se produit dans la chaîne de précédence dépend de " -"quelles méthodes descripteur ont été définies." - -#: howto/descriptor.rst:512 -#, fuzzy +"définir ou supprimer l'attribut dans le dictionnaire d'un objet. Par " +"exemple, pour chercher ``a.x`` Python commence par chercher ``a." +"__dict__['x']``, puis ``type(a).__dict__['x']``, et continue la recherche en " +"utilisant la MRO (l'ordre de résolution des méthodes) de ``type(a)``. Si la " +"valeur recherchée est un objet définissant l'une des méthodes de " +"descripteur, Python remplace le comportement par défaut par un appel à la " +"méthode du descripteur. Le moment où cela se produit dans la chaîne de " +"recherche dépend des méthodes définies par le descripteur." + +#: howto/descriptor.rst:514 msgid "" "Descriptors are a powerful, general purpose protocol. They are the " "mechanism behind properties, methods, static methods, class methods, and :" @@ -433,32 +543,31 @@ msgid "" "simplify the underlying C code and offer a flexible set of new tools for " "everyday Python programs." msgstr "" -"Les descripteurs sont un protocole puissant et à usage général. Ils sont le " -"mécanisme derrière les propriétés, les méthodes, les méthodes statiques, les " -"méthodes de classes et :func:`super()`. Ils sont utilisés dans tout Python " -"lui-même pour implémenter les nouvelles classes de style introduites dans la " -"version 2.2. Les descripteurs simplifient le code C sous-jacent et offrent " -"un ensemble flexible de nouveaux outils pour les programmes Python " -"quotidiens." +"Les descripteurs sont un protocole puissant et à usage général. Ils " +"constituent le mécanisme qui met en œuvre les propriétés, les méthodes, les " +"méthodes statiques, les méthodes de classes et :func:`super()`. Ils sont " +"utilisés dans tout Python lui-même. Les descripteurs simplifient le code C " +"sous-jacent et offrent un ensemble flexible de nouveaux outils pour les " +"programmes Python quotidiens." -#: howto/descriptor.rst:520 +#: howto/descriptor.rst:522 #, fuzzy msgid "Descriptor protocol" msgstr "Protocole descripteur" -#: howto/descriptor.rst:522 +#: howto/descriptor.rst:524 msgid "``descr.__get__(self, obj, type=None) -> value``" msgstr "``descr.__get__(self, obj, type=None) -> value``" -#: howto/descriptor.rst:524 +#: howto/descriptor.rst:526 msgid "``descr.__set__(self, obj, value) -> None``" msgstr "``descr.__set__(self, obj, value) -> None``" -#: howto/descriptor.rst:526 +#: howto/descriptor.rst:528 msgid "``descr.__delete__(self, obj) -> None``" msgstr "``descr.__delete__(self, obj) -> None``" -#: howto/descriptor.rst:528 +#: howto/descriptor.rst:530 msgid "" "That is all there is to it. Define any of these methods and an object is " "considered a descriptor and can override default behavior upon being looked " @@ -468,8 +577,7 @@ msgstr "" "méthodes et un objet est considéré comme un descripteur et peut remplacer le " "comportement par défaut lorsqu'il est recherché comme un attribut." -#: howto/descriptor.rst:532 -#, fuzzy +#: howto/descriptor.rst:534 msgid "" "If an object defines :meth:`__set__` or :meth:`__delete__`, it is considered " "a data descriptor. Descriptors that only define :meth:`__get__` are called " @@ -477,11 +585,11 @@ msgid "" "possible)." msgstr "" "Si un objet définit :meth:`__set__` ou :meth:`__delete__`, il est considéré " -"comme un descripteur de données. Les descripteurs qui ne définissent que :" -"meth:`__get__` sont appelés descripteurs *non-data* (ils sont généralement " +"comme un descripteur de données. Les descripteurs qui ne définissent que :" +"meth:`__get__` sont appelés descripteurs hors-données (ils sont généralement " "utilisés pour des méthodes mais d'autres utilisations sont possibles)." -#: howto/descriptor.rst:537 +#: howto/descriptor.rst:539 msgid "" "Data and non-data descriptors differ in how overrides are calculated with " "respect to entries in an instance's dictionary. If an instance's dictionary " @@ -497,7 +605,7 @@ msgstr "" "entrée portant le même nom qu'un descripteur *non-data*, l'entrée du " "dictionnaire a la priorité." -#: howto/descriptor.rst:543 +#: howto/descriptor.rst:545 msgid "" "To make a read-only data descriptor, define both :meth:`__get__` and :meth:" "`__set__` with the :meth:`__set__` raising an :exc:`AttributeError` when " @@ -510,183 +618,205 @@ msgstr "" "`__set__set__` avec une exception élevant le caractère générique est " "suffisant pour en faire un descripteur de données." -#: howto/descriptor.rst:550 +#: howto/descriptor.rst:552 msgid "Overview of descriptor invocation" -msgstr "" +msgstr "Présentation de l'appel de descripteur" -#: howto/descriptor.rst:552 -#, fuzzy +#: howto/descriptor.rst:554 msgid "" "A descriptor can be called directly with ``desc.__get__(obj)`` or ``desc." "__get__(None, cls)``." msgstr "" -"Un descripteur peut être appelé directement par son nom de méthode. Par " -"exemple, ``d.__get__(obj)``." +"Un descripteur peut être appelé directement par ``desc.__get__(obj)`` ou " +"``desc.__get__(None, cls)``." -#: howto/descriptor.rst:555 +#: howto/descriptor.rst:557 msgid "" "But it is more common for a descriptor to be invoked automatically from " "attribute access." msgstr "" +"Mais il est plus courant qu'un descripteur soit invoqué automatiquement à " +"partir d'un accès à un attribut." -#: howto/descriptor.rst:558 +#: howto/descriptor.rst:560 msgid "" "The expression ``obj.x`` looks up the attribute ``x`` in the chain of " "namespaces for ``obj``. If the search finds a descriptor outside of the " "instance ``__dict__``, its :meth:`__get__` method is invoked according to " "the precedence rules listed below." msgstr "" +"L'expression ``obj.x`` recherche l'attribut ``x`` dans les espaces de noms " +"pour ``obj``. Si la recherche trouve un descripteur en dehors de l'instance " +"``__dict__``, sa méthode :meth:`__get__` est appelée selon les règles de " +"priorité listées ci-dessous." -#: howto/descriptor.rst:563 -#, fuzzy +#: howto/descriptor.rst:565 msgid "" "The details of invocation depend on whether ``obj`` is an object, class, or " "instance of super." msgstr "" -"Les détails de l'invocation dépendent du fait que ``obj`` est un objet ou " -"une classe." +"Les détails de l'appel varient selon que ``obj`` est un objet, une classe ou " +"une instance de *super*." -#: howto/descriptor.rst:568 +#: howto/descriptor.rst:570 msgid "Invocation from an instance" -msgstr "" +msgstr "Appel depuis une instance" -#: howto/descriptor.rst:570 +#: howto/descriptor.rst:572 msgid "" "Instance lookup scans through a chain of namespaces giving data descriptors " "the highest priority, followed by instance variables, then non-data " "descriptors, then class variables, and lastly :meth:`__getattr__` if it is " "provided." msgstr "" +"La recherche d'instance consiste à parcourir la liste d'espaces de noms en " +"donnant aux descripteurs de données la priorité la plus élevée, suivis des " +"variables d'instance, puis des descripteurs hors-données, puis des variables " +"de classe, et enfin :meth:`__getattr__` s'il est fourni." -#: howto/descriptor.rst:575 +#: howto/descriptor.rst:577 msgid "" "If a descriptor is found for ``a.x``, then it is invoked with: ``desc." "__get__(a, type(a))``." msgstr "" +"Si un descripteur est trouvé pour ``a.x``, alors il est appelé par ``desc." +"__get__(a, type(a))``." -#: howto/descriptor.rst:578 +#: howto/descriptor.rst:580 msgid "" "The logic for a dotted lookup is in :meth:`object.__getattribute__`. Here " "is a pure Python equivalent:" msgstr "" +"La logique d'une recherche « après un point » se trouve dans :meth:`object." +"__getattribute__`. Voici un équivalent en Python pur :" -#: howto/descriptor.rst:698 +#: howto/descriptor.rst:699 msgid "" -"Interestingly, attribute lookup doesn't call :meth:`object.__getattribute__` " -"directly. Instead, both the dot operator and the :func:`getattr` function " -"perform attribute lookup by way of a helper function:" +"Note, there is no :meth:`__getattr__` hook in the :meth:`__getattribute__` " +"code. That is why calling :meth:`__getattribute__` directly or with " +"``super().__getattribute__`` will bypass :meth:`__getattr__` entirely." msgstr "" +"Notez qu'il n'y a pas d'appel vers :meth:`__getattr__` dans le code de :meth:" +"`__getattribute__`. C'est pourquoi appeler :meth:`__getattribute__` " +"directement ou avec ``super().__getattribute__`` contourne entièrement :meth:" +"`__getattr__`." -#: howto/descriptor.rst:713 +#: howto/descriptor.rst:703 msgid "" -"So if :meth:`__getattr__` exists, it is called whenever :meth:" -"`__getattribute__` raises :exc:`AttributeError` (either directly or in one " -"of the descriptor calls)." +"Instead, it is the dot operator and the :func:`getattr` function that are " +"responsible for invoking :meth:`__getattr__` whenever :meth:" +"`__getattribute__` raises an :exc:`AttributeError`. Their logic is " +"encapsulated in a helper function:" msgstr "" +"Au lieu, c'est l'opérateur « point » et la fonction :func:`getattr` qui sont " +"responsables de l'appel de :meth:`__getattr__` chaque fois que :meth:" +"`__getattribute__` déclenche une :exc:`AttributeError`. Cette logique est " +"présentée encapsulée dans une fonction utilitaire :" -#: howto/descriptor.rst:716 -msgid "" -"Also, if a user calls :meth:`object.__getattribute__` directly, the :meth:" -"`__getattr__` hook is bypassed entirely." -msgstr "" - -#: howto/descriptor.rst:721 -#, fuzzy +#: howto/descriptor.rst:753 msgid "Invocation from a class" -msgstr "Appelé depuis un Classe" +msgstr "Appel depuis une classe" -#: howto/descriptor.rst:723 +#: howto/descriptor.rst:755 msgid "" "The logic for a dotted lookup such as ``A.x`` is in :meth:`type." "__getattribute__`. The steps are similar to those for :meth:`object." "__getattribute__` but the instance dictionary lookup is replaced by a search " "through the class's :term:`method resolution order`." msgstr "" +"La logique pour une recherche « après un point » telle que ``A.x`` se trouve " +"dans :meth:`type.__getattribute__`. Les étapes sont similaires à celles de :" +"meth:`object.__getattribute__` mais la recherche dans le dictionnaire " +"d'instance est remplacée par une recherche suivant l':term:`ordre de " +"résolution des méthodes ` de la classe." -#: howto/descriptor.rst:728 +#: howto/descriptor.rst:760 msgid "If a descriptor is found, it is invoked with ``desc.__get__(None, A)``." msgstr "" +"Si un descripteur est trouvé, il est appelé par ``desc.__get__(None, A)``." -#: howto/descriptor.rst:730 +#: howto/descriptor.rst:762 msgid "" "The full C implementation can be found in :c:func:`type_getattro()` and :c:" "func:`_PyType_Lookup()` in :source:`Objects/typeobject.c`." msgstr "" +"L'implémentation C complète peut être trouvée dans :c:func:`type_getattro()` " +"et :c:func:`_PyType_Lookup()` dans :source:`Objects/typeobject.c`." -#: howto/descriptor.rst:735 +#: howto/descriptor.rst:767 msgid "Invocation from super" -msgstr "" +msgstr "Appel depuis super" -#: howto/descriptor.rst:737 +#: howto/descriptor.rst:769 msgid "" "The logic for super's dotted lookup is in the :meth:`__getattribute__` " "method for object returned by :class:`super()`." msgstr "" +"La logique de la recherche « après un point » de super se trouve dans la " +"méthode :meth:`__getattribute__` de l'objet renvoyé par :class:`super()`." -#: howto/descriptor.rst:740 -#, fuzzy +#: howto/descriptor.rst:772 msgid "" "A dotted lookup such as ``super(A, obj).m`` searches ``obj.__class__." "__mro__`` for the base class ``B`` immediately following ``A`` and then " "returns ``B.__dict__['m'].__get__(obj, A)``. If not a descriptor, ``m`` is " "returned unchanged." msgstr "" -"L'objet renvoyé par ``super()`` a également une méthode personnalisée :meth:" -"`__getattribute__` pour invoquer des descripteurs. La recherche d'attribut " -"``super(B, obj).m`` recherche dans ``obj.__class__.__mro__`` la classe qui " -"suit immédiatement B, appelons la A, et renvoie ``A.__dict__['m']." -"__get__(obj, B)``. Si ce n'est pas un descripteur, ``m`` est renvoyé " -"inchangé. S'il n'est pas dans le dictionnaire, la recherche de ``m`` revient " -"à une recherche utilisant :meth:`object.__getattribute__`." +"La recherche d'attribut ``super(A, obj).m`` recherche dans ``obj.__class__." +"__mro__`` la classe ``B`` qui suit immédiatement A, et renvoie ``B." +"__dict__['m'].__get__(obj, A)``. Si ce n'est pas un descripteur, ``m`` est " +"renvoyé inchangé." -#: howto/descriptor.rst:745 -#, fuzzy +#: howto/descriptor.rst:777 msgid "" "The full C implementation can be found in :c:func:`super_getattro()` in :" "source:`Objects/typeobject.c`. A pure Python equivalent can be found in " "`Guido's Tutorial `_." msgstr "" -"Les détails d'implémentation sont dans :c:func:`super_getattro()` dans :" -"source:`Objects/typeobject.c` et un équivalent Python pur peut être trouvé " -"dans `Guido's Tutorial`_." +"L'implémentation C complète est dans :c:func:`super_getattro()` dans :source:" +"`Objects/typeobject.c`. Un équivalent Python pur peut être trouvé dans " +"`Guido's Tutorial `_ (page en anglais)." -#: howto/descriptor.rst:752 +#: howto/descriptor.rst:784 msgid "Summary of invocation logic" -msgstr "" +msgstr "Résumé de la logique d'appel" -#: howto/descriptor.rst:754 +#: howto/descriptor.rst:786 msgid "" "The mechanism for descriptors is embedded in the :meth:`__getattribute__()` " "methods for :class:`object`, :class:`type`, and :func:`super`." msgstr "" +"Le fonctionnement des descripteurs se trouve dans les méthodes :meth:" +"`__getattribute__()` de :class:`object`, :class:`type` et :func:`super`." -#: howto/descriptor.rst:757 +#: howto/descriptor.rst:789 msgid "The important points to remember are:" msgstr "Les points importants à retenir sont :" -#: howto/descriptor.rst:759 -#, fuzzy +#: howto/descriptor.rst:791 msgid "Descriptors are invoked by the :meth:`__getattribute__` method." -msgstr "les descripteurs sont appelés par la méthode :meth:`__getattribute__`" +msgstr "" +"les descripteurs sont appelés par la méthode :meth:`__getattribute__` ;" -#: howto/descriptor.rst:761 +#: howto/descriptor.rst:793 msgid "" "Classes inherit this machinery from :class:`object`, :class:`type`, or :func:" "`super`." msgstr "" +"les classes héritent ce mécanisme de :class:`object`, :class:`type` ou :func:" +"`super` ;" -#: howto/descriptor.rst:764 -#, fuzzy +#: howto/descriptor.rst:796 msgid "" "Overriding :meth:`__getattribute__` prevents automatic descriptor calls " "because all the descriptor logic is in that method." msgstr "" "redéfinir :meth:`__getattribute____` empêche les appels automatiques de " -"descripteurs" +"descripteur car toute la logique des descripteurs est dans cette méthode ;" -#: howto/descriptor.rst:767 -#, fuzzy +#: howto/descriptor.rst:799 msgid "" ":meth:`object.__getattribute__` and :meth:`type.__getattribute__` make " "different calls to :meth:`__get__`. The first includes the instance and may " @@ -694,27 +824,27 @@ msgid "" "includes the class." msgstr "" ":meth:`objet.__getattribute__` et :meth:`type.__getattribute__` font " -"différents appels à :meth:`__get__`." +"différents appels à :meth:`__get__`. La première inclut l'instance et peut " +"inclure la classe. La seconde met ``None`` pour l'instance et inclut " +"toujours la classe ;" -#: howto/descriptor.rst:772 -#, fuzzy +#: howto/descriptor.rst:804 msgid "Data descriptors always override instance dictionaries." msgstr "" -"les descripteurs de données remplacent toujours les dictionnaires " +"les descripteurs de données sont toujours prioritaires sur les dictionnaires " "d'instances." -#: howto/descriptor.rst:774 -#, fuzzy +#: howto/descriptor.rst:806 msgid "Non-data descriptors may be overridden by instance dictionaries." msgstr "" -"les descripteurs *non-data* peuvent être remplacés par des dictionnaires " +"les descripteurs hors-données peuvent céder la priorité aux dictionnaires " "d'instance." -#: howto/descriptor.rst:778 +#: howto/descriptor.rst:810 msgid "Automatic name notification" -msgstr "" +msgstr "Notification automatique des noms" -#: howto/descriptor.rst:780 +#: howto/descriptor.rst:812 msgid "" "Sometimes it is desirable for a descriptor to know what class variable name " "it was assigned to. When a new class is created, the :class:`type` " @@ -723,110 +853,125 @@ msgid "" "with two arguments. The *owner* is the class where the descriptor is used, " "and the *name* is the class variable the descriptor was assigned to." msgstr "" +"Il est parfois souhaitable qu'un descripteur sache à quel nom de variable de " +"classe il a été affecté. Lorsqu'une nouvelle classe est créée, la " +"métaclasse :class:`type` parcourt le dictionnaire de la nouvelle classe. Si " +"l'une des entrées est un descripteur et si elle définit :meth:" +"`__set_name__`, cette méthode est appelée avec deux arguments : *owner* " +"(propriétaire) est la classe où le descripteur est utilisé, et *name* est la " +"variable de classe à laquelle le descripteur a été assigné." -#: howto/descriptor.rst:787 -#, fuzzy +#: howto/descriptor.rst:819 msgid "" "The implementation details are in :c:func:`type_new()` and :c:func:" "`set_names()` in :source:`Objects/typeobject.c`." msgstr "" -"Les détails d'implémentation sont dans :c:func:`super_getattro()` dans :" -"source:`Objects/typeobject.c` et un équivalent Python pur peut être trouvé " -"dans `Guido's Tutorial`_." +"Les détails d'implémentation sont dans :c:func:`type_new()` et :c:func:" +"`set_names()` dans :source:`Objects/typeobject.c`." -#: howto/descriptor.rst:790 +#: howto/descriptor.rst:822 msgid "" "Since the update logic is in :meth:`type.__new__`, notifications only take " "place at the time of class creation. If descriptors are added to the class " "afterwards, :meth:`__set_name__` will need to be called manually." msgstr "" +"Comme la logique de mise à jour est dans :meth:`type.__new__`, les " +"notifications n'ont lieu qu'au moment de la création de la classe. Si des " +"descripteurs sont ajoutés à la classe par la suite, :meth:`__set_name__` " +"doit être appelée manuellement." -#: howto/descriptor.rst:796 +#: howto/descriptor.rst:828 msgid "ORM example" -msgstr "" +msgstr "Exemple d'ORM" -#: howto/descriptor.rst:798 +#: howto/descriptor.rst:830 msgid "" "The following code is simplified skeleton showing how data descriptors could " "be used to implement an `object relational mapping `_." msgstr "" -#: howto/descriptor.rst:802 +#: howto/descriptor.rst:834 msgid "" "The essential idea is that the data is stored in an external database. The " "Python instances only hold keys to the database's tables. Descriptors take " "care of lookups or updates:" msgstr "" +"L'idée essentielle est que les données sont stockées dans une base de " +"données externe. Les instances Python ne contiennent que les clés des tables " +"de la base de données. Les descripteurs s'occupent des recherches et des " +"mises à jour :" -#: howto/descriptor.rst:821 +#: howto/descriptor.rst:853 msgid "" "We can use the :class:`Field` class to define `models `_ that describe the schema for each table in a " "database:" msgstr "" +"Nous pouvons utiliser la classe :class:`Field` pour définir des `modèles " +"`_ qui décrivent le schéma de " +"chaque table d'une base de données :" -#: howto/descriptor.rst:846 +#: howto/descriptor.rst:878 msgid "To use the models, first connect to the database::" msgstr "" +"Pour utiliser les modèles, connectons-nous d'abord à la base de données ::" -#: howto/descriptor.rst:851 +#: howto/descriptor.rst:883 msgid "" "An interactive session shows how data is retrieved from the database and how " "it can be updated:" msgstr "" +"Une session interactive montre comment les données sont extraites de la base " +"de données et comment elles peuvent être mises à jour :" -#: howto/descriptor.rst:896 +#: howto/descriptor.rst:928 msgid "Pure Python Equivalents" -msgstr "" +msgstr "Équivalents en Python pur" -#: howto/descriptor.rst:898 -#, fuzzy +#: howto/descriptor.rst:930 msgid "" "The descriptor protocol is simple and offers exciting possibilities. " "Several use cases are so common that they have been prepackaged into built-" -"in tools. Properties, bound methods, static methods, class methods, and \\_" -"\\_slots\\_\\_ are all based on the descriptor protocol." +"in tools. Properties, bound methods, static methods, class methods, and " +"\\_\\_slots\\_\\_ are all based on the descriptor protocol." msgstr "" -"Le protocole est simple et offre des possibilités passionnantes. Plusieurs " -"cas d'utilisation sont si courants qu'ils ont été regroupés en appels de " -"fonction individuels. Les propriétés, les méthodes liées, les méthodes " -"statiques et les méthodes de classe sont toutes basées sur le protocole du " -"descripteur." +"Le protocole descripteur est simple et offre des possibilités très " +"intéressantes. Plusieurs cas d'utilisation sont si courants qu'ils ont été " +"regroupés dans des outils intégrés. Les propriétés, les méthodes liées, les " +"méthodes statiques et les méthodes de classe sont toutes basées sur le " +"protocole descripteur." -#: howto/descriptor.rst:905 +#: howto/descriptor.rst:937 msgid "Properties" msgstr "Propriétés" -#: howto/descriptor.rst:907 -#, fuzzy +#: howto/descriptor.rst:939 msgid "" "Calling :func:`property` is a succinct way of building a data descriptor " "that triggers a function call upon access to an attribute. Its signature " "is::" msgstr "" -"Appeler :func:`property` est une façon succincte de construire un " -"descripteur de données qui déclenche des appels de fonction lors de l'accès " -"à un attribut. Sa signature est ::" +"Appeler :func:`property` construit de façon succincte un descripteur de " +"données qui déclenche un appel de fonction lors de l'accès à un attribut. Sa " +"signature est ::" -#: howto/descriptor.rst:912 -#, fuzzy +#: howto/descriptor.rst:944 msgid "" "The documentation shows a typical use to define a managed attribute ``x``:" msgstr "" -"La documentation montre une utilisation typique pour définir un attribut " -"géré ``x`` ::" +"La documentation montre une utilisation caractéristique pour définir un " +"attribut géré ``x`` ::" -#: howto/descriptor.rst:922 -#, fuzzy +#: howto/descriptor.rst:968 msgid "" "To see how :func:`property` is implemented in terms of the descriptor " "protocol, here is a pure Python equivalent:" msgstr "" -"Pour voir comment :func:`property` est implémenté dans le protocole du " -"descripteur, voici un un équivalent Python pur ::" +"Pour voir comment :func:`property` est implémentée dans le protocole du " +"descripteur, voici un équivalent en Python pur ::" -#: howto/descriptor.rst:1015 +#: howto/descriptor.rst:1061 msgid "" "The :func:`property` builtin helps whenever a user interface has granted " "attribute access and then subsequent changes require the intervention of a " @@ -836,8 +981,7 @@ msgstr "" "utilisateur a accordé l'accès à un attribut et que des modifications " "ultérieures nécessitent l'intervention d'une méthode." -#: howto/descriptor.rst:1019 -#, fuzzy +#: howto/descriptor.rst:1065 msgid "" "For instance, a spreadsheet class may grant access to a cell value through " "``Cell('b10').value``. Subsequent improvements to the program require the " @@ -848,23 +992,25 @@ msgid "" msgstr "" "Par exemple, une classe de tableur peut donner accès à une valeur de cellule " "via ``Cell('b10').value``. Les améliorations ultérieures du programme " -"exigent que la cellule soit recalculée à chaque accès ; cependant, le " -"programmeur ne veut pas affecter le code client existant accédant " -"directement à l'attribut. La solution consiste à envelopper l'accès à " -"l'attribut de valeur dans un descripteur de données de propriété ::" +"exigent que la cellule soit recalculée à chaque accès ; cependant, le " +"programmeur ne veut pas impacter le code client existant accédant " +"directement à l'attribut. La solution consiste à envelopper l'accès à " +"l'attribut *value* dans un descripteur de données ::" -#: howto/descriptor.rst:1036 +#: howto/descriptor.rst:1082 msgid "" "Either the built-in :func:`property` or our :func:`Property` equivalent " "would work in this example." msgstr "" +"Soit la :func:`property` native, soit notre équivalent :func:`Property` " +"fonctionnent dans cet exemple." -#: howto/descriptor.rst:1041 +#: howto/descriptor.rst:1087 #, fuzzy msgid "Functions and methods" msgstr "Fonctions et méthodes" -#: howto/descriptor.rst:1043 +#: howto/descriptor.rst:1089 msgid "" "Python's object oriented features are built upon a function based " "environment. Using non-data descriptors, the two are merged seamlessly." @@ -873,92 +1019,103 @@ msgstr "" "environnement basé sur des fonctions. À l'aide de descripteurs *non-data*, " "les deux sont fusionnés de façon transparente." -#: howto/descriptor.rst:1046 -#, fuzzy +#: howto/descriptor.rst:1092 msgid "" "Functions stored in class dictionaries get turned into methods when invoked. " "Methods only differ from regular functions in that the object instance is " "prepended to the other arguments. By convention, the instance is called " "*self* but could be called *this* or any other variable name." msgstr "" -"Les dictionnaires de classes stockent les méthodes sous forme de fonctions. " -"Dans une définition de classe, les méthodes sont écrites en utilisant :" -"keyword:`def` ou :keyword:`lambda`, les outils habituels pour créer des " -"fonctions. Les méthodes ne diffèrent des fonctions régulières que par le " -"fait que le premier argument est réservé à l'instance de l'objet. Par " -"convention Python, la référence de l'instance est appelée *self* mais peut " -"être appelée *this* ou tout autre nom de variable." +"Les fonctions placées dans les dictionnaires des classes sont transformées " +"en méthodes au moment de l'appel. Les méthodes ne diffèrent des fonctions " +"ordinaires que par le fait que le premier argument est réservé à l'instance " +"de l'objet. Par convention Python, la référence de l'instance est appelée " +"*self*, bien qu'il soit possible de l'appeler *this* ou tout autre nom de " +"variable." -#: howto/descriptor.rst:1051 +#: howto/descriptor.rst:1097 msgid "" "Methods can be created manually with :class:`types.MethodType` which is " "roughly equivalent to:" msgstr "" +"Les méthodes peuvent être créées manuellement avec :class:`types." +"MethodType`, qui équivaut à peu près à :" -#: howto/descriptor.rst:1068 -#, fuzzy +#: howto/descriptor.rst:1114 msgid "" "To support automatic creation of methods, functions include the :meth:" "`__get__` method for binding methods during attribute access. This means " "that functions are non-data descriptors that return bound methods during " "dotted lookup from an instance. Here's how it works:" msgstr "" -"Pour prendre en charge les appels de méthodes, les fonctions incluent la " -"méthode :meth:`__get__` pour lier les méthodes pendant l'accès aux " -"attributs. Cela signifie que toutes les fonctions sont des descripteurs " -"*non-data* qui renvoient des méthodes liées lorsqu'elles sont appelées " -"depuis un objet. En Python pur, il fonctionne comme ceci ::" +"Pour prendre en charge la création automatique des méthodes, les fonctions " +"incluent la méthode :meth:`__get__` pour lier les méthodes pendant l'accès " +"aux attributs. Cela signifie que toutes les fonctions sont des descripteurs " +"hors-données qui renvoient des méthodes liées au cours d'une recherche " +"d'attribut d'une instance. Cela fonctionne ainsi ::" -#: howto/descriptor.rst:1084 -#, fuzzy +#: howto/descriptor.rst:1130 msgid "" "Running the following class in the interpreter shows how the function " "descriptor works in practice:" msgstr "" -"L'exécution de l'interpréteur montre comment le descripteur de fonction se " -"comporte dans la pratique ::" +"L'exécution de la classe suivante dans l'interpréteur montre comment le " +"descripteur de fonction se comporte en pratique ::" -#: howto/descriptor.rst:1093 +#: howto/descriptor.rst:1139 msgid "" "The function has a :term:`qualified name` attribute to support introspection:" msgstr "" +"La fonction possède un attribut ``__qualname__`` (:term:`nom " +"qualifié`) pour prendre en charge l'introspection :" -#: howto/descriptor.rst:1100 +#: howto/descriptor.rst:1146 msgid "" "Accessing the function through the class dictionary does not invoke :meth:" "`__get__`. Instead, it just returns the underlying function object::" msgstr "" +"L'accès à la fonction *via* le dictionnaire de classe n'invoque pas :meth:" +"`__get__`. À la place, il renvoie simplement l'objet de fonction sous-" +"jacent ::" -#: howto/descriptor.rst:1106 +#: howto/descriptor.rst:1152 msgid "" "Dotted access from a class calls :meth:`__get__` which just returns the " "underlying function unchanged::" msgstr "" +"La recherche d'attribut depuis une classe appelle :meth:`__get__`, qui " +"renvoie simplement la fonction sous-jacente inchangée ::" -#: howto/descriptor.rst:1112 +#: howto/descriptor.rst:1158 msgid "" "The interesting behavior occurs during dotted access from an instance. The " "dotted lookup calls :meth:`__get__` which returns a bound method object::" msgstr "" +"Le comportement intéressant se produit lors d'une recherche d'attribut à " +"partir d'une instance. La recherche d'attribut appelle :meth:`__get__` qui " +"renvoie un objet « méthode liée » ::" -#: howto/descriptor.rst:1119 +#: howto/descriptor.rst:1165 msgid "" "Internally, the bound method stores the underlying function and the bound " "instance::" msgstr "" +"En interne, la méthode liée stocke la fonction sous-jacente et l'instance " +"liée ::" -#: howto/descriptor.rst:1128 +#: howto/descriptor.rst:1174 msgid "" "If you have ever wondered where *self* comes from in regular methods or " "where *cls* comes from in class methods, this is it!" msgstr "" +"Si vous vous êtes déjà demandé d'où vient *self* dans les méthodes " +"ordinaires ou d'où vient *cls* dans les méthodes de classe, c'est ça !" -#: howto/descriptor.rst:1133 -#, fuzzy -msgid "Other kinds of methods" -msgstr "Fonctions et méthodes" +#: howto/descriptor.rst:1179 +msgid "Kinds of methods" +msgstr "Types de méthodes" -#: howto/descriptor.rst:1135 +#: howto/descriptor.rst:1181 msgid "" "Non-data descriptors provide a simple mechanism for variations on the usual " "patterns of binding functions into methods." @@ -966,8 +1123,7 @@ msgstr "" "Les descripteurs *non-data* fournissent un mécanisme simple pour les " "variations des patrons habituels des fonctions de liaison dans les méthodes." -#: howto/descriptor.rst:1138 -#, fuzzy +#: howto/descriptor.rst:1184 msgid "" "To recap, functions have a :meth:`__get__` method so that they can be " "converted to a method when accessed as attributes. The non-data descriptor " @@ -975,64 +1131,61 @@ msgid "" "f(*args)`` becomes ``f(*args)``." msgstr "" "Pour résumer, les fonctions ont une méthode :meth:`__get__` pour qu'elles " -"puissent être converties en méthode lorsqu'on y accède comme attributs. Le " -"descripteur *non-data* transforme un appel ``obj.f(*args)``en ``f(obj, " -"*args)``. Appeler ``klass.f(*args)`` devient ``f(*args)``." +"puissent être converties en méthodes lorsqu'on y accède comme attributs. Le " +"descripteur hors-données transforme un appel ``obj.f(*args)`` en ``f(obj, " +"*args)``. L'appel ``cls.f(*args)`` devient ``f(*args)``." -#: howto/descriptor.rst:1143 +#: howto/descriptor.rst:1189 msgid "This chart summarizes the binding and its two most useful variants:" msgstr "" "Ce tableau résume le lien (*binding*) et ses deux variantes les plus " "utiles ::" -#: howto/descriptor.rst:1146 +#: howto/descriptor.rst:1192 msgid "Transformation" msgstr "Transformation" -#: howto/descriptor.rst:1146 -#, fuzzy +#: howto/descriptor.rst:1192 msgid "Called from an object" -msgstr "Appelé depuis un Objet" +msgstr "Appelée depuis un objet" -#: howto/descriptor.rst:1146 -#, fuzzy +#: howto/descriptor.rst:1192 msgid "Called from a class" -msgstr "Appelé depuis un Classe" +msgstr "Appelée depuis une classe" -#: howto/descriptor.rst:1149 +#: howto/descriptor.rst:1195 msgid "function" msgstr "fonction" -#: howto/descriptor.rst:1149 +#: howto/descriptor.rst:1195 msgid "f(obj, \\*args)" msgstr "f(obj, \\*args)" -#: howto/descriptor.rst:1151 +#: howto/descriptor.rst:1197 msgid "f(\\*args)" msgstr "f(\\*args)" -#: howto/descriptor.rst:1151 +#: howto/descriptor.rst:1197 msgid "staticmethod" msgstr "méthode statique" -#: howto/descriptor.rst:1153 +#: howto/descriptor.rst:1199 msgid "classmethod" msgstr "méthode de classe" -#: howto/descriptor.rst:1153 +#: howto/descriptor.rst:1199 msgid "f(type(obj), \\*args)" msgstr "f(type(obj), \\*args)" -#: howto/descriptor.rst:1153 +#: howto/descriptor.rst:1199 msgid "f(cls, \\*args)" msgstr "f(cls, \\*args)" -#: howto/descriptor.rst:1158 -#, fuzzy +#: howto/descriptor.rst:1204 msgid "Static methods" -msgstr "méthode statique" +msgstr "Méthodes statiques" -#: howto/descriptor.rst:1160 +#: howto/descriptor.rst:1206 msgid "" "Static methods return the underlying function without changes. Calling " "either ``c.f`` or ``C.f`` is the equivalent of a direct lookup into ``object." @@ -1046,7 +1199,7 @@ msgstr "" "__getattribute__(C, \"f\")``. Par conséquent, la fonction devient accessible " "de manière identique à partir d'un objet ou d'une classe." -#: howto/descriptor.rst:1166 +#: howto/descriptor.rst:1212 msgid "" "Good candidates for static methods are methods that do not reference the " "``self`` variable." @@ -1054,7 +1207,7 @@ msgstr "" "Les bonnes candidates pour être méthode statique sont des méthodes qui ne " "font pas référence à la variable ``self``." -#: howto/descriptor.rst:1169 +#: howto/descriptor.rst:1215 msgid "" "For instance, a statistics package may include a container class for " "experimental data. The class provides normal methods for computing the " @@ -1076,42 +1229,37 @@ msgstr "" "appelée à partir d'un objet ou de la classe : ``s.erf(1.5) --> .9332``` ou " "``Sample.erf(1.5) --> .9332``." -#: howto/descriptor.rst:1178 -#, fuzzy +#: howto/descriptor.rst:1224 msgid "" "Since static methods return the underlying function with no changes, the " "example calls are unexciting:" msgstr "" -"Depuis que les méthodes statiques renvoient la fonction sous-jacente sans " -"changement, les exemples d’appels ne sont pas excitants ::" +"Puisque les méthodes statiques renvoient la fonction sous-jacente sans " +"changement, les exemples d’appels sont d'une grande banalité ::" -#: howto/descriptor.rst:1195 -#, fuzzy +#: howto/descriptor.rst:1241 msgid "" "Using the non-data descriptor protocol, a pure Python version of :func:" "`staticmethod` would look like this:" msgstr "" -"En utilisant le protocole de descripteur *non-data*, une version Python pure " -"de :func:`staticmethod` ressemblerait à ceci ::" +"En utilisant le protocole de descripteur hors-données, une version Python " +"pure de :func:`staticmethod` ressemblerait à ceci ::" -#: howto/descriptor.rst:1211 -#, fuzzy +#: howto/descriptor.rst:1273 msgid "Class methods" -msgstr "méthode de classe" +msgstr "Méthodes de classe" -#: howto/descriptor.rst:1213 -#, fuzzy +#: howto/descriptor.rst:1275 msgid "" "Unlike static methods, class methods prepend the class reference to the " "argument list before calling the function. This format is the same for " "whether the caller is an object or a class:" msgstr "" -"Contrairement aux méthodes statiques, les méthodes de classe préchargent la " -"référence de classe dans la liste d'arguments avant d'appeler la fonction. " -"Ce format est le même que l'appelant soit un objet ou une classe ::" +"Contrairement aux méthodes statiques, les méthodes de classe ajoutent la " +"référence de classe en tête de la liste d'arguments, avant d'appeler la " +"fonction. C'est le même format que l'appelant soit un objet ou une classe ::" -#: howto/descriptor.rst:1231 -#, fuzzy +#: howto/descriptor.rst:1293 msgid "" "This behavior is useful whenever the method only needs to have a class " "reference and does not rely on data stored in a specific instance. One use " @@ -1120,73 +1268,85 @@ msgid "" "of keys. The pure Python equivalent is:" msgstr "" "Ce comportement est utile lorsque la fonction n'a besoin que d'une référence " -"de classe et ne se soucie pas des données sous-jacentes. Une des " -"utilisations des méthodes de classe est de créer d'autres constructeurs de " -"classe. En Python 2.3, la méthode de classe :func:`dict.fromkeys` crée un " -"nouveau dictionnaire à partir d'une liste de clés. L'équivalent Python pur " -"est ::" +"de classe et ne se soucie pas des données propres à une instance " +"particulière. Une des utilisations des méthodes de classe est de créer des " +"constructeurs de classe personnalisés. Par exemple, la méthode de classe :" +"func:`dict.fromkeys` crée un nouveau dictionnaire à partir d'une liste de " +"clés. L'équivalent Python pur est ::" -#: howto/descriptor.rst:1248 -#, fuzzy +#: howto/descriptor.rst:1310 msgid "Now a new dictionary of unique keys can be constructed like this:" msgstr "" "Maintenant un nouveau dictionnaire de clés uniques peut être construit comme " -"ceci ::" +"ceci :" -#: howto/descriptor.rst:1258 -#, fuzzy +#: howto/descriptor.rst:1320 msgid "" "Using the non-data descriptor protocol, a pure Python version of :func:" "`classmethod` would look like this:" msgstr "" -"En utilisant le protocole de descripteur *non-data*, une version Python pure " -"de :func:`classmethod` ressemblerait à ceci ::" +"En utilisant le protocole de descripteur hors-données, une version Python " +"pure de :func:`classmethod` ressemblerait à ceci :" -#: howto/descriptor.rst:1296 +#: howto/descriptor.rst:1369 msgid "" -"The code path for ``hasattr(obj, '__get__')`` was added in Python 3.9 and " -"makes it possible for :func:`classmethod` to support chained decorators. For " -"example, a classmethod and property could be chained together:" +"The code path for ``hasattr(type(self.f), '__get__')`` was added in Python " +"3.9 and makes it possible for :func:`classmethod` to support chained " +"decorators. For example, a classmethod and property could be chained " +"together:" msgstr "" -#: howto/descriptor.rst:1315 +#: howto/descriptor.rst:1389 msgid "Member objects and __slots__" -msgstr "" +msgstr "Objets membres et *__slots__*" -#: howto/descriptor.rst:1317 +#: howto/descriptor.rst:1391 msgid "" "When a class defines ``__slots__``, it replaces instance dictionaries with a " "fixed-length array of slot values. From a user point of view that has " "several effects:" msgstr "" +"Lorsqu'une classe définit ``__slots__``, Python remplace le dictionnaire " +"d'instance par un tableau de longueur fixe de créneaux prédéfinis. D'un " +"point de vue utilisateur, cela :" -#: howto/descriptor.rst:1321 +#: howto/descriptor.rst:1395 msgid "" "1. Provides immediate detection of bugs due to misspelled attribute " "assignments. Only attribute names specified in ``__slots__`` are allowed:" msgstr "" +"1/ permet une détection immédiate des bogues dus à des affectations " +"d'attributs mal orthographiés. Seuls les noms d'attribut spécifiés dans " +"``__slots__`` sont autorisés :" -#: howto/descriptor.rst:1337 +#: howto/descriptor.rst:1411 msgid "" "2. Helps create immutable objects where descriptors manage access to private " "attributes stored in ``__slots__``:" msgstr "" +"2/ aide à créer des objets immuables où les descripteurs gèrent l'accès aux " +"attributs privés stockés dans ``__slots__`` :" -#: howto/descriptor.rst:1372 +#: howto/descriptor.rst:1446 msgid "" "3. Saves memory. On a 64-bit Linux build, an instance with two attributes " "takes 48 bytes with ``__slots__`` and 152 bytes without. This `flyweight " "design pattern `_ likely " "only matters when a large number of instances are going to be created." msgstr "" +"3/ économise de la mémoire. Sur une version Linux 64 bits, une instance avec " +"deux attributs prend 48 octets avec ``__slots__`` et 152 octets sans. Ce " +"patron de conception `poids mouche `_ n'a probablement d'importance que si un " +"grand nombre d'instances doivent être créées ;" -#: howto/descriptor.rst:1377 +#: howto/descriptor.rst:1451 msgid "" "4. Blocks tools like :func:`functools.cached_property` which require an " "instance dictionary to function correctly:" msgstr "" -#: howto/descriptor.rst:1399 +#: howto/descriptor.rst:1473 msgid "" "It is not possible to create an exact drop-in pure Python version of " "``__slots__`` because it requires direct access to C structures and control " @@ -1195,40 +1355,59 @@ msgid "" "``_slotvalues`` list. Reads and writes to that private structure are " "managed by member descriptors:" msgstr "" +"Il n'est pas possible de créer une version Python pure exacte de " +"``__slots__`` car il faut un accès direct aux structures C et un contrôle " +"sur l'allocation de la mémoire des objets. Cependant, nous pouvons " +"construire une simulation presque fidèle où la structure C réelle pour les " +"*slots* est émulée par une liste privée ``_slotvalues``. Les lectures et " +"écritures dans cette structure privée sont gérées par des descripteurs de " +"membres :" -#: howto/descriptor.rst:1442 +#: howto/descriptor.rst:1516 msgid "" "The :meth:`type.__new__` method takes care of adding member objects to class " "variables:" msgstr "" +"La méthode :meth:`type.__new__` s'occupe d'ajouter des objets membres aux " +"variables de classe :" -#: howto/descriptor.rst:1458 +#: howto/descriptor.rst:1532 msgid "" "The :meth:`object.__new__` method takes care of creating instances that have " "slots instead of an instance dictionary. Here is a rough simulation in pure " "Python:" msgstr "" +"La méthode :meth:`object.__new__` s'occupe de créer des instances qui ont " +"des *slots* au lieu d'un dictionnaire d'instances. Voici une simulation " +"approximative en Python pur :" -#: howto/descriptor.rst:1493 +#: howto/descriptor.rst:1567 msgid "" "To use the simulation in a real class, just inherit from :class:`Object` and " "set the :term:`metaclass` to :class:`Type`:" msgstr "" +"Pour utiliser la simulation dans une classe réelle, héritez simplement de :" +"class:`Object` et définissez la :term:`métaclasse ` à :class:" +"`Type` :" -#: howto/descriptor.rst:1507 +#: howto/descriptor.rst:1581 msgid "" "At this point, the metaclass has loaded member objects for *x* and *y*::" msgstr "" +"À ce stade, la métaclasse a chargé des objets membres pour *x* et *y* ::" -#: howto/descriptor.rst:1528 +#: howto/descriptor.rst:1602 msgid "" "When instances are created, they have a ``slot_values`` list where the " "attributes are stored:" msgstr "" +"Lorsque les instances sont créées, elles ont une liste ``slot_values`` où " +"les attributs sont stockés :" -#: howto/descriptor.rst:1540 +#: howto/descriptor.rst:1614 msgid "Misspelled or unassigned attributes will raise an exception:" msgstr "" +"Les attributs mal orthographiés ou non attribués lèvent une exception :" #~ msgid "" #~ "Defines descriptors, summarizes the protocol, and shows how descriptors " diff --git a/howto/functional.po b/howto/functional.po index 07414aae80..75f99aa7ff 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-04-30 11:11+0200\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" @@ -180,23 +180,23 @@ msgstr "" msgid "" "Some languages are very strict about purity and don't even have assignment " "statements such as ``a=3`` or ``c = a + b``, but it's difficult to avoid all " -"side effects. Printing to the screen or writing to a disk file are side " -"effects, for example. For example, in Python a call to the :func:`print` " -"or :func:`time.sleep` function both return no useful value; they're only " -"called for their side effects of sending some text to the screen or pausing " -"execution for a second." +"side effects, such as printing to the screen or writing to a disk file. " +"Another example is a call to the :func:`print` or :func:`time.sleep` " +"function, neither of which returns a useful value. Both are called only for " +"their side effects of sending some text to the screen or pausing execution " +"for a second." msgstr "" "Certains langages sont très stricts en ce qui concerne la pureté des " "fonctions et ne laissent même pas la possibilité d'assigner des variables " "avec des expressions telles que ``a = 3`` ou ``c = a + b``, cependant il est " "difficile d'éviter tous les effets de bord. Afficher un message sur l'écran " -"ou écrire un fichier sur le disque sont des effets de bord. Par exemple, un " -"appel aux fonctions :func:`print` ou :func:`time.sleep` en Python ne renvoie " -"aucune valeur utile ; ces fonctions ne sont appelées que pour leur effet de " -"bord (afficher du texte sur l'écran et mettre en pause l'exécution du " -"programme)." +"ou écrire un fichier sur le disque sont des effets de bord. Pour prendre un " +"autre exemple, un appel aux fonctions :func:`print` ou :func:`time.sleep` en " +"Python ne renvoie aucune valeur utile ; ces fonctions ne sont appelées que " +"pour leur effet de bord (afficher du texte sur l'écran ou mettre en pause " +"l'exécution du programme)." -#: howto/functional.rst:74 +#: howto/functional.rst:73 msgid "" "Python programs written in functional style usually won't go to the extreme " "of avoiding all I/O or all assignments; instead, they'll provide a " @@ -213,7 +213,7 @@ msgstr "" "locales mais ne modifiera pas de variable globale et n'aura pas d'autre " "effet de bord." -#: howto/functional.rst:80 +#: howto/functional.rst:79 msgid "" "Functional programming can be considered the opposite of object-oriented " "programming. Objects are little capsules containing some internal state " @@ -234,7 +234,7 @@ msgstr "" "qui prennent en argument et renvoient des instances représentants des objets " "de votre application (courriers électroniques, transactions, etc.)." -#: howto/functional.rst:89 +#: howto/functional.rst:88 msgid "" "Functional design may seem like an odd constraint to work under. Why should " "you avoid objects and side effects? There are theoretical and practical " @@ -245,30 +245,30 @@ msgstr "" "avantages théoriques et pratiques au style fonctionnel :" # Énumération -#: howto/functional.rst:93 +#: howto/functional.rst:92 msgid "Formal provability." msgstr "preuves formelles ;" # Énumération -#: howto/functional.rst:94 +#: howto/functional.rst:93 msgid "Modularity." msgstr "modularité ;" # Énumération -#: howto/functional.rst:95 +#: howto/functional.rst:94 msgid "Composability." msgstr "composabilité ;" # Énumération -#: howto/functional.rst:96 +#: howto/functional.rst:95 msgid "Ease of debugging and testing." msgstr "facilité de débogage et de test." -#: howto/functional.rst:100 +#: howto/functional.rst:99 msgid "Formal provability" msgstr "Preuves formelles" -#: howto/functional.rst:102 +#: howto/functional.rst:101 msgid "" "A theoretical benefit is that it's easier to construct a mathematical proof " "that a functional program is correct." @@ -276,7 +276,7 @@ msgstr "" "Un avantage théorique est qu'il plus facile de construire une preuve " "mathématique de l'exactitude d'un programme fonctionnel." -#: howto/functional.rst:105 +#: howto/functional.rst:104 msgid "" "For a long time researchers have been interested in finding ways to " "mathematically prove programs correct. This is different from testing a " @@ -292,7 +292,7 @@ msgstr "" "d'établir une preuve rigoureuse que le programme produit le bon résultat " "pour toutes les entrées possibles." -#: howto/functional.rst:112 +#: howto/functional.rst:111 msgid "" "The technique used to prove programs correct is to write down " "**invariants**, properties of the input data and of the program's variables " @@ -311,7 +311,7 @@ msgstr "" "programme. À ce stade, les invariants doivent alors correspondre aux " "propriétés que l'on souhaite que la sortie du programme vérifie." -#: howto/functional.rst:120 +#: howto/functional.rst:119 msgid "" "Functional programming's avoidance of assignments arose because assignments " "are difficult to handle with this technique; assignments can break " @@ -323,7 +323,7 @@ msgstr "" "assignations peuvent rompre des invariants qui étaient vrais auparavant sans " "pour autant produire de nouveaux invariants qui pourraient être propagés." -#: howto/functional.rst:125 +#: howto/functional.rst:124 msgid "" "Unfortunately, proving programs correct is largely impractical and not " "relevant to Python software. Even trivial programs require proofs that are " @@ -345,11 +345,11 @@ msgstr "" "erreur et que vous pensez désormais, à tort, que vous avez prouvé que votre " "programme est correct." -#: howto/functional.rst:136 +#: howto/functional.rst:135 msgid "Modularity" msgstr "Modularité" -#: howto/functional.rst:138 +#: howto/functional.rst:137 msgid "" "A more practical benefit of functional programming is that it forces you to " "break apart your problem into small pieces. Programs are more modular as a " @@ -364,15 +364,15 @@ msgstr "" "grosse fonction qui réalise une transformation complexe. Les petites " "fonctions sont plus faciles à lire et à vérifier." -#: howto/functional.rst:146 +#: howto/functional.rst:145 msgid "Ease of debugging and testing" msgstr "Facilité de débogage et de test" -#: howto/functional.rst:148 +#: howto/functional.rst:147 msgid "Testing and debugging a functional-style program is easier." msgstr "Tester et déboguer un programme fonctionnel est plus facile." -#: howto/functional.rst:150 +#: howto/functional.rst:149 msgid "" "Debugging is simplified because functions are generally small and clearly " "specified. When a program doesn't work, each function is an interface point " @@ -386,7 +386,7 @@ msgstr "" "valeurs sont justes. Vous pouvez observer les entrées intermédiaires et les " "sorties afin d'isoler rapidement la fonction qui est à l'origine du bogue." -#: howto/functional.rst:155 +#: howto/functional.rst:154 msgid "" "Testing is easier because each function is a potential subject for a unit " "test. Functions don't depend on system state that needs to be replicated " @@ -399,11 +399,11 @@ msgstr "" "à la place vous n'avez qu'à produire une entrée synthétique et vérifier que " "le résultat correspond à ce que vous attendez." -#: howto/functional.rst:162 +#: howto/functional.rst:161 msgid "Composability" msgstr "Composabilité" -#: howto/functional.rst:164 +#: howto/functional.rst:163 msgid "" "As you work on a functional-style program, you'll write a number of " "functions with varying inputs and outputs. Some of these functions will be " @@ -422,7 +422,7 @@ msgstr "" "contenu d'un fichier à partir de son nom peuvent être utiles dans de " "nombreuses situations." -#: howto/functional.rst:171 +#: howto/functional.rst:170 msgid "" "Over time you'll form a personal library of utilities. Often you'll " "assemble new programs by arranging existing functions in a new configuration " @@ -433,11 +433,11 @@ msgstr "" "agençant des fonctions existantes dans une nouvelle configuration et en " "écrivant quelques fonctions spécifiques à votre objectif en cours." -#: howto/functional.rst:179 +#: howto/functional.rst:178 msgid "Iterators" msgstr "Itérateurs" -#: howto/functional.rst:181 +#: howto/functional.rst:180 msgid "" "I'll start by looking at a Python language feature that's an important " "foundation for writing functional-style programs: iterators." @@ -445,7 +445,7 @@ msgstr "" "Commençons par jeter un œil à une des fonctionnalités les plus importantes " "pour écrire en style fonctionnel avec Python : les itérateurs." -#: howto/functional.rst:184 +#: howto/functional.rst:183 msgid "" "An iterator is an object representing a stream of data; this object returns " "the data one element at a time. A Python iterator must support a method " @@ -463,7 +463,7 @@ msgstr "" "`StopIteration`. Toutefois, ce n'est pas indispensable ; il est envisageable " "d'écrire un itérateur qui produit un flux infini de données." -#: howto/functional.rst:192 +#: howto/functional.rst:191 msgid "" "The built-in :func:`iter` function takes an arbitrary object and tries to " "return an iterator that will return the object's contents or elements, " @@ -479,11 +479,11 @@ msgstr "" "listes et les dictionnaires. On appelle :term:`iterable` un objet pour " "lequel il est possible de construire un itérateur." -#: howto/functional.rst:199 +#: howto/functional.rst:198 msgid "You can experiment with the iteration interface manually:" msgstr "Vous pouvez expérimenter avec l'interface d'itération manuellement :" -#: howto/functional.rst:217 +#: howto/functional.rst:216 msgid "" "Python expects iterable objects in several different contexts, the most " "important being the :keyword:`for` statement. In the statement ``for X in " @@ -495,7 +495,7 @@ msgstr "" "``for X in Y``, Y doit être un itérateur ou un objet pour lequel :func:" "`iter` peut générer un itérateur. Ces deux expressions sont équivalentes ::" -#: howto/functional.rst:229 +#: howto/functional.rst:228 msgid "" "Iterators can be materialized as lists or tuples by using the :func:`list` " "or :func:`tuple` constructor functions:" @@ -503,7 +503,7 @@ msgstr "" "Les itérateurs peuvent être transformés en listes ou en *n*-uplets en " "appelant les constructeurs respectifs :func:`list` et :func:`tuple` :" -#: howto/functional.rst:238 +#: howto/functional.rst:237 msgid "" "Sequence unpacking also supports iterators: if you know an iterator will " "return N elements, you can unpack them into an N-tuple:" @@ -512,11 +512,11 @@ msgstr "" "vous savez qu'un itérateur renvoie N éléments, vous pouvez les dépaqueter " "dans un *n*-uplet :" -#: howto/functional.rst:247 +#: howto/functional.rst:246 msgid "" "Built-in functions such as :func:`max` and :func:`min` can take a single " -"iterator argument and will return the largest or smallest element. The ``" -"\"in\"`` and ``\"not in\"`` operators also support iterators: ``X in " +"iterator argument and will return the largest or smallest element. The " +"``\"in\"`` and ``\"not in\"`` operators also support iterators: ``X in " "iterator`` is true if X is found in the stream returned by the iterator. " "You'll run into obvious problems if the iterator is infinite; :func:`max`, :" "func:`min` will never return, and if the element X never appears in the " @@ -528,10 +528,10 @@ msgstr "" "itérateurs : ``X in iterator`` est vrai si X a été trouvé dans le flux " "renvoyé par l'itérateur. Vous rencontrerez bien sûr des problèmes si " "l'itérateur est infini : :func:`max`, :func:`min` ne termineront jamais et, " -"si l'élément X n'apparaît pas dans le flux, les opérateurs ``\"in\"`` et ``" -"\"not in\"`` non plus." +"si l'élément X n'apparaît pas dans le flux, les opérateurs ``\"in\"`` et " +"``\"not in\"`` non plus." -#: howto/functional.rst:255 +#: howto/functional.rst:254 msgid "" "Note that you can only go forward in an iterator; there's no way to get the " "previous element, reset the iterator, or make a copy of it. Iterator " @@ -550,11 +550,11 @@ msgstr "" "devez utiliser le même flux pour autre chose, vous devrez en créer un " "nouveau." -#: howto/functional.rst:265 +#: howto/functional.rst:264 msgid "Data Types That Support Iterators" msgstr "Types de données itérables" -#: howto/functional.rst:267 +#: howto/functional.rst:266 msgid "" "We've already seen how lists and tuples support iterators. In fact, any " "Python sequence type, such as strings, will automatically support creation " @@ -564,7 +564,7 @@ msgstr "" "itérateurs. En réalité, n'importe quel type de séquence en Python, par " "exemple les chaînes de caractères, sont itérables." -#: howto/functional.rst:271 +#: howto/functional.rst:270 msgid "" "Calling :func:`iter` on a dictionary returns an iterator that will loop over " "the dictionary's keys::" @@ -572,7 +572,7 @@ msgstr "" "Appeler :func:`iter` sur un dictionnaire renvoie un itérateur qui parcourt " "l'ensemble de ses clés ::" -#: howto/functional.rst:291 +#: howto/functional.rst:290 msgid "" "Note that starting with Python 3.7, dictionary iteration order is guaranteed " "to be the same as the insertion order. In earlier versions, the behaviour " @@ -583,7 +583,7 @@ msgstr "" "clés. Dans les versions précédentes, ce comportement n'était pas spécifié et " "pouvait varier en fonction de l'implémentation." -#: howto/functional.rst:295 +#: howto/functional.rst:294 msgid "" "Applying :func:`iter` to a dictionary always loops over the keys, but " "dictionaries have methods that return other iterators. If you want to " @@ -596,7 +596,7 @@ msgstr "" "dictionnaire, vous pouvez explicitement appeler les méthodes :meth:`~dict." "values` ou :meth:`~dict.items` pour obtenir l'itérateur idoine." -#: howto/functional.rst:301 +#: howto/functional.rst:300 msgid "" "The :func:`dict` constructor can accept an iterator that returns a finite " "stream of ``(key, value)`` tuples:" @@ -604,7 +604,7 @@ msgstr "" "Le constructeur :func:`dict` accepte de prendre un itérateur en argument qui " "renvoie un flux fini de pairs ``(clé, valeur)`` :" -#: howto/functional.rst:308 +#: howto/functional.rst:307 msgid "" "Files also support iteration by calling the :meth:`~io.TextIOBase.readline` " "method until there are no more lines in the file. This means you can read " @@ -615,7 +615,7 @@ msgstr "" "fichier. Cela signifie que vous pouvez lire l'intégralité d'un fichier de la " "façon suivante ::" -#: howto/functional.rst:316 +#: howto/functional.rst:315 msgid "" "Sets can take their contents from an iterable and let you iterate over the " "set's elements::" @@ -623,11 +623,11 @@ msgstr "" "Les ensembles peuvent être créés à partir d'un itérable et autorisent " "l'itération sur les éléments de l'ensemble ::" -#: howto/functional.rst:326 +#: howto/functional.rst:325 msgid "Generator expressions and list comprehensions" msgstr "Expressions génératrices et compréhension de listes" -#: howto/functional.rst:328 +#: howto/functional.rst:327 msgid "" "Two common operations on an iterator's output are 1) performing some " "operation for every element, 2) selecting a subset of elements that meet " @@ -642,7 +642,7 @@ msgstr "" "caractères blancs à la fin de chaque ligne ou extraire toutes les chaînes " "contenant une sous-chaîne précise." -#: howto/functional.rst:334 +#: howto/functional.rst:333 msgid "" "List comprehensions and generator expressions (short form: \"listcomps\" and " "\"genexps\") are a concise notation for such operations, borrowed from the " @@ -655,14 +655,14 @@ msgstr "" "retirer tous les caractères blancs initiaux et finaux d'un flux de chaînes " "de caractères à l'aide du code suivant ::" -#: howto/functional.rst:347 +#: howto/functional.rst:346 msgid "" "You can select only certain elements by adding an ``\"if\"`` condition::" msgstr "" "Vous pouvez ne sélectionner que certains éléments en ajoutant une condition " "« ``if`` » ::" -#: howto/functional.rst:352 +#: howto/functional.rst:351 msgid "" "With a list comprehension, you get back a Python list; ``stripped_list`` is " "a list containing the resulting lines, not an iterator. Generator " @@ -680,7 +680,7 @@ msgstr "" "sur des itérateurs infinis ou produisant une très grande quantité de " "données. Les expressions génératrices sont préférables dans ce cas." -#: howto/functional.rst:359 +#: howto/functional.rst:358 msgid "" "Generator expressions are surrounded by parentheses (\"()\") and list " "comprehensions are surrounded by square brackets (\"[]\"). Generator " @@ -690,7 +690,7 @@ msgstr "" "compréhensions de listes entre crochets (« [] »). Les expressions " "génératrices sont de la forme ::" -#: howto/functional.rst:372 +#: howto/functional.rst:371 msgid "" "Again, for a list comprehension only the outside brackets are different " "(square brackets instead of parentheses)." @@ -698,7 +698,7 @@ msgstr "" "La compréhension de liste équivalente s'écrit de la même manière, utilisez " "juste des crochets à la place des parenthèses." -#: howto/functional.rst:375 +#: howto/functional.rst:374 msgid "" "The elements of the generated output will be the successive values of " "``expression``. The ``if`` clauses are all optional; if present, " @@ -709,7 +709,7 @@ msgstr "" "clause ``if`` est facultative ; si elle est présente, ``expression`` n'est " "évaluée et ajoutée au résultat que si ``condition`` est vérifiée." -#: howto/functional.rst:379 +#: howto/functional.rst:378 msgid "" "Generator expressions always have to be written inside parentheses, but the " "parentheses signalling a function call also count. If you want to create an " @@ -720,7 +720,7 @@ msgstr "" "comptent aussi. Si vous souhaitez créer un itérateur qui soit immédiatement " "passé à une fonction, vous pouvez écrire ::" -#: howto/functional.rst:385 +#: howto/functional.rst:384 msgid "" "The ``for...in`` clauses contain the sequences to be iterated over. The " "sequences do not have to be the same length, because they are iterated over " @@ -736,7 +736,7 @@ msgstr "" "parcourue dans son intégralité pour chaque paire d'éléments de ``sequence1`` " "et ``sequence2``." -#: howto/functional.rst:391 +#: howto/functional.rst:390 msgid "" "To put it another way, a list comprehension or generator expression is " "equivalent to the following Python code::" @@ -744,7 +744,7 @@ msgstr "" "Autrement dit, une compréhension de liste ou une expression génératrice est " "équivalente au code Python ci-dessous ::" -#: howto/functional.rst:408 +#: howto/functional.rst:407 msgid "" "This means that when there are multiple ``for...in`` clauses but no ``if`` " "clauses, the length of the resulting output will be equal to the product of " @@ -756,7 +756,7 @@ msgstr "" "produit des longueurs des séquences itérées. Si vous travaillez sur deux " "listes de longueur 3, la sortie contiendra 9 éléments :" -#: howto/functional.rst:420 +#: howto/functional.rst:419 msgid "" "To avoid introducing an ambiguity into Python's grammar, if ``expression`` " "is creating a tuple, it must be surrounded with parentheses. The first list " @@ -767,11 +767,11 @@ msgstr "" "uplet. La première compréhension de liste ci-dessous n'est pas valide " "syntaxiquement, tandis que la seconde l'est ::" -#: howto/functional.rst:431 +#: howto/functional.rst:430 msgid "Generators" msgstr "Générateurs" -#: howto/functional.rst:433 +#: howto/functional.rst:432 msgid "" "Generators are a special class of functions that simplify the task of " "writing iterators. Regular functions compute a value and return it, but " @@ -782,7 +782,7 @@ msgstr "" "renvoie, tandis que les générateurs renvoient un itérateur qui produit un " "flux de valeurs." -#: howto/functional.rst:437 +#: howto/functional.rst:436 msgid "" "You're doubtless familiar with how regular function calls work in Python or " "C. When you call a function, it gets a private namespace where its local " @@ -807,11 +807,11 @@ msgstr "" "s'agit de fonctions qu'il est possible d'interrompre, puis de relancer sans " "perdre leur progression." -#: howto/functional.rst:446 +#: howto/functional.rst:445 msgid "Here's the simplest example of a generator function:" msgstr "Voici un exemple simple de fonction génératrice :" -#: howto/functional.rst:452 +#: howto/functional.rst:451 msgid "" "Any function containing a :keyword:`yield` keyword is a generator function; " "this is detected by Python's :term:`bytecode` compiler which compiles the " @@ -821,7 +821,7 @@ msgstr "" "générateur ; le compilateur :term:`bytecode` de Python détecte ce mot-clé et " "prend en compte cette particularité de la fonction." -#: howto/functional.rst:456 +#: howto/functional.rst:455 msgid "" "When you call a generator function, it doesn't return a single value; " "instead it returns a generator object that supports the iterator protocol. " @@ -841,11 +841,11 @@ msgstr "" "locales sont conservées. Lors de l'appel suivant à la méthode :meth:" "`~generator.__next__` du générateur, la fonction reprend son exécution." -#: howto/functional.rst:465 +#: howto/functional.rst:464 msgid "Here's a sample usage of the ``generate_ints()`` generator:" msgstr "Voici un exemple d'utilisation du générateur ``generate_ints()`` :" -#: howto/functional.rst:482 +#: howto/functional.rst:481 msgid "" "You could equally write ``for i in generate_ints(5)``, or ``a, b, c = " "generate_ints(3)``." @@ -853,7 +853,7 @@ msgstr "" "Vous pourriez de façon équivalente écrire ``for i in generate_ints(5)`` ou " "``a, b, c = generate_ints(3)``." -#: howto/functional.rst:485 +#: howto/functional.rst:484 msgid "" "Inside a generator function, ``return value`` causes " "``StopIteration(value)`` to be raised from the :meth:`~generator.__next__` " @@ -866,7 +866,7 @@ msgstr "" "est atteinte), le flot de nouvelles valeurs s'arrête et le générateur ne " "peut plus rien produire." -#: howto/functional.rst:490 +#: howto/functional.rst:489 msgid "" "You could achieve the effect of generators manually by writing your own " "class and storing all the local variables of the generator as instance " @@ -883,7 +883,7 @@ msgstr "" "le renvoie. Cependant, cela devient beaucoup plus complexe pour des " "générateurs relativement sophistiqués." -#: howto/functional.rst:498 +#: howto/functional.rst:497 msgid "" "The test suite included with Python's library, :source:`Lib/test/" "test_generators.py`, contains a number of more interesting examples. Here's " @@ -895,7 +895,7 @@ msgstr "" "implémente le parcours d'un arbre dans l'ordre en utilisant des générateurs " "de façon récursive. ::" -#: howto/functional.rst:514 +#: howto/functional.rst:513 msgid "" "Two other examples in ``test_generators.py`` produce solutions for the N-" "Queens problem (placing N queens on an NxN chess board so that no queen " @@ -910,11 +910,11 @@ msgstr "" "de visiter toutes les cases d'un échiquier *NxN* sans jamais visiter la même " "case deux fois)." -#: howto/functional.rst:522 +#: howto/functional.rst:521 msgid "Passing values into a generator" msgstr "Transmettre des valeurs au générateur" -#: howto/functional.rst:524 +#: howto/functional.rst:523 msgid "" "In Python 2.4 and earlier, generators only produced output. Once a " "generator's code was invoked to create an iterator, there was no way to pass " @@ -930,7 +930,7 @@ msgstr "" "générateur à consulter des variables globales ou en lui passant des objets " "mutables modifiés hors du générateur, mais ces approches étaient compliquées." -#: howto/functional.rst:531 +#: howto/functional.rst:530 msgid "" "In Python 2.5 there's a simple way to pass values into a generator. :keyword:" "`yield` became an expression, returning a value that can be assigned to a " @@ -941,7 +941,7 @@ msgstr "" "expression qui renvoie une valeur sur laquelle il est possible d'opérer et " "que vous pouvez assigner à une variable ::" -#: howto/functional.rst:537 +#: howto/functional.rst:536 msgid "" "I recommend that you **always** put parentheses around a ``yield`` " "expression when you're doing something with the returned value, as in the " @@ -955,7 +955,7 @@ msgstr "" "systématiquement que de prendre le risque de les oublier là où elles sont " "requises." -#: howto/functional.rst:542 +#: howto/functional.rst:541 msgid "" "(:pep:`342` explains the exact rules, which are that a ``yield``-expression " "must always be parenthesized except when it occurs at the top-level " @@ -969,7 +969,7 @@ msgstr "" "que vous pouvez écrire ``val = yield i`` mais que les parenthèses sont " "requises s'il y a une opération, comme dans ``val = (yield i) + 12``.)" -#: howto/functional.rst:548 +#: howto/functional.rst:547 msgid "" "Values are sent into a generator by calling its :meth:`send(value) " "` method. This method resumes the generator's code and the " @@ -982,7 +982,7 @@ msgstr "" "la méthode :meth:`~generator.__next__` habituelle qui est appelée, alors " "``yield`` renvoie ``None``." -#: howto/functional.rst:553 +#: howto/functional.rst:552 msgid "" "Here's a simple counter that increments by 1 and allows changing the value " "of the internal counter." @@ -990,11 +990,11 @@ msgstr "" "Voici un exemple de compteur qui s'incrémente de 1 mais dont il est possible " "de modifier le compte interne." -#: howto/functional.rst:568 +#: howto/functional.rst:567 msgid "And here's an example of changing the counter:" msgstr "Et voici comment il est possible de modifier le compteur :" -#: howto/functional.rst:585 +#: howto/functional.rst:584 msgid "" "Because ``yield`` will often be returning ``None``, you should always check " "for this case. Don't just use its value in expressions unless you're sure " @@ -1006,7 +1006,7 @@ msgstr "" "seule la méthode :meth:`~generator.send` sera utilisée pour reprendre " "l'exécution de la fonction génératrice." -#: howto/functional.rst:590 +#: howto/functional.rst:589 msgid "" "In addition to :meth:`~generator.send`, there are two other methods on " "generators:" @@ -1015,17 +1015,17 @@ msgstr "" "s'appliquant aux générateurs :" # Énumération -#: howto/functional.rst:593 +#: howto/functional.rst:592 msgid "" -":meth:`throw(type, value=None, traceback=None) ` is used to " -"raise an exception inside the generator; the exception is raised by the " -"``yield`` expression where the generator's execution is paused." +":meth:`throw(value) ` is used to raise an exception inside " +"the generator; the exception is raised by the ``yield`` expression where the " +"generator's execution is paused." msgstr "" -":meth:`throw(type, value=None, traceback=None) ` permet de " -"lever une exception dans le générateur ; celle-ci est levée par l'expression " -"``yield`` à l'endroit où l'exécution a été mise en pause ;" +":meth:`throw(value) ` permet de lever une exception dans le " +"générateur ; celle-ci est levée par l'expression ``yield`` à l'endroit où " +"l'exécution a été mise en pause." -#: howto/functional.rst:597 +#: howto/functional.rst:596 msgid "" ":meth:`~generator.close` raises a :exc:`GeneratorExit` exception inside the " "generator to terminate the iteration. On receiving this exception, the " @@ -1043,7 +1043,7 @@ msgstr "" "le ramasse-miette de Python collecte le générateur, il appelle sa méthode :" "meth:`~generator.close`." -#: howto/functional.rst:605 +#: howto/functional.rst:604 msgid "" "If you need to run cleanup code when a :exc:`GeneratorExit` occurs, I " "suggest using a ``try: ... finally:`` suite instead of catching :exc:" @@ -1053,7 +1053,7 @@ msgstr "" "`GeneratorExit`, nous vous suggérons d'utiliser une structure ``try: ... " "finally`` plutôt que d'attraper :exc:`GeneratorExit`." -#: howto/functional.rst:608 +#: howto/functional.rst:607 msgid "" "The cumulative effect of these changes is to turn generators from one-way " "producers of information into both producers and consumers." @@ -1062,7 +1062,7 @@ msgstr "" "unidirectionnels d'information vers un statut hybride à la fois producteur " "et consommateur." -#: howto/functional.rst:611 +#: howto/functional.rst:610 msgid "" "Generators also become **coroutines**, a more generalized form of " "subroutines. Subroutines are entered at one point and exited at another " @@ -1077,18 +1077,18 @@ msgstr "" "de reprendre une coroutine à différents endroits (les instructions " "``yield``)." -#: howto/functional.rst:618 +#: howto/functional.rst:617 msgid "Built-in functions" msgstr "Fonctions natives" -#: howto/functional.rst:620 +#: howto/functional.rst:619 msgid "" "Let's look in more detail at built-in functions often used with iterators." msgstr "" "Voyons un peu plus en détail les fonctions natives souvent utilisées de " "concert avec les itérateurs." -#: howto/functional.rst:622 +#: howto/functional.rst:621 msgid "" "Two of Python's built-in functions, :func:`map` and :func:`filter` duplicate " "the features of generator expressions:" @@ -1096,25 +1096,25 @@ msgstr "" ":func:`map` et :func:`filter` sont deux fonctions natives de Python qui " "clonent les propriétés des expressions génératrices :" -#: howto/functional.rst:634 +#: howto/functional.rst:633 msgid "" ":func:`map(f, iterA, iterB, ...) ` returns an iterator over the sequence" msgstr "" ":func:`map(f, iterA, iterB, ...) ` renvoie un itérateur sur une séquence" -#: howto/functional.rst:626 +#: howto/functional.rst:625 msgid "" "``f(iterA[0], iterB[0]), f(iterA[1], iterB[1]), f(iterA[2], iterB[2]), ...``." msgstr "" "``f(iterA[0], iterB[0]), f(iterA[1], iterB[1]), f(iterA[2], iterB[2]), ...``." -#: howto/functional.rst:636 +#: howto/functional.rst:635 msgid "You can of course achieve the same effect with a list comprehension." msgstr "" "Vous pouvez obtenir le même comportement à l'aide d'une compréhension de " "liste." -#: howto/functional.rst:638 +#: howto/functional.rst:637 msgid "" ":func:`filter(predicate, iter) ` returns an iterator over all the " "sequence elements that meet a certain condition, and is similarly duplicated " @@ -1129,11 +1129,11 @@ msgstr "" "certaine condition. Dans le cas de :func:`filter`, le prédicat ne doit " "prendre qu'un seul argument." -#: howto/functional.rst:651 +#: howto/functional.rst:650 msgid "This can also be written as a list comprehension:" msgstr "Cela peut se réécrire sous la forme d'une compréhension de liste :" -#: howto/functional.rst:657 +#: howto/functional.rst:656 msgid "" ":func:`enumerate(iter, start=0) ` counts off the elements in the " "iterable returning 2-tuples containing the count (from *start*) and each " @@ -1143,7 +1143,7 @@ msgstr "" "l'itérable en renvoyant des paires contenant le nombre d'éléments déjà " "listés (depuis le *début*) et l'élément en cours ::" -#: howto/functional.rst:667 +#: howto/functional.rst:666 msgid "" ":func:`enumerate` is often used when looping through a list and recording " "the indexes at which certain conditions are met::" @@ -1152,7 +1152,7 @@ msgstr "" "liste tout en listant les indices pour lesquels une certaine condition est " "vérifiée ::" -#: howto/functional.rst:675 +#: howto/functional.rst:674 msgid "" ":func:`sorted(iterable, key=None, reverse=False) ` collects all the " "elements of the iterable into a list, sorts the list, and returns the sorted " @@ -1164,14 +1164,14 @@ msgstr "" "classé. Les arguments *key* et *reverse* sont passés à la méthode :meth:" "`~list.sort` de la liste ainsi construite. ::" -#: howto/functional.rst:690 +#: howto/functional.rst:689 msgid "" "(For a more detailed discussion of sorting, see the :ref:`sortinghowto`.)" msgstr "" "(Pour plus de détails sur les algorithmes de tri, se référer à :ref:" "`sortinghowto`.)" -#: howto/functional.rst:693 +#: howto/functional.rst:692 msgid "" "The :func:`any(iter) ` and :func:`all(iter) ` built-ins look at " "the truth values of an iterable's contents. :func:`any` returns ``True`` if " @@ -1184,7 +1184,7 @@ msgstr "" "comme vrai et :func:`all` renvoie ``True`` si tous les éléments s'évaluent " "comme vrai :" -#: howto/functional.rst:712 +#: howto/functional.rst:711 msgid "" ":func:`zip(iterA, iterB, ...) ` takes one element from each iterable " "and returns them in a tuple::" @@ -1192,7 +1192,7 @@ msgstr "" ":func:`zip(iterA, iterB, ...) ` rassemble un élément de chaque itérable " "dans un *n*-uplet ::" -#: howto/functional.rst:718 +#: howto/functional.rst:717 msgid "" "It doesn't construct an in-memory list and exhaust all the input iterators " "before returning; instead tuples are constructed and returned only if " @@ -1205,7 +1205,7 @@ msgstr "" "d'un comportement d'`évaluation paresseuse `__)." -#: howto/functional.rst:723 +#: howto/functional.rst:722 msgid "" "This iterator is intended to be used with iterables that are all of the same " "length. If the iterables are of different lengths, the resulting stream " @@ -1215,7 +1215,7 @@ msgstr "" "longueur des itérables diffère, le flux résultant a la même longueur que le " "plus court des itérables. ::" -#: howto/functional.rst:730 +#: howto/functional.rst:729 msgid "" "You should avoid doing this, though, because an element may be taken from " "the longer iterators and discarded. This means you can't go on to use the " @@ -1227,11 +1227,11 @@ msgstr "" "plus utiliser cet itérable car vous allez sauter l'élément qui vient d'être " "jeté." -#: howto/functional.rst:736 +#: howto/functional.rst:735 msgid "The itertools module" msgstr "Le module *itertools*" -#: howto/functional.rst:738 +#: howto/functional.rst:737 msgid "" "The :mod:`itertools` module contains a number of commonly-used iterators as " "well as functions for combining several iterators. This section will " @@ -1241,40 +1241,40 @@ msgstr "" "ainsi que des fonctions pour combiner différents itérateurs. Cette section " "présente le contenu du module au travers de quelques exemples." -#: howto/functional.rst:742 +#: howto/functional.rst:741 msgid "The module's functions fall into a few broad classes:" msgstr "Les fonctions du module se divisent en quelques grandes catégories :" # Énumération -#: howto/functional.rst:744 +#: howto/functional.rst:743 msgid "Functions that create a new iterator based on an existing iterator." msgstr "" "les fonctions qui transforment un itérateur existant en un nouvel itérateur ;" # Énumération -#: howto/functional.rst:745 +#: howto/functional.rst:744 msgid "Functions for treating an iterator's elements as function arguments." msgstr "" "les fonctions qui traitent les éléments d'un itérateur comme les arguments " "d'une fonction ;" # Énumération -#: howto/functional.rst:746 +#: howto/functional.rst:745 msgid "Functions for selecting portions of an iterator's output." msgstr "" "les fonctions qui permettent de sélectionner des portions de la sortie d'un " "itérateur ;" # Énumération -#: howto/functional.rst:747 +#: howto/functional.rst:746 msgid "A function for grouping an iterator's output." msgstr "une fonction qui permet de grouper la sortie d'un itérateur." -#: howto/functional.rst:750 +#: howto/functional.rst:749 msgid "Creating new iterators" msgstr "Créer de nouveaux itérateurs" -#: howto/functional.rst:752 +#: howto/functional.rst:751 msgid "" ":func:`itertools.count(start, step) ` returns an infinite " "stream of evenly spaced values. You can optionally supply the starting " @@ -1285,7 +1285,7 @@ msgstr "" "infini de valeurs régulièrement espacées. Vous pouvez spécifier la valeur de " "départ (par défaut, 0) et l'intervalle entre les nombres (par défaut, 1) ::" -#: howto/functional.rst:763 +#: howto/functional.rst:762 msgid "" ":func:`itertools.cycle(iter) ` saves a copy of the contents " "of a provided iterable and returns a new iterator that returns its elements " @@ -1296,7 +1296,7 @@ msgstr "" "contenu de l'itérable passé en argument et renvoie un nouvel itérateur qui " "produit tous les éléments du premier au dernier et se répète indéfiniment. ::" -#: howto/functional.rst:770 +#: howto/functional.rst:769 msgid "" ":func:`itertools.repeat(elem, [n]) ` returns the provided " "element *n* times, or returns the element endlessly if *n* is not " @@ -1306,7 +1306,7 @@ msgstr "" "passé en argument *n* fois ou répète l'élément à l'infini si *n* n'est pas " "spécifié. ::" -#: howto/functional.rst:778 +#: howto/functional.rst:777 msgid "" ":func:`itertools.chain(iterA, iterB, ...) ` takes an " "arbitrary number of iterables as input, and returns all the elements of the " @@ -1318,7 +1318,7 @@ msgstr "" "éléments du premier itérateur, puis tous ceux du second et ainsi de suite " "jusqu'à ce que tous les itérables aient été épuisés. ::" -#: howto/functional.rst:786 +#: howto/functional.rst:785 msgid "" ":func:`itertools.islice(iter, [start], stop, [step]) ` " "returns a stream that's a slice of the iterator. With a single *stop* " @@ -1336,7 +1336,7 @@ msgstr "" "pour *start*, *stop* ou *step* (contrairement aux listes et chaînes de " "caractères de Python). ::" -#: howto/functional.rst:800 +#: howto/functional.rst:799 msgid "" ":func:`itertools.tee(iter, [n]) ` replicates an iterator; it " "returns *n* independent iterators that will all return the contents of the " @@ -1352,11 +1352,11 @@ msgstr "" "source, ce qui peut consommer beaucoup de mémoire si l'itérateur est grand " "et que l'un des nouveaux itérateurs est plus consommé que les autres. ::" -#: howto/functional.rst:819 +#: howto/functional.rst:818 msgid "Calling functions on elements" msgstr "Appliquer des fonctions au contenu des itérateurs" -#: howto/functional.rst:821 +#: howto/functional.rst:820 msgid "" "The :mod:`operator` module contains a set of functions corresponding to " "Python's operators. Some examples are :func:`operator.add(a, b) ` renvoie un objet appelable qui récupère l'attribut ``.id``." -#: howto/functional.rst:827 +#: howto/functional.rst:826 msgid "" ":func:`itertools.starmap(func, iter) ` assumes that the " "iterable will return a stream of tuples, and calls *func* using these tuples " @@ -1380,11 +1380,11 @@ msgstr "" "l'itérable renvoie une séquence de *n*-uplets et appelle *func* en utilisant " "tous les *n*-uplets comme arguments ::" -#: howto/functional.rst:839 +#: howto/functional.rst:838 msgid "Selecting elements" msgstr "Sélectionner des éléments" -#: howto/functional.rst:841 +#: howto/functional.rst:840 msgid "" "Another group of functions chooses a subset of an iterator's elements based " "on a predicate." @@ -1392,7 +1392,7 @@ msgstr "" "Une autre catégorie de fonctions est celle permettant de sélectionner un " "sous-ensemble des éléments de l'itérateur selon un prédicat donné." -#: howto/functional.rst:844 +#: howto/functional.rst:843 msgid "" ":func:`itertools.filterfalse(predicate, iter) ` is " "the opposite of :func:`filter`, returning all elements for which the " @@ -1402,7 +1402,7 @@ msgstr "" "l'opposé de :func:`filter` et renvoie tous les éléments pour lesquels le " "prédicat est faux ::" -#: howto/functional.rst:851 +#: howto/functional.rst:850 msgid "" ":func:`itertools.takewhile(predicate, iter) ` returns " "elements for as long as the predicate returns true. Once the predicate " @@ -1412,7 +1412,7 @@ msgstr "" "les éléments de l'itérateur tant que ceux-ci vérifient le prédicat. Dès lors " "que le prédicat renvoie faux, l'itération s'arrête. ::" -#: howto/functional.rst:864 +#: howto/functional.rst:863 msgid "" ":func:`itertools.dropwhile(predicate, iter) ` discards " "elements while the predicate returns true, and then returns the rest of the " @@ -1422,7 +1422,7 @@ msgstr "" "des éléments tant que le prédicat renvoie vrai puis renvoie le reste des " "éléments de l'itérable. ::" -#: howto/functional.rst:874 +#: howto/functional.rst:873 msgid "" ":func:`itertools.compress(data, selectors) ` takes two " "iterators and returns only those elements of *data* for which the " @@ -1434,11 +1434,11 @@ msgstr "" "*data* pour lesquels l'élément correspondant de *selectors* est évalué à " "vrai. L'itération s'arrête lorsque l'un des deux itérateurs est épuisé ::" -#: howto/functional.rst:883 +#: howto/functional.rst:882 msgid "Combinatoric functions" msgstr "Fonctions combinatoires" -#: howto/functional.rst:885 +#: howto/functional.rst:884 msgid "" "The :func:`itertools.combinations(iterable, r) ` " "returns an iterator giving all possible *r*-tuple combinations of the " @@ -1448,7 +1448,7 @@ msgstr "" "un itérateur qui produit toutes les combinaisons possibles de *r*-uplets des " "éléments de *iterable*. ::" -#: howto/functional.rst:900 +#: howto/functional.rst:899 msgid "" "The elements within each tuple remain in the same order as *iterable* " "returned them. For example, the number 1 is always before 2, 3, 4, or 5 in " @@ -1463,7 +1463,7 @@ msgstr "" "contrainte sur l'ordre et renvoie tous les arrangements possibles de " "longueur *r* ::" -#: howto/functional.rst:919 +#: howto/functional.rst:918 msgid "" "If you don't supply a value for *r* the length of the iterable is used, " "meaning that all the elements are permuted." @@ -1472,7 +1472,7 @@ msgstr "" "utilisée par défaut, c'est-à-dire que toutes les permutations de la séquence " "sont renvoyées." -#: howto/functional.rst:922 +#: howto/functional.rst:921 msgid "" "Note that these functions produce all of the possible combinations by " "position and don't require that the contents of *iterable* are unique::" @@ -1481,7 +1481,7 @@ msgstr "" "basant sur la position des éléments et ne requièrent pas que les éléments de " "*iterable* soient uniques ::" -#: howto/functional.rst:929 +#: howto/functional.rst:928 msgid "" "The identical tuple ``('a', 'a', 'b')`` occurs twice, but the two 'a' " "strings came from different positions." @@ -1489,7 +1489,7 @@ msgstr "" "Le triplet ``('a', 'a', 'b')`` apparaît deux fois mais les deux chaînes de " "caractères ``'a'`` proviennent de deux positions différentes." -#: howto/functional.rst:932 +#: howto/functional.rst:931 msgid "" "The :func:`itertools.combinations_with_replacement(iterable, r) ` function relaxes a different constraint: " @@ -1503,11 +1503,11 @@ msgstr "" "tirage avec remise : le premier élément sélectionné pour chaque *n*-uplet " "est replacé dans la séquence avant le tirage du deuxième. ::" -#: howto/functional.rst:947 +#: howto/functional.rst:946 msgid "Grouping elements" msgstr "Grouper les éléments" -#: howto/functional.rst:949 +#: howto/functional.rst:948 msgid "" "The last function I'll discuss, :func:`itertools.groupby(iter, " "key_func=None) `, is the most complicated. " @@ -1522,7 +1522,7 @@ msgstr "" "l'identité par défaut (c'est-à-dire que la clé d'un élément est l'élément " "lui-même)." -#: howto/functional.rst:954 +#: howto/functional.rst:953 msgid "" ":func:`~itertools.groupby` collects all the consecutive elements from the " "underlying iterable that have the same key value, and returns a stream of 2-" @@ -1532,7 +1532,7 @@ msgstr "" "sous-jacent qui ont la même clé et renvoie un flux de paires contenant la " "clé et un itérateur produisant la liste des éléments pour cette clé." -#: howto/functional.rst:982 +#: howto/functional.rst:981 msgid "" ":func:`~itertools.groupby` assumes that the underlying iterable's contents " "will already be sorted based on the key. Note that the returned iterators " @@ -1547,11 +1547,11 @@ msgstr "" "itérateur (*iterator-2* dans l'exemple ci-dessus) et la clé à laquelle il " "est associé." -#: howto/functional.rst:989 +#: howto/functional.rst:988 msgid "The functools module" msgstr "Le module *functools*" -#: howto/functional.rst:991 +#: howto/functional.rst:990 msgid "" "The :mod:`functools` module in Python 2.5 contains some higher-order " "functions. A **higher-order function** takes one or more functions as input " @@ -1563,7 +1563,7 @@ msgstr "" "plusieurs fonctions en entrée et renvoie une fonction. L'outil le plus " "important de ce module est la fonction :func:`functools.partial`." -#: howto/functional.rst:996 +#: howto/functional.rst:995 msgid "" "For programs written in a functional style, you'll sometimes want to " "construct variants of existing functions that have some of the parameters " @@ -1579,7 +1579,7 @@ msgstr "" "b, c)``, c'est-à-dire fixer le premier paramètre de ``f()``. La fonction " "``g()`` est une appelée « application partielle » de ``f()``." -#: howto/functional.rst:1002 +#: howto/functional.rst:1001 msgid "" "The constructor for :func:`~functools.partial` takes the arguments " "``(function, arg1, arg2, ..., kwarg1=value1, kwarg2=value2)``. The " @@ -1590,11 +1590,11 @@ msgstr "" "arg1, arg2, ..., kwarg1=value1, kwarg2=value2, ...)``. Un appel à l'objet " "ainsi créé invoque la fonction ``fonction`` avec les arguments spécifiés." -#: howto/functional.rst:1007 +#: howto/functional.rst:1006 msgid "Here's a small but realistic example::" msgstr "Voici un exemple court mais réaliste ::" -#: howto/functional.rst:1019 +#: howto/functional.rst:1018 msgid "" ":func:`functools.reduce(func, iter, [initial_value]) ` " "cumulatively performs an operation on all the iterable's elements and, " @@ -1620,7 +1620,7 @@ msgstr "" "La valeur initiale *initial_value*, si spécifiée, est utilisée comme point " "de départ et le premier calcul est alors ``func(inital_value, A)``. ::" -#: howto/functional.rst:1043 +#: howto/functional.rst:1042 msgid "" "If you use :func:`operator.add` with :func:`functools.reduce`, you'll add up " "all the elements of the iterable. This case is so common that there's a " @@ -1631,7 +1631,7 @@ msgstr "" "courant pour qu'il existe une fonction native :func:`sum` qui lui est " "équivalent :" -#: howto/functional.rst:1055 +#: howto/functional.rst:1054 msgid "" "For many uses of :func:`functools.reduce`, though, it can be clearer to just " "write the obvious :keyword:`for` loop::" @@ -1640,7 +1640,7 @@ msgstr "" "impliquant :func:`functools.reduce` de simplement écrire la boucle :keyword:" "`for` ::" -#: howto/functional.rst:1067 +#: howto/functional.rst:1066 msgid "" "A related function is :func:`itertools.accumulate(iterable, func=operator." "add) `. It performs the same calculation, but instead " @@ -1653,11 +1653,11 @@ msgstr "" "renvoie un itérateur qui génère la séquence de tous les résultats " "intermédiaires ::" -#: howto/functional.rst:1080 +#: howto/functional.rst:1079 msgid "The operator module" msgstr "Le module *operator*" -#: howto/functional.rst:1082 +#: howto/functional.rst:1081 msgid "" "The :mod:`operator` module was mentioned earlier. It contains a set of " "functions corresponding to Python's operators. These functions are often " @@ -1669,12 +1669,12 @@ msgstr "" "utiles en programmation fonctionnelle car elles permettent de ne pas avoir à " "écrire des fonctions triviales qui ne réalisent qu'une seule opération." -#: howto/functional.rst:1087 +#: howto/functional.rst:1086 msgid "Some of the functions in this module are:" msgstr "Voici quelques fonctions de ce module :" # Énumération -#: howto/functional.rst:1089 +#: howto/functional.rst:1088 msgid "" "Math operations: ``add()``, ``sub()``, ``mul()``, ``floordiv()``, " "``abs()``, ..." @@ -1683,17 +1683,17 @@ msgstr "" "``floordiv()``, ``abs()``… ;" # Énumération -#: howto/functional.rst:1090 +#: howto/functional.rst:1089 msgid "Logical operations: ``not_()``, ``truth()``." msgstr "les opérations logiques : ``not_()``, ``truth()`` ;" # Énumération -#: howto/functional.rst:1091 +#: howto/functional.rst:1090 msgid "Bitwise operations: ``and_()``, ``or_()``, ``invert()``." msgstr "les opérations bit à bit : ``and_()``, ``or_()``, ``invert()`` ;" # Énumération -#: howto/functional.rst:1092 +#: howto/functional.rst:1091 msgid "" "Comparisons: ``eq()``, ``ne()``, ``lt()``, ``le()``, ``gt()``, and ``ge()``." msgstr "" @@ -1701,21 +1701,21 @@ msgstr "" "``ge()`` ;" # Énumération -#: howto/functional.rst:1093 +#: howto/functional.rst:1092 msgid "Object identity: ``is_()``, ``is_not()``." msgstr "l'identification des objets : ``is_()``, ``is_not()``." -#: howto/functional.rst:1095 +#: howto/functional.rst:1094 msgid "Consult the operator module's documentation for a complete list." msgstr "" "Veuillez vous référer à la documentation du module *operator* pour une liste " "complète." -#: howto/functional.rst:1099 +#: howto/functional.rst:1098 msgid "Small functions and the lambda expression" msgstr "Expressions lambda et fonctions courtes" -#: howto/functional.rst:1101 +#: howto/functional.rst:1100 msgid "" "When writing functional-style programs, you'll often need little functions " "that act as predicates or that combine elements in some way." @@ -1724,7 +1724,7 @@ msgstr "" "petites fonctions utilisées comme prédicats ou pour combiner des éléments " "d'une façon ou d'une autre." -#: howto/functional.rst:1104 +#: howto/functional.rst:1103 msgid "" "If there's a Python built-in or a module function that's suitable, you don't " "need to define a new function at all::" @@ -1732,7 +1732,7 @@ msgstr "" "S'il existe une fonction native Python ou une fonction d'un module qui " "convient, vous n'avez pas besoin de définir de nouvelle fonction ::" -#: howto/functional.rst:1110 +#: howto/functional.rst:1109 msgid "" "If the function you need doesn't exist, you need to write it. One way to " "write small functions is to use the :keyword:`lambda` expression. " @@ -1746,7 +1746,7 @@ msgstr "" "combinant ces derniers afin de créer une fonction anonyme qui renvoie la " "valeur de cette expression ::" -#: howto/functional.rst:1119 +#: howto/functional.rst:1118 msgid "" "An alternative is to just use the ``def`` statement and define a function in " "the usual way::" @@ -1754,7 +1754,7 @@ msgstr "" "Une autre façon de faire est de simplement utiliser l'instruction ``def`` " "afin de définir une fonction de la manière habituelle ::" -#: howto/functional.rst:1128 +#: howto/functional.rst:1127 msgid "" "Which alternative is preferable? That's a style question; my usual course " "is to avoid using ``lambda``." @@ -1762,7 +1762,7 @@ msgstr "" "La méthode à préférer est une question de style, en général l'auteur évite " "l'utilisation de ``lambda``." -#: howto/functional.rst:1131 +#: howto/functional.rst:1130 msgid "" "One reason for my preference is that ``lambda`` is quite limited in the " "functions it can define. The result has to be computable as a single " @@ -1779,7 +1779,7 @@ msgstr "" "une expression illisible. Par exemple, pouvez-vous dire du premier coup " "d’œil ce que fait le code ci-dessous ? ::" -#: howto/functional.rst:1141 +#: howto/functional.rst:1140 msgid "" "You can figure it out, but it takes time to disentangle the expression to " "figure out what's going on. Using a short nested ``def`` statements makes " @@ -1789,18 +1789,18 @@ msgstr "" "de démêler l'expression pour y voir plus clair. Une clause ``def`` concise " "améliore la situation ::" -#: howto/functional.rst:1151 +#: howto/functional.rst:1150 msgid "But it would be best of all if I had simply used a ``for`` loop::" msgstr "" "Toutefois l'idéal aurait été de simplement se contenter d'une boucle " "``for`` ::" -#: howto/functional.rst:1157 +#: howto/functional.rst:1156 msgid "Or the :func:`sum` built-in and a generator expression::" msgstr "" "ou de la fonction native :func:`sum` et d'une expression génératrice ::" -#: howto/functional.rst:1161 +#: howto/functional.rst:1160 msgid "" "Many uses of :func:`functools.reduce` are clearer when written as ``for`` " "loops." @@ -1808,7 +1808,7 @@ msgstr "" "Les boucles ``for`` sont souvent plus lisibles que la fonction :func:" "`functools.reduce`." -#: howto/functional.rst:1163 +#: howto/functional.rst:1162 msgid "" "Fredrik Lundh once suggested the following set of rules for refactoring uses " "of ``lambda``:" @@ -1816,16 +1816,16 @@ msgstr "" "Frederik Lundh a suggéré quelques règles pour le réusinage de code " "impliquant les expressions ``lambda`` :" -#: howto/functional.rst:1166 +#: howto/functional.rst:1165 msgid "Write a lambda function." msgstr "Écrire une fonction lambda." -#: howto/functional.rst:1167 +#: howto/functional.rst:1166 msgid "Write a comment explaining what the heck that lambda does." msgstr "" "Écrire un commentaire qui explique ce que fait cette satanée fonction lambda." -#: howto/functional.rst:1168 +#: howto/functional.rst:1167 msgid "" "Study the comment for a while, and think of a name that captures the essence " "of the comment." @@ -1833,16 +1833,16 @@ msgstr "" "Scruter le commentaire pendant quelques temps et réfléchir à un nom qui " "synthétise son essence." -#: howto/functional.rst:1170 +#: howto/functional.rst:1169 msgid "Convert the lambda to a def statement, using that name." msgstr "" "Réécrire la fonction lambda en une définition *def* en utilisant ce nom." -#: howto/functional.rst:1171 +#: howto/functional.rst:1170 msgid "Remove the comment." msgstr "Effacer le commentaire." -#: howto/functional.rst:1173 +#: howto/functional.rst:1172 msgid "" "I really like these rules, but you're free to disagree about whether this " "lambda-free style is better." @@ -1850,11 +1850,11 @@ msgstr "" "J'aime beaucoup ces règles, mais vous êtes libre de ne pas être d'accord et " "de préférer un style avec des lambdas." -#: howto/functional.rst:1178 +#: howto/functional.rst:1177 msgid "Revision History and Acknowledgements" msgstr "Historique des modifications et remerciements" -#: howto/functional.rst:1180 +#: howto/functional.rst:1179 msgid "" "The author would like to thank the following people for offering " "suggestions, corrections and assistance with various drafts of this article: " @@ -1867,17 +1867,17 @@ msgstr "" "Jewett, Mike Krell, Leandro Lameiro, Jussi Salmela, Collin Winter, Blake " "Winton." -#: howto/functional.rst:1185 +#: howto/functional.rst:1184 msgid "Version 0.1: posted June 30 2006." msgstr "Version 0.1 : publiée le 30 juin 2006." -#: howto/functional.rst:1187 +#: howto/functional.rst:1186 msgid "Version 0.11: posted July 1 2006. Typo fixes." msgstr "" "Version 0.11 : publiée le 1\\ :sup:`er` juillet 2006. Correction " "orthographique." -#: howto/functional.rst:1189 +#: howto/functional.rst:1188 msgid "" "Version 0.2: posted July 10 2006. Merged genexp and listcomp sections into " "one. Typo fixes." @@ -1885,14 +1885,14 @@ msgstr "" "Version 0.2 : publiée le 10 juillet 2006. Fusion des sections *genexp* et " "*listcomp*. Correction orthographique." -#: howto/functional.rst:1192 +#: howto/functional.rst:1191 msgid "" "Version 0.21: Added more references suggested on the tutor mailing list." msgstr "" "Version 0.21 : ajout de plusieurs références suggérées sur la liste de " "diffusion *tutor*." -#: howto/functional.rst:1194 +#: howto/functional.rst:1193 msgid "" "Version 0.30: Adds a section on the ``functional`` module written by Collin " "Winter; adds short section on the operator module; a few other edits." @@ -1901,15 +1901,15 @@ msgstr "" "Collin Winter ; ajout d'une courte section sur le module ``operator`` ; " "quelques autres modifications." -#: howto/functional.rst:1199 +#: howto/functional.rst:1198 msgid "References" msgstr "Références" -#: howto/functional.rst:1202 +#: howto/functional.rst:1201 msgid "General" msgstr "Général" -#: howto/functional.rst:1204 +#: howto/functional.rst:1203 msgid "" "**Structure and Interpretation of Computer Programs**, by Harold Abelson and " "Gerald Jay Sussman with Julie Sussman. Full text at https://mitpress.mit." @@ -1927,7 +1927,7 @@ msgstr "" "utilisent le langage Scheme mais la plupart des approches décrites dans ces " "chapitres s'appliquent au style fonctionnel de Python." -#: howto/functional.rst:1212 +#: howto/functional.rst:1211 msgid "" "http://www.defmacro.org/ramblings/fp.html: A general introduction to " "functional programming that uses Java examples and has a lengthy historical " @@ -1937,7 +1937,7 @@ msgstr "" "programmation fonctionnelle avec une longue introduction historique et des " "exemples en Java." -#: howto/functional.rst:1215 +#: howto/functional.rst:1214 msgid "" "https://en.wikipedia.org/wiki/Functional_programming: General Wikipedia " "entry describing functional programming." @@ -1945,23 +1945,23 @@ msgstr "" "https://fr.wikipedia.org/wiki/Programmation_fonctionnelle : l'entrée " "Wikipédia qui décrit la programmation fonctionnelle." -#: howto/functional.rst:1218 +#: howto/functional.rst:1217 msgid "https://en.wikipedia.org/wiki/Coroutine: Entry for coroutines." msgstr "" "https://fr.wikipedia.org/wiki/Coroutine : l'entrée pour les coroutines." -#: howto/functional.rst:1220 +#: howto/functional.rst:1219 msgid "" "https://en.wikipedia.org/wiki/Currying: Entry for the concept of currying." msgstr "" "https://fr.wikipedia.org/wiki/Curryfication : l'entrée pour le concept de " "curryfication (création d'applications partielles)." -#: howto/functional.rst:1223 +#: howto/functional.rst:1222 msgid "Python-specific" msgstr "Spécifique à Python" -#: howto/functional.rst:1225 +#: howto/functional.rst:1224 msgid "" "http://gnosis.cx/TPiP/: The first chapter of David Mertz's book :title-" "reference:`Text Processing in Python` discusses functional programming for " @@ -1973,7 +1973,7 @@ msgstr "" "programmation fonctionnelle pour le traitement de texte dans la section « " "Utilisation des fonctions d'ordre supérieur pour le traitement de texte »." -#: howto/functional.rst:1230 +#: howto/functional.rst:1229 msgid "" "Mertz also wrote a 3-part series of articles on functional programming for " "IBM's DeveloperWorks site; see `part 1 `__ et `partie 3 `__," -#: howto/functional.rst:1238 +#: howto/functional.rst:1237 msgid "Python documentation" msgstr "Documentation Python" -#: howto/functional.rst:1240 +#: howto/functional.rst:1239 msgid "Documentation for the :mod:`itertools` module." msgstr "Documentation du module :mod:`itertools`." -#: howto/functional.rst:1242 +#: howto/functional.rst:1241 msgid "Documentation for the :mod:`functools` module." msgstr "Documentation du module :mod:`functools`." -#: howto/functional.rst:1244 +#: howto/functional.rst:1243 msgid "Documentation for the :mod:`operator` module." msgstr "Documentation du module :mod:`operator`." -#: howto/functional.rst:1246 +#: howto/functional.rst:1245 msgid ":pep:`289`: \"Generator Expressions\"" msgstr ":pep:`289`: *\"Generator Expressions\"*" -#: howto/functional.rst:1248 +#: howto/functional.rst:1247 msgid "" ":pep:`342`: \"Coroutines via Enhanced Generators\" describes the new " "generator features in Python 2.5." diff --git a/howto/instrumentation.po b/howto/instrumentation.po index bccfff8281..e18e1646bb 100644 --- a/howto/instrumentation.po +++ b/howto/instrumentation.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-01-28 15:41+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -250,8 +250,8 @@ msgstr "" #: howto/instrumentation.rst:280 msgid "" "The filename, function name, and line number are provided back to the " -"tracing script as positional arguments, which must be accessed using ``" -"$arg1``, ``$arg2``, ``$arg3``:" +"tracing script as positional arguments, which must be accessed using " +"``$arg1``, ``$arg2``, ``$arg3``:" msgstr "" "Le nom de fichier, le nom de la fonction et le numéro de ligne sont renvoyés " "au script de traçage sous forme d'arguments positionnels, auxquels il faut " @@ -357,9 +357,9 @@ msgstr "*Tapsets* de *SystemTap*" #: howto/instrumentation.rst:345 msgid "" -"The higher-level way to use the SystemTap integration is to use a \"tapset" -"\": SystemTap's equivalent of a library, which hides some of the lower-level " -"details of the static markers." +"The higher-level way to use the SystemTap integration is to use a " +"\"tapset\": SystemTap's equivalent of a library, which hides some of the " +"lower-level details of the static markers." msgstr "" "La façon la plus simple d'utiliser l'intégration *SystemTap* est d'utiliser " "un *« tapset »*. L'équivalent pour *SystemTap* d'une bibliothèque, qui " diff --git a/howto/logging-cookbook.po b/howto/logging-cookbook.po index 5bdf06bcc6..378243688c 100644 --- a/howto/logging-cookbook.po +++ b/howto/logging-cookbook.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -16,7 +16,7 @@ msgstr "" #: howto/logging-cookbook.rst:5 msgid "Logging Cookbook" -msgstr "" +msgstr "Recettes pour la journalisation" #: howto/logging-cookbook.rst:0 msgid "Author" @@ -34,7 +34,7 @@ msgstr "" #: howto/logging-cookbook.rst:15 msgid "Using logging in multiple modules" -msgstr "" +msgstr "Journalisation dans plusieurs modules" #: howto/logging-cookbook.rst:17 msgid "" @@ -47,10 +47,18 @@ msgid "" "logger calls to the child will pass up to the parent. Here is a main " "module::" msgstr "" +"Deux appels à ``logging.getLogger('unLogger')`` renvoient toujours une " +"référence vers le même objet de journalisation. C’est valable à l’intérieur " +"d’un module, mais aussi dans des modules différents pour autant que ce soit " +"le même processus de l’interpréteur Python. En plus, le code d’une " +"application peut définir et configurer une journalisation parente dans un " +"module et créer (mais pas configurer) une journalisation fille dans un " +"module séparé. Les appels à la journalisation fille passeront alors à la " +"journalisation parente. Voici un module principal ::" #: howto/logging-cookbook.rst:55 msgid "Here is the auxiliary module::" -msgstr "" +msgstr "Voici un module auxiliaire ::" #: howto/logging-cookbook.rst:75 msgid "The output looks like this:" @@ -58,27 +66,33 @@ msgstr "La sortie ressemble à ceci ::" #: howto/logging-cookbook.rst:101 msgid "Logging from multiple threads" -msgstr "" +msgstr "Journalisation avec des fils d’exécution multiples" #: howto/logging-cookbook.rst:103 msgid "" "Logging from multiple threads requires no special effort. The following " "example shows logging from the main (initial) thread and another thread::" msgstr "" +"La journalisation avec des fils d’exécution multiples ne requiert pas " +"d’effort particulier. L’exemple suivant montre comment journaliser depuis le " +"fil principal (c.-à-d. initial) et un autre fil ::" #: howto/logging-cookbook.rst:132 msgid "When run, the script should print something like the following:" -msgstr "" +msgstr "À l’exécution, le script doit afficher quelque chose comme ça ::" #: howto/logging-cookbook.rst:154 msgid "" "This shows the logging output interspersed as one might expect. This " "approach works for more threads than shown here, of course." msgstr "" +"Les entrées de journalisation sont entrelacées, comme on pouvait s’y " +"attendre. Cette approche fonctionne aussi avec plus de fils que dans " +"l’exemple, bien sûr." #: howto/logging-cookbook.rst:158 msgid "Multiple handlers and formatters" -msgstr "" +msgstr "Plusieurs gestionnaires et formateurs" #: howto/logging-cookbook.rst:160 msgid "" @@ -91,6 +105,15 @@ msgid "" "slight modification to the previous simple module-based configuration " "example::" msgstr "" +"Les gestionnaires de journalisation sont des objets Python ordinaires. La " +"méthode :meth:`~Logger.addHandler` n’est pas limitée, en nombre minimum ou " +"maximum, en gestionnaires que vous pouvez ajouter. Parfois, il peut être " +"utile pour une application de journaliser tous les messages quels que soient " +"leurs niveaux vers un fichier texte, tout en journalisant les erreurs (et " +"plus grave) dans la console. Pour ce faire, configurez simplement les " +"gestionnaires de manière adéquate. Les appels de journalisation dans le code " +"de l’application resteront les mêmes. Voici une légère modification de " +"l’exemple précédent dans une configuration au niveau du module ::" #: howto/logging-cookbook.rst:193 msgid "" @@ -98,6 +121,9 @@ msgid "" "All that changed was the addition and configuration of a new handler named " "*fh*." msgstr "" +"Notez que le code de « l’application » ignore la multiplicité des " +"gestionnaires. Les modifications consistent simplement en l’ajout et la " +"configuration d’un nouveau gestionnaire appelé *fh*." #: howto/logging-cookbook.rst:196 msgid "" @@ -110,10 +136,19 @@ msgid "" "to happen is to modify the severity level of the logger and/or handler to " "debug." msgstr "" +"La possibilité de créer de nouveaux gestionnaires avec des filtres sur un " +"niveau de gravité supérieur ou inférieur peut être très utile lors de " +"l’écriture ou du test d’une application. Au lieu d’utiliser de nombreuses " +"instructions ``print`` pour le débogage, utilisez ``logger.debug`` : " +"contrairement aux instructions ``print``, que vous devrez supprimer ou " +"commenter plus tard, les instructions ``logger.debug`` peuvent demeurer " +"telles quelles dans le code source et restent dormantes jusqu’à ce que vous " +"en ayez à nouveau besoin. À ce moment-là, il suffit de modifier le niveau de " +"gravité de la journalisation ou du gestionnaire pour déboguer." #: howto/logging-cookbook.rst:207 msgid "Logging to multiple destinations" -msgstr "" +msgstr "Journalisation vers plusieurs destinations" #: howto/logging-cookbook.rst:209 msgid "" @@ -123,34 +158,46 @@ msgid "" "console. Let's also assume that the file should contain timestamps, but the " "console messages should not. Here's how you can achieve this::" msgstr "" +"Supposons que vous souhaitiez journaliser dans la console et dans un fichier " +"avec différents formats de messages et avec différents critères. Supposons " +"que vous souhaitiez consigner les messages de niveau DEBUG et supérieur dans " +"le fichier, et les messages de niveau INFO et supérieur dans la console. " +"Supposons également que le fichier doive contenir des horodatages, mais pas " +"les messages de la console. Voici comment y parvenir ::" #: howto/logging-cookbook.rst:247 msgid "When you run this, on the console you will see" -msgstr "" +msgstr "Quand vous le lancez, vous devez voir" #: howto/logging-cookbook.rst:256 msgid "and in the file you will see something like" -msgstr "" +msgstr "et, dans le fichier, vous devez trouver" #: howto/logging-cookbook.rst:266 msgid "" "As you can see, the DEBUG message only shows up in the file. The other " "messages are sent to both destinations." msgstr "" +"Comme vous pouvez le constater, le message DEBUG n’apparaît que dans le " +"fichier. Les autres messages sont envoyés vers les deux destinations." #: howto/logging-cookbook.rst:269 msgid "" "This example uses console and file handlers, but you can use any number and " "combination of handlers you choose." msgstr "" +"Cet exemple utilise la console et des gestionnaires de fichier, mais vous " +"pouvez utiliser et combiner autant de gestionnaires que de besoin." #: howto/logging-cookbook.rst:274 msgid "Configuration server example" -msgstr "" +msgstr "Exemple d’un serveur de configuration" #: howto/logging-cookbook.rst:276 msgid "Here is an example of a module using the logging configuration server::" msgstr "" +"Voici un exemple de module mettant en œuvre la configuration de la " +"journalisation *via* un serveur ::" #: howto/logging-cookbook.rst:307 msgid "" @@ -158,10 +205,14 @@ msgid "" "server, properly preceded with the binary-encoded length, as the new logging " "configuration::" msgstr "" +"Et voici un script qui, à partir d’un nom de fichier, commence par envoyer " +"la taille du fichier encodée en binaire (comme il se doit), puis envoie ce " +"fichier au serveur pour définir la nouvelle configuration de " +"journalisation ::" #: howto/logging-cookbook.rst:330 msgid "Dealing with handlers that block" -msgstr "" +msgstr "Utilisation de gestionnaires bloquants" #: howto/logging-cookbook.rst:334 msgid "" @@ -180,6 +231,15 @@ msgid "" "which is too slow (and this query can be deep in the socket library code, " "below the Python layer, and outside your control)." msgstr "" +"Un gestionnaire classiquement lent est le :class:`SMTPHandler` : l’envoi d’e-" +"mails peut prendre beaucoup de temps, pour un certain nombre de raisons " +"indépendantes du développeur (par exemple, une infrastructure de messagerie " +"ou de réseau peu performante). Mais n’importe quel autre gestionnaire " +"utilisant le réseau ou presque peut aussi s’avérer bloquant : même une " +"simple opération :class:`SocketHandler` peut faire une requête DNS implicite " +"et être ainsi très lente (cette requête peut être enfouie profondément dans " +"le code de la bibliothèque d’accès réseau, sous la couche Python, et hors de " +"votre contrôle)." #: howto/logging-cookbook.rst:346 msgid "" @@ -194,6 +254,18 @@ msgid "" "to attach only ``QueueHandlers`` to your loggers) for the benefit of other " "developers who will use your code." msgstr "" +"Une solution consiste à utiliser une approche en deux parties. Pour la " +"première partie, affectez un seul :class:`QueueHandler` à la journalisation " +"des fils d’exécution critiques pour les performances. Ils écrivent " +"simplement dans leur file d’attente, qui peut être dimensionnée à une " +"capacité suffisamment grande ou initialisée sans limite supérieure en " +"taille. L’écriture dans la file d’attente est généralement acceptée " +"rapidement, mais nous vous conseillons quand même de prévoir d’intercepter " +"l’exception :exc:`queue.Full` par précaution dans votre code. Si vous " +"développez une bibliothèque avec des fils d’exécution critiques pour les " +"performances, documentez-le bien (avec une suggestion de n’affecter que des " +"``QueueHandlers`` à votre journalisation) pour faciliter le travail des " +"développeurs qui utilisent votre code." #: howto/logging-cookbook.rst:357 msgid "" @@ -205,6 +277,13 @@ msgid "" "matter). The ``LogRecords`` are removed from the queue and passed to the " "handlers for processing." msgstr "" +"La deuxième partie de la solution est la classe :class:`QueueListener`, " +"conçue comme l’homologue de :class:`QueueHandler`. Un :class:`QueueListener` " +"est très simple : vous lui passez une file d’attente et des gestionnaires, " +"et il lance un fil d’exécution interne qui scrute la file d’attente pour " +"récupérer les événements envoyés par les ``QueueHandlers`` (ou toute autre " +"source de ``LogRecords``, d’ailleurs). Les ``LogRecords`` sont supprimés de " +"la file d’attente et transmis aux gestionnaires pour traitement." #: howto/logging-cookbook.rst:365 msgid "" @@ -214,14 +293,20 @@ msgid "" "handler classes, which would eat up one thread per handler for no particular " "benefit." msgstr "" +"L’avantage d’avoir une classe :class:`QueueListener` séparée est que vous " +"pouvez utiliser la même instance pour servir plusieurs ``QueueHandlers``. " +"Cela consomme moins de ressources que des instances de gestionnaires " +"réparties chacune dans un fil d’exécution séparé." #: howto/logging-cookbook.rst:370 msgid "An example of using these two classes follows (imports omitted)::" msgstr "" +"Voici un exemple d’utilisation de ces deux classes (les importations sont " +"omises) ::" #: howto/logging-cookbook.rst:388 msgid "which, when run, will produce:" -msgstr "" +msgstr "ce qui produit ceci à l’exécution :" #: howto/logging-cookbook.rst:394 msgid "" @@ -234,10 +319,18 @@ msgid "" "of each message with the handler's level, and only passes a message to a " "handler if it's appropriate to do so." msgstr "" +"avant Python 3.5, la classe :class:`QueueListener` passait chaque message " +"reçu de la file d’attente à chaque gestionnaire avec lequel l’instance avait " +"été initialisée (on supposait que le filtrage de niveau était entièrement " +"effectué de l’autre côté, au niveau de l’alimentation de la file d’attente). " +"Depuis Python 3.5, le comportement peut être modifié en passant l’argument " +"par mot-clé ``respect_handler_level=True`` au constructeur. Dans ce cas, la " +"``QueueListener`` compare le niveau de chaque message avec le niveau défini " +"dans chaque gestionnaire et ne transmet le message que si c’est opportun." #: howto/logging-cookbook.rst:407 msgid "Sending and receiving logging events across a network" -msgstr "" +msgstr "Envoi et réception d’événements de journalisation à travers le réseau" #: howto/logging-cookbook.rst:409 msgid "" @@ -245,18 +338,26 @@ msgid "" "at the receiving end. A simple way of doing this is attaching a :class:" "`SocketHandler` instance to the root logger at the sending end::" msgstr "" +"Supposons que vous souhaitiez envoyer des événements de journalisation sur " +"un réseau et les traiter à la réception. Une façon simple de faire est " +"d’attacher une instance :class:`SocketHandler` à la journalisation racine de " +"l’émetteur ::" #: howto/logging-cookbook.rst:437 msgid "" "At the receiving end, you can set up a receiver using the :mod:" "`socketserver` module. Here is a basic working example::" msgstr "" +"Vous pouvez configurer le récepteur en utilisant le module :mod:" +"`socketserver`. Voici un exemple élémentaire ::" #: howto/logging-cookbook.rst:525 msgid "" "First run the server, and then the client. On the client side, nothing is " "printed on the console; on the server side, you should see something like:" msgstr "" +"Lancez d’abord le serveur, puis le client. Côté client, rien ne s’affiche " +"sur la console ; côté serveur, vous devez voir quelque chose comme ça :" #: howto/logging-cookbook.rst:537 msgid "" @@ -266,12 +367,32 @@ msgid "" "implementing your alternative there, as well as adapting the above script to " "use your alternative serialization." msgstr "" +"Notez que ``pickle`` introduit des problèmes de sécurité dans certains " +"scénarios. Si vous êtes concerné, vous pouvez utiliser une sérialisation " +"alternative en surchargeant la méthode :meth:`~handlers.SocketHandler." +"makePickle` par votre propre implémentation, ainsi qu’en adaptant le script " +"ci-dessus pour utiliser votre sérialisation." + +#: howto/logging-cookbook.rst:545 +msgid "Running a logging socket listener in production" +msgstr "" +"Journalisation en production à l’aide d’un connecteur en écoute sur le réseau" #: howto/logging-cookbook.rst:547 -msgid "Adding contextual information to your logging output" +msgid "" +"To run a logging listener in production, you may need to use a process-" +"management tool such as `Supervisor `_. `Here " +"`_ is a " +"Gist which provides the bare-bones files to run the above functionality " +"using Supervisor: you will need to change the `/path/to/` parts in the Gist " +"to reflect the actual paths you want to use." msgstr "" -#: howto/logging-cookbook.rst:549 +#: howto/logging-cookbook.rst:558 +msgid "Adding contextual information to your logging output" +msgstr "Ajout d’informations contextuelles dans la journalisation" + +#: howto/logging-cookbook.rst:560 msgid "" "Sometimes you want logging output to contain contextual information in " "addition to the parameters passed to the logging call. For example, in a " @@ -286,12 +407,28 @@ msgid "" "logging an application, it could be hard to manage if the number of :class:" "`Logger` instances becomes effectively unbounded." msgstr "" - -#: howto/logging-cookbook.rst:564 +"Dans certains cas, vous pouvez souhaiter que la journalisation contienne des " +"informations contextuelles en plus des paramètres transmis à l’appel de " +"journalisation. Par exemple, dans une application réseau, il peut être " +"souhaitable de consigner des informations spécifiques au client dans le " +"journal (par exemple, le nom d’utilisateur ou l’adresse IP du client " +"distant). Bien que vous puissiez utiliser le paramètre *extra* pour y " +"parvenir, il n’est pas toujours pratique de transmettre les informations de " +"cette manière. Il peut être aussi tentant de créer des instances :class:" +"`Logger` connexion par connexion, mais ce n’est pas une bonne idée car ces " +"instances :class:`Logger` ne sont pas éliminées par le ramasse-miettes. Même " +"si ce point n’est pas problématique en soi si la journalisation est " +"configurée avec plusieurs niveaux de granularité, cela peut devenir " +"difficile de gérer un nombre potentiellement illimité d’instances de :class:" +"`Logger`." + +#: howto/logging-cookbook.rst:575 msgid "Using LoggerAdapters to impart contextual information" msgstr "" +"Utilisation d’adaptateurs de journalisation pour transmettre des " +"informations contextuelles" -#: howto/logging-cookbook.rst:566 +#: howto/logging-cookbook.rst:577 msgid "" "An easy way in which you can pass contextual information to be output along " "with logging event information is to use the :class:`LoggerAdapter` class. " @@ -301,8 +438,16 @@ msgid "" "signatures as their counterparts in :class:`Logger`, so you can use the two " "types of instances interchangeably." msgstr "" +"Un moyen simple de transmettre des informations contextuelles accompagnant " +"les informations de journalisation consiste à utiliser la classe :class:" +"`LoggerAdapter`. Cette classe est conçue pour ressembler à un :class:" +"`Logger`, de sorte que vous pouvez appeler :meth:`debug`, :meth:`info`, :" +"meth:`warning`, :meth:`error`, :meth:`exception`, :meth:`critical` et :meth:" +"`log`. Ces méthodes ont les mêmes signatures que leurs homologues dans :" +"class:`Logger`, vous pouvez donc utiliser les deux types d’instances de " +"manière interchangeable." -#: howto/logging-cookbook.rst:574 +#: howto/logging-cookbook.rst:585 msgid "" "When you create an instance of :class:`LoggerAdapter`, you pass it a :class:" "`Logger` instance and a dict-like object which contains your contextual " @@ -312,8 +457,15 @@ msgid "" "contextual information in the delegated call. Here's a snippet from the code " "of :class:`LoggerAdapter`::" msgstr "" +"Lorsque vous créez une instance de :class:`LoggerAdapter`, vous lui " +"transmettez une instance de :class:`Logger` et un objet dictionnaire qui " +"contient vos informations contextuelles. Lorsque vous appelez l’une des " +"méthodes de journalisation sur une instance de :class:`LoggerAdapter`, elle " +"délègue l’appel à l’instance sous-jacente de :class:`Logger` transmise à son " +"constructeur et s’arrange pour intégrer les informations contextuelles dans " +"l’appel délégué. Voici un extrait du code de :class:`LoggerAdapter` ::" -#: howto/logging-cookbook.rst:590 +#: howto/logging-cookbook.rst:601 msgid "" "The :meth:`~LoggerAdapter.process` method of :class:`LoggerAdapter` is where " "the contextual information is added to the logging output. It's passed the " @@ -325,8 +477,17 @@ msgid "" "had passed an 'extra' keyword argument in the call to the adapter, it will " "be silently overwritten." msgstr "" +"Les informations contextuelles sont ajoutées dans la méthode :meth:" +"`~LoggerAdapter.process` de :class:`LoggerAdapter`. On lui passe le message " +"et les arguments par mot-clé de l’appel de journalisation, et elle en " +"renvoie des versions (potentiellement) modifiées à utiliser pour la " +"journalisation sous-jacente. L’implémentation par défaut de cette méthode " +"laisse le message seul, mais insère une clé ``extra`` dans l’argument par " +"mot-clé dont la valeur est l’objet dictionnaire passé au constructeur. Bien " +"sûr, si vous avez passé un argument par mot-clé ``extra`` dans l’appel à " +"l’adaptateur, il est écrasé silencieusement." -#: howto/logging-cookbook.rst:599 +#: howto/logging-cookbook.rst:610 msgid "" "The advantage of using 'extra' is that the values in the dict-like object " "are merged into the :class:`LogRecord` instance's __dict__, allowing you to " @@ -336,22 +497,35 @@ msgid "" "string, you just need to subclass :class:`LoggerAdapter` and override :meth:" "`~LoggerAdapter.process` to do what you need. Here is a simple example::" msgstr "" +"L’avantage d’utiliser ``extra`` est que les valeurs de l’objet dictionnaire " +"sont fusionnées dans le ``__dict__`` de l’instance :class:`LogRecord`, ce " +"qui vous permet d’utiliser des chaînes personnalisées avec vos instances :" +"class:`Formatter` qui connaissent les clés de l’objet dictionnaire. Si vous " +"avez besoin d’une méthode différente, par exemple si vous souhaitez ajouter " +"des informations contextuelles avant ou après la chaîne de message, il vous " +"suffit de surcharger :class:`LoggerAdapter` et de remplacer :meth:" +"`~LoggerAdapter.process` pour faire ce dont vous avez besoin. Voici un " +"exemple simple ::" -#: howto/logging-cookbook.rst:615 +#: howto/logging-cookbook.rst:626 msgid "which you can use like this::" -msgstr "" +msgstr "que vous pouvez utiliser comme ceci ::" -#: howto/logging-cookbook.rst:620 +#: howto/logging-cookbook.rst:631 msgid "" "Then any events that you log to the adapter will have the value of " "``some_conn_id`` prepended to the log messages." msgstr "" +"Ainsi, tout événement journalisé aura la valeur de ``some_conn_id`` insérée " +"en début de message de journalisation." -#: howto/logging-cookbook.rst:624 +#: howto/logging-cookbook.rst:635 msgid "Using objects other than dicts to pass contextual information" msgstr "" +"Utilisation d’objets autres que les dictionnaires pour passer des " +"informations contextuelles" -#: howto/logging-cookbook.rst:626 +#: howto/logging-cookbook.rst:637 msgid "" "You don't need to pass an actual dict to a :class:`LoggerAdapter` - you " "could pass an instance of a class which implements ``__getitem__`` and " @@ -359,12 +533,18 @@ msgid "" "if you want to generate values dynamically (whereas the values in a dict " "would be constant)." msgstr "" +"Il n’est pas obligatoire de passer un dictionnaire réel à un :class:" +"`LoggerAdapter`, vous pouvez passer une instance d’une classe qui implémente " +"``__getitem__`` et ``__iter__`` pour qu’il ressemble à un dictionnaire du " +"point de vue de la journalisation. C’est utile si vous souhaitez générer des " +"valeurs de manière dynamique (alors que les valeurs d’un dictionnaire " +"seraient constantes)." -#: howto/logging-cookbook.rst:635 +#: howto/logging-cookbook.rst:646 msgid "Using Filters to impart contextual information" -msgstr "" +msgstr "Utilisation de filtres pour transmettre des informations contextuelles" -#: howto/logging-cookbook.rst:637 +#: howto/logging-cookbook.rst:648 msgid "" "You can also add contextual information to log output using a user-defined :" "class:`Filter`. ``Filter`` instances are allowed to modify the " @@ -372,8 +552,14 @@ msgid "" "can then be output using a suitable format string, or if needed a custom :" "class:`Formatter`." msgstr "" +"Un :class:`Filter` défini par l’utilisateur peut aussi ajouter des " +"informations contextuelles à la journalisation. Les instances de ``Filter`` " +"sont autorisées à modifier les ``LogRecords`` qui leur sont transmis, y " +"compris par l’ajout d’attributs supplémentaires qui peuvent ensuite être " +"intégrés à la journalisation en utilisant une chaîne de formatage appropriée " +"ou, si nécessaire, un :class:`Formatter` personnalisé." -#: howto/logging-cookbook.rst:642 +#: howto/logging-cookbook.rst:653 msgid "" "For example in a web application, the request being processed (or at least, " "the interesting parts of it) can be stored in a threadlocal (:class:" @@ -384,16 +570,25 @@ msgid "" "format string can be used to get similar output to that shown above. Here's " "an example script::" msgstr "" - -#: howto/logging-cookbook.rst:688 +"Par exemple, dans une application Web, la requête en cours de traitement (ou " +"du moins ce qu’elle contient d’intéressant) peut être stockée dans une " +"variable locale au fil d’exécution (:class:`threading.local`), puis utilisée " +"dans un ``Filter`` pour ajouter, par exemple, des informations relatives à " +"la requête (par exemple, l’adresse IP distante et le nom de l’utilisateur) " +"au ``LogRecord``, en utilisant les noms d’attribut ``ip`` et ``user`` comme " +"dans l’exemple ``LoggerAdapter`` ci-dessus. Dans ce cas, la même chaîne de " +"formatage peut être utilisée pour obtenir une sortie similaire à celle " +"indiquée ci-dessus. Voici un exemple de script ::" + +#: howto/logging-cookbook.rst:699 msgid "which, when run, produces something like:" -msgstr "" +msgstr "qui, à l’exécution, produit quelque chose comme ça ::" -#: howto/logging-cookbook.rst:709 +#: howto/logging-cookbook.rst:720 msgid "Logging to a single file from multiple processes" -msgstr "" +msgstr "Journalisation vers un fichier unique à partir de plusieurs processus" -#: howto/logging-cookbook.rst:711 +#: howto/logging-cookbook.rst:722 msgid "" "Although logging is thread-safe, and logging to a single file from multiple " "threads in a single process *is* supported, logging to a single file from " @@ -408,8 +603,22 @@ msgid "" "includes a working socket receiver which can be used as a starting point for " "you to adapt in your own applications." msgstr "" - -#: howto/logging-cookbook.rst:724 +"La journalisation est fiable avec les programmes à fils d’exécution " +"multiples (*thread-safe*) : rien n’empêche plusieurs fils d’exécution de " +"journaliser dans le même fichier, du moment que ces fils d’exécution font " +"partie du même processus. En revanche, il n’existe aucun moyen standard de " +"sérialiser l’accès à un seul fichier sur plusieurs processus en Python. Si " +"vous avez besoin de vous connecter à un seul fichier à partir de plusieurs " +"processus, une façon de le faire est de faire en sorte que tous les " +"processus se connectent à un :class:`~handlers.SocketHandler`, et d’avoir un " +"processus séparé qui implémente un serveur qui lit à partir de ce connecteur " +"et écrit les journaux dans le fichier (si vous préférez, vous pouvez dédier " +"un fil d’exécution dans l’un des processus existants pour exécuter cette " +"tâche). :ref:`Cette section ` documente cette approche plus " +"en détail et inclut un connecteur en écoute réseau fonctionnel qui peut être " +"utilisé comme point de départ pour l’adapter à vos propres applications." + +#: howto/logging-cookbook.rst:735 msgid "" "You could also write your own handler which uses the :class:" "`~multiprocessing.Lock` class from the :mod:`multiprocessing` module to " @@ -419,8 +628,16 @@ msgid "" "`multiprocessing` module does not provide working lock functionality on all " "platforms (see https://bugs.python.org/issue3770)." msgstr "" +"Vous pouvez également écrire votre propre gestionnaire en utilisant la " +"classe :class:`~multiprocessing.Lock` du module :mod:`multiprocessing` pour " +"sérialiser l’accès au fichier depuis vos processus. Les actuels :class:" +"`FileHandler` et sous-classes n’utilisent pas :mod:`multiprocessing` pour le " +"moment, même s’ils pourraient le faire à l’avenir. Notez qu’à l’heure " +"actuelle, le module :mod:`multiprocessing` ne fournit pas un verrouillage " +"fonctionnel pour toutes les plates-formes (voir https://bugs.python.org/" +"issue3770)." -#: howto/logging-cookbook.rst:734 +#: howto/logging-cookbook.rst:745 msgid "" "Alternatively, you can use a ``Queue`` and a :class:`QueueHandler` to send " "all logging events to one of the processes in your multi-process " @@ -434,14 +651,28 @@ msgid "" "application, and can be used as the basis for code meeting your own specific " "requirements::" msgstr "" - -#: howto/logging-cookbook.rst:850 +"Autrement, vous pouvez utiliser une ``Queue`` et un :class:`QueueHandler` " +"pour envoyer tous les événements de journalisation à l’un des processus de " +"votre application multi-processus. L’exemple de script suivant montre " +"comment procéder ; dans l’exemple, un processus d’écoute distinct écoute les " +"événements envoyés par les autres processus et les journalise en fonction de " +"sa propre configuration de journalisation. Bien que l’exemple ne montre " +"qu’une seule façon de faire (par exemple, vous pouvez utiliser un fil " +"d’exécution d’écoute plutôt qu’un processus d’écoute séparé – " +"l’implémentation serait analogue), il permet des configurations de " +"journalisation complètement différentes pour celui qui écoute ainsi que pour " +"les autres processus de votre application, et peut être utilisé comme base " +"pour répondre à vos propres exigences ::" + +#: howto/logging-cookbook.rst:861 msgid "" "A variant of the above script keeps the logging in the main process, in a " "separate thread::" msgstr "" +"Une variante du script ci-dessus conserve la journalisation dans le " +"processus principal, dans un fil séparé ::" -#: howto/logging-cookbook.rst:945 +#: howto/logging-cookbook.rst:956 msgid "" "This variant shows how you can e.g. apply configuration for particular " "loggers - e.g. the ``foo`` logger has a special handler which stores all " @@ -450,35 +681,75 @@ msgid "" "events are generated in the worker processes) to direct the messages to the " "appropriate destinations." msgstr "" +"Cette variante montre comment appliquer la configuration pour des " +"enregistreurs particuliers – par exemple l’enregistreur ``foo`` a un " +"gestionnaire spécial qui stocke tous les événements du sous-système ``foo`` " +"dans un fichier ``mplog-foo.log``. C’est utilisé par le mécanisme de " +"journalisation dans le processus principal (même si les événements de " +"journalisation sont générés dans les processus de travail) pour diriger les " +"messages vers les destinations appropriées." -#: howto/logging-cookbook.rst:952 +#: howto/logging-cookbook.rst:963 msgid "Using concurrent.futures.ProcessPoolExecutor" -msgstr "" +msgstr "Utilisation de concurrent.futures.ProcessPoolExecutor" -#: howto/logging-cookbook.rst:954 +#: howto/logging-cookbook.rst:965 msgid "" "If you want to use :class:`concurrent.futures.ProcessPoolExecutor` to start " "your worker processes, you need to create the queue slightly differently. " "Instead of" msgstr "" +"Si vous souhaitez utiliser :class:`concurrent.futures.ProcessPoolExecutor` " +"pour démarrer vos processus de travail, vous devez créer la file d’attente " +"légèrement différemment. À la place de" -#: howto/logging-cookbook.rst:962 +#: howto/logging-cookbook.rst:973 msgid "you should use" -msgstr "" +msgstr "vous devez écrire" -#: howto/logging-cookbook.rst:968 +#: howto/logging-cookbook.rst:979 msgid "and you can then replace the worker creation from this::" msgstr "" +"et vous pouvez alors remplacer la création du processus de travail telle " +"que ::" -#: howto/logging-cookbook.rst:979 +#: howto/logging-cookbook.rst:990 msgid "to this (remembering to first import :mod:`concurrent.futures`)::" msgstr "" - -#: howto/logging-cookbook.rst:987 +"par celle-ci (souvenez-vous d’importer au préalable :mod:`concurrent." +"futures`) ::" + +#: howto/logging-cookbook.rst:997 +msgid "Deploying Web applications using Gunicorn and uWSGI" +msgstr "Déploiement d’applications Web avec *Gunicorn* et *uWSGI*" + +#: howto/logging-cookbook.rst:999 +msgid "" +"When deploying Web applications using `Gunicorn `_ or " +"`uWSGI `_ (or similar), " +"multiple worker processes are created to handle client requests. In such " +"environments, avoid creating file-based handlers directly in your web " +"application. Instead, use a :class:`SocketHandler` to log from the web " +"application to a listener in a separate process. This can be set up using a " +"process management tool such as Supervisor - see `Running a logging socket " +"listener in production`_ for more details." +msgstr "" +"Lors du déploiement d’applications Web qui utilisent `Gunicorn `_ ou `uWSGI `_ " +"(ou équivalent), plusieurs processus de travail sont créés pour traiter les " +"requêtes des clients. Dans de tels environnements, évitez de créer des " +"gestionnaires à fichiers directement dans votre application Web. Au lieu de " +"cela, utilisez un :class:`SocketHandler` pour journaliser depuis " +"l’application Web vers gestionnaire réseau à l’écoute dans un processus " +"séparé. Cela peut être configuré à l’aide d’un outil de gestion de processus " +"tel que *Supervisor* (voir `Journalisation en production à l’aide d’un " +"connecteur en écoute sur le réseau`_ pour plus de détails)." + +#: howto/logging-cookbook.rst:1009 msgid "Using file rotation" -msgstr "" +msgstr "Utilisation du roulement de fichiers" -#: howto/logging-cookbook.rst:992 +#: howto/logging-cookbook.rst:1014 msgid "" "Sometimes you want to let a log file grow to a certain size, then open a new " "file and log to that. You may want to keep a certain number of these files, " @@ -487,32 +758,48 @@ msgid "" "usage pattern, the logging package provides a :class:`~handlers." "RotatingFileHandler`::" msgstr "" +"Parfois, vous souhaitez laisser un fichier de journalisation grossir jusqu’à " +"une certaine taille, puis ouvrir un nouveau fichier et vous y enregistrer " +"les nouveaux événements. Vous souhaitez peut-être conserver un certain " +"nombre de ces fichiers et, lorsque ce nombre de fichiers aura été créé, " +"faire rouler les fichiers afin que le nombre de fichiers et la taille des " +"fichiers restent tous deux limités. Pour ce cas d’usage, :class:`~handlers." +"RotatingFileHandler` est inclus dans le paquet de journalisation ::" -#: howto/logging-cookbook.rst:1024 +#: howto/logging-cookbook.rst:1046 msgid "" "The result should be 6 separate files, each with part of the log history for " "the application:" msgstr "" +"Vous devez obtenir 6 fichiers séparés, chacun contenant une partie de " +"l’historique de journalisation de l’application :" -#: howto/logging-cookbook.rst:1036 +#: howto/logging-cookbook.rst:1058 msgid "" "The most current file is always :file:`logging_rotatingfile_example.out`, " "and each time it reaches the size limit it is renamed with the suffix " "``.1``. Each of the existing backup files is renamed to increment the suffix " "(``.1`` becomes ``.2``, etc.) and the ``.6`` file is erased." msgstr "" +"Le fichier de journalisation actuel est toujours :file:" +"`logging_rotatingfile_example.out`, et chaque fois qu’il atteint la taille " +"limite, il est renommé avec le suffixe ``.1``. Chacun des fichiers de " +"sauvegarde existants est renommé pour incrémenter le suffixe (``.1`` devient " +"``.2``, etc.) et le fichier ``.6`` est effacé." -#: howto/logging-cookbook.rst:1041 +#: howto/logging-cookbook.rst:1063 msgid "" "Obviously this example sets the log length much too small as an extreme " "example. You would want to set *maxBytes* to an appropriate value." msgstr "" +"De toute évidence, la longueur du journal définie dans cet exemple est " +"beaucoup trop petite. À vous de définir *maxBytes* à une valeur appropriée." -#: howto/logging-cookbook.rst:1047 +#: howto/logging-cookbook.rst:1069 msgid "Use of alternative formatting styles" -msgstr "" +msgstr "Utilisation d’autres styles de formatage" -#: howto/logging-cookbook.rst:1049 +#: howto/logging-cookbook.rst:1071 msgid "" "When logging was added to the Python standard library, the only way of " "formatting messages with variable content was to use the %-formatting " @@ -520,8 +807,13 @@ msgid "" "`string.Template` (added in Python 2.4) and :meth:`str.format` (added in " "Python 2.6)." msgstr "" +"Lorsque la journalisation a été ajoutée à la bibliothèque standard Python, " +"la seule façon de formater les messages avec un contenu variable était " +"d’utiliser la méthode de formatage avec « % ». Depuis, Python s’est enrichi " +"de deux nouvelles méthode de formatage : :class:`string.Template` (ajouté " +"dans Python 2.4) et :meth:`str.format` (ajouté dans Python 2.6)." -#: howto/logging-cookbook.rst:1055 +#: howto/logging-cookbook.rst:1077 msgid "" "Logging (as of 3.2) provides improved support for these two additional " "formatting styles. The :class:`Formatter` class been enhanced to take an " @@ -533,15 +825,30 @@ msgid "" "meth:`str.format` or :class:`string.Template`. Here's an example console " "session to show the possibilities:" msgstr "" +"La journalisation (à partir de la version 3.2) offre une meilleure prise en " +"charge de ces deux styles de formatage supplémentaires. La classe :class:" +"`Formatter` a été améliorée pour accepter un paramètre par mot-clé " +"facultatif supplémentaire nommé ``style``. La valeur par défaut est ``'%'``, " +"les autres valeurs possibles étant ``'{'`` et ``'$'``, qui correspondent aux " +"deux autres styles de formatage. La rétrocompatibilité est maintenue par " +"défaut (comme vous vous en doutez) mais, en spécifiant explicitement un " +"paramètre de style, vous avez la possibilité de spécifier des chaînes de " +"format qui fonctionnent avec :meth:`str.format` ou :class:`string.Template`. " +"Voici un exemple de session interactive en console pour montrer les " +"possibilités :" -#: howto/logging-cookbook.rst:1089 +#: howto/logging-cookbook.rst:1111 msgid "" "Note that the formatting of logging messages for final output to logs is " "completely independent of how an individual logging message is constructed. " "That can still use %-formatting, as shown here::" msgstr "" +"Notez que le formatage des messages de journalisation est, au final, " +"complètement indépendant de la façon dont un message de journalisation " +"individuel est construit. Vous pouvez toujours utiliser formatage *via* " +"« % », comme ici ::" -#: howto/logging-cookbook.rst:1097 +#: howto/logging-cookbook.rst:1119 msgid "" "Logging calls (``logger.debug()``, ``logger.info()`` etc.) only take " "positional parameters for the actual logging message itself, with keyword " @@ -556,8 +863,21 @@ msgid "" "logging calls which are out there in existing code will be using %-format " "strings." msgstr "" - -#: howto/logging-cookbook.rst:1110 +"Les appels de journalisation (``logger.debug()``, ``logger.info()`` etc.) ne " +"prennent que des paramètres positionnels pour le message de journalisation " +"lui-même, les paramètres par mots-clés étant utilisés uniquement pour " +"déterminer comment gérer le message réel (par exemple, le paramètre par mot-" +"clé ``exc_info`` indique que les informations de trace doivent être " +"enregistrées, ou le paramètre par mot-clé ``extra`` indique des informations " +"contextuelles supplémentaires à ajouter au journal). Vous ne pouvez donc pas " +"inclure dans les appels de journalisation à l’aide de la syntaxe :meth:`str." +"format` ou :class:`string.Template`, car le paquet de journalisation utilise " +"le formatage via « % » en interne pour fusionner la chaîne de format et les " +"arguments de variables. Il n’est pas possible de changer ça tout en " +"préservant la rétrocompatibilité puisque tous les appels de journalisation " +"dans le code pré-existant utilisent des chaînes au format « % »." + +#: howto/logging-cookbook.rst:1132 msgid "" "There is, however, a way that you can use {}- and $- formatting to construct " "your individual log messages. Recall that for a message you can use an " @@ -565,8 +885,13 @@ msgid "" "will call ``str()`` on that object to get the actual format string. Consider " "the following two classes::" msgstr "" +"Il existe cependant un moyen d’utiliser le formatage *via* « {} » et « $ » " +"pour vos messages de journalisation. Rappelez-vous que, pour un message, " +"vous pouvez utiliser un objet arbitraire comme chaîne de format de message, " +"et que le package de journalisation appelle ``str()`` sur cet objet pour " +"fabriquer la chaîne finale. Considérez les deux classes suivantes ::" -#: howto/logging-cookbook.rst:1134 +#: howto/logging-cookbook.rst:1156 msgid "" "Either of these can be used in place of a format string, to allow {}- or $-" "formatting to be used to build the actual \"message\" part which appears in " @@ -576,22 +901,37 @@ msgid "" "__ (double underscore --- not to be confused with _, the single underscore " "used as a synonym/alias for :func:`gettext.gettext` or its brethren)." msgstr "" +"L’une ou l’autre peut être utilisée à la place d’une chaîne de format " +"\"%(message)s\" ou \"{message}\" ou \"$message\", afin de mettre en forme " +"*via* « { } » ou « $ » la partie « message réel » qui apparaît dans la " +"sortie de journal formatée. Il est un peu lourd d’utiliser les noms de " +"classe chaque fois que vous voulez journaliser quelque chose, mais ça " +"devient acceptable si vous utilisez un alias tel que __ (double trait de " +"soulignement — à ne pas confondre avec _, le trait de soulignement unique " +"utilisé comme alias pour :func:`gettext.gettext` ou ses homologues)." -#: howto/logging-cookbook.rst:1142 +#: howto/logging-cookbook.rst:1164 msgid "" "The above classes are not included in Python, though they're easy enough to " "copy and paste into your own code. They can be used as follows (assuming " "that they're declared in a module called ``wherever``):" msgstr "" +"Les classes ci-dessus ne sont pas incluses dans Python, bien qu’elles soient " +"assez faciles à copier et coller dans votre propre code. Elles peuvent être " +"utilisées comme suit (en supposant qu’elles soient déclarées dans un module " +"appelé ``wherever``) :" -#: howto/logging-cookbook.rst:1164 +#: howto/logging-cookbook.rst:1186 msgid "" "While the above examples use ``print()`` to show how the formatting works, " "you would of course use ``logger.debug()`` or similar to actually log using " "this approach." msgstr "" +"Alors que les exemples ci-dessus utilisent ``print()`` pour montrer comment " +"fonctionne le formatage, utilisez bien sûr ``logger.debug()`` ou similaire " +"pour journaliser avec cette approche." -#: howto/logging-cookbook.rst:1168 +#: howto/logging-cookbook.rst:1190 msgid "" "One thing to note is that you pay no significant performance penalty with " "this approach: the actual formatting happens not when you make the logging " @@ -601,24 +941,37 @@ msgid "" "not just the format string. That's because the __ notation is just syntax " "sugar for a constructor call to one of the XXXMessage classes." msgstr "" +"Une chose à noter est qu’il n’y a pas de perte de performance significative " +"avec cette approche : le formatage réel ne se produit pas lorsque vous " +"effectuez l’appel de journalisation, mais lorsque (et si) le message " +"journalisé est réellement sur le point d’être écrit dans un journal par un " +"gestionnaire. Ainsi, la seule chose légèrement inhabituelle qui pourrait " +"vous perturber est que les parenthèses entourent la chaîne de format et les " +"arguments, pas seulement la chaîne de format. C’est parce que la notation __ " +"n’est que du sucre syntaxique pour un appel de constructeur à l’une des " +"classes ``XXXMessage``." -#: howto/logging-cookbook.rst:1176 +#: howto/logging-cookbook.rst:1198 msgid "" "If you prefer, you can use a :class:`LoggerAdapter` to achieve a similar " "effect to the above, as in the following example::" msgstr "" +"Si vous préférez, vous pouvez utiliser un :class:`LoggerAdapter` pour " +"obtenir un effet similaire à ce qui précède, comme dans l’exemple suivant ::" -#: howto/logging-cookbook.rst:1207 +#: howto/logging-cookbook.rst:1229 msgid "" "The above script should log the message ``Hello, world!`` when run with " "Python 3.2 or later." msgstr "" +"Le script ci-dessus journalise le message ``Hello, world!`` quand il est " +"lancé avec Python 3.2 ou ultérieur." -#: howto/logging-cookbook.rst:1216 +#: howto/logging-cookbook.rst:1238 msgid "Customizing ``LogRecord``" -msgstr "" +msgstr "Personnalisation de ``LogRecord``" -#: howto/logging-cookbook.rst:1218 +#: howto/logging-cookbook.rst:1240 msgid "" "Every logging event is represented by a :class:`LogRecord` instance. When an " "event is logged and not filtered out by a logger's level, a :class:" @@ -628,14 +981,24 @@ msgid "" "disabled). Before Python 3.2, there were only two places where this creation " "was done:" msgstr "" +"Chaque événement de journalisation est représenté par une instance :class:" +"`LogRecord`. Lorsqu’un événement est enregistré et non filtré en raison du " +"niveau d’un enregistreur, un :class:`LogRecord` est créé, rempli avec les " +"informations de l’événement, puis transmis aux gestionnaires de cet " +"enregistreur (et ses ancêtres, jusqu’à et y compris l’enregistreur où la " +"propagation vers le haut de la hiérarchie est désactivée). Avant Python 3.2, " +"il n’y avait que deux endroits où cette création était effectuée :" -#: howto/logging-cookbook.rst:1225 +#: howto/logging-cookbook.rst:1247 msgid "" ":meth:`Logger.makeRecord`, which is called in the normal process of logging " "an event. This invoked :class:`LogRecord` directly to create an instance." msgstr "" +":meth:`Logger.makeRecord`, qui est appelée dans le processus normal de " +"journalisation d’un événement. Elle appelait :class:`LogRecord` directement " +"pour créer une instance." -#: howto/logging-cookbook.rst:1228 +#: howto/logging-cookbook.rst:1250 msgid "" ":func:`makeLogRecord`, which is called with a dictionary containing " "attributes to be added to the LogRecord. This is typically invoked when a " @@ -643,36 +1006,54 @@ msgid "" "via a :class:`~handlers.SocketHandler`, or in JSON form via an :class:" "`~handlers.HTTPHandler`)." msgstr "" +":func:`makeLogRecord`, qui est appelée avec un dictionnaire contenant des " +"attributs à ajouter au *LogRecord*. Elle est généralement invoquée lorsqu’un " +"dictionnaire approprié a été reçu par le réseau (par exemple, sous forme de " +"*pickle* *via* un :class:`~handlers.SocketHandler`, ou sous format JSON " +"*via* un :class:`~handlers.HTTPHandler`)." -#: howto/logging-cookbook.rst:1234 +#: howto/logging-cookbook.rst:1256 msgid "" "This has usually meant that if you need to do anything special with a :class:" "`LogRecord`, you've had to do one of the following." msgstr "" +"Cela signifiait généralement que, si vous deviez faire quelque chose de " +"spécial avec un :class:`LogRecord`, vous deviez faire l’une des choses " +"suivantes." -#: howto/logging-cookbook.rst:1237 +#: howto/logging-cookbook.rst:1259 msgid "" "Create your own :class:`Logger` subclass, which overrides :meth:`Logger." "makeRecord`, and set it using :func:`~logging.setLoggerClass` before any " "loggers that you care about are instantiated." msgstr "" +"Créer votre propre sous-classe :class:`Logger`, surchargeant :meth:`Logger." +"makeRecord`, et la personnaliser à l’aide de :func:`~logging.setLoggerClass` " +"avant que les enregistreurs qui vous intéressaient ne soient instanciés." -#: howto/logging-cookbook.rst:1240 +#: howto/logging-cookbook.rst:1262 msgid "" "Add a :class:`Filter` to a logger or handler, which does the necessary " "special manipulation you need when its :meth:`~Filter.filter` method is " "called." msgstr "" +"Ajouter un :class:`Filter` à un enregistreur ou un gestionnaire, qui " +"effectuait la manipulation spéciale nécessaire dont vous aviez besoin " +"lorsque sa méthode :meth:`~Filter.filter` était appelée." -#: howto/logging-cookbook.rst:1244 +#: howto/logging-cookbook.rst:1266 msgid "" "The first approach would be a little unwieldy in the scenario where (say) " "several different libraries wanted to do different things. Each would " "attempt to set its own :class:`Logger` subclass, and the one which did this " "last would win." msgstr "" +"La première approche est un peu lourde dans le scénario où (disons) " +"plusieurs bibliothèques différentes veulent faire des choses différentes. " +"Chacun essaie de définir sa propre sous-classe :class:`Logger`, et celui qui " +"l’a fait en dernier gagne." -#: howto/logging-cookbook.rst:1249 +#: howto/logging-cookbook.rst:1271 msgid "" "The second approach works reasonably well for many cases, but does not allow " "you to e.g. use a specialized subclass of :class:`LogRecord`. Library " @@ -680,8 +1061,14 @@ msgid "" "to remember to do this every time they introduced a new logger (which they " "would do simply by adding new packages or modules and doing ::" msgstr "" +"La seconde approche fonctionne raisonnablement bien dans de nombreux cas, " +"mais ne vous permet pas, par exemple, d’utiliser une sous-classe spécialisée " +"de :class:`LogRecord`. Les développeurs de bibliothèques peuvent définir un " +"filtre approprié sur leurs enregistreurs, mais ils doivent se rappeler de le " +"faire chaque fois qu’ils introduisent un nouvel enregistreur (ce qu’ils font " +"simplement en ajoutant de nouveaux paquets ou modules et en écrivant ::" -#: howto/logging-cookbook.rst:1257 +#: howto/logging-cookbook.rst:1279 msgid "" "at module level). It's probably one too many things to think about. " "Developers could also add the filter to a :class:`~logging.NullHandler` " @@ -690,8 +1077,15 @@ msgid "" "so output from that handler would not reflect the intentions of the library " "developer." msgstr "" +"au niveau des modules). C’est probablement trop de choses auxquelles penser. " +"Les développeurs pourraient également ajouter le filtre à un :class:" +"`~logging.NullHandler` attaché à leur enregistreur de niveau supérieur, mais " +"cela ne serait pas invoqué si un développeur d’application attachait un " +"gestionnaire à un enregistreur de bibliothèque de niveau inférieur — donc la " +"sortie de ce gestionnaire ne refléterait pas les intentions du développeur " +"de la bibliothèque." -#: howto/logging-cookbook.rst:1263 +#: howto/logging-cookbook.rst:1285 msgid "" "In Python 3.2 and later, :class:`~logging.LogRecord` creation is done " "through a factory, which you can specify. The factory is just a callable you " @@ -700,16 +1094,27 @@ msgid "" "signature as the :class:`~logging.LogRecord` constructor, as :class:" "`LogRecord` is the default setting for the factory." msgstr "" +"Dans Python 3.2 et ultérieurs, la création de :class:`~logging.LogRecord` " +"est effectuée via une fabrique, que vous pouvez spécifier. La fabrique est " +"juste un appelable que vous pouvez définir avec :func:`~logging." +"setLogRecordFactory`, et interroger avec :func:`~logging." +"getLogRecordFactory`. La fabrique est invoquée avec la même signature que le " +"constructeur :class:`~logging.LogRecord`, car :class:`LogRecord` est le " +"paramètre par défaut de la fabrique." -#: howto/logging-cookbook.rst:1270 +#: howto/logging-cookbook.rst:1292 msgid "" "This approach allows a custom factory to control all aspects of LogRecord " "creation. For example, you could return a subclass, or just add some " "additional attributes to the record once created, using a pattern similar to " "this::" msgstr "" +"Cette approche permet à une fabrique personnalisée de contrôler tous les " +"aspects de la création d’un *LogRecord*. Par exemple, vous pouvez renvoyer " +"une sous-classe ou simplement ajouter des attributs supplémentaires à " +"l’enregistrement une fois créé, en utilisant un modèle similaire à celui-ci :" -#: howto/logging-cookbook.rst:1283 +#: howto/logging-cookbook.rst:1305 msgid "" "This pattern allows different libraries to chain factories together, and as " "long as they don't overwrite each other's attributes or unintentionally " @@ -718,115 +1123,151 @@ msgid "" "time overhead to all logging operations, and the technique should only be " "used when the use of a :class:`Filter` does not provide the desired result." msgstr "" +"Ce modèle permet à différentes bibliothèques d’enchaîner des fabriques, et " +"tant qu’elles n’écrasent pas les attributs des autres ou n’écrasent pas " +"involontairement les attributs fournis en standard, il ne devrait pas y " +"avoir de surprise. Cependant, il faut garder à l’esprit que chaque maillon " +"de la chaîne ajoute une surcharge d’exécution à toutes les opérations de " +"journalisation, et la technique ne doit être utilisée que lorsque " +"l’utilisation d’un :class:`Filter` ne permet pas d’obtenir le résultat " +"souhaité." -#: howto/logging-cookbook.rst:1294 +#: howto/logging-cookbook.rst:1316 msgid "Subclassing QueueHandler - a ZeroMQ example" -msgstr "" +msgstr "Dérivation de *QueueHandler* – un exemple de *ZeroMQ*" -#: howto/logging-cookbook.rst:1296 +#: howto/logging-cookbook.rst:1318 msgid "" "You can use a :class:`QueueHandler` subclass to send messages to other kinds " "of queues, for example a ZeroMQ 'publish' socket. In the example below,the " "socket is created separately and passed to the handler (as its 'queue')::" msgstr "" +"Vous pouvez utiliser une sous-classe :class:`QueueHandler` pour envoyer des " +"messages à d’autres types de files d’attente, par exemple un connecteur " +"*ZeroMQ publish*. Dans l’exemple ci-dessous, le connecteur est créé " +"séparément et transmis au gestionnaire (en tant que file d’attente) ::" -#: howto/logging-cookbook.rst:1315 +#: howto/logging-cookbook.rst:1337 msgid "" "Of course there are other ways of organizing this, for example passing in " "the data needed by the handler to create the socket::" msgstr "" +"Bien sûr, il existe d’autres manières de faire, par exemple en transmettant " +"les données nécessaires au gestionnaire pour créer le connecteur ::" -#: howto/logging-cookbook.rst:1333 +#: howto/logging-cookbook.rst:1355 msgid "Subclassing QueueListener - a ZeroMQ example" -msgstr "" +msgstr "Dérivation de *QueueListener* – un exemple de *ZeroMQ*" -#: howto/logging-cookbook.rst:1335 +#: howto/logging-cookbook.rst:1357 msgid "" "You can also subclass :class:`QueueListener` to get messages from other " "kinds of queues, for example a ZeroMQ 'subscribe' socket. Here's an example::" msgstr "" +"Vous pouvez également dériver :class:`QueueListener` pour obtenir des " +"messages d’autres types de files d’attente, par exemple un connecteur " +"*ZeroMQ subscribe*. Voici un exemple ::" -#: howto/logging-cookbook.rst:1354 +#: howto/logging-cookbook.rst:1376 msgid "Module :mod:`logging`" msgstr "Module :mod:`logging`" -#: howto/logging-cookbook.rst:1354 +#: howto/logging-cookbook.rst:1376 msgid "API reference for the logging module." msgstr "Référence d'API pour le module de journalisation." -#: howto/logging-cookbook.rst:1357 +#: howto/logging-cookbook.rst:1379 msgid "Module :mod:`logging.config`" msgstr "Module :mod:`logging.config`" -#: howto/logging-cookbook.rst:1357 +#: howto/logging-cookbook.rst:1379 msgid "Configuration API for the logging module." msgstr "API de configuration pour le module de journalisation." -#: howto/logging-cookbook.rst:1360 +#: howto/logging-cookbook.rst:1382 msgid "Module :mod:`logging.handlers`" msgstr "Module :mod:`logging.handlers`" -#: howto/logging-cookbook.rst:1360 +#: howto/logging-cookbook.rst:1382 msgid "Useful handlers included with the logging module." msgstr "Gestionnaires utiles inclus avec le module de journalisation." -#: howto/logging-cookbook.rst:1362 +#: howto/logging-cookbook.rst:1384 msgid ":ref:`A basic logging tutorial `" msgstr "" +":ref:`Les bases de l’utilisation du module de journalisation `" -#: howto/logging-cookbook.rst:1364 +#: howto/logging-cookbook.rst:1386 msgid ":ref:`A more advanced logging tutorial `" msgstr "" +":ref:`Utilisation avancée du module de journalisation `" -#: howto/logging-cookbook.rst:1368 +#: howto/logging-cookbook.rst:1390 msgid "An example dictionary-based configuration" -msgstr "" +msgstr "Exemple de configuration basée sur un dictionnaire" -#: howto/logging-cookbook.rst:1370 +#: howto/logging-cookbook.rst:1392 msgid "" "Below is an example of a logging configuration dictionary - it's taken from " "the `documentation on the Django project `_. This dictionary is passed to :" "func:`~config.dictConfig` to put the configuration into effect::" msgstr "" +"Vous trouverez ci-dessous un exemple de dictionnaire de configuration de " +"journalisation ­– il est tiré de la `documentation du projet Django `_. Ce " +"dictionnaire est passé à :func:`~config.dictConfig` pour activer la " +"configuration ::" -#: howto/logging-cookbook.rst:1426 +#: howto/logging-cookbook.rst:1448 msgid "" "For more information about this configuration, you can see the `relevant " "section `_ of the Django documentation." msgstr "" +"Pour plus d’informations sur cette configuration, vous pouvez consulter la " +"`section correspondante `_ de la documentation de *Django*." -#: howto/logging-cookbook.rst:1433 +#: howto/logging-cookbook.rst:1455 msgid "Using a rotator and namer to customize log rotation processing" msgstr "" +"Utilisation d’un rotateur et d’un nom pour personnaliser la rotation des " +"journaux" -#: howto/logging-cookbook.rst:1435 +#: howto/logging-cookbook.rst:1457 msgid "" "An example of how you can define a namer and rotator is given in the " "following snippet, which shows zlib-based compression of the log file::" msgstr "" -#: howto/logging-cookbook.rst:1453 +#: howto/logging-cookbook.rst:1475 msgid "" "These are not \"true\" .gz files, as they are bare compressed data, with no " "\"container\" such as you’d find in an actual gzip file. This snippet is " "just for illustration purposes." msgstr "" -#: howto/logging-cookbook.rst:1458 +#: howto/logging-cookbook.rst:1480 msgid "A more elaborate multiprocessing example" -msgstr "" +msgstr "Exemple plus élaboré avec traitement en parallèle" -#: howto/logging-cookbook.rst:1460 +#: howto/logging-cookbook.rst:1482 msgid "" "The following working example shows how logging can be used with " "multiprocessing using configuration files. The configurations are fairly " "simple, but serve to illustrate how more complex ones could be implemented " "in a real multiprocessing scenario." msgstr "" +"L’exemple suivant que nous allons étudier montre comment la journalisation " +"peut être utilisée, à l’aide de fichiers de configuration, pour un programme " +"effectuant des traitements parallèles. Les configurations sont assez " +"simples, mais servent à illustrer comment des configurations plus complexes " +"pourraient être implémentées dans un scénario multi-processus réel." -#: howto/logging-cookbook.rst:1465 +#: howto/logging-cookbook.rst:1487 msgid "" "In the example, the main process spawns a listener process and some worker " "processes. Each of the main process, the listener and the workers have three " @@ -838,18 +1279,32 @@ msgid "" "purely illustrative, but you should be able to adapt this example to your " "own scenario." msgstr "" - -#: howto/logging-cookbook.rst:1475 +"Dans l’exemple, le processus principal génère un processus d’écoute et des " +"processus de travail. Chacun des processus, le principal, l’auditeur " +"(*listener_process* dans l’exemple) et les processus de travail " +"(*worker_process* dans l’exemple) ont trois configurations distinctes (les " +"processus de travail partagent tous la même configuration). Nous pouvons " +"voir la journalisation dans le processus principal, comment les processus de " +"travail se connectent à un *QueueHandler* et comment l’auditeur implémente " +"un *QueueListener* avec une configuration de journalisation plus complexe, " +"et s’arrange pour envoyer les événements reçus *via* la file d’attente aux " +"gestionnaires spécifiés dans la configuration. Notez que ces configurations " +"sont purement illustratives, mais vous devriez pouvoir adapter cet exemple à " +"votre propre scénario." + +#: howto/logging-cookbook.rst:1497 msgid "" "Here's the script - the docstrings and the comments hopefully explain how it " "works::" msgstr "" +"Voici le script – les chaines de documentation et les commentaires " +"expliquent (en anglais), le principe de fonctionnement ::" -#: howto/logging-cookbook.rst:1687 +#: howto/logging-cookbook.rst:1709 msgid "Inserting a BOM into messages sent to a SysLogHandler" -msgstr "" +msgstr "Insertion d’une *BOM* dans les messages envoyés à un *SysLogHandler*" -#: howto/logging-cookbook.rst:1689 +#: howto/logging-cookbook.rst:1711 msgid "" ":rfc:`5424` requires that a Unicode message be sent to a syslog daemon as a " "set of bytes which have the following structure: an optional pure-ASCII " @@ -857,16 +1312,25 @@ msgid "" "encoded using UTF-8. (See the :rfc:`relevant section of the specification " "<5424#section-6>`.)" msgstr "" +"La :rfc:`5424` requiert qu’un message Unicode soit envoyé à un démon " +"*syslog* sous la forme d’un ensemble d’octets ayant la structure suivante : " +"un composant ASCII pur facultatif, suivi d’une marque d’ordre d’octet (*BOM* " +"pour *Byte Order Mark* en anglais) UTF-8, suivie de contenu Unicode UTF-8 " +"(voir la :rfc:`la spécification correspondante <5424#section-6>`)." -#: howto/logging-cookbook.rst:1695 +#: howto/logging-cookbook.rst:1717 msgid "" "In Python 3.1, code was added to :class:`~logging.handlers.SysLogHandler` to " "insert a BOM into the message, but unfortunately, it was implemented " "incorrectly, with the BOM appearing at the beginning of the message and " "hence not allowing any pure-ASCII component to appear before it." msgstr "" +"Dans Python 3.1, du code a été ajouté à :class:`~logging.handlers." +"SysLogHandler` pour insérer une *BOM* dans le message mais, malheureusement, " +"il a été implémenté de manière incorrecte, la *BOM* apparaissant au début du " +"message et n’autorisant donc aucun composant ASCII pur à être placé devant." -#: howto/logging-cookbook.rst:1701 +#: howto/logging-cookbook.rst:1723 msgid "" "As this behaviour is broken, the incorrect BOM insertion code is being " "removed from Python 3.2.4 and later. However, it is not being replaced, and " @@ -874,34 +1338,51 @@ msgid "" "an optional pure-ASCII sequence before it and arbitrary Unicode after it, " "encoded using UTF-8, then you need to do the following:" msgstr "" +"Comme ce comportement est inadéquat, le code incorrect d’insertion de la " +"*BOM* a été supprimé de Python 3.2.4 et ultérieurs. Cependant, il n’est pas " +"remplacé et, si vous voulez produire des messages conformes :rfc:`5424` qui " +"incluent une *BOM*, une séquence facultative en ASCII pur avant et un " +"Unicode arbitraire après, encodé en UTF-8, alors vous devez appliquer ce qui " +"suit :" -#: howto/logging-cookbook.rst:1707 +#: howto/logging-cookbook.rst:1729 msgid "" "Attach a :class:`~logging.Formatter` instance to your :class:`~logging." "handlers.SysLogHandler` instance, with a format string such as::" msgstr "" +"Adjoignez une instance :class:`~logging.Formatter` à votre instance :class:" +"`~logging.handlers.SysLogHandler`, avec une chaîne de format telle que ::" -#: howto/logging-cookbook.rst:1713 +#: howto/logging-cookbook.rst:1735 msgid "" "The Unicode code point U+FEFF, when encoded using UTF-8, will be encoded as " "a UTF-8 BOM -- the byte-string ``b'\\xef\\xbb\\xbf'``." msgstr "" +"Le point de code Unicode U+FEFF, lorsqu’il est encodé en UTF-8, est encodé " +"comme une *BOM* UTF-8 – la chaîne d’octets ``b'\\xef\\xbb\\xbf'``." -#: howto/logging-cookbook.rst:1716 +#: howto/logging-cookbook.rst:1738 msgid "" "Replace the ASCII section with whatever placeholders you like, but make sure " "that the data that appears in there after substitution is always ASCII (that " "way, it will remain unchanged after UTF-8 encoding)." msgstr "" +"Remplacez la section ASCII par les caractères de votre choix, mais assurez-" +"vous que les données qui y apparaissent après la substitution sont toujours " +"ASCII (ainsi elles resteront inchangées après l’encodage UTF-8)." -#: howto/logging-cookbook.rst:1720 +#: howto/logging-cookbook.rst:1742 msgid "" "Replace the Unicode section with whatever placeholders you like; if the data " "which appears there after substitution contains characters outside the ASCII " "range, that's fine -- it will be encoded using UTF-8." msgstr "" +"Remplacez la section Unicode par le contenu de votre choix ; si les données " +"qui y apparaissent après la substitution contiennent des caractères en " +"dehors de la plage ASCII, c’est pris en charge – elles seront encodées en " +"UTF-8." -#: howto/logging-cookbook.rst:1724 +#: howto/logging-cookbook.rst:1746 msgid "" "The formatted message *will* be encoded using UTF-8 encoding by " "``SysLogHandler``. If you follow the above rules, you should be able to " @@ -909,12 +1390,17 @@ msgid "" "complain, but your messages will not be RFC 5424-compliant, and your syslog " "daemon may complain." msgstr "" +"Le message formaté *sera* encodé en UTF-8 par ``SysLogHandler``. Si vous " +"suivez les règles ci-dessus, vous devriez pouvoir produire des messages " +"conformes à la :rfc:`5424`. Si vous ne le faites pas, la journalisation ne " +"se plaindra peut-être pas, mais vos messages ne seront pas conformes à la " +"RFC 5424 et votre démon *syslog* est susceptible de se plaindre." -#: howto/logging-cookbook.rst:1731 +#: howto/logging-cookbook.rst:1753 msgid "Implementing structured logging" -msgstr "" +msgstr "Journalisation structurée" -#: howto/logging-cookbook.rst:1733 +#: howto/logging-cookbook.rst:1755 msgid "" "Although most logging messages are intended for reading by humans, and thus " "not readily machine-parseable, there might be circumstances where you want " @@ -925,32 +1411,44 @@ msgid "" "following is a simple approach which uses JSON to serialise the event in a " "machine-parseable manner::" msgstr "" +"Bien que la plupart des messages de journalisation soient destinés à être " +"lus par des humains, et donc difficilement analysables par la machine, il " +"peut arriver que vous souhaitiez produire des messages dans un format " +"structuré dans le but d’être analysé par un programme (sans avoir besoin " +"d’expressions régulières complexes pour analyser le message du journal). " +"C’est simple à réaliser en utilisant le paquet de journalisation. Il existe " +"plusieurs façons d’y parvenir et voici une approche simple qui utilise JSON " +"pour sérialiser l’événement de manière à être analysable par une machine ::" -#: howto/logging-cookbook.rst:1757 +#: howto/logging-cookbook.rst:1779 msgid "If the above script is run, it prints:" -msgstr "" +msgstr "Si vous lancez le script ci-dessus, il imprime :" -#: howto/logging-cookbook.rst:1763 howto/logging-cookbook.rst:1812 +#: howto/logging-cookbook.rst:1785 howto/logging-cookbook.rst:1834 msgid "" "Note that the order of items might be different according to the version of " "Python used." msgstr "" +"Notez que l’ordre des éléments peut être différent en fonction de la version " +"de Python utilisée." -#: howto/logging-cookbook.rst:1766 +#: howto/logging-cookbook.rst:1788 msgid "" "If you need more specialised processing, you can use a custom JSON encoder, " "as in the following complete example::" msgstr "" +"Si vous avez besoin d’un traitement plus spécifique, vous pouvez utiliser un " +"encodeur JSON personnalisé, comme dans l’exemple complet suivant :" -#: howto/logging-cookbook.rst:1806 +#: howto/logging-cookbook.rst:1828 msgid "When the above script is run, it prints:" -msgstr "" +msgstr "Quand vous exécutez le script ci-dessus, il imprime :" -#: howto/logging-cookbook.rst:1821 +#: howto/logging-cookbook.rst:1843 msgid "Customizing handlers with :func:`dictConfig`" -msgstr "" +msgstr "Personnalisation des gestionnaires avec :func:`dictConfig`" -#: howto/logging-cookbook.rst:1823 +#: howto/logging-cookbook.rst:1845 msgid "" "There are times when you want to customize logging handlers in particular " "ways, and if you use :func:`dictConfig` you may be able to do this without " @@ -959,25 +1457,40 @@ msgid "" "the file handlers in the stdlib don't offer built-in support. You can " "customize handler creation using a plain function such as::" msgstr "" +"Il arrive de souhaiter personnaliser les gestionnaires de journalisation " +"d’une manière particulière et, en utilisant :func:`dictConfig`, vous pourrez " +"peut-être le faire sans avoir à dériver les classes mères. Par exemple, " +"supposons que vous souhaitiez définir le propriétaire d’un fichier journal. " +"Dans un environnement POSIX, cela se fait facilement en utilisant :func:" +"`shutil.chown`, mais les gestionnaires de fichiers de la bibliothèque " +"standard n’offrent pas cette gestion nativement. Vous pouvez personnaliser " +"la création du gestionnaire à l’aide d’une fonction simple telle que ::" -#: howto/logging-cookbook.rst:1837 +#: howto/logging-cookbook.rst:1859 msgid "" "You can then specify, in a logging configuration passed to :func:" "`dictConfig`, that a logging handler be created by calling this function::" msgstr "" +"Vous pouvez ensuite spécifier, dans une configuration de journalisation " +"transmise à :func:`dictConfig`, qu’un gestionnaire de journalisation soit " +"créé en appelant cette fonction ::" -#: howto/logging-cookbook.rst:1870 +#: howto/logging-cookbook.rst:1892 msgid "" "In this example I am setting the ownership using the ``pulse`` user and " "group, just for the purposes of illustration. Putting it together into a " "working script, ``chowntest.py``::" msgstr "" +"Dans cet exemple, nous définissons le propriétaire à l’utilisateur et au " +"groupe ``pulse``, uniquement à des fins d’illustration. Rassemblons le tout " +"dans un script ``chowntest.py`` ::" -#: howto/logging-cookbook.rst:1917 +#: howto/logging-cookbook.rst:1939 msgid "To run this, you will probably need to run as ``root``:" msgstr "" +"Pour l’exécuter, vous devrez probablement le faire en tant que ``root`` :" -#: howto/logging-cookbook.rst:1927 +#: howto/logging-cookbook.rst:1949 msgid "" "Note that this example uses Python 3.3 because that's where :func:`shutil." "chown` makes an appearance. This approach should work with any Python " @@ -985,44 +1498,65 @@ msgid "" "With pre-3.3 versions, you would need to implement the actual ownership " "change using e.g. :func:`os.chown`." msgstr "" +"Notez que cet exemple utilise Python 3.3 car c’est là que :func:`shutil." +"chown` fait son apparition. Cette approche devrait fonctionner avec " +"n’importe quelle version de Python prenant en charge :func:`dictConfig` – à " +"savoir, Python 2.7, 3.2 ou version ultérieure. Avec les versions antérieures " +"à la 3.3, vous devrez implémenter le changement de propriétaire réel en " +"utilisant par exemple :func:`os.chown`." -#: howto/logging-cookbook.rst:1933 +#: howto/logging-cookbook.rst:1955 msgid "" "In practice, the handler-creating function may be in a utility module " "somewhere in your project. Instead of the line in the configuration::" msgstr "" +"En pratique, la fonction de création de gestionnaire peut être située dans " +"un module utilitaire ailleurs dans votre projet. Au lieu de cette ligne dans " +"la configuration ::" -#: howto/logging-cookbook.rst:1938 +#: howto/logging-cookbook.rst:1960 msgid "you could use e.g.::" -msgstr "" +msgstr "vous pouvez écrire par exemple ::" -#: howto/logging-cookbook.rst:1942 +#: howto/logging-cookbook.rst:1964 msgid "" "where ``project.util`` can be replaced with the actual name of the package " "where the function resides. In the above working script, using ``'ext://" "__main__.owned_file_handler'`` should work. Here, the actual callable is " "resolved by :func:`dictConfig` from the ``ext://`` specification." msgstr "" +"où ``project.util`` peut être remplacé par le nom réel du paquet où réside " +"la fonction. Dans le script étudié ci-dessus, l’utilisation de ``'ext://" +"__main__.owned_file_handler'`` devrait fonctionner. Dans le cas présent, " +"l’appelable réel est résolu par :func:`dictConfig` à partir de la " +"spécification ``ext://``." -#: howto/logging-cookbook.rst:1947 +#: howto/logging-cookbook.rst:1969 msgid "" "This example hopefully also points the way to how you could implement other " "types of file change - e.g. setting specific POSIX permission bits - in the " "same way, using :func:`os.chmod`." msgstr "" +"Nous espérons qu'à partir de cet exemple vous saurez implémenter d’autres " +"types de modification de fichier – par ex. définir des bits d’autorisation " +"POSIX spécifiques – de la même manière, en utilisant :func:`os.chmod`." -#: howto/logging-cookbook.rst:1951 +#: howto/logging-cookbook.rst:1973 msgid "" "Of course, the approach could also be extended to types of handler other " "than a :class:`~logging.FileHandler` - for example, one of the rotating file " "handlers, or a different type of handler altogether." msgstr "" +"Bien sûr, l’approche pourrait également être étendue à des types de " +"gestionnaires autres qu’un :class:`~logging.FileHandler` – par exemple, l’un " +"des gestionnaires à roulement de fichiers ou un autre type de gestionnaire " +"complètement différent." -#: howto/logging-cookbook.rst:1961 +#: howto/logging-cookbook.rst:1983 msgid "Using particular formatting styles throughout your application" msgstr "" -#: howto/logging-cookbook.rst:1963 +#: howto/logging-cookbook.rst:1985 msgid "" "In Python 3.2, the :class:`~logging.Formatter` gained a ``style`` keyword " "parameter which, while defaulting to ``%`` for backward compatibility, " @@ -1033,7 +1567,7 @@ msgid "" "is constructed." msgstr "" -#: howto/logging-cookbook.rst:1970 +#: howto/logging-cookbook.rst:1992 msgid "" "Logging calls (:meth:`~Logger.debug`, :meth:`~Logger.info` etc.) only take " "positional parameters for the actual logging message itself, with keyword " @@ -1048,7 +1582,7 @@ msgid "" "calls which are out there in existing code will be using %-format strings." msgstr "" -#: howto/logging-cookbook.rst:1982 +#: howto/logging-cookbook.rst:2004 msgid "" "There have been suggestions to associate format styles with specific " "loggers, but that approach also runs into backward compatibility problems " @@ -1056,7 +1590,7 @@ msgid "" "formatting." msgstr "" -#: howto/logging-cookbook.rst:1986 +#: howto/logging-cookbook.rst:2008 msgid "" "For logging to work interoperably between any third-party libraries and your " "code, decisions about formatting need to be made at the level of the " @@ -1064,11 +1598,11 @@ msgid "" "formatting styles can be accommodated." msgstr "" -#: howto/logging-cookbook.rst:1993 +#: howto/logging-cookbook.rst:2015 msgid "Using LogRecord factories" msgstr "" -#: howto/logging-cookbook.rst:1995 +#: howto/logging-cookbook.rst:2017 msgid "" "In Python 3.2, along with the :class:`~logging.Formatter` changes mentioned " "above, the logging package gained the ability to allow users to set their " @@ -1083,17 +1617,17 @@ msgid "" "implementation does." msgstr "" -#: howto/logging-cookbook.rst:2006 +#: howto/logging-cookbook.rst:2028 msgid "" "Refer to the reference documentation on :func:`setLogRecordFactory` and :" "class:`LogRecord` for more information." msgstr "" -#: howto/logging-cookbook.rst:2011 +#: howto/logging-cookbook.rst:2033 msgid "Using custom message objects" msgstr "" -#: howto/logging-cookbook.rst:2013 +#: howto/logging-cookbook.rst:2035 msgid "" "There is another, perhaps simpler way that you can use {}- and $- formatting " "to construct your individual log messages. You may recall (from :ref:" @@ -1103,7 +1637,7 @@ msgid "" "following two classes::" msgstr "" -#: howto/logging-cookbook.rst:2038 +#: howto/logging-cookbook.rst:2060 msgid "" "Either of these can be used in place of a format string, to allow {}- or $-" "formatting to be used to build the actual \"message\" part which appears in " @@ -1114,17 +1648,17 @@ msgid "" "using ``_`` for localization)." msgstr "" -#: howto/logging-cookbook.rst:2046 +#: howto/logging-cookbook.rst:2068 msgid "" "Examples of this approach are given below. Firstly, formatting with :meth:" "`str.format`::" msgstr "" -#: howto/logging-cookbook.rst:2060 +#: howto/logging-cookbook.rst:2082 msgid "Secondly, formatting with :class:`string.Template`::" msgstr "" -#: howto/logging-cookbook.rst:2067 +#: howto/logging-cookbook.rst:2089 msgid "" "One thing to note is that you pay no significant performance penalty with " "this approach: the actual formatting happens not when you make the logging " @@ -1136,11 +1670,11 @@ msgid "" "above." msgstr "" -#: howto/logging-cookbook.rst:2081 +#: howto/logging-cookbook.rst:2103 msgid "Configuring filters with :func:`dictConfig`" msgstr "" -#: howto/logging-cookbook.rst:2083 +#: howto/logging-cookbook.rst:2105 msgid "" "You *can* configure filters using :func:`~logging.config.dictConfig`, though " "it might not be obvious at first glance how to do it (hence this recipe). " @@ -1155,22 +1689,22 @@ msgid "" "complete example::" msgstr "" -#: howto/logging-cookbook.rst:2136 +#: howto/logging-cookbook.rst:2158 msgid "" "This example shows how you can pass configuration data to the callable which " "constructs the instance, in the form of keyword parameters. When run, the " "above script will print:" msgstr "" -#: howto/logging-cookbook.rst:2144 +#: howto/logging-cookbook.rst:2166 msgid "which shows that the filter is working as configured." msgstr "" -#: howto/logging-cookbook.rst:2146 +#: howto/logging-cookbook.rst:2168 msgid "A couple of extra points to note:" msgstr "" -#: howto/logging-cookbook.rst:2148 +#: howto/logging-cookbook.rst:2170 msgid "" "If you can't refer to the callable directly in the configuration (e.g. if it " "lives in a different module, and you can't import it directly where the " @@ -1180,7 +1714,7 @@ msgid "" "the above example." msgstr "" -#: howto/logging-cookbook.rst:2155 +#: howto/logging-cookbook.rst:2177 msgid "" "As well as for filters, this technique can also be used to configure custom " "handlers and formatters. See :ref:`logging-config-dict-userdef` for more " @@ -1189,11 +1723,11 @@ msgid "" "above." msgstr "" -#: howto/logging-cookbook.rst:2164 +#: howto/logging-cookbook.rst:2186 msgid "Customized exception formatting" msgstr "" -#: howto/logging-cookbook.rst:2166 +#: howto/logging-cookbook.rst:2188 msgid "" "There might be times when you want to do customized exception formatting - " "for argument's sake, let's say you want exactly one line per logged event, " @@ -1201,22 +1735,22 @@ msgid "" "formatter class, as shown in the following example::" msgstr "" -#: howto/logging-cookbook.rst:2207 +#: howto/logging-cookbook.rst:2229 msgid "When run, this produces a file with exactly two lines:" msgstr "" -#: howto/logging-cookbook.rst:2214 +#: howto/logging-cookbook.rst:2236 msgid "" "While the above treatment is simplistic, it points the way to how exception " "information can be formatted to your liking. The :mod:`traceback` module may " "be helpful for more specialized needs." msgstr "" -#: howto/logging-cookbook.rst:2221 +#: howto/logging-cookbook.rst:2243 msgid "Speaking logging messages" msgstr "" -#: howto/logging-cookbook.rst:2223 +#: howto/logging-cookbook.rst:2245 msgid "" "There might be situations when it is desirable to have logging messages " "rendered in an audible rather than a visible format. This is easy to do if " @@ -1233,24 +1767,24 @@ msgid "" "approach, which assumes that the ``espeak`` TTS package is available::" msgstr "" -#: howto/logging-cookbook.rst:2265 +#: howto/logging-cookbook.rst:2287 msgid "" "When run, this script should say \"Hello\" and then \"Goodbye\" in a female " "voice." msgstr "" -#: howto/logging-cookbook.rst:2267 +#: howto/logging-cookbook.rst:2289 msgid "" "The above approach can, of course, be adapted to other TTS systems and even " "other systems altogether which can process messages via external programs " "run from a command line." msgstr "" -#: howto/logging-cookbook.rst:2275 +#: howto/logging-cookbook.rst:2297 msgid "Buffering logging messages and outputting them conditionally" msgstr "" -#: howto/logging-cookbook.rst:2277 +#: howto/logging-cookbook.rst:2299 msgid "" "There might be situations where you want to log messages in a temporary area " "and only output them if a certain condition occurs. For example, you may " @@ -1260,7 +1794,7 @@ msgid "" "debug information to be output as well as the error." msgstr "" -#: howto/logging-cookbook.rst:2284 +#: howto/logging-cookbook.rst:2306 msgid "" "Here is an example which shows how you could do this using a decorator for " "your functions where you want logging to behave this way. It makes use of " @@ -1273,7 +1807,7 @@ msgid "" "subclass of ``MemoryHandler`` if you want custom flushing behavior." msgstr "" -#: howto/logging-cookbook.rst:2294 +#: howto/logging-cookbook.rst:2316 msgid "" "The example script has a simple function, ``foo``, which just cycles through " "all the logging levels, writing to ``sys.stderr`` to say what level it's " @@ -1282,7 +1816,7 @@ msgid "" "levels - otherwise, it only logs at DEBUG, INFO and WARNING levels." msgstr "" -#: howto/logging-cookbook.rst:2300 +#: howto/logging-cookbook.rst:2322 msgid "" "The script just arranges to decorate ``foo`` with a decorator which will do " "the conditional logging that's required. The decorator takes a logger as a " @@ -1294,36 +1828,36 @@ msgid "" "respectively." msgstr "" -#: howto/logging-cookbook.rst:2308 +#: howto/logging-cookbook.rst:2330 msgid "Here's the script::" msgstr "" -#: howto/logging-cookbook.rst:2371 +#: howto/logging-cookbook.rst:2393 msgid "When this script is run, the following output should be observed:" msgstr "" -#: howto/logging-cookbook.rst:2401 +#: howto/logging-cookbook.rst:2423 msgid "" "As you can see, actual logging output only occurs when an event is logged " "whose severity is ERROR or greater, but in that case, any previous events at " "lower severities are also logged." msgstr "" -#: howto/logging-cookbook.rst:2405 +#: howto/logging-cookbook.rst:2427 msgid "You can of course use the conventional means of decoration::" msgstr "" -#: howto/logging-cookbook.rst:2415 +#: howto/logging-cookbook.rst:2437 msgid "Formatting times using UTC (GMT) via configuration" msgstr "" -#: howto/logging-cookbook.rst:2417 +#: howto/logging-cookbook.rst:2439 msgid "" "Sometimes you want to format times using UTC, which can be done using a " "class such as `UTCFormatter`, shown below::" msgstr "" -#: howto/logging-cookbook.rst:2426 +#: howto/logging-cookbook.rst:2448 msgid "" "and you can then use the ``UTCFormatter`` in your code instead of :class:" "`~logging.Formatter`. If you want to do that via configuration, you can use " @@ -1331,21 +1865,21 @@ msgid "" "the following complete example::" msgstr "" -#: howto/logging-cookbook.rst:2469 +#: howto/logging-cookbook.rst:2491 msgid "When this script is run, it should print something like:" msgstr "" -#: howto/logging-cookbook.rst:2476 +#: howto/logging-cookbook.rst:2498 msgid "" "showing how the time is formatted both as local time and UTC, one for each " "handler." msgstr "" -#: howto/logging-cookbook.rst:2483 +#: howto/logging-cookbook.rst:2505 msgid "Using a context manager for selective logging" msgstr "" -#: howto/logging-cookbook.rst:2485 +#: howto/logging-cookbook.rst:2507 msgid "" "There are times when it would be useful to temporarily change the logging " "configuration and revert it back after doing something. For this, a context " @@ -1355,7 +1889,7 @@ msgid "" "scope of the context manager::" msgstr "" -#: howto/logging-cookbook.rst:2518 +#: howto/logging-cookbook.rst:2540 msgid "" "If you specify a level value, the logger's level is set to that value in the " "scope of the with block covered by the context manager. If you specify a " @@ -1364,13 +1898,13 @@ msgid "" "block exit - you could do this if you don't need the handler any more." msgstr "" -#: howto/logging-cookbook.rst:2524 +#: howto/logging-cookbook.rst:2546 msgid "" "To illustrate how it works, we can add the following block of code to the " "above::" msgstr "" -#: howto/logging-cookbook.rst:2542 +#: howto/logging-cookbook.rst:2564 msgid "" "We initially set the logger's level to ``INFO``, so message #1 appears and " "message #2 doesn't. We then change the level to ``DEBUG`` temporarily in the " @@ -1383,56 +1917,56 @@ msgid "" "(like message #1) whereas message #7 doesn't (just like message #2)." msgstr "" -#: howto/logging-cookbook.rst:2552 +#: howto/logging-cookbook.rst:2574 msgid "If we run the resulting script, the result is as follows:" msgstr "" -#: howto/logging-cookbook.rst:2563 +#: howto/logging-cookbook.rst:2585 msgid "" "If we run it again, but pipe ``stderr`` to ``/dev/null``, we see the " "following, which is the only message written to ``stdout``:" msgstr "" -#: howto/logging-cookbook.rst:2571 +#: howto/logging-cookbook.rst:2593 msgid "Once again, but piping ``stdout`` to ``/dev/null``, we get:" msgstr "" -#: howto/logging-cookbook.rst:2581 +#: howto/logging-cookbook.rst:2603 msgid "" "In this case, the message #5 printed to ``stdout`` doesn't appear, as " "expected." msgstr "" -#: howto/logging-cookbook.rst:2583 +#: howto/logging-cookbook.rst:2605 msgid "" "Of course, the approach described here can be generalised, for example to " "attach logging filters temporarily. Note that the above code works in Python " "2 as well as Python 3." msgstr "" -#: howto/logging-cookbook.rst:2591 +#: howto/logging-cookbook.rst:2613 msgid "A CLI application starter template" msgstr "" -#: howto/logging-cookbook.rst:2593 +#: howto/logging-cookbook.rst:2615 msgid "Here's an example which shows how you can:" msgstr "" -#: howto/logging-cookbook.rst:2595 +#: howto/logging-cookbook.rst:2617 msgid "Use a logging level based on command-line arguments" msgstr "" -#: howto/logging-cookbook.rst:2596 +#: howto/logging-cookbook.rst:2618 msgid "" "Dispatch to multiple subcommands in separate files, all logging at the same " "level in a consistent way" msgstr "" -#: howto/logging-cookbook.rst:2598 +#: howto/logging-cookbook.rst:2620 msgid "Make use of simple, minimal configuration" msgstr "" -#: howto/logging-cookbook.rst:2600 +#: howto/logging-cookbook.rst:2622 msgid "" "Suppose we have a command-line application whose job is to stop, start or " "restart some services. This could be organised for the purposes of " @@ -1443,53 +1977,53 @@ msgid "" "``logging.INFO``. Here's one way that ``app.py`` could be written::" msgstr "" -#: howto/logging-cookbook.rst:2649 +#: howto/logging-cookbook.rst:2671 msgid "" "And the ``start``, ``stop`` and ``restart`` commands can be implemented in " "separate modules, like so for starting::" msgstr "" -#: howto/logging-cookbook.rst:2662 +#: howto/logging-cookbook.rst:2684 msgid "and thus for stopping::" msgstr "" -#: howto/logging-cookbook.rst:2683 +#: howto/logging-cookbook.rst:2705 msgid "and similarly for restarting::" msgstr "" -#: howto/logging-cookbook.rst:2704 +#: howto/logging-cookbook.rst:2726 msgid "" "If we run this application with the default log level, we get output like " "this:" msgstr "" -#: howto/logging-cookbook.rst:2717 +#: howto/logging-cookbook.rst:2739 msgid "" "The first word is the logging level, and the second word is the module or " "package name of the place where the event was logged." msgstr "" -#: howto/logging-cookbook.rst:2720 +#: howto/logging-cookbook.rst:2742 msgid "" "If we change the logging level, then we can change the information sent to " "the log. For example, if we want more information:" msgstr "" -#: howto/logging-cookbook.rst:2737 +#: howto/logging-cookbook.rst:2759 msgid "And if we want less:" msgstr "" -#: howto/logging-cookbook.rst:2745 +#: howto/logging-cookbook.rst:2767 msgid "" "In this case, the commands don't print anything to the console, since " "nothing at ``WARNING`` level or above is logged by them." msgstr "" -#: howto/logging-cookbook.rst:2751 +#: howto/logging-cookbook.rst:2773 msgid "A Qt GUI for logging" msgstr "" -#: howto/logging-cookbook.rst:2753 +#: howto/logging-cookbook.rst:2775 msgid "" "A question that comes up from time to time is about how to log to a GUI " "application. The `Qt `_ framework is a popular cross-" @@ -1497,7 +2031,7 @@ msgid "" "project/PySide2/>`_ or `PyQt5 `_ libraries." msgstr "" -#: howto/logging-cookbook.rst:2759 +#: howto/logging-cookbook.rst:2781 msgid "" "The following example shows how to log to a Qt GUI. This introduces a simple " "``QtHandler`` class which takes a callable, which should be a slot in the " @@ -1507,17 +2041,132 @@ msgid "" "logging messages at random levels with random short delays in between)." msgstr "" -#: howto/logging-cookbook.rst:2766 +#: howto/logging-cookbook.rst:2788 msgid "" "The worker thread is implemented using Qt's ``QThread`` class rather than " "the :mod:`threading` module, as there are circumstances where one has to use " "``QThread``, which offers better integration with other ``Qt`` components." msgstr "" -#: howto/logging-cookbook.rst:2770 +#: howto/logging-cookbook.rst:2792 msgid "" "The code should work with recent releases of either ``PySide2`` or " "``PyQt5``. You should be able to adapt the approach to earlier versions of " "Qt. Please refer to the comments in the code snippet for more detailed " "information." msgstr "" + +#: howto/logging-cookbook.rst:3009 +msgid "Patterns to avoid" +msgstr "" + +#: howto/logging-cookbook.rst:3011 +msgid "" +"Although the preceding sections have described ways of doing things you " +"might need to do or deal with, it is worth mentioning some usage patterns " +"which are *unhelpful*, and which should therefore be avoided in most cases. " +"The following sections are in no particular order." +msgstr "" + +#: howto/logging-cookbook.rst:3018 +msgid "Opening the same log file multiple times" +msgstr "" + +#: howto/logging-cookbook.rst:3020 +msgid "" +"On Windows, you will generally not be able to open the same file multiple " +"times as this will lead to a \"file is in use by another process\" error. " +"However, on POSIX platforms you'll not get any errors if you open the same " +"file multiple times. This could be done accidentally, for example by:" +msgstr "" + +#: howto/logging-cookbook.rst:3025 +msgid "" +"Adding a file handler more than once which references the same file (e.g. by " +"a copy/paste/forget-to-change error)." +msgstr "" + +#: howto/logging-cookbook.rst:3028 +msgid "" +"Opening two files that look different, as they have different names, but are " +"the same because one is a symbolic link to the other." +msgstr "" + +#: howto/logging-cookbook.rst:3031 +msgid "" +"Forking a process, following which both parent and child have a reference to " +"the same file. This might be through use of the :mod:`multiprocessing` " +"module, for example." +msgstr "" + +#: howto/logging-cookbook.rst:3035 +msgid "" +"Opening a file multiple times might *appear* to work most of the time, but " +"can lead to a number of problems in practice:" +msgstr "" + +#: howto/logging-cookbook.rst:3038 +msgid "" +"Logging output can be garbled because multiple threads or processes try to " +"write to the same file. Although logging guards against concurrent use of " +"the same handler instance by multiple threads, there is no such protection " +"if concurrent writes are attempted by two different threads using two " +"different handler instances which happen to point to the same file." +msgstr "" + +#: howto/logging-cookbook.rst:3044 +msgid "" +"An attempt to delete a file (e.g. during file rotation) silently fails, " +"because there is another reference pointing to it. This can lead to " +"confusion and wasted debugging time - log entries end up in unexpected " +"places, or are lost altogether." +msgstr "" + +#: howto/logging-cookbook.rst:3049 +msgid "" +"Use the techniques outlined in :ref:`multiple-processes` to circumvent such " +"issues." +msgstr "" + +#: howto/logging-cookbook.rst:3053 +msgid "Using loggers as attributes in a class or passing them as parameters" +msgstr "" + +#: howto/logging-cookbook.rst:3055 +msgid "" +"While there might be unusual cases where you'll need to do this, in general " +"there is no point because loggers are singletons. Code can always access a " +"given logger instance by name using ``logging.getLogger(name)``, so passing " +"instances around and holding them as instance attributes is pointless. Note " +"that in other languages such as Java and C#, loggers are often static class " +"attributes. However, this pattern doesn't make sense in Python, where the " +"module (and not the class) is the unit of software decomposition." +msgstr "" + +#: howto/logging-cookbook.rst:3065 +msgid "" +"Adding handlers other than :class:`NullHandler` to a logger in a library" +msgstr "" + +#: howto/logging-cookbook.rst:3067 +msgid "" +"Configuring logging by adding handlers, formatters and filters is the " +"responsibility of the application developer, not the library developer. If " +"you are maintaining a library, ensure that you don't add handlers to any of " +"your loggers other than a :class:`~logging.NullHandler` instance." +msgstr "" + +#: howto/logging-cookbook.rst:3074 +msgid "Creating a lot of loggers" +msgstr "" + +#: howto/logging-cookbook.rst:3076 +msgid "" +"Loggers are singletons that are never freed during a script execution, and " +"so creating lots of loggers will use up memory which can't then be freed. " +"Rather than create a logger per e.g. file processed or network connection " +"made, use the :ref:`existing mechanisms ` for passing " +"contextual information into your logs and restrict the loggers created to " +"those describing areas within your application (generally modules, but " +"occasionally slightly more fine-grained than that)." +msgstr "" diff --git a/howto/pyporting.po b/howto/pyporting.po index e18dfabd00..372f61d9d3 100644 --- a/howto/pyporting.po +++ b/howto/pyporting.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-01-28 15:50+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -61,13 +61,13 @@ msgstr "" "qui a motivé la création de Python 3, vous pouvez lire le `Python 3 Q & A`_ " "de Nick Coghlan ou bien `Why Python 3 exists`_ de Brett Cannon." -#: howto/pyporting.rst:23 +#: howto/pyporting.rst:24 msgid "" -"For help with porting, you can email the python-porting_ mailing list with " -"questions." +"For help with porting, you can view the archived python-porting_ mailing " +"list." msgstr "" -"Vous pouvez solliciter par courriel l'aide de la liste de diffusion python-" -"porting_ pour vos questions liées au portage." +"Vous pouvez lire les archives de la liste diffusion python-porting_ dans vos " +"recherches sur les questions liées au portage." #: howto/pyporting.rst:27 msgid "The Short Explanation" diff --git a/howto/regex.po b/howto/regex.po index 5ab025dd69..402f183dd5 100644 --- a/howto/regex.po +++ b/howto/regex.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-11-10 10:27+0100\n" "Last-Translator: Nabil Bendafi \n" "Language-Team: FRENCH \n" @@ -199,15 +199,16 @@ msgstr "" #: howto/regex.rst:92 msgid "" -"Metacharacters are not active inside classes. For example, ``[akm$]`` will " -"match any of the characters ``'a'``, ``'k'``, ``'m'``, or ``'$'``; ``'$'`` " -"is usually a metacharacter, but inside a character class it's stripped of " -"its special nature." +"Metacharacters (except ``\\``) are not active inside classes. For example, " +"``[akm$]`` will match any of the characters ``'a'``, ``'k'``, ``'m'``, or " +"``'$'``; ``'$'`` is usually a metacharacter, but inside a character class " +"it's stripped of its special nature." msgstr "" -"Les métacaractères ne sont pas actifs dans les classes. Par exemple, ``[akm" -"$]`` correspond à n'importe quel caractère parmi ``'a'``, ``'k'``, ``'m'`` " -"ou ``'$'`` ; ``'$'`` est habituellement un métacaractère mais dans une " -"classe de caractères, il est dépourvu de sa signification spéciale." +"Les métacaractères (à l’exception de ``\\``) ne sont pas actifs dans les " +"classes. Par exemple, ``[akm$]`` correspond à n'importe quel caractère parmi " +"``'a'``, ``'k'``, ``'m'`` ou ``'$'`` ; ``'$'`` est habituellement un " +"métacaractère mais dans une classe de caractères, il est dépourvu de sa " +"signification spéciale." #: howto/regex.rst:97 msgid "" @@ -270,9 +271,9 @@ msgstr "" "équivalent à la classe ``[a-zA-Z0-9_]``. Si l'expression régulière est une " "chaîne de caractères, ``\\w`` correspond à tous les caractères identifiés " "comme lettre dans la base de données Unicode fournie par le module :mod:" -"`unicodedata`. Vous pouvez utiliser la définition plus restrictive de ``" -"\\w`` dans un motif exprimé en chaîne de caractères en spécifiant l'option :" -"const:`re.ASCII` lors de la compilation de l'expression régulière." +"`unicodedata`. Vous pouvez utiliser la définition plus restrictive de " +"``\\w`` dans un motif exprimé en chaîne de caractères en spécifiant " +"l'option :const:`re.ASCII` lors de la compilation de l'expression régulière." #: howto/regex.rst:123 msgid "" @@ -317,8 +318,8 @@ msgstr "``\\s``" #: howto/regex.rst:137 msgid "" -"Matches any whitespace character; this is equivalent to the class ``[ \\t\\n" -"\\r\\f\\v]``." +"Matches any whitespace character; this is equivalent to the class " +"``[ \\t\\n\\r\\f\\v]``." msgstr "" "Correspond à n'importe quel caractère « blanc » ; équivalent à la classe " "``[ \\t\\n\\r\\f\\v]``." @@ -1192,8 +1193,8 @@ msgid "" "Makes several escapes like ``\\w``, ``\\b``, ``\\s`` and ``\\d`` match only " "on ASCII characters with the respective property." msgstr "" -"Transforme plusieurs échappements tels que ``\\w``, ``\\b``, ``\\s`` et ``" -"\\d`` de manière à ce qu'ils ne correspondent qu'à des caractères ASCII " +"Transforme plusieurs échappements tels que ``\\w``, ``\\b``, ``\\s`` et " +"``\\d`` de manière à ce qu'ils ne correspondent qu'à des caractères ASCII " "ayant la propriété demandée." #: howto/regex.rst:543 @@ -1253,8 +1254,8 @@ msgid "" "z]`` or ``[A-Z]`` are used in combination with the :const:`IGNORECASE` flag, " "they will match the 52 ASCII letters and 4 additional non-ASCII letters: " "'İ' (U+0130, Latin capital letter I with dot above), 'ı' (U+0131, Latin " -"small letter dotless i), 'ſ' (U+017F, Latin small letter long s) and 'K' (U" -"+212A, Kelvin sign). ``Spam`` will match ``'Spam'``, ``'spam'``, " +"small letter dotless i), 'ſ' (U+017F, Latin small letter long s) and " +"'K' (U+212A, Kelvin sign). ``Spam`` will match ``'Spam'``, ``'spam'``, " "``'spAM'``, or ``'ſpam'`` (the latter is matched only in Unicode mode). This " "lowercasing doesn't take the current locale into account; it will if you " "also set the :const:`LOCALE` flag." @@ -1314,13 +1315,13 @@ msgstr "" "certaines fonctions C diront à votre programme que l'octet codant ``é`` doit " "être considéré comme une lettre. Définir l'option :const:`LOCALE` lors de la " "compilation d'une expression régulière fait que l'objet compilé résultant " -"utilise ces fonctions C pour ``\\w`` ; c'est plus lent mais cela permet à ``" -"\\w+`` de correspondre avec les mots français tel qu'attendu. L'utilisation " -"de cette option est déconseillée en Python 3 car le mécanisme de locale est " -"très peu fiable, il ne gère qu'une seule « culture » à la fois et il ne " -"fonctionne qu'avec des locales 8 bits. La correspondance Unicode est déjà " -"activée par défaut dans Python 3 pour les motifs Unicode (type *str*) et " -"elle est capable de gérer différentes configurations de régions." +"utilise ces fonctions C pour ``\\w`` ; c'est plus lent mais cela permet à " +"``\\w+`` de correspondre avec les mots français tel qu'attendu. " +"L'utilisation de cette option est déconseillée en Python 3 car le mécanisme " +"de locale est très peu fiable, il ne gère qu'une seule « culture » à la fois " +"et il ne fonctionne qu'avec des locales 8 bits. La correspondance Unicode " +"est déjà activée par défaut dans Python 3 pour les motifs Unicode (type " +"*str*) et elle est capable de gérer différentes configurations de régions." #: howto/regex.rst:605 msgid "" @@ -1593,8 +1594,8 @@ msgstr "" msgid "" "There are two subtleties you should remember when using this special " "sequence. First, this is the worst collision between Python's string " -"literals and regular expression sequences. In Python's string literals, ``" -"\\b`` is the backspace character, ASCII value 8. If you're not using raw " +"literals and regular expression sequences. In Python's string literals, " +"``\\b`` is the backspace character, ASCII value 8. If you're not using raw " "strings, then Python will convert the ``\\b`` to a backspace, and your RE " "won't match as you expect it to. The following example looks the same as our " "previous RE, but omits the ``'r'`` in front of the RE string. ::" @@ -1611,8 +1612,8 @@ msgstr "" #: howto/regex.rst:774 msgid "" -"Second, inside a character class, where there's no use for this assertion, ``" -"\\b`` represents the backspace character, for compatibility with Python's " +"Second, inside a character class, where there's no use for this assertion, " +"``\\b`` represents the backspace character, for compatibility with Python's " "string literals." msgstr "" "Ensuite, dans une classe de caractères, où cette assertion n'a pas lieu " @@ -1667,8 +1668,8 @@ msgid "" "Groups are marked by the ``'('``, ``')'`` metacharacters. ``'('`` and " "``')'`` have much the same meaning as they do in mathematical expressions; " "they group together the expressions contained inside them, and you can " -"repeat the contents of a group with a repeating qualifier, such as ``*``, ``" -"+``, ``?``, or ``{m,n}``. For example, ``(ab)*`` will match zero or more " +"repeat the contents of a group with a repeating qualifier, such as ``*``, " +"``+``, ``?``, or ``{m,n}``. For example, ``(ab)*`` will match zero or more " "repetitions of ``ab``. ::" msgstr "" "Les groupes sont délimités par les métacaractères marqueurs ``'('`` et " @@ -1788,8 +1789,8 @@ msgstr "" msgid "" "Perl 5 is well known for its powerful additions to standard regular " "expressions. For these new features the Perl developers couldn't choose new " -"single-keystroke metacharacters or new special sequences beginning with ``" -"\\`` without making Perl's regular expressions confusingly different from " +"single-keystroke metacharacters or new special sequences beginning with " +"``\\`` without making Perl's regular expressions confusingly different from " "standard REs. If they chose ``&`` as a new metacharacter, for example, old " "expressions would be assuming that ``&`` was a regular character and " "wouldn't have escaped it by writing ``\\&`` or ``[&]``." @@ -1939,8 +1940,8 @@ msgid "" "name instead of the number. This is another Python extension: ``(?P=name)`` " "indicates that the contents of the group called *name* should again be " "matched at the current point. The regular expression for finding doubled " -"words, ``\\b(\\w+)\\s+\\1\\b`` can also be written as ``\\b(?P\\w+)\\s" -"+(?P=word)\\b``::" +"words, ``\\b(\\w+)\\s+\\1\\b`` can also be written as ``\\b(?" +"P\\w+)\\s+(?P=word)\\b``::" msgstr "" "La syntaxe des renvois dans une expression telle que ``(....)\\1`` fait " "référence au numéro du groupe. Il y a naturellement une variante qui utilise " @@ -2109,11 +2110,11 @@ msgstr "Une assertion prédictive négative supprime toute cette confusion :" #: howto/regex.rst:1042 msgid "" "``.*[.](?!bat$)[^.]*$`` The negative lookahead means: if the expression " -"``bat`` doesn't match at this point, try the rest of the pattern; if ``bat" -"$`` does match, the whole pattern will fail. The trailing ``$`` is required " -"to ensure that something like ``sample.batch``, where the extension only " -"starts with ``bat``, will be allowed. The ``[^.]*`` makes sure that the " -"pattern works when there are multiple dots in the filename." +"``bat`` doesn't match at this point, try the rest of the pattern; if " +"``bat$`` does match, the whole pattern will fail. The trailing ``$`` is " +"required to ensure that something like ``sample.batch``, where the extension " +"only starts with ``bat``, will be allowed. The ``[^.]*`` makes sure that " +"the pattern works when there are multiple dots in the filename." msgstr "" "``.*[.](?!bat$)[^.]*$`` Cette assertion prédictive négative signifie : si " "l'expression ``bat`` ne correspond pas à cet emplacement, essaie le reste du " @@ -2319,9 +2320,9 @@ msgstr "" msgid "" "If *replacement* is a string, any backslash escapes in it are processed. " "That is, ``\\n`` is converted to a single newline character, ``\\r`` is " -"converted to a carriage return, and so forth. Unknown escapes such as ``" -"\\&`` are left alone. Backreferences, such as ``\\6``, are replaced with the " -"substring matched by the corresponding group in the RE. This lets you " +"converted to a carriage return, and so forth. Unknown escapes such as " +"``\\&`` are left alone. Backreferences, such as ``\\6``, are replaced with " +"the substring matched by the corresponding group in the RE. This lets you " "incorporate portions of the original text in the resulting replacement " "string." msgstr "" @@ -2356,9 +2357,9 @@ msgstr "" "par la syntaxe ``(?P....)``. ``\\g`` utilise la sous-chaîne " "correspondante au groupe nommé ``nom`` et ``\\g`` utilise le numéro " "de groupe correspondant. ``\\g<2>`` est donc l'équivalent de ``\\2``, mais " -"n'est pas ambigu dans une chaîne de substitution telle que ``\\g<2>0`` (``" -"\\20`` serait interprété comme une référence au groupe 20 et non comme une " -"référence au groupe 2 suivie du caractère littéral ``'0'``). Les " +"n'est pas ambigu dans une chaîne de substitution telle que ``\\g<2>0`` " +"(``\\20`` serait interprété comme une référence au groupe 20 et non comme " +"une référence au groupe 2 suivie du caractère littéral ``'0'``). Les " "substitutions suivantes sont toutes équivalentes mais utilisent les trois " "variantes de la chaîne de remplacement. ::" diff --git a/howto/sockets.po b/howto/sockets.po index f8cb8ccc03..befa9ef965 100644 --- a/howto/sockets.po +++ b/howto/sockets.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-09-30 17:07+0200\n" "Last-Translator: Mathieu Dupuy \n" "Language-Team: FRENCH \n" @@ -475,9 +475,9 @@ msgid "" "example, a Motorola chip will represent a 16 bit integer with the value 1 as " "the two hex bytes 00 01. Intel and DEC, however, are byte-reversed - that " "same 1 is 01 00. Socket libraries have calls for converting 16 and 32 bit " -"integers - ``ntohl, htonl, ntohs, htons`` where \"n\" means *network* and \"h" -"\" means *host*, \"s\" means *short* and \"l\" means *long*. Where network " -"order is host order, these do nothing, but where the machine is byte-" +"integers - ``ntohl, htonl, ntohs, htons`` where \"n\" means *network* and " +"\"h\" means *host*, \"s\" means *short* and \"l\" means *long*. Where " +"network order is host order, these do nothing, but where the machine is byte-" "reversed, these swap the bytes around appropriately." msgstr "" "Il est parfaitement possible d’envoyer des données binaires sur un " diff --git a/howto/sorting.po b/howto/sorting.po index e63244675d..59b97a716e 100644 --- a/howto/sorting.po +++ b/howto/sorting.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-01-28 15:46+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -417,10 +417,11 @@ msgstr "" "native :func:`reversed` deux fois :" #: howto/sorting.rst:290 +#, fuzzy msgid "" -"The sort routines are guaranteed to use :meth:`__lt__` when making " -"comparisons between two objects. So, it is easy to add a standard sort order " -"to a class by defining an :meth:`__lt__` method::" +"The sort routines use ``<`` when making comparisons between two objects. So, " +"it is easy to add a standard sort order to a class by defining an :meth:" +"`__lt__` method::" msgstr "" "Il est garanti que les routines de tri utilisent les méthodes :meth:`__lt__` " "lorsqu'elles effectuent des comparaisons entre deux objets. Donc il est " @@ -429,6 +430,15 @@ msgstr "" #: howto/sorting.rst:298 msgid "" +"However, note that ``<`` can fall back to using :meth:`__gt__` if :meth:" +"`__lt__` is not implemented (see :func:`object.__lt__`)." +msgstr "" +"Notez toutefois que l'opérateur ``<`` peut utiliser la méthode :meth:" +"`__gt__` si :meth:`__lt__` n'est pas implémentée ; voir :func:`object." +"__lt__`." + +#: howto/sorting.rst:301 +msgid "" "Key functions need not depend directly on the objects being sorted. A key " "function can also access external resources. For instance, if the student " "grades are stored in a dictionary, they can be used to sort a separate list " diff --git a/howto/unicode.po b/howto/unicode.po index c8ea85114d..56b47c14e3 100644 --- a/howto/unicode.po +++ b/howto/unicode.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-09-30 17:16+0200\n" "Last-Translator: Melançon Victor \n" "Language-Team: FRENCH \n" @@ -111,8 +111,8 @@ msgstr "" "entre ``0`` et ``0x10FFFF`` (environ 1,1 million de valeurs possibles, le " "`nombre de valeurs réellement assignées `_ est inférieur à ce nombre). Dans le standard et dans le " -"présent document, un point de code est écrit en utilisant la notation ``U" -"+265E`` pour désigner le caractère avec la valeur ``0x265e`` (9 822 en " +"présent document, un point de code est écrit en utilisant la notation " +"``U+265E`` pour désigner le caractère avec la valeur ``0x265e`` (9 822 en " "décimal)." #: howto/unicode.rst:50 @@ -535,8 +535,8 @@ msgstr "" "de ``'strict'``, ``'ignore'`` et ``'remplace'`` (qui dans ce cas insère un " "point d'interrogation au lieu du caractère non codable), il y a aussi " "``'xmlcharrefreplace'`` (insère une référence XML), ``backslashreplace`` " -"(insère une séquence ``\\uNNNN``) et ``namereplace`` (insère une séquence ``" -"\\N{...}``)." +"(insère une séquence ``\\uNNNN``) et ``namereplace`` (insère une séquence " +"``\\N{...}``)." #: howto/unicode.rst:280 msgid "The following example shows the different results::" @@ -572,8 +572,8 @@ msgid "" msgstr "" "Dans le code source Python, des points de code Unicode spécifiques peuvent " "être écrits en utilisant la séquence d'échappement ``\\u``, suivie de quatre " -"chiffres hexadécimaux donnant le point de code. La séquence d'échappement ``" -"\\U`` est similaire, mais attend huit chiffres hexadécimaux, pas quatre ::" +"chiffres hexadécimaux donnant le point de code. La séquence d'échappement " +"``\\U`` est similaire, mais attend huit chiffres hexadécimaux, pas quatre ::" #: howto/unicode.rst:324 msgid "" @@ -709,11 +709,11 @@ msgstr "" "Unicode ajoute une certaine complication à la comparaison des chaînes de " "caractères, car le même jeu de caractères peut être représenté par " "différentes séquences de points de code. Par exemple, une lettre comme « ê » " -"peut être représentée comme un point de code unique ``U+00EA``, ou comme ``U" -"+0065 U+0302``, qui est le point de code pour « e » suivi d'un point de code " -"pour ``COMBINING CIRCUMFLEX ACCENT``. Celles-ci produisent le même résultat " -"lorsqu'elles sont affichées, mais l'une est une chaîne de caractères de " -"longueur 1 et l'autre de longueur 2." +"peut être représentée comme un point de code unique ``U+00EA``, ou comme " +"``U+0065 U+0302``, qui est le point de code pour « e » suivi d'un point de " +"code pour ``COMBINING CIRCUMFLEX ACCENT``. Celles-ci produisent le même " +"résultat lorsqu'elles sont affichées, mais l'une est une chaîne de " +"caractères de longueur 1 et l'autre de longueur 2." #: howto/unicode.rst:412 msgid "" @@ -1230,9 +1230,9 @@ msgid "" "error handler is used to encode the data and write it back out." msgstr "" "Le gestionnaire d'erreurs ``surrogateescape`` décode tous les octets non-" -"ASCII comme points de code dans une plage spéciale allant de ``U+DC80`` à ``U" -"+DCFF``. Ces points de code redeviennent alors les mêmes octets lorsque le " -"gestionnaire d'erreurs ``surrogateescape`` est utilisé pour encoder les " +"ASCII comme points de code dans une plage spéciale allant de ``U+DC80`` à " +"``U+DCFF``. Ces points de code redeviennent alors les mêmes octets lorsque " +"le gestionnaire d'erreurs ``surrogateescape`` est utilisé pour encoder les " "données et les réécrire." #: howto/unicode.rst:737 diff --git a/howto/urllib2.po b/howto/urllib2.po index 06784f7771..6e5095d393 100644 --- a/howto/urllib2.po +++ b/howto/urllib2.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-24 17:33+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -17,6 +17,7 @@ msgstr "" #: howto/urllib2.rst:5 msgid "HOWTO Fetch Internet Resources Using The urllib Package" msgstr "" +"Guide pratique : récupérer des ressources web en utilisant le module *urllib*" #: howto/urllib2.rst:0 msgid "Author" @@ -129,8 +130,8 @@ msgid "" "In the case of HTTP, there are two extra things that Request objects allow " "you to do: First, you can pass data to be sent to the server. Second, you " "can pass extra information (\"metadata\") *about* the data or about the " -"request itself, to the server - this information is sent as HTTP \"headers" -"\". Let's look at each of these in turn." +"request itself, to the server - this information is sent as HTTP " +"\"headers\". Let's look at each of these in turn." msgstr "" #: howto/urllib2.rst:105 @@ -480,10 +481,10 @@ msgstr "" #: howto/urllib2.rst:522 msgid "" "``top_level_url`` is in fact *either* a full URL (including the 'http:' " -"scheme component and the hostname and optionally the port number) e.g. ``" -"\"http://example.com/\"`` *or* an \"authority\" (i.e. the hostname, " -"optionally including the port number) e.g. ``\"example.com\"`` or ``" -"\"example.com:8080\"`` (the latter example includes a port number). The " +"scheme component and the hostname and optionally the port number) e.g. " +"``\"http://example.com/\"`` *or* an \"authority\" (i.e. the hostname, " +"optionally including the port number) e.g. ``\"example.com\"`` or " +"``\"example.com:8080\"`` (the latter example includes a port number). The " "authority, if present, must NOT contain the \"userinfo\" component - for " "example ``\"joe:password@example.com\"`` is not correct." msgstr "" diff --git a/install/index.po b/install/index.po index a67df292b7..d13a33bac6 100644 --- a/install/index.po +++ b/install/index.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-24 17:33+0100\n" -"PO-Revision-Date: 2020-04-27 22:25+0200\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" +"PO-Revision-Date: 2021-04-27 15:27+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -115,7 +115,7 @@ msgstr "" #: install/index.rst:55 msgid "Distutils based source distributions" -msgstr "" +msgstr "Distributions basées sur *distutils*" #: install/index.rst:57 msgid "" @@ -368,12 +368,13 @@ msgstr "" "l'installation." #: install/index.rst:199 +#, fuzzy msgid "" "If you don't choose an installation directory---i.e., if you just run " "``setup.py install``\\ ---then the :command:`install` command installs to " "the standard location for third-party Python modules. This location varies " -"by platform and by how you built/installed Python itself. On Unix (and Mac " -"OS X, which is also Unix-based), it also depends on whether the module " +"by platform and by how you built/installed Python itself. On Unix (and " +"macOS, which is also Unix-based), it also depends on whether the module " "distribution being installed is pure Python or contains extensions (\"non-" "pure\"):" msgstr "" @@ -462,18 +463,19 @@ msgstr "" #: install/index.rst:227 msgid "" -"The default installation directory on Windows was :file:`C:\\\\Program Files" -"\\\\Python` under Python 1.6a1, 1.5.2, and earlier." +"The default installation directory on Windows was :file:`C:\\\\Program " +"Files\\\\Python` under Python 1.6a1, 1.5.2, and earlier." msgstr "" "Sous Windows, le dossier d'installation par défaut était : :file:`C:\\" "\\Program Files\\\\Python` sous Python 1.6a1, 1.5.2 et avant." #: install/index.rst:230 +#, fuzzy msgid "" ":file:`{prefix}` and :file:`{exec-prefix}` stand for the directories that " "Python is installed to, and where it finds its libraries at run-time. They " "are always the same under Windows, and very often the same under Unix and " -"Mac OS X. You can find out what your Python installation uses for :file:" +"macOS. You can find out what your Python installation uses for :file:" "`{prefix}` and :file:`{exec-prefix}` by running Python in interactive mode " "and typing a few simple commands. Under Unix, just type ``python`` at the " "shell prompt. Under Windows, choose :menuselection:`Start --> Programs --> " @@ -600,11 +602,12 @@ msgstr "" "simple option ::" #: install/index.rst:305 +#, fuzzy msgid "" "Files will be installed into subdirectories of :data:`site.USER_BASE` " "(written as :file:`{userbase}` hereafter). This scheme installs pure Python " "modules and extension modules in the same location (also known as :data:" -"`site.USER_SITE`). Here are the values for UNIX, including Mac OS X:" +"`site.USER_SITE`). Here are the values for UNIX, including macOS:" msgstr "" "Les fichiers seront installés dans des sous-dossiers de :data:`site." "USER_BASE` (écrit :file:`{userbase}` dans la suite). Ce schéma installe des " @@ -954,10 +957,14 @@ msgid "" "that pure Python modules and extension modules are installed into the same " "location. Files are installed as follows:" msgstr "" +"Le dossier racine de l'installation est défini par l'option :option:`!--" +"prefix`. L'option :option:`!--exec-prefix` n'est pas gérée sur Windows, ce " +"qui signifie que les modules Python et les modules d'extension sont " +"installés au même endroit. Les fichiers sont installés selon ce tableau :" #: install/index.rst:477 msgid ":file:`{prefix}\\\\Scripts`" -msgstr "" +msgstr ":file:`{prefix}\\\\Scripts`" #: install/index.rst:479 msgid ":file:`{prefix}\\\\Include\\\\{distname}`" @@ -988,38 +995,41 @@ msgid "" "schemes and override some of the installation directories used for the " "various types of files, using these options:" msgstr "" +"Pour créer un modèle d'installation personnalisé, partez d'un modèle " +"alternatif et remplacez les dossiers d'installation de types de fichiers " +"donnés via ces options :" #: install/index.rst:499 msgid "Override option" -msgstr "" +msgstr "Option" #: install/index.rst:501 msgid "``--install-purelib``" -msgstr "" +msgstr "``--install-purelib``" #: install/index.rst:502 msgid "``--install-platlib``" -msgstr "" +msgstr "``--install-platlib``" #: install/index.rst:503 msgid "all modules" -msgstr "" +msgstr "tous les modules" #: install/index.rst:503 msgid "``--install-lib``" -msgstr "" +msgstr "``--install-lib``" #: install/index.rst:504 msgid "``--install-scripts``" -msgstr "" +msgstr "``--install-scripts``" #: install/index.rst:505 msgid "``--install-data``" -msgstr "" +msgstr "``--install-data``" #: install/index.rst:506 msgid "``--install-headers``" -msgstr "" +msgstr "``--install-headers``" #: install/index.rst:509 msgid "" @@ -1258,8 +1268,8 @@ msgstr "" #: install/index.rst:730 msgid "" "The names and locations of the configuration files vary slightly across " -"platforms. On Unix and Mac OS X, the three configuration files (in the " -"order they are processed) are:" +"platforms. On Unix and macOS, the three configuration files (in the order " +"they are processed) are:" msgstr "" #: install/index.rst:747 @@ -1272,7 +1282,7 @@ msgstr "" #: install/index.rst:737 msgid ":file:`{prefix}/lib/python{ver}/distutils/distutils.cfg`" -msgstr "" +msgstr ":file:`{prefix}/lib/python{ver}/distutils/distutils.cfg`" #: install/index.rst:751 msgid "personal" @@ -1280,7 +1290,7 @@ msgstr "" #: install/index.rst:739 msgid ":file:`$HOME/.pydistutils.cfg`" -msgstr "" +msgstr ":file:`$HOME/.pydistutils.cfg`" #: install/index.rst:753 msgid "local" @@ -1288,7 +1298,7 @@ msgstr "" #: install/index.rst:753 msgid ":file:`setup.cfg`" -msgstr "" +msgstr ":file:`setup.cfg`" #: install/index.rst:753 msgid "\\(3)" @@ -1300,7 +1310,7 @@ msgstr "" #: install/index.rst:749 msgid ":file:`{prefix}\\\\Lib\\\\distutils\\\\distutils.cfg`" -msgstr "" +msgstr ":file:`{prefix}\\\\Lib\\\\distutils\\\\distutils.cfg`" #: install/index.rst:749 msgid "\\(4)" @@ -1308,7 +1318,7 @@ msgstr "\\(4)" #: install/index.rst:751 msgid ":file:`%HOME%\\\\pydistutils.cfg`" -msgstr "" +msgstr ":file:`%HOME%\\\\pydistutils.cfg`" #: install/index.rst:751 msgid "\\(5)" @@ -1530,9 +1540,9 @@ msgid "" "appended to the proper command line, so in the above example the compiler " "will be passed the :option:`!-o32` option, and the linker will be passed :" "option:`!-shared`. If a compiler option requires an argument, you'll have " -"to supply multiple :option:`!-Xcompiler` options; for example, to pass ``-x c" -"++`` the :file:`Setup` file would have to contain ``-Xcompiler -x -Xcompiler " -"c++``." +"to supply multiple :option:`!-Xcompiler` options; for example, to pass ``-x " +"c++`` the :file:`Setup` file would have to contain ``-Xcompiler -x -" +"Xcompiler c++``." msgstr "" #: install/index.rst:929 diff --git a/installing/index.po b/installing/index.po index 3b4b7dea90..d277fad917 100644 --- a/installing/index.po +++ b/installing/index.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-12-15 21:18+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -117,8 +117,9 @@ msgstr "" "capables d'installer automatiquement ``pip`` dans les environnements créés." #: installing/index.rst:47 +#, fuzzy msgid "" -"The `Python Packaging Index `__ is a public repository of " +"The `Python Package Index `__ is a public repository of " "open source licensed packages made available for use by other Python users." msgstr "" "L'`Index des Paquets Python `__ est un dépôt public des " @@ -186,16 +187,18 @@ msgstr "" "utilisés à partir de la ligne de commande." #: installing/index.rst:80 +#, fuzzy msgid "" "The following command will install the latest version of a module and its " -"dependencies from the Python Packaging Index::" +"dependencies from the Python Package Index::" msgstr "" "La commande suivante va installer la dernière version d'un module et ses " "dépendances depuis le *Python Package Index* ::" #: installing/index.rst:87 +#, fuzzy msgid "" -"For POSIX users (including Mac OS X and Linux users), the examples in this " +"For POSIX users (including macOS and Linux users), the examples in this " "guide assume the use of a :term:`virtual environment`." msgstr "" "Pour les utilisateurs POSIX (y compris Mac OS X et Linux), les exemples de " @@ -339,10 +342,11 @@ msgstr "" "... Travailler avec plusieurs versions de Python installés en parallèle ?" #: installing/index.rst:166 +#, fuzzy msgid "" -"On Linux, Mac OS X, and other POSIX systems, use the versioned Python " -"commands in combination with the ``-m`` switch to run the appropriate copy " -"of ``pip``::" +"On Linux, macOS, and other POSIX systems, use the versioned Python commands " +"in combination with the ``-m`` switch to run the appropriate copy of " +"``pip``::" msgstr "" "Sous Linux, Max OS X et autres systèmes POSIX, utiliser les commandes Python " "de la version souhaitée en combinaison avec l'option ``-m`` permet de lancer " @@ -430,12 +434,13 @@ msgstr "" "l'installation, les modules d'extension à partir des sources." #: installing/index.rst:227 +#, fuzzy msgid "" "With the introduction of support for the binary ``wheel`` format, and the " -"ability to publish wheels for at least Windows and Mac OS X through the " -"Python Packaging Index, this problem is expected to diminish over time, as " -"users are more regularly able to install pre-built extensions rather than " -"needing to build them themselves." +"ability to publish wheels for at least Windows and macOS through the Python " +"Package Index, this problem is expected to diminish over time, as users are " +"more regularly able to install pre-built extensions rather than needing to " +"build them themselves." msgstr "" "Avec l'introduction du format binaire ``wheel``, et la possibilité de " "publier des *wheels*, pour, au moins Windows et Mac OS X, via le *Python " diff --git a/library/2to3.po b/library/2to3.po index 754ef56a5a..eb41669921 100644 --- a/library/2to3.po +++ b/library/2to3.po @@ -5,22 +5,21 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2019-09-16 10:54+0200\n" -"Last-Translator: Léa Klein \n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" +"PO-Revision-Date: 2021-04-29 13:57+0200\n" +"Last-Translator: Dimitri Merejkowsky \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.1.1\n" +"X-Generator: Poedit 2.4.1\n" #: library/2to3.rst:4 msgid "2to3 - Automated Python 2 to 3 code translation" msgstr "*2to3* — Traduction automatique de code en Python 2 vers Python 3" #: library/2to3.rst:8 -#, fuzzy msgid "" "2to3 is a Python program that reads Python 2.x source code and applies a " "series of *fixers* to transform it into valid Python 3.x code. The standard " @@ -31,11 +30,9 @@ msgstr "" "*2to3* est un programme Python qui lit du code source en Python 2.x et " "applique une suite de correcteurs pour le transformer en code Python 3.x " "valide. La bibliothèque standard contient un ensemble riche de correcteurs " -"qui gèreront quasiment tout le code. La bibliothèque :mod:`lib2to3` " +"qui géreront quasiment tout le code. La bibliothèque :mod:`lib2to3` " "utilisée par *2to3* est cependant une bibliothèque flexible et générique, il " -"est donc possible d'écrire vos propres correcteurs pour *2to3*. :mod:" -"`lib2to3` pourrait aussi être adaptée à des applications personnalisées dans " -"lesquelles le code Python doit être édité automatiquement." +"est donc possible d'écrire vos propres correcteurs pour *2to3*." #: library/2to3.rst:18 msgid "Using 2to3" @@ -162,7 +159,6 @@ msgstr "" "processus de traduction." #: library/2to3.rst:97 -#, fuzzy msgid "" "Since some print statements can be parsed as function calls or statements, " "2to3 cannot always read files containing the print function. When 2to3 " @@ -173,15 +169,16 @@ msgid "" "had its print statements converted. Also :option:`!-e` can be used to make :" "func:`exec` a function." msgstr "" -"Puisque certaines instructions d'affichage peuvent être analysées comme des " -"appels ou des instructions de fonction, *2to3* ne peut pas toujours lire les " -"fichiers contenant la fonction d’affichage. Lorsque *2to3* détecte la " -"présence de la directive compilateur ``from __future__ import " -"print_function``, il modifie sa grammaire interne pour interpréter :func:" -"`print` comme une fonction. Cette modification peut également être activée " -"manuellement avec l'option :option:`!-p`. Utilisez :option:`!-p` pour " -"exécuter des correcteurs sur du code dont les instructions d'affichage ont " -"déjà été converties." +"Puisque l'instruction ``print`` peut être analysée soit comme un appel de " +"fonction soit comme une instruction, *2to3* ne peut pas toujours lire les " +"fichiers contenant la fonction *print*. Lorsque *2to3* détecte la présence " +"de la directive compilateur ``from __future__ import print_function``, il " +"modifie sa grammaire interne pour interpréter :func:`print` comme une " +"fonction. Cette modification peut également être activée manuellement avec " +"l'option :option:`!-p`. Utilisez :option:`!-p` pour exécuter des " +"correcteurs sur du code dont les instructions d'affichage ont déjà été " +"converties. Notez également l'usage de l'option :option:`!-e` pour " +"transformer :func:`exec` en fonction." #: library/2to3.rst:105 msgid "" @@ -272,11 +269,11 @@ msgstr "" "Remplace les noms de méthodes obsolètes du module :mod:`unittest` par les " "bons." -#: library/2to3.rst:350 +#: library/2to3.rst:351 msgid "From" msgstr "De" -#: library/2to3.rst:350 +#: library/2to3.rst:351 msgid "To" msgstr "À" @@ -561,16 +558,19 @@ msgstr "" "`~iterator.__next__`." #: library/2to3.rst:336 -msgid "Renames :meth:`__nonzero__` to :meth:`~object.__bool__`." +#, fuzzy +msgid "" +"Renames definitions of methods called :meth:`__nonzero__` to :meth:`~object." +"__bool__`." msgstr "Renomme :meth:`__nonzero__` en :meth:`~object.__bool__`." -#: library/2to3.rst:340 +#: library/2to3.rst:341 msgid "Converts octal literals into the new syntax." msgstr "" "Convertit les nombres écrits littéralement en octal dans leur nouvelle " "syntaxe." -#: library/2to3.rst:344 +#: library/2to3.rst:345 msgid "" "Converts calls to various functions in the :mod:`operator` module to other, " "but equivalent, function calls. When needed, the appropriate ``import`` " @@ -582,63 +582,63 @@ msgstr "" "``import`` appropriées sont ajoutées, e.g. ``import collections.abc``. Les " "correspondances suivantes sont appliquées :" -#: library/2to3.rst:352 +#: library/2to3.rst:353 msgid "``operator.isCallable(obj)``" msgstr "``operator.isCallable(obj)``" -#: library/2to3.rst:352 +#: library/2to3.rst:353 msgid "``callable(obj)``" msgstr "``callable(obj)``" -#: library/2to3.rst:353 +#: library/2to3.rst:354 msgid "``operator.sequenceIncludes(obj)``" msgstr "``operator.sequenceIncludes(obj)``" -#: library/2to3.rst:353 +#: library/2to3.rst:354 msgid "``operator.contains(obj)``" msgstr "``operator.contains(obj)``" -#: library/2to3.rst:354 +#: library/2to3.rst:355 msgid "``operator.isSequenceType(obj)``" msgstr "``operator.isSequenceType(obj)``" -#: library/2to3.rst:354 +#: library/2to3.rst:355 msgid "``isinstance(obj, collections.abc.Sequence)``" msgstr "``isinstance(obj, collections.abc.Sequence)``" -#: library/2to3.rst:355 +#: library/2to3.rst:356 msgid "``operator.isMappingType(obj)``" msgstr "``operator.isMappingType(obj)``" -#: library/2to3.rst:355 +#: library/2to3.rst:356 msgid "``isinstance(obj, collections.abc.Mapping)``" msgstr "``isinstance(obj, collections.abc.Mapping)``" -#: library/2to3.rst:356 +#: library/2to3.rst:357 msgid "``operator.isNumberType(obj)``" msgstr "``operator.isNumberType(obj)``" -#: library/2to3.rst:356 +#: library/2to3.rst:357 msgid "``isinstance(obj, numbers.Number)``" msgstr "``isinstance(obj, numbers.Number)``" -#: library/2to3.rst:357 +#: library/2to3.rst:358 msgid "``operator.repeat(obj, n)``" msgstr "``operator.repeat(obj, n)``" -#: library/2to3.rst:357 +#: library/2to3.rst:358 msgid "``operator.mul(obj, n)``" msgstr "``operator.mul(obj, n)``" -#: library/2to3.rst:358 +#: library/2to3.rst:359 msgid "``operator.irepeat(obj, n)``" msgstr "``operator.irepeat(obj, n)``" -#: library/2to3.rst:358 +#: library/2to3.rst:359 msgid "``operator.imul(obj, n)``" msgstr "``operator.imul(obj, n)``" -#: library/2to3.rst:363 +#: library/2to3.rst:364 msgid "" "Add extra parenthesis where they are required in list comprehensions. For " "example, ``[x for x in 1, 2]`` becomes ``[x for x in (1, 2)]``." @@ -647,11 +647,11 @@ msgstr "" "les listes en compréhension. Par exemple, ``[x for x in 1, 2]`` devient " "``[x for x in (1, 2)]``." -#: library/2to3.rst:368 +#: library/2to3.rst:369 msgid "Converts the ``print`` statement to the :func:`print` function." msgstr "Convertit l'instruction ``print`` en fonction :func:`print`." -#: library/2to3.rst:372 +#: library/2to3.rst:373 msgid "" "Converts ``raise E, V`` to ``raise E(V)``, and ``raise E, V, T`` to ``raise " "E(V).with_traceback(T)``. If ``E`` is a tuple, the translation will be " @@ -662,30 +662,30 @@ msgstr "" "incorrecte puisque la substitution de *n*-uplets aux exceptions a été " "supprimée en 3.0." -#: library/2to3.rst:378 +#: library/2to3.rst:379 msgid "Converts :func:`raw_input` to :func:`input`." msgstr "Convertit :func:`raw_input` en :func:`input`." -#: library/2to3.rst:382 +#: library/2to3.rst:383 msgid "Handles the move of :func:`reduce` to :func:`functools.reduce`." msgstr "Gère le déplacement de :func:`reduce` à :func:`functools.reduce`." -#: library/2to3.rst:386 +#: library/2to3.rst:387 msgid "Converts :func:`reload` to :func:`importlib.reload`." msgstr "" "Convertit les appels à :func:`reload` en appels à :func:`importlib.reload`." -#: library/2to3.rst:390 +#: library/2to3.rst:391 msgid "Changes :data:`sys.maxint` to :data:`sys.maxsize`." msgstr "Change :data:`sys.maxint` en :data:`sys.maxsize`." -#: library/2to3.rst:394 +#: library/2to3.rst:395 msgid "Replaces backtick repr with the :func:`repr` function." msgstr "" "Remplace les accents graves utilisés comme ``repr`` par des appels à :func:" "`repr`." -#: library/2to3.rst:398 +#: library/2to3.rst:399 msgid "" "Replaces use of the :class:`set` constructor with set literals. This fixer " "is optional." @@ -693,11 +693,11 @@ msgstr "" "Remplace l'usage du constructeur de :class:`set` par les ensembles " "littéraux. Ce correcteur est optionnel." -#: library/2to3.rst:403 +#: library/2to3.rst:404 msgid "Renames :exc:`StandardError` to :exc:`Exception`." msgstr "Renomme :exc:`StandardError` en :exc:`Exception`." -#: library/2to3.rst:407 +#: library/2to3.rst:408 msgid "" "Changes the deprecated :data:`sys.exc_value`, :data:`sys.exc_type`, :data:" "`sys.exc_traceback` to use :func:`sys.exc_info`." @@ -705,12 +705,12 @@ msgstr "" "Change les :data:`sys.exc_value`, :data:`sys.exc_type`, :data:`sys." "exc_traceback` dépréciés en :func:`sys.exc_info`." -#: library/2to3.rst:412 +#: library/2to3.rst:413 msgid "Fixes the API change in generator's :meth:`throw` method." msgstr "" "Fixe le changement de l'API dans la méthode :meth:`throw` du générateur." -#: library/2to3.rst:416 +#: library/2to3.rst:417 msgid "" "Removes implicit tuple parameter unpacking. This fixer inserts temporary " "variables." @@ -718,7 +718,7 @@ msgstr "" "Supprime la décompression implicite des paramètres d'un *n*-uplet. Ce " "correcteur ajoute des variables temporaires." -#: library/2to3.rst:421 +#: library/2to3.rst:422 msgid "" "Fixes code broken from the removal of some members in the :mod:`types` " "module." @@ -726,11 +726,11 @@ msgstr "" "Fixe le code cassé par la suppression de certains membres du module :mod:" "`types`." -#: library/2to3.rst:426 +#: library/2to3.rst:427 msgid "Renames :class:`unicode` to :class:`str`." msgstr "Renomme :class:`unicode` en :class:`str`." -#: library/2to3.rst:430 +#: library/2to3.rst:431 msgid "" "Handles the rename of :mod:`urllib` and :mod:`urllib2` to the :mod:`urllib` " "package." @@ -738,7 +738,7 @@ msgstr "" "Gère le renommage des paquets :mod:`urllib` et :mod:`urllib2` en :mod:" "`urllib`." -#: library/2to3.rst:435 +#: library/2to3.rst:436 msgid "" "Removes excess whitespace from comma separated items. This fixer is " "optional." @@ -746,7 +746,7 @@ msgstr "" "Supprime l'espace excédentaire des éléments séparés par des virgules. Ce " "correcteur est optionnel." -#: library/2to3.rst:440 +#: library/2to3.rst:441 msgid "" "Renames :func:`xrange` to :func:`range` and wraps existing :func:`range` " "calls with :class:`list`." @@ -754,11 +754,11 @@ msgstr "" "Renomme la fonction :func:`xrange` en :func:`range` et encapsule les appels " "à la fonction :func:`range` avec des appels à :class:`list`." -#: library/2to3.rst:445 +#: library/2to3.rst:446 msgid "Changes ``for x in file.xreadlines()`` to ``for x in file``." msgstr "Change ``for x in file.xreadlines()`` en ``for x in file``." -#: library/2to3.rst:449 +#: library/2to3.rst:450 msgid "" "Wraps :func:`zip` usage in a :class:`list` call. This is disabled when " "``from future_builtins import zip`` appears." @@ -766,15 +766,15 @@ msgstr "" "Encapsule l'usage de :func:`zip` dans un appel à :class:`list`. Ceci est " "désactivé lorsque ``from future_builtins import zip`` apparaît." -#: library/2to3.rst:454 +#: library/2to3.rst:455 msgid ":mod:`lib2to3` - 2to3's library" msgstr ":mod:`lib2to3` — la bibliothèque de *2to3*" -#: library/2to3.rst:463 +#: library/2to3.rst:464 msgid "**Source code:** :source:`Lib/lib2to3/`" msgstr "**Code source:** :source:`Lib/lib2to3/`" -#: library/2to3.rst:467 +#: library/2to3.rst:468 msgid "" "Python 3.9 will switch to a PEG parser (see :pep:`617`), and Python 3.10 may " "include new language syntax that is not parsable by lib2to3's LL(1) parser. " @@ -782,8 +782,15 @@ msgid "" "Python version. Consider third-party alternatives such as `LibCST`_ or " "`parso`_." msgstr "" +"Python 3.9 utilisera prochainement un analyseur syntaxique PEG (voir :pep:" +"`617`) et il est possible que Python 3.10 introduise une nouvelle syntaxe " +"qui ne pourra pas être analysée par lib2to3 (qui utilise un analyseur " +"syntaxique LL(1)). Il est également possible que le module ``lib2to3`` soit " +"supprimé de la bibliothèque standard dans une future version de Python. Pour " +"une approche alternative, vous pouvez utiliser des outils tiers tels que " +"`LibCST`_ ou `parso`_." -#: library/2to3.rst:476 +#: library/2to3.rst:477 msgid "" "The :mod:`lib2to3` API should be considered unstable and may change " "drastically in the future." diff --git a/library/__future__.po b/library/__future__.po index 9b5db45427..871ae9c861 100644 --- a/library/__future__.po +++ b/library/__future__.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-06-01 23:02+0200\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -277,18 +277,29 @@ msgid "3.7.0b1" msgstr "3.7.0b1" #: library/__future__.rst:93 -msgid "3.10" +msgid "TBD [1]_" msgstr "" #: library/__future__.rst:93 msgid ":pep:`563`: *Postponed evaluation of annotations*" msgstr ":pep:`563` : *Évaluation différée des annotations*" -#: library/__future__.rst:102 +#: library/__future__.rst:100 +msgid "" +"``from __future__ import annotations`` was previously scheduled to become " +"mandatory in Python 3.10, but the Python Steering Council twice decided to " +"delay the change (`announcement for Python 3.10 `__; `announcement for Python 3.11 `__). No " +"final decision has been made yet. See also :pep:`563` and :pep:`649`." +msgstr "" + +#: library/__future__.rst:110 msgid ":ref:`future`" msgstr ":ref:`future`" -#: library/__future__.rst:103 +#: library/__future__.rst:111 msgid "How the compiler treats future imports." msgstr "Comment le compilateur gère les importations « futures »." diff --git a/library/abc.po b/library/abc.po index 202130fcf1..d9a27aa5cc 100644 --- a/library/abc.po +++ b/library/abc.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-02-21 17:32+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -106,9 +106,9 @@ msgstr "" "Utilisez cette métaclasse pour créer une ABC. Il est possible d'hériter " "d'une ABC directement, cette classe de base abstraite fonctionne alors comme " "une classe *mixin*. Vous pouvez également enregistrer une classe concrète " -"sans lien (même une classe native) et des ABC comme \"sous-classes virtuelles" -"\" -- celles-ci et leur descendantes seront considérées comme des sous-" -"classes de la classe de base abstraite par la fonction native :func:" +"sans lien (même une classe native) et des ABC comme \"sous-classes " +"virtuelles\" -- celles-ci et leur descendantes seront considérées comme des " +"sous-classes de la classe de base abstraite par la fonction native :func:" "`issubclass`, mais les ABC enregistrées n'apparaitront pas dans leur ordre " "de résolution des méthodes (*MRO* pour *Method Resolution Order* en " "anglais). Les implémentations de méthodes définies par l'ABC ne seront pas " diff --git a/library/aifc.po b/library/aifc.po index a10b27b3f3..7265b77051 100644 --- a/library/aifc.po +++ b/library/aifc.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-12-11 15:56+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -18,19 +18,25 @@ msgstr "" msgid ":mod:`aifc` --- Read and write AIFF and AIFC files" msgstr ":mod:`aifc` — Lis et écrit dans les fichiers AIFF et AIFC" -#: library/aifc.rst:7 +#: library/aifc.rst:8 msgid "**Source code:** :source:`Lib/aifc.py`" msgstr "**Code source:** :source:`Lib/aifc.py`" #: library/aifc.rst:16 msgid "" +"The :mod:`aifc` module is deprecated (see :pep:`PEP 594 <594#aifc>` for " +"details)." +msgstr "" + +#: library/aifc.rst:22 +msgid "" "This module provides support for reading and writing AIFF and AIFF-C files. " "AIFF is Audio Interchange File Format, a format for storing digital audio " "samples in a file. AIFF-C is a newer version of the format that includes " "the ability to compress the audio data." msgstr "" -#: library/aifc.rst:21 +#: library/aifc.rst:27 msgid "" "Audio files have a number of parameters that describe the audio data. The " "sampling rate or frame rate is the number of times per second the sound is " @@ -41,7 +47,7 @@ msgid "" "samplesize * framerate`` bytes." msgstr "" -#: library/aifc.rst:29 +#: library/aifc.rst:35 msgid "" "For example, CD quality audio has a sample size of two bytes (16 bits), uses " "two channels (stereo) and has a frame rate of 44,100 frames/second. This " @@ -49,11 +55,11 @@ msgid "" "2\\*2\\*44100 bytes (176,400 bytes)." msgstr "" -#: library/aifc.rst:34 +#: library/aifc.rst:40 msgid "Module :mod:`aifc` defines the following function:" msgstr "Le module :mod:`aifc` définit les fonctions suivantes :" -#: library/aifc.rst:39 +#: library/aifc.rst:45 msgid "" "Open an AIFF or AIFF-C file and return an object instance with methods that " "are described below. The argument *file* is either a string naming a file " @@ -67,48 +73,48 @@ msgid "" "keyword:`!with` block completes, the :meth:`~aifc.close` method is called." msgstr "" -#: library/aifc.rst:50 +#: library/aifc.rst:56 msgid "Support for the :keyword:`with` statement was added." msgstr "La prise en charge de l'instruction :keyword:`with` a été ajoutée." -#: library/aifc.rst:53 +#: library/aifc.rst:59 msgid "" "Objects returned by :func:`.open` when a file is opened for reading have the " "following methods:" msgstr "" -#: library/aifc.rst:59 +#: library/aifc.rst:65 #, fuzzy msgid "Return the number of audio channels (1 for mono, 2 for stereo)." msgstr "" "Renvoie le nombre de canaux audio (``1`` pour mono, ``2`` pour stéréo)." -#: library/aifc.rst:64 +#: library/aifc.rst:70 msgid "Return the size in bytes of individual samples." msgstr "Donne la taille en octets des échantillons, individuellement." -#: library/aifc.rst:69 +#: library/aifc.rst:75 msgid "Return the sampling rate (number of audio frames per second)." msgstr "" -#: library/aifc.rst:74 +#: library/aifc.rst:80 msgid "Return the number of audio frames in the file." msgstr "Donne le nombre de trames (*frames*) audio du fichier." -#: library/aifc.rst:79 +#: library/aifc.rst:85 msgid "" "Return a bytes array of length 4 describing the type of compression used in " "the audio file. For AIFF files, the returned value is ``b'NONE'``." msgstr "" -#: library/aifc.rst:86 +#: library/aifc.rst:92 msgid "" "Return a bytes array convertible to a human-readable description of the type " "of compression used in the audio file. For AIFF files, the returned value " "is ``b'not compressed'``." msgstr "" -#: library/aifc.rst:93 +#: library/aifc.rst:99 msgid "" "Returns a :func:`~collections.namedtuple` ``(nchannels, sampwidth, " "framerate, nframes, comptype, compname)``, equivalent to output of the :meth:" @@ -118,7 +124,7 @@ msgstr "" "framerate, nframes, comptype, compname)``, équivalent à la sortie des " "méthodes :meth:`get\\*`." -#: library/aifc.rst:100 +#: library/aifc.rst:106 msgid "" "Return a list of markers in the audio file. A marker consists of a tuple of " "three elements. The first is the mark ID (an integer), the second is the " @@ -126,40 +132,40 @@ msgid "" "third is the name of the mark (a string)." msgstr "" -#: library/aifc.rst:108 +#: library/aifc.rst:114 msgid "" "Return the tuple as described in :meth:`getmarkers` for the mark with the " "given *id*." msgstr "" -#: library/aifc.rst:114 +#: library/aifc.rst:120 msgid "" "Read and return the next *nframes* frames from the audio file. The returned " "data is a string containing for each frame the uncompressed samples of all " "channels." msgstr "" -#: library/aifc.rst:121 +#: library/aifc.rst:127 msgid "" "Rewind the read pointer. The next :meth:`readframes` will start from the " "beginning." msgstr "" -#: library/aifc.rst:127 +#: library/aifc.rst:133 msgid "Seek to the specified frame number." msgstr "Va à la trame de numéro donné." -#: library/aifc.rst:132 +#: library/aifc.rst:138 msgid "Return the current frame number." msgstr "Donne le numéro de la trame courante." -#: library/aifc.rst:137 +#: library/aifc.rst:143 msgid "" "Close the AIFF file. After calling this method, the object can no longer be " "used." msgstr "" -#: library/aifc.rst:140 +#: library/aifc.rst:146 msgid "" "Objects returned by :func:`.open` when a file is opened for writing have all " "the above methods, except for :meth:`readframes` and :meth:`setpos`. In " @@ -169,40 +175,40 @@ msgid "" "parameters except for the number of frames must be filled in." msgstr "" -#: library/aifc.rst:150 +#: library/aifc.rst:156 msgid "" "Create an AIFF file. The default is that an AIFF-C file is created, unless " "the name of the file ends in ``'.aiff'`` in which case the default is an " "AIFF file." msgstr "" -#: library/aifc.rst:156 +#: library/aifc.rst:162 msgid "" "Create an AIFF-C file. The default is that an AIFF-C file is created, " "unless the name of the file ends in ``'.aiff'`` in which case the default is " "an AIFF file." msgstr "" -#: library/aifc.rst:163 +#: library/aifc.rst:169 msgid "Specify the number of channels in the audio file." msgstr "Définit le nombre de canaux du fichier audio." -#: library/aifc.rst:168 +#: library/aifc.rst:174 msgid "Specify the size in bytes of audio samples." msgstr "Définit la taille en octets des échantillons audio." -#: library/aifc.rst:173 +#: library/aifc.rst:179 msgid "Specify the sampling frequency in frames per second." msgstr "" -#: library/aifc.rst:178 +#: library/aifc.rst:184 msgid "" "Specify the number of frames that are to be written to the audio file. If " "this parameter is not set, or not set correctly, the file needs to support " "seeking." msgstr "" -#: library/aifc.rst:189 +#: library/aifc.rst:195 msgid "" "Specify the compression type. If not specified, the audio data will not be " "compressed. In AIFF files, compression is not possible. The name parameter " @@ -212,42 +218,42 @@ msgid "" "``b'ALAW'``, ``b'G722'``." msgstr "" -#: library/aifc.rst:199 +#: library/aifc.rst:205 msgid "" "Set all the above parameters at once. The argument is a tuple consisting of " "the various parameters. This means that it is possible to use the result of " "a :meth:`getparams` call as argument to :meth:`setparams`." msgstr "" -#: library/aifc.rst:206 +#: library/aifc.rst:212 msgid "" "Add a mark with the given id (larger than 0), and the given name at the " "given position. This method can be called at any time before :meth:`close`." msgstr "" -#: library/aifc.rst:213 +#: library/aifc.rst:219 msgid "" "Return the current write position in the output file. Useful in combination " "with :meth:`setmark`." msgstr "" -#: library/aifc.rst:219 +#: library/aifc.rst:225 msgid "" "Write data to the output file. This method can only be called after the " "audio file parameters have been set." msgstr "" -#: library/aifc.rst:231 +#: library/aifc.rst:237 msgid "Any :term:`bytes-like object` is now accepted." msgstr "N'importe quel :term:`bytes-like object` est maintenant accepté." -#: library/aifc.rst:228 +#: library/aifc.rst:234 msgid "" "Like :meth:`writeframes`, except that the header of the audio file is not " "updated." msgstr "" -#: library/aifc.rst:238 +#: library/aifc.rst:244 msgid "" "Close the AIFF file. The header of the file is updated to reflect the " "actual size of the audio data. After calling this method, the object can no " diff --git a/library/argparse.po b/library/argparse.po index 8f9aced17e..37a09317fd 100644 --- a/library/argparse.po +++ b/library/argparse.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-03-29 15:50+0200\n" "Last-Translator: Yannick Gingras \n" "Language-Team: FRENCH \n" @@ -575,8 +575,9 @@ msgid "fromfile_prefix_chars" msgstr "Le paramètre *fromfile_prefix_chars*" #: library/argparse.rst:504 +#, fuzzy msgid "" -"Sometimes, for example when dealing with a particularly long argument lists, " +"Sometimes, for example when dealing with a particularly long argument list, " "it may make sense to keep the list of arguments in a file rather than typing " "it out at the command line. If the ``fromfile_prefix_chars=`` argument is " "given to the :class:`ArgumentParser` constructor, then arguments that start " @@ -762,9 +763,10 @@ msgstr "" "class:`ArgumentParser`, l'exécution se termine avec un message d'erreur." #: library/argparse.rst:662 +#, fuzzy msgid "" -"If the user would like catch errors manually, the feature can be enable by " -"setting ``exit_on_error`` to ``False``::" +"If the user would like to catch errors manually, the feature can be enabled " +"by setting ``exit_on_error`` to ``False``::" msgstr "" "Si vous souhaitez intercepter les erreurs manuellement, la fonctionnalité " "peut être activée en assignant ``False`` à ``exit_on_error`` ::" @@ -1019,7 +1021,7 @@ msgstr "" "``BooleanOptionalAction`` est disponible dans ``argparse`` et elle ajoute la " "gestion des options booléennes telles que ``--foo`` et ``--no-foo`` ::" -#: library/argparse.rst:856 +#: library/argparse.rst:858 msgid "" "The recommended way to create a custom action is to extend :class:`Action`, " "overriding the ``__call__`` method and optionally the ``__init__`` and " @@ -1029,19 +1031,19 @@ msgstr "" "class:`Action` en surchargeant la méthode ``__call__``. Vous avez également " "l'option de surcharger les méthodes ``__init__`` et ``format_usage``." -#: library/argparse.rst:860 +#: library/argparse.rst:862 msgid "An example of a custom action::" msgstr "Un exemple d'action personnalisée ::" -#: library/argparse.rst:880 +#: library/argparse.rst:882 msgid "For more details, see :class:`Action`." msgstr "Pour plus d'information, voir :class:`Action`." -#: library/argparse.rst:883 +#: library/argparse.rst:885 msgid "nargs" msgstr "Le paramètre *nargs*" -#: library/argparse.rst:885 +#: library/argparse.rst:887 msgid "" "ArgumentParser objects usually associate a single command-line argument with " "a single action to be taken. The ``nargs`` keyword argument associates a " @@ -1053,7 +1055,7 @@ msgstr "" "``nargs`` associe un nombre différent d'arguments de la ligne de commande à " "une action. Les valeurs reconnues sont :" -#: library/argparse.rst:890 +#: library/argparse.rst:892 msgid "" "``N`` (an integer). ``N`` arguments from the command line will be gathered " "together into a list. For example::" @@ -1061,7 +1063,7 @@ msgstr "" "``N`` (un entier). ``N`` arguments de la ligne de commande seront capturés " "ensemble et stockés dans une liste. Par exemple ::" -#: library/argparse.rst:899 +#: library/argparse.rst:901 msgid "" "Note that ``nargs=1`` produces a list of one item. This is different from " "the default, in which the item is produced by itself." @@ -1070,7 +1072,7 @@ msgstr "" "différent du comportement par défaut qui produit l'élément directement " "(comme un scalaire)." -#: library/argparse.rst:904 +#: library/argparse.rst:906 msgid "" "``'?'``. One argument will be consumed from the command line if possible, " "and produced as a single item. If no command-line argument is present, the " @@ -1086,7 +1088,7 @@ msgstr "" "qu'elle ne soit pas suivie d'un argument. Dans ce cas, la valeur de const_ " "est produite. Voici quelques exemples pour illustrer ceci ::" -#: library/argparse.rst:921 +#: library/argparse.rst:923 msgid "" "One of the more common uses of ``nargs='?'`` is to allow optional input and " "output files::" @@ -1094,7 +1096,7 @@ msgstr "" "``nargs='?'`` est fréquemment utilisé pour accepter des fichiers d'entrée et " "de sortie optionnels ::" -#: library/argparse.rst:938 +#: library/argparse.rst:940 msgid "" "``'*'``. All command-line arguments present are gathered into a list. Note " "that it generally doesn't make much sense to have more than one positional " @@ -1107,7 +1109,7 @@ msgstr "" "d'avoir plusieurs arguments optionnels qui spécifient ``nargs='*'``. Par " "exemple ::" -#: library/argparse.rst:952 +#: library/argparse.rst:954 msgid "" "``'+'``. Just like ``'*'``, all command-line args present are gathered into " "a list. Additionally, an error message will be generated if there wasn't at " @@ -1118,7 +1120,7 @@ msgstr "" "produit s'il n'y a pas au moins un argument présent sur la ligne de " "commande. Par exemple ::" -#: library/argparse.rst:964 +#: library/argparse.rst:966 msgid "" "If the ``nargs`` keyword argument is not provided, the number of arguments " "consumed is determined by the action_. Generally this means a single " @@ -1129,11 +1131,11 @@ msgstr "" "capturés est déterminé par l'action_. En général, c'est un seul argument de " "la ligne de commande qui est capturé et il est produit directement." -#: library/argparse.rst:970 +#: library/argparse.rst:972 msgid "const" msgstr "Le paramètre *const*" -#: library/argparse.rst:972 +#: library/argparse.rst:974 msgid "" "The ``const`` argument of :meth:`~ArgumentParser.add_argument` is used to " "hold constant values that are not read from the command line but are " @@ -1145,7 +1147,7 @@ msgstr "" "est requise par certaines actions d':class:`ArgumentParser`. Les deux " "utilisations les plus communes sont :" -#: library/argparse.rst:976 +#: library/argparse.rst:978 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with " "``action='store_const'`` or ``action='append_const'``. These actions add " @@ -1158,8 +1160,9 @@ msgstr "" "`~ArgumentParser.parse_args`. Consultez la description d'action_ pour voir " "quelques exemples ;" -# Nous sommes dans une énumération après un :, donc pas de majuscule et le paragraphe doit se terminer par ;. -#: library/argparse.rst:981 +# Nous sommes dans une énumération après un :, donc pas de majuscule et le +# paragraphe doit se terminer par ;. +#: library/argparse.rst:983 msgid "" "When :meth:`~ArgumentParser.add_argument` is called with option strings " "(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional " @@ -1176,7 +1179,7 @@ msgstr "" "valeur de ``const`` est utilisée. Consultez la description de nargs_ pour " "voir quelques exemples." -#: library/argparse.rst:988 +#: library/argparse.rst:990 msgid "" "With the ``'store_const'`` and ``'append_const'`` actions, the ``const`` " "keyword argument must be given. For other actions, it defaults to ``None``." @@ -1185,11 +1188,11 @@ msgstr "" "``const`` doit être spécifié. Pour toutes les autres actions, il est " "optionnel et sa valeur par défaut est ``None``." -#: library/argparse.rst:993 +#: library/argparse.rst:995 msgid "default" msgstr "Le paramètre *default*" -#: library/argparse.rst:995 +#: library/argparse.rst:997 msgid "" "All optional arguments and some positional arguments may be omitted at the " "command line. The ``default`` keyword argument of :meth:`~ArgumentParser." @@ -1205,7 +1208,7 @@ msgstr "" "commande. Pour les arguments optionnels, la valeur de ``default`` est " "utilisée si la chaîne d'option n'est pas présente sur la ligne de commande ::" -#: library/argparse.rst:1009 +#: library/argparse.rst:1011 msgid "" "If the target namespace already has an attribute set, the action *default* " "will not over write it::" @@ -1213,7 +1216,7 @@ msgstr "" "Si l'objet ``namespace`` cible a déjà un attribut assigné, l'action " "*default* ne l'écrase pas ::" -#: library/argparse.rst:1017 +#: library/argparse.rst:1019 msgid "" "If the ``default`` value is a string, the parser parses the value as if it " "were a command-line argument. In particular, the parser applies any type_ " @@ -1226,7 +1229,7 @@ msgstr "" "est fournie) avant d'affecter l'attribut à l'objet :class:`Namespace` " "renvoyé. Autrement, l'analyseur utilise la valeur telle qu'elle ::" -#: library/argparse.rst:1028 +#: library/argparse.rst:1030 msgid "" "For positional arguments with nargs_ equal to ``?`` or ``*``, the " "``default`` value is used when no command-line argument was present::" @@ -1235,7 +1238,7 @@ msgstr "" "valeur de ``default`` est utilisée quand l'argument est absent de la ligne " "de commande ::" -#: library/argparse.rst:1039 +#: library/argparse.rst:1041 msgid "" "Providing ``default=argparse.SUPPRESS`` causes no attribute to be added if " "the command-line argument was not present::" @@ -1244,11 +1247,11 @@ msgstr "" "à l'objet ``Namespace`` quand l'argument est absent de la ligne de " "commande ::" -#: library/argparse.rst:1051 +#: library/argparse.rst:1053 msgid "type" msgstr "Le paramètre *type*" -#: library/argparse.rst:1053 +#: library/argparse.rst:1055 msgid "" "By default, the parser reads command-line arguments in as simple strings. " "However, quite often the command-line string should instead be interpreted " @@ -1262,7 +1265,7 @@ msgstr "" "`int`. L'argument nommé ``type`` d':meth:`~ArgumentParser.add_argument` nous " "permet de faire les vérifications et les conversions de type nécessaires." -#: library/argparse.rst:1059 +#: library/argparse.rst:1061 msgid "" "If the type_ keyword is used with the default_ keyword, the type converter " "is only applied if the default is a string." @@ -1271,7 +1274,7 @@ msgstr "" "keyword_, le convertisseur de type n'est appliqué que si la valeur par " "défaut est une chaîne." -#: library/argparse.rst:1062 +#: library/argparse.rst:1064 msgid "" "The argument to ``type`` can be any callable that accepts a single string. " "If the function raises :exc:`ArgumentTypeError`, :exc:`TypeError`, or :exc:" @@ -1284,18 +1287,18 @@ msgstr "" "d'erreur agréablement formaté est affiché. Aucun autre type d'exception " "n'est géré." -#: library/argparse.rst:1067 +#: library/argparse.rst:1069 msgid "Common built-in types and functions can be used as type converters:" msgstr "" "Les types et les fonctions natives peuvent être utilisés comme " "convertisseurs de types :" -#: library/argparse.rst:1083 +#: library/argparse.rst:1085 msgid "User defined functions can be used as well:" msgstr "" "Des fonctions définies par l'utilisateur peuvent aussi être utilisées :" -#: library/argparse.rst:1095 +#: library/argparse.rst:1097 msgid "" "The :func:`bool` function is not recommended as a type converter. All it " "does is convert empty strings to ``False`` and non-empty strings to " @@ -1305,7 +1308,7 @@ msgstr "" "comportement se limite à convertir les chaînes vides à ``False`` et les " "chaînes non-vides à ``True``. Ce n'est généralement pas le résultat désiré." -#: library/argparse.rst:1099 +#: library/argparse.rst:1101 msgid "" "In general, the ``type`` keyword is a convenience that should only be used " "for simple conversions that can only raise one of the three supported " @@ -1318,10 +1321,11 @@ msgstr "" "d'erreurs plus intéressant ou une gestion de ressources devraient être " "effectuées plus tard dans l’exécution suite à l'analyse des arguments." -#: library/argparse.rst:1104 +#: library/argparse.rst:1106 +#, fuzzy msgid "" "For example, JSON or YAML conversions have complex error cases that require " -"better reporting than can be given by the ``type`` keyword. An :exc:`~json." +"better reporting than can be given by the ``type`` keyword. A :exc:`~json." "JSONDecodeError` would not be well formatted and a :exc:`FileNotFound` " "exception would not be handled at all." msgstr "" @@ -1331,7 +1335,7 @@ msgstr "" "JSONDecodeError` ne serait pas adéquatement formatée et une exception :exc:" "`FileNotFound` ne serait pas du tout traitée." -#: library/argparse.rst:1109 +#: library/argparse.rst:1111 msgid "" "Even :class:`~argparse.FileType` has its limitations for use with the " "``type`` keyword. If one argument uses *FileType* and then a subsequent " @@ -1346,7 +1350,7 @@ msgstr "" "fin de l'exécution de l'analyseur puis de gérer les fichiers à l'aide d'un " "bloc :keyword:`with`." -#: library/argparse.rst:1115 +#: library/argparse.rst:1117 msgid "" "For type checkers that simply check against a fixed set of values, consider " "using the choices_ keyword instead." @@ -1354,11 +1358,11 @@ msgstr "" "Pour les vérificateurs de types qui ne font que tester l'appartenance à un " "ensemble de valeurs, pensez plutôt à utiliser l'argument nommé choices_." -#: library/argparse.rst:1120 +#: library/argparse.rst:1122 msgid "choices" msgstr "Le paramètre *choices*" -#: library/argparse.rst:1122 +#: library/argparse.rst:1124 msgid "" "Some command-line arguments should be selected from a restricted set of " "values. These can be handled by passing a container object as the *choices* " @@ -1373,7 +1377,7 @@ msgstr "" "l'argument sont comparées et un message d'erreur est affiché si l'argument " "n'est pas parmi les valeurs acceptables ::" -#: library/argparse.rst:1137 +#: library/argparse.rst:1139 msgid "" "Note that inclusion in the *choices* container is checked after any type_ " "conversions have been performed, so the type of the objects in the *choices* " @@ -1383,7 +1387,7 @@ msgstr "" "la conversion de type_. Le type des objets dans le conteneur *choices* " "doivent donc correspondre au type_ spécifié ::" -#: library/argparse.rst:1149 +#: library/argparse.rst:1151 msgid "" "Any container can be passed as the *choices* value, so :class:`list` " "objects, :class:`set` objects, and custom containers are all supported." @@ -1392,7 +1396,7 @@ msgstr "" "les objets :class:`list`, les objets :class:`set` et les conteneurs " "personnalisés sont tous acceptés." -#: library/argparse.rst:1152 +#: library/argparse.rst:1154 msgid "" "Use of :class:`enum.Enum` is not recommended because it is difficult to " "control its appearance in usage, help, and error messages." @@ -1400,7 +1404,7 @@ msgstr "" "L'utilisation d':class:`enum.Enum` est déconseillée, car il est difficile de " "contrôler son apparence dans les messages d'usage, d'aide et d'erreur." -#: library/argparse.rst:1155 +#: library/argparse.rst:1157 msgid "" "Formatted choices overrides the default *metavar* which is normally derived " "from *dest*. This is usually what you want because the user never sees the " @@ -1413,11 +1417,11 @@ msgstr "" "pas souhaité (comme lorsque les choix sont nombreux) spécifiez simplement " "metavar_ de façon explicite." -#: library/argparse.rst:1162 +#: library/argparse.rst:1164 msgid "required" msgstr "Le paramètre *required*" -#: library/argparse.rst:1164 +#: library/argparse.rst:1166 msgid "" "In general, the :mod:`argparse` module assumes that flags like ``-f`` and " "``--bar`` indicate *optional* arguments, which can always be omitted at the " @@ -1430,7 +1434,7 @@ msgstr "" "*obligatoire*, ``True`` peut être passé à l'argument nommé ``required=`` d':" "meth:`~ArgumentParser.add_argument` ::" -#: library/argparse.rst:1177 +#: library/argparse.rst:1179 msgid "" "As the example shows, if an option is marked as ``required``, :meth:" "`~ArgumentParser.parse_args` will report an error if that option is not " @@ -1440,7 +1444,7 @@ msgstr "" "``required``, :meth:`~ArgumentParser.parse_args` mentionne une erreur si " "l'option est absente de la ligne de commande." -#: library/argparse.rst:1183 +#: library/argparse.rst:1185 msgid "" "Required options are generally considered bad form because users expect " "*options* to be *optional*, and thus they should be avoided when possible." @@ -1449,11 +1453,11 @@ msgstr "" "utilisateurs s'attendent que les *options* soient *optionnelles*. Elles " "devraient donc être évitées si possible." -#: library/argparse.rst:1188 +#: library/argparse.rst:1190 msgid "help" msgstr "Le paramètre *help*" -#: library/argparse.rst:1190 +#: library/argparse.rst:1192 msgid "" "The ``help`` value is a string containing a brief description of the " "argument. When a user requests help (usually by using ``-h`` or ``--help`` " @@ -1465,13 +1469,13 @@ msgstr "" "l'utilisation de ``-h`` ou ``--help`` sur la ligne de commande), ces " "descriptions d'aide seront affichées pour chacun des arguments ::" -#: library/argparse.rst:1210 +#: library/argparse.rst:1212 msgid "" "The ``help`` strings can include various format specifiers to avoid " "repetition of things like the program name or the argument default_. The " "available specifiers include the program name, ``%(prog)s`` and most keyword " -"arguments to :meth:`~ArgumentParser.add_argument`, e.g. ``%(default)s``, ``" -"%(type)s``, etc.::" +"arguments to :meth:`~ArgumentParser.add_argument`, e.g. ``%(default)s``, " +"``%(type)s``, etc.::" msgstr "" "La chaîne ``help`` peut contenir des spécificateurs de formatage afin " "d'éviter la répétition de contenu tel que le nom du programme et la valeur " @@ -1480,7 +1484,7 @@ msgstr "" "plupart des arguments nommés d':meth:`~ArgumentParser.add_argument`, tels " "que ``%(default)s``, ``%(type)s``, etc. ::" -#: library/argparse.rst:1227 +#: library/argparse.rst:1229 msgid "" "As the help string supports %-formatting, if you want a literal ``%`` to " "appear in the help string, you must escape it as ``%%``." @@ -1489,7 +1493,7 @@ msgstr "" "désirez afficher un ``%`` littéral dans la chaîne d'aide, vous devez en " "faire l’échappement avec ``%%``." -#: library/argparse.rst:1230 +#: library/argparse.rst:1232 msgid "" ":mod:`argparse` supports silencing the help entry for certain options, by " "setting the ``help`` value to ``argparse.SUPPRESS``::" @@ -1497,11 +1501,11 @@ msgstr "" ":mod:`argparse` peut supprimer la rubrique d'aide de certaines options. Pour " "ce faire, passez ``argparse.SUPPRESS`` à ``help`` ::" -#: library/argparse.rst:1243 +#: library/argparse.rst:1245 msgid "metavar" msgstr "Le paramètre *metavar*" -#: library/argparse.rst:1245 +#: library/argparse.rst:1247 msgid "" "When :class:`ArgumentParser` generates help messages, it needs some way to " "refer to each expected argument. By default, ArgumentParser objects use the " @@ -1522,11 +1526,11 @@ msgstr "" "positionnel unique ``--foo`` qui prend un seul argument sur la ligne de " "commande sera affiché comme ``FOO``. Par exemple ::" -#: library/argparse.rst:1269 +#: library/argparse.rst:1271 msgid "An alternative name can be specified with ``metavar``::" msgstr "Un nom alternatif peut être fourni à ``metavar`` ::" -#: library/argparse.rst:1286 +#: library/argparse.rst:1288 msgid "" "Note that ``metavar`` only changes the *displayed* name - the name of the " "attribute on the :meth:`~ArgumentParser.parse_args` object is still " @@ -1536,7 +1540,7 @@ msgstr "" "l'attribut ajouté à l'objet renvoyé par :meth:`~ArgumentParser.parse_args` " "est toujours déterminé par la valeur de dest_." -#: library/argparse.rst:1290 +#: library/argparse.rst:1292 msgid "" "Different values of ``nargs`` may cause the metavar to be used multiple " "times. Providing a tuple to ``metavar`` specifies a different display for " @@ -1546,11 +1550,11 @@ msgstr "" "plus d'une fois. Passer un *n-uplet* à ``metavar`` indique les différents " "noms à afficher pour chacun des arguments ::" -#: library/argparse.rst:1307 +#: library/argparse.rst:1309 msgid "dest" msgstr "Le paramètre *dest*" -#: library/argparse.rst:1309 +#: library/argparse.rst:1311 msgid "" "Most :class:`ArgumentParser` actions add some value as an attribute of the " "object returned by :meth:`~ArgumentParser.parse_args`. The name of this " @@ -1566,7 +1570,7 @@ msgstr "" "est généralement le premier argument d':meth:`~ArgumentParser." "add_argument` ::" -#: library/argparse.rst:1321 +#: library/argparse.rst:1323 msgid "" "For optional argument actions, the value of ``dest`` is normally inferred " "from the option strings. :class:`ArgumentParser` generates the value of " @@ -1586,15 +1590,15 @@ msgstr "" "s'assurer que la chaîne est un nom d'attribut valide. Les exemples suivants " "illustrent ce comportement ::" -#: library/argparse.rst:1338 +#: library/argparse.rst:1340 msgid "``dest`` allows a custom attribute name to be provided::" msgstr "``dest`` vous permet de fournir un nom d'attribut personnalisé ::" -#: library/argparse.rst:1346 +#: library/argparse.rst:1348 msgid "Action classes" msgstr "Classes Action" -#: library/argparse.rst:1348 +#: library/argparse.rst:1350 msgid "" "Action classes implement the Action API, a callable which returns a callable " "which processes arguments from the command-line. Any object which follows " @@ -1605,7 +1609,7 @@ msgstr "" "qui suit cette API peut être passé comme paramètre ``action`` d':meth:" "`add_argument`." -#: library/argparse.rst:1357 +#: library/argparse.rst:1359 msgid "" "Action objects are used by an ArgumentParser to represent the information " "needed to parse a single argument from one or more strings from the command " @@ -1619,7 +1623,7 @@ msgstr "" "doit accepter les deux arguments positionnels d':meth:`ArgumentParser." "add_argument` ainsi que tous ses arguments nommés, sauf ``action``." -#: library/argparse.rst:1363 +#: library/argparse.rst:1365 msgid "" "Instances of Action (or return value of any callable to the ``action`` " "parameter) should have attributes \"dest\", \"option_strings\", \"default\", " @@ -1632,7 +1636,7 @@ msgstr "" "plus simple de s'assurer que ces attributs sont définis est d'appeler " "``Action.__init__``." -#: library/argparse.rst:1368 +#: library/argparse.rst:1370 msgid "" "Action instances should be callable, so subclasses must override the " "``__call__`` method, which should accept four parameters:" @@ -1641,11 +1645,11 @@ msgstr "" "doivent surcharger la méthode ``__call__``. Cette méthode doit accepter " "quatre paramètres :" -#: library/argparse.rst:1371 +#: library/argparse.rst:1373 msgid "``parser`` - The ArgumentParser object which contains this action." msgstr "``parser`` – L'objet ``ArgumentParser`` qui contient cette action ;" -#: library/argparse.rst:1373 +#: library/argparse.rst:1375 msgid "" "``namespace`` - The :class:`Namespace` object that will be returned by :meth:" "`~ArgumentParser.parse_args`. Most actions add an attribute to this object " @@ -1655,7 +1659,7 @@ msgstr "" "`~ArgumentParser.parse_args`. La majorité des actions ajoutent un attribut à " "cet objet avec :func:`setattr` ;" -#: library/argparse.rst:1377 +#: library/argparse.rst:1379 msgid "" "``values`` - The associated command-line arguments, with any type " "conversions applied. Type conversions are specified with the type_ keyword " @@ -1666,7 +1670,7 @@ msgstr "" "spécifiées grâce à l’argument nommé type_ d':meth:`~ArgumentParser." "add_argument` ;" -#: library/argparse.rst:1381 +#: library/argparse.rst:1383 msgid "" "``option_string`` - The option string that was used to invoke this action. " "The ``option_string`` argument is optional, and will be absent if the action " @@ -1676,7 +1680,7 @@ msgstr "" "L'argument ``option_string`` est optionnel et est absent si l'action est " "associée à un argument positionnel." -#: library/argparse.rst:1385 +#: library/argparse.rst:1387 msgid "" "The ``__call__`` method may perform arbitrary actions, but will typically " "set attributes on the ``namespace`` based on ``dest`` and ``values``." @@ -1685,7 +1689,7 @@ msgstr "" "général elle affecte des attributs sur le ``namespace`` en fonction de " "``dest`` et de ``values``." -#: library/argparse.rst:1388 +#: library/argparse.rst:1390 msgid "" "Action subclasses can define a ``format_usage`` method that takes no " "argument and return a string which will be used when printing the usage of " @@ -1696,11 +1700,11 @@ msgstr "" "utilisée lors de l'affichage du message d'utilisation du programme. Si cette " "méthode n'est pas fournie, une valeur raisonnable est utilisée par défaut." -#: library/argparse.rst:1393 +#: library/argparse.rst:1395 msgid "The parse_args() method" msgstr "La méthode *parse_args()*" -#: library/argparse.rst:1397 +#: library/argparse.rst:1399 msgid "" "Convert argument strings to objects and assign them as attributes of the " "namespace. Return the populated namespace." @@ -1708,7 +1712,7 @@ msgstr "" "Convertie les chaînes d'arguments en objets et les assigne comme attributs " "de l'objet ``namespace``. Retourne l'objet ``namespace`` rempli." -#: library/argparse.rst:1400 +#: library/argparse.rst:1402 msgid "" "Previous calls to :meth:`add_argument` determine exactly what objects are " "created and how they are assigned. See the documentation for :meth:" @@ -1718,7 +1722,7 @@ msgstr "" "quels objets sont créés et comment ils sont affectés. Consultez la rubrique " "d':meth:`add_argument` pour les détails." -#: library/argparse.rst:1404 +#: library/argparse.rst:1406 msgid "" "args_ - List of strings to parse. The default is taken from :data:`sys." "argv`." @@ -1726,7 +1730,7 @@ msgstr "" "args_ – Liste de chaînes à analyser. La valeur par défaut est récupérée " "dans : :data:`sys.argv`." -#: library/argparse.rst:1407 +#: library/argparse.rst:1409 msgid "" "namespace_ - An object to take the attributes. The default is a new empty :" "class:`Namespace` object." @@ -1734,11 +1738,11 @@ msgstr "" "namespace_ – Un objet pour recevoir les attributs. Par défaut : une nouvelle " "instance (vide) de :class:`Namespace`." -#: library/argparse.rst:1412 +#: library/argparse.rst:1414 msgid "Option value syntax" msgstr "Syntaxe de la valeur des options" -#: library/argparse.rst:1414 +#: library/argparse.rst:1416 msgid "" "The :meth:`~ArgumentParser.parse_args` method supports several ways of " "specifying the value of an option (if it takes one). In the simplest case, " @@ -1749,7 +1753,7 @@ msgstr "" "simple, l'option et sa valeur sont passées en tant que deux arguments " "distincts ::" -#: library/argparse.rst:1426 +#: library/argparse.rst:1428 msgid "" "For long options (options with names longer than a single character), the " "option and value can also be passed as a single command-line argument, using " @@ -1759,7 +1763,7 @@ msgstr "" "caractère), l'option et sa valeur peuvent être passées comme un seul " "argument de la ligne de commande en utilisant ``=`` comme séparateur ::" -#: library/argparse.rst:1433 +#: library/argparse.rst:1435 msgid "" "For short options (options only one character long), the option and its " "value can be concatenated::" @@ -1767,7 +1771,7 @@ msgstr "" "Pour les options courtes (les options qui utilisent un seul caractère), " "l'option et sa valeur peuvent être concaténées ::" -#: library/argparse.rst:1439 +#: library/argparse.rst:1441 msgid "" "Several short options can be joined together, using only a single ``-`` " "prefix, as long as only the last option (or none of them) requires a value::" @@ -1776,11 +1780,11 @@ msgstr "" "préfixe ``-`` pour autant que seule la dernière (ou aucune) nécessite une " "valeur ::" -#: library/argparse.rst:1451 +#: library/argparse.rst:1453 msgid "Invalid arguments" msgstr "Arguments invalides" -#: library/argparse.rst:1453 +#: library/argparse.rst:1455 msgid "" "While parsing the command line, :meth:`~ArgumentParser.parse_args` checks " "for a variety of errors, including ambiguous options, invalid types, invalid " @@ -1794,11 +1798,11 @@ msgstr "" "elle affiche l'erreur accompagnée du message d'aide puis termine " "l'exécution ::" -#: library/argparse.rst:1479 +#: library/argparse.rst:1481 msgid "Arguments containing ``-``" msgstr "Arguments contenant ``-``" -#: library/argparse.rst:1481 +#: library/argparse.rst:1483 msgid "" "The :meth:`~ArgumentParser.parse_args` method attempts to give errors " "whenever the user has clearly made a mistake, but some situations are " @@ -1819,7 +1823,7 @@ msgstr "" "que l'analyseur ne contient aucune option qui a l'apparence d'un nombre " "négatif ::" -#: library/argparse.rst:1519 +#: library/argparse.rst:1521 msgid "" "If you have positional arguments that must begin with ``-`` and don't look " "like negative numbers, you can insert the pseudo-argument ``'--'`` which " @@ -1831,11 +1835,11 @@ msgstr "" "argument ``'--'`` qui indique à :meth:`~ArgumentParser.parse_args` de " "traiter tout ce qui suit comme un argument positionnel ::" -#: library/argparse.rst:1530 +#: library/argparse.rst:1532 msgid "Argument abbreviations (prefix matching)" msgstr "Arguments abrégés (Par comparaison de leurs préfixes)" -#: library/argparse.rst:1532 +#: library/argparse.rst:1534 msgid "" "The :meth:`~ArgumentParser.parse_args` method :ref:`by default " "` allows long options to be abbreviated to a prefix, if the " @@ -1846,7 +1850,7 @@ msgstr "" "autant que l’abréviation soit non-ambigüe, c'est-à-dire qu'elle ne " "corresponde qu'à une seule option ::" -#: library/argparse.rst:1547 +#: library/argparse.rst:1549 msgid "" "An error is produced for arguments that could produce more than one options. " "This feature can be disabled by setting :ref:`allow_abbrev` to ``False``." @@ -1855,11 +1859,11 @@ msgstr "" "option. Ce comportement peut être désactivé en passant ``False`` à :ref:" "`allow_abbrev`." -#: library/argparse.rst:1553 +#: library/argparse.rst:1555 msgid "Beyond ``sys.argv``" msgstr "Au-delà de ``sys.argv``" -#: library/argparse.rst:1555 +#: library/argparse.rst:1557 msgid "" "Sometimes it may be useful to have an ArgumentParser parse arguments other " "than those of :data:`sys.argv`. This can be accomplished by passing a list " @@ -1872,11 +1876,11 @@ msgstr "" "parse_args`. Cette approche est pratique pour faire des tests depuis " "l'invite de commande ::" -#: library/argparse.rst:1575 +#: library/argparse.rst:1577 msgid "The Namespace object" msgstr "L'objet ``Namespace``" -#: library/argparse.rst:1579 +#: library/argparse.rst:1581 msgid "" "Simple class used by default by :meth:`~ArgumentParser.parse_args` to create " "an object holding attributes and return it." @@ -1885,7 +1889,7 @@ msgstr "" "parse_args` pour créer un objet qui stock les attributs. Cet objet est " "renvoyé par ``ArgumentParser.parse_args``." -#: library/argparse.rst:1582 +#: library/argparse.rst:1584 msgid "" "This class is deliberately simple, just an :class:`object` subclass with a " "readable string representation. If you prefer to have dict-like view of the " @@ -1896,7 +1900,7 @@ msgstr "" "une vue *dict-compatible*, vous devez utiliser :func:`vars` (un idiome " "Python classique) ::" -#: library/argparse.rst:1592 +#: library/argparse.rst:1594 msgid "" "It may also be useful to have an :class:`ArgumentParser` assign attributes " "to an already existing object, rather than a new :class:`Namespace` object. " @@ -1907,15 +1911,15 @@ msgstr "" "création d'un nouvel objet :class:`Namespace`. Ceci peut être réalisé avec " "l'argument nommé ``namespace=`` ::" -#: library/argparse.rst:1608 +#: library/argparse.rst:1610 msgid "Other utilities" msgstr "Autres outils" -#: library/argparse.rst:1611 +#: library/argparse.rst:1613 msgid "Sub-commands" msgstr "Sous commandes" -#: library/argparse.rst:1618 +#: library/argparse.rst:1620 msgid "" "Many programs split up their functionality into a number of sub-commands, " "for example, the ``svn`` program can invoke sub-commands like ``svn " @@ -1943,11 +1947,11 @@ msgstr "" "constructeur d':class:`ArgumentParser` ; elle renvoie un objet :class:" "`ArgumentParser` qui peut être modifié normalement." -#: library/argparse.rst:1630 +#: library/argparse.rst:1632 msgid "Description of parameters:" msgstr "Description des paramètres :" -#: library/argparse.rst:1632 +#: library/argparse.rst:1634 msgid "" "title - title for the sub-parser group in help output; by default " "\"subcommands\" if description is provided, otherwise uses title for " @@ -1957,7 +1961,7 @@ msgstr "" "défaut : ``\"subcommands\"`` si ``description`` est fournie, sinon utilise " "la valeur de ``title`` de la section sur les arguments positionnels ;" -#: library/argparse.rst:1636 +#: library/argparse.rst:1638 msgid "" "description - description for the sub-parser group in help output, by " "default ``None``" @@ -1965,8 +1969,9 @@ msgstr "" "``description`` – description du groupe de ce sous-analyseur dans la sortie " "d'aide ; par défaut : ``None`` ;" -# I think the English version is very misleading here. Even for subcommands, ``prog`` is only a tiny prefix of the auto generater usage string. -#: library/argparse.rst:1639 +# I think the English version is very misleading here. Even for subcommands, +# ``prog`` is only a tiny prefix of the auto generater usage string. +#: library/argparse.rst:1641 msgid "" "prog - usage information that will be displayed with sub-command help, by " "default the name of the program and any positional arguments before the " @@ -1976,7 +1981,7 @@ msgstr "" "commandes ; par défaut : le nom du programme et les arguments positionnels " "qui arrivent avant l'argument de ce sous-analyseur ;" -#: library/argparse.rst:1643 +#: library/argparse.rst:1645 msgid "" "parser_class - class which will be used to create sub-parser instances, by " "default the class of the current parser (e.g. ArgumentParser)" @@ -1985,7 +1990,7 @@ msgstr "" "analyseurs ; par défaut : la classe de l'analyseur courant (par exemple " "``ArgumentParser``) ;" -#: library/argparse.rst:1646 +#: library/argparse.rst:1648 msgid "" "action_ - the basic type of action to be taken when this argument is " "encountered at the command line" @@ -1993,7 +1998,7 @@ msgstr "" "action_ – action à entreprendre quand cet argument est reconnu sur la ligne " "de commande ;" -#: library/argparse.rst:1649 +#: library/argparse.rst:1651 msgid "" "dest_ - name of the attribute under which sub-command name will be stored; " "by default ``None`` and no value is stored" @@ -2001,7 +2006,7 @@ msgstr "" "dest_ – nom de l'attribut sous lequel la sous-commande est stockée ; par " "défaut : ``None`` et aucune valeur n'est stockée ;" -#: library/argparse.rst:1652 +#: library/argparse.rst:1654 msgid "" "required_ - Whether or not a subcommand must be provided, by default " "``False`` (added in 3.7)" @@ -2009,13 +2014,13 @@ msgstr "" "required_ – ``True`` si la sous-commande est obligatoire ; par défaut : " "``False`` (ajouté dans 3.7) ;" -#: library/argparse.rst:1655 +#: library/argparse.rst:1657 msgid "help_ - help for sub-parser group in help output, by default ``None``" msgstr "" "help_ – message d'aide pour le groupe du sous-analyseur dans la sortie " "d'aide ; par défaut : ``None`` ;" -#: library/argparse.rst:1657 +#: library/argparse.rst:1659 msgid "" "metavar_ - string presenting available sub-commands in help; by default it " "is ``None`` and presents sub-commands in form {cmd1, cmd2, ..}" @@ -2024,11 +2029,11 @@ msgstr "" "messages d'aide ; par défaut : ``None``, ce qui entraine la génération d'une " "chaîne suivant le format ``'{cmd1, cmd2, …}'``." -#: library/argparse.rst:1660 +#: library/argparse.rst:1662 msgid "Some example usage::" msgstr "Quelques exemples d'utilisation ::" -#: library/argparse.rst:1681 +#: library/argparse.rst:1683 msgid "" "Note that the object returned by :meth:`parse_args` will only contain " "attributes for the main parser and the subparser that was selected by the " @@ -2045,7 +2050,7 @@ msgstr "" "présents ; quand la commande ``b`` est spécifiée, seuls les attributs " "``foo`` et ``baz`` sont présents." -#: library/argparse.rst:1688 +#: library/argparse.rst:1690 msgid "" "Similarly, when a help message is requested from a subparser, only the help " "for that particular parser will be printed. The help message will not " @@ -2060,7 +2065,7 @@ msgstr "" "d'aide pour chacun des sous-analyseurs grâce à l'argument ``help=`` d':meth:" "`add_parser` tel qu'illustré ci-dessus." -#: library/argparse.rst:1724 +#: library/argparse.rst:1726 msgid "" "The :meth:`add_subparsers` method also supports ``title`` and " "``description`` keyword arguments. When either is present, the subparser's " @@ -2071,7 +2076,7 @@ msgstr "" "sous-analyseur sont affichées dans leur propre groupe dans la sortie d'aide. " "Par exemple ::" -#: library/argparse.rst:1745 +#: library/argparse.rst:1747 msgid "" "Furthermore, ``add_parser`` supports an additional ``aliases`` argument, " "which allows multiple strings to refer to the same subparser. This example, " @@ -2082,7 +2087,7 @@ msgstr "" "L'exemple suivant, à la manière de ``svn``, utilise ``co`` comme une " "abréviation de ``checkout`` ::" -#: library/argparse.rst:1756 +#: library/argparse.rst:1758 msgid "" "One particularly effective way of handling sub-commands is to combine the " "use of the :meth:`add_subparsers` method with calls to :meth:`set_defaults` " @@ -2094,7 +2099,7 @@ msgstr "" "`set_defaults` pour que chaque sous-analyseur sache quelle fonction Python " "doit être exécutée. Par exemple ::" -#: library/argparse.rst:1793 +#: library/argparse.rst:1795 msgid "" "This way, you can let :meth:`parse_args` do the job of calling the " "appropriate function after argument parsing is complete. Associating " @@ -2110,15 +2115,15 @@ msgstr "" "avez besoin de consulter le nom de du sous-analyseur qui a été invoqué, vous " "pouvez utiliser l'argument nommé ``dest`` d':meth:`add_subparsers` ::" -#: library/argparse.rst:1809 +#: library/argparse.rst:1811 msgid "New *required* keyword argument." msgstr "Introduction des arguments nommés obligatoires." -#: library/argparse.rst:1814 +#: library/argparse.rst:1816 msgid "FileType objects" msgstr "Objets ``FileType``" -#: library/argparse.rst:1818 +#: library/argparse.rst:1820 msgid "" "The :class:`FileType` factory creates objects that can be passed to the type " "argument of :meth:`ArgumentParser.add_argument`. Arguments that have :class:" @@ -2133,7 +2138,7 @@ msgstr "" "taille du tampon, encodage et gestion des erreurs (voir la fonction :func:" "`open` pour plus de détails) ::" -#: library/argparse.rst:1830 +#: library/argparse.rst:1832 msgid "" "FileType objects understand the pseudo-argument ``'-'`` and automatically " "convert this into ``sys.stdin`` for readable :class:`FileType` objects and " @@ -2144,15 +2149,15 @@ msgstr "" "`FileType` ouverts en lecture et vers ``sys.stdout`` pour les objets :class:" "`FileType` ouverts en écriture ::" -#: library/argparse.rst:1839 +#: library/argparse.rst:1841 msgid "The *encodings* and *errors* keyword arguments." msgstr "Les arguments nommés ``encodings`` et ``errors``." -#: library/argparse.rst:1844 +#: library/argparse.rst:1846 msgid "Argument groups" msgstr "Groupes d'arguments" -#: library/argparse.rst:1848 +#: library/argparse.rst:1850 msgid "" "By default, :class:`ArgumentParser` groups command-line arguments into " "\"positional arguments\" and \"optional arguments\" when displaying help " @@ -2166,7 +2171,7 @@ msgstr "" "meilleur regroupement conceptuel des arguments, les groupes adéquats peuvent " "être créés avec la méthode :meth:`add_argument_group` ::" -#: library/argparse.rst:1865 +#: library/argparse.rst:1867 msgid "" "The :meth:`add_argument_group` method returns an argument group object which " "has an :meth:`~ArgumentParser.add_argument` method just like a regular :" @@ -2184,7 +2189,7 @@ msgstr "" "d'aide. Afin de personnaliser l'affichage, la méthode :meth:" "`add_argument_group` accepte les arguments ``title`` et ``description`` ::" -#: library/argparse.rst:1891 +#: library/argparse.rst:1893 msgid "" "Note that any arguments not in your user-defined groups will end up back in " "the usual \"positional arguments\" and \"optional arguments\" sections." @@ -2193,11 +2198,11 @@ msgstr "" "affiché dans l'une des sections usuelles *positional arguments* et *optional " "arguments*." -#: library/argparse.rst:1896 +#: library/argparse.rst:1898 msgid "Mutual exclusion" msgstr "Exclusion mutuelle" -#: library/argparse.rst:1900 +#: library/argparse.rst:1902 msgid "" "Create a mutually exclusive group. :mod:`argparse` will make sure that only " "one of the arguments in the mutually exclusive group was present on the " @@ -2207,7 +2212,7 @@ msgstr "" "qu'au plus un des arguments du groupe mutuellement exclusif est présent sur " "la ligne de commande ::" -#: library/argparse.rst:1916 +#: library/argparse.rst:1918 msgid "" "The :meth:`add_mutually_exclusive_group` method also accepts a *required* " "argument, to indicate that at least one of the mutually exclusive arguments " @@ -2217,7 +2222,7 @@ msgstr "" "``required`` pour indiquer qu'au moins un des arguments mutuellement " "exclusifs est nécessaire ::" -#: library/argparse.rst:1928 +#: library/argparse.rst:1930 msgid "" "Note that currently mutually exclusive argument groups do not support the " "*title* and *description* arguments of :meth:`~ArgumentParser." @@ -2227,11 +2232,11 @@ msgstr "" "n'acceptent pas les arguments ``title`` et ``description`` d':meth:" "`~ArgumentParser.add_argument_group`." -#: library/argparse.rst:1934 +#: library/argparse.rst:1936 msgid "Parser defaults" msgstr "Valeurs par défaut de l'analyseur" -#: library/argparse.rst:1938 +#: library/argparse.rst:1940 msgid "" "Most of the time, the attributes of the object returned by :meth:" "`parse_args` will be fully determined by inspecting the command-line " @@ -2245,14 +2250,14 @@ msgstr "" "`set_defaults` permet l'ajout d'attributs additionnels qui sont définis sans " "nécessiter l'inspection de la ligne de commande ::" -#: library/argparse.rst:1950 +#: library/argparse.rst:1952 msgid "" "Note that parser-level defaults always override argument-level defaults::" msgstr "" "Prenez note que les valeurs par défaut au niveau de l'analyseur ont " "précédence sur les valeurs par défaut au niveau de l'argument ::" -#: library/argparse.rst:1958 +#: library/argparse.rst:1960 msgid "" "Parser-level defaults can be particularly useful when working with multiple " "parsers. See the :meth:`~ArgumentParser.add_subparsers` method for an " @@ -2262,7 +2267,7 @@ msgstr "" "quand on travaille avec plusieurs analyseurs. Voir la méthode :meth:" "`~ArgumentParser.add_subparsers` pour un exemple de cette utilisation." -#: library/argparse.rst:1964 +#: library/argparse.rst:1966 msgid "" "Get the default value for a namespace attribute, as set by either :meth:" "`~ArgumentParser.add_argument` or by :meth:`~ArgumentParser.set_defaults`::" @@ -2271,11 +2276,11 @@ msgstr "" "qu'il a été défini soit par :meth:`~ArgumentParser.add_argument` ou par :" "meth:`~ArgumentParser.set_defaults` ::" -#: library/argparse.rst:1975 +#: library/argparse.rst:1977 msgid "Printing help" msgstr "Afficher l'aide" -#: library/argparse.rst:1977 +#: library/argparse.rst:1979 msgid "" "In most typical applications, :meth:`~ArgumentParser.parse_args` will take " "care of formatting and printing any usage or error messages. However, " @@ -2285,7 +2290,7 @@ msgstr "" "charge du formatage et de l'affichage des messages d'erreur et " "d'utilisation. Plusieurs méthodes de formatage sont toutefois disponibles :" -#: library/argparse.rst:1983 +#: library/argparse.rst:1985 msgid "" "Print a brief description of how the :class:`ArgumentParser` should be " "invoked on the command line. If *file* is ``None``, :data:`sys.stdout` is " @@ -2295,7 +2300,7 @@ msgstr "" "`ArgumentParser` depuis la ligne de commande. Si ``file`` est ``None``, " "utilise :data:`sys.stdout`." -#: library/argparse.rst:1989 +#: library/argparse.rst:1991 msgid "" "Print a help message, including the program usage and information about the " "arguments registered with the :class:`ArgumentParser`. If *file* is " @@ -2305,7 +2310,7 @@ msgstr "" "l'information sur les arguments répertoriés dans l':class:`ArgumentParser`. " "Si ``file`` est ``None``, utilise :data:`sys.stdout`." -#: library/argparse.rst:1993 +#: library/argparse.rst:1995 msgid "" "There are also variants of these methods that simply return a string instead " "of printing it:" @@ -2313,7 +2318,7 @@ msgstr "" "Des variantes de ces méthodes sont fournies pour renvoyer la chaîne plutôt " "que de l'afficher :" -#: library/argparse.rst:1998 +#: library/argparse.rst:2000 msgid "" "Return a string containing a brief description of how the :class:" "`ArgumentParser` should be invoked on the command line." @@ -2321,7 +2326,7 @@ msgstr "" "Renvoie une chaîne contenant une brève description sur la façon d'invoquer " "l':class:`ArgumentParser` depuis la ligne de commande." -#: library/argparse.rst:2003 +#: library/argparse.rst:2005 msgid "" "Return a string containing a help message, including the program usage and " "information about the arguments registered with the :class:`ArgumentParser`." @@ -2330,11 +2335,11 @@ msgstr "" "informations sur l'utilisation du programme et sur les arguments définis " "dans l':class:`ArgumentParser`." -#: library/argparse.rst:2008 +#: library/argparse.rst:2010 msgid "Partial parsing" msgstr "Analyse partielle" -#: library/argparse.rst:2012 +#: library/argparse.rst:2014 msgid "" "Sometimes a script may only parse a few of the command-line arguments, " "passing the remaining arguments on to another script or program. In these " @@ -2352,7 +2357,7 @@ msgstr "" "sont présents. Au lieu, elle renvoie une paire de valeurs : l'objet " "``Namespace`` rempli et la liste des arguments non-traités." -#: library/argparse.rst:2028 +#: library/argparse.rst:2030 msgid "" ":ref:`Prefix matching ` rules apply to :meth:" "`parse_known_args`. The parser may consume an option even if it's just a " @@ -2364,11 +2369,11 @@ msgstr "" "option même si elle n'est que le préfixe d'une option reconnue plutôt que de " "la laisser dans la liste des arguments non-traités." -#: library/argparse.rst:2035 +#: library/argparse.rst:2037 msgid "Customizing file parsing" msgstr "Personnaliser le *parsing* de fichiers" -#: library/argparse.rst:2039 +#: library/argparse.rst:2041 msgid "" "Arguments that are read from a file (see the *fromfile_prefix_chars* keyword " "argument to the :class:`ArgumentParser` constructor) are read one argument " @@ -2380,7 +2385,7 @@ msgstr "" "un traitement plus élaboré. Voir aussi l'argument nommé " "``fromfile_prefix_chars`` du constructeur d':class:`ArgumentParser`." -#: library/argparse.rst:2044 +#: library/argparse.rst:2046 msgid "" "This method takes a single argument *arg_line* which is a string read from " "the argument file. It returns a list of arguments parsed from this string. " @@ -2392,7 +2397,7 @@ msgstr "" "appelée une fois pour chaque ligne lue du fichier d'arguments. L'ordre est " "préservé." -#: library/argparse.rst:2048 +#: library/argparse.rst:2050 msgid "" "A useful override of this method is one that treats each space-separated " "word as an argument. The following example demonstrates how to do this::" @@ -2401,11 +2406,11 @@ msgstr "" "par des espaces d'être traité comme un argument. L'exemple suivant illustre " "comment réaliser ceci ::" -#: library/argparse.rst:2057 +#: library/argparse.rst:2059 msgid "Exiting methods" msgstr "Méthodes d'interruptions" -#: library/argparse.rst:2061 +#: library/argparse.rst:2063 msgid "" "This method terminates the program, exiting with the specified *status* and, " "if given, it prints a *message* before that. The user can override this " @@ -2416,7 +2421,7 @@ msgstr "" "est affichée avant la fin de l'exécution. Vous pouvez surcharger cette " "méthode pour traiter ces étapes différemment ::" -#: library/argparse.rst:2073 +#: library/argparse.rst:2075 msgid "" "This method prints a usage message including the *message* to the standard " "error and terminates the program with a status code of 2." @@ -2425,11 +2430,11 @@ msgstr "" "``message`` sur la sortie d'erreur standard puis termine l'exécution avec le " "code de fin d'exécution 2." -#: library/argparse.rst:2078 +#: library/argparse.rst:2080 msgid "Intermixed parsing" msgstr "Analyse entremêlée" -#: library/argparse.rst:2083 +#: library/argparse.rst:2085 msgid "" "A number of Unix commands allow the user to intermix optional arguments with " "positional arguments. The :meth:`~ArgumentParser.parse_intermixed_args` " @@ -2441,7 +2446,7 @@ msgstr "" "`~ArgumentParser.parse_intermixed_args` et :meth:`~ArgumentParser." "parse_known_intermixed_args` permettent ce style d'analyse." -#: library/argparse.rst:2088 +#: library/argparse.rst:2090 msgid "" "These parsers do not support all the argparse features, and will raise " "exceptions if unsupported features are used. In particular, subparsers, " @@ -2454,7 +2459,7 @@ msgstr "" "groupes mutuellement exclusifs qui contiennent à la fois des arguments " "optionnels et des arguments positionnels ne sont pas pris en charge." -#: library/argparse.rst:2093 +#: library/argparse.rst:2095 msgid "" "The following example shows the difference between :meth:`~ArgumentParser." "parse_known_args` and :meth:`~ArgumentParser.parse_intermixed_args`: the " @@ -2466,7 +2471,7 @@ msgstr "" "premier renvoie ``['2', '3']`` comme arguments non-traités alors que le " "second capture tous les arguments positionnels dans ``rest`` ::" -#: library/argparse.rst:2108 +#: library/argparse.rst:2110 msgid "" ":meth:`~ArgumentParser.parse_known_intermixed_args` returns a two item tuple " "containing the populated namespace and the list of remaining argument " @@ -2478,12 +2483,14 @@ msgstr "" "non-traités. :meth:`~ArgumentParser.parse_intermixed_args` lève une erreur " "s'il reste des chaînes d'arguments non-traités." -#: library/argparse.rst:2118 +#: library/argparse.rst:2120 msgid "Upgrading optparse code" msgstr "Mettre à jour du code ``optparse``" -# Surchargé n'est pas une traduction exact de monkey-patch, mais c'est probablement permission içi puisqu'on parle du context historique général plutôt que de détails d'implantation. -#: library/argparse.rst:2120 +# Surchargé n'est pas une traduction exact de monkey-patch, mais c'est +# probablement permission içi puisqu'on parle du context historique général +# plutôt que de détails d'implantation. +#: library/argparse.rst:2122 msgid "" "Originally, the :mod:`argparse` module had attempted to maintain " "compatibility with :mod:`optparse`. However, :mod:`optparse` was difficult " @@ -2500,7 +2507,7 @@ msgstr "" "d'utilisation améliorés. Après avoir porté ou surchargé tout le code d':mod:" "`optparse`, la rétro-compatibilité pouvait difficilement être conservée." -#: library/argparse.rst:2127 +#: library/argparse.rst:2129 msgid "" "The :mod:`argparse` module improves on the standard library :mod:`optparse` " "module in a number of ways including:" @@ -2508,38 +2515,38 @@ msgstr "" "Le module :mod:`argparse` fournit plusieurs améliorations par rapport au " "module :mod:`optparse` de la bibliothèque standard :" -#: library/argparse.rst:2130 +#: library/argparse.rst:2132 msgid "Handling positional arguments." msgstr "Gère les arguments positionnels ;" -#: library/argparse.rst:2131 +#: library/argparse.rst:2133 msgid "Supporting sub-commands." msgstr "Prise en charge des sous commandes ;" -#: library/argparse.rst:2132 +#: library/argparse.rst:2134 msgid "Allowing alternative option prefixes like ``+`` and ``/``." msgstr "" "Permet d'utiliser les alternatives ``+`` ou ``/`` comme préfixes d'option ;" -#: library/argparse.rst:2133 +#: library/argparse.rst:2135 msgid "Handling zero-or-more and one-or-more style arguments." msgstr "Prend en charge la répétition de valeurs (zéro ou plus, un ou plus) ;" -#: library/argparse.rst:2134 +#: library/argparse.rst:2136 msgid "Producing more informative usage messages." msgstr "Fournit des messages d'aide plus complets ;" -#: library/argparse.rst:2135 +#: library/argparse.rst:2137 msgid "Providing a much simpler interface for custom ``type`` and ``action``." msgstr "" "Fournit une interface plus simple pour les types et les actions " "personnalisés." -#: library/argparse.rst:2137 +#: library/argparse.rst:2139 msgid "A partial upgrade path from :mod:`optparse` to :mod:`argparse`:" msgstr "Le portage partiel d':mod:`optparse` à :mod:`argparse` :" -#: library/argparse.rst:2139 +#: library/argparse.rst:2141 msgid "" "Replace all :meth:`optparse.OptionParser.add_option` calls with :meth:" "`ArgumentParser.add_argument` calls." @@ -2547,7 +2554,7 @@ msgstr "" "Remplacer tous les appels à :meth:`optparse.OptionParser.add_option` par des " "appels à :meth:`ArgumentParser.add_argument` ;" -#: library/argparse.rst:2142 +#: library/argparse.rst:2144 msgid "" "Replace ``(options, args) = parser.parse_args()`` with ``args = parser." "parse_args()`` and add additional :meth:`ArgumentParser.add_argument` calls " @@ -2560,7 +2567,7 @@ msgstr "" "appelées ``options`` sont appelées ``args`` dans le contexte d':mod:" "`argparse` ;" -#: library/argparse.rst:2147 +#: library/argparse.rst:2149 msgid "" "Replace :meth:`optparse.OptionParser.disable_interspersed_args` by using :" "meth:`~ArgumentParser.parse_intermixed_args` instead of :meth:" @@ -2570,7 +2577,7 @@ msgstr "" "appelant :meth:`~ArgumentParser.parse_intermixed_args` plutôt que :meth:" "`~ArgumentParser.parse_args` ;" -#: library/argparse.rst:2151 +#: library/argparse.rst:2153 msgid "" "Replace callback actions and the ``callback_*`` keyword arguments with " "``type`` or ``action`` arguments." @@ -2578,7 +2585,7 @@ msgstr "" "Remplacer les actions de rappel (*callback actions* en anglais) et les " "arguments nommés ``callback_*`` par des arguments ``type`` et ``actions`` ;" -#: library/argparse.rst:2154 +#: library/argparse.rst:2156 msgid "" "Replace string names for ``type`` keyword arguments with the corresponding " "type objects (e.g. int, float, complex, etc)." @@ -2587,7 +2594,7 @@ msgstr "" "``type`` par les objets types correspondants (par exemple : ``int``, " "``float``, ``complex``, etc) ;" -#: library/argparse.rst:2157 +#: library/argparse.rst:2159 msgid "" "Replace :class:`optparse.Values` with :class:`Namespace` and :exc:`optparse." "OptionError` and :exc:`optparse.OptionValueError` with :exc:`ArgumentError`." @@ -2596,18 +2603,18 @@ msgstr "" "`optparse.OptionError` et :exc:`optparse.OptionValueError` par :exc:" "`ArgumentError` ;" -#: library/argparse.rst:2161 +#: library/argparse.rst:2163 msgid "" "Replace strings with implicit arguments such as ``%default`` or ``%prog`` " "with the standard Python syntax to use dictionaries to format strings, that " "is, ``%(default)s`` and ``%(prog)s``." msgstr "" -"Remplacer les chaînes avec des arguments de formatage implicite (tels que ``" -"%default`` ou ``%prog``) par la syntaxe standard de Python pour " +"Remplacer les chaînes avec des arguments de formatage implicite (tels que " +"``%default`` ou ``%prog``) par la syntaxe standard de Python pour " "l'interpolation d'un dictionnaire dans les chaînes de formatage (c'est-à-" "dire ``%(default)s`` et ``%(prog)s``) ;" -#: library/argparse.rst:2165 +#: library/argparse.rst:2167 msgid "" "Replace the OptionParser constructor ``version`` argument with a call to " "``parser.add_argument('--version', action='version', version='\n" "Language-Team: FRENCH \n" @@ -371,12 +371,12 @@ msgstr "" ":meth:`fromstring` est renommée en :meth:`frombytes` pour plus de lisibilité." #: library/array.rst:160 +#, fuzzy msgid "" "Read *n* items (as machine values) from the :term:`file object` *f* and " "append them to the end of the array. If less than *n* items are available, :" "exc:`EOFError` is raised, but the items that were available are still " -"inserted into the array. *f* must be a real built-in file object; something " -"else with a :meth:`read` method won't do." +"inserted into the array." msgstr "" "Lit *n* éléments (en tant que valeurs machine) du :term:`file object` *f* et " "les ajouter à la fin du tableau. Si moins de *n* éléments sont disponibles, :" @@ -384,7 +384,7 @@ msgstr "" "tout de même insérés dans le tableau. *f* doit être un objet fichier natif ; " "quelque chose d'autre avec une méthode :meth:`read` ne suffit pas." -#: library/array.rst:169 +#: library/array.rst:168 msgid "" "Append items from the list. This is equivalent to ``for x in list: a." "append(x)`` except that if there is a type error, the array is unchanged." @@ -392,7 +392,7 @@ msgstr "" "Ajoute les éléments de la liste. C'est l'équivalent de ``for x in list: a." "append(x)`` sauf que s'il y a une erreur de type, le tableau est inchangé." -#: library/array.rst:175 +#: library/array.rst:174 msgid "" "Extends this array with data from the given unicode string. The array must " "be a type ``'u'`` array; otherwise a :exc:`ValueError` is raised. Use " @@ -404,7 +404,7 @@ msgstr "" "``array.frombytes(unicodestring.encode(enc))`` pour ajouter des données " "Unicode à un tableau d'un autre type." -#: library/array.rst:183 +#: library/array.rst:182 msgid "" "Return the smallest *i* such that *i* is the index of the first occurrence " "of *x* in the array." @@ -412,7 +412,7 @@ msgstr "" "Renvoie le plus petit *i* tel que *i* est l'index de la première occurrence " "de *x* dans le tableau." -#: library/array.rst:189 +#: library/array.rst:188 msgid "" "Insert a new item with value *x* in the array before position *i*. Negative " "values are treated as being relative to the end of the array." @@ -421,7 +421,7 @@ msgstr "" "position *i*. Les valeurs négatives sont traitées relativement à la fin du " "tableau." -#: library/array.rst:195 +#: library/array.rst:194 msgid "" "Removes the item with the index *i* from the array and returns it. The " "optional argument defaults to ``-1``, so that by default the last item is " @@ -431,15 +431,15 @@ msgstr "" "optionnel par défaut est à ``-1``, de sorte que par défaut le dernier " "élément est supprimé et renvoyé." -#: library/array.rst:202 +#: library/array.rst:201 msgid "Remove the first occurrence of *x* from the array." msgstr "Supprime la première occurrence de *x* du tableau." -#: library/array.rst:207 +#: library/array.rst:206 msgid "Reverse the order of the items in the array." msgstr "Inverse l'ordre des éléments du tableau." -#: library/array.rst:212 +#: library/array.rst:211 msgid "" "Convert the array to an array of machine values and return the bytes " "representation (the same sequence of bytes that would be written to a file " @@ -449,22 +449,22 @@ msgstr "" "représentation en octets (la même séquence d'octets qui serait écrite par la " "méthode :meth:`tofile`)." -#: library/array.rst:216 +#: library/array.rst:215 msgid ":meth:`tostring` is renamed to :meth:`tobytes` for clarity." msgstr "" ":meth:`tostring` est renommé en :meth:`tobytes` pour plus de lisibilité." -#: library/array.rst:222 +#: library/array.rst:221 msgid "Write all items (as machine values) to the :term:`file object` *f*." msgstr "" "Écrit tous les éléments (en tant que valeurs machine) du :term:`file object` " "*f*." -#: library/array.rst:227 +#: library/array.rst:226 msgid "Convert the array to an ordinary list with the same items." msgstr "Convertit le tableau en une liste ordinaire avec les mêmes éléments." -#: library/array.rst:232 +#: library/array.rst:231 msgid "" "Convert the array to a unicode string. The array must be a type ``'u'`` " "array; otherwise a :exc:`ValueError` is raised. Use ``array.tobytes()." @@ -475,7 +475,7 @@ msgstr "" "tobytes().decode(enc)`` pour obtenir une chaîne Unicode depuis un tableau de " "tout autre type." -#: library/array.rst:237 +#: library/array.rst:236 msgid "" "When an array object is printed or converted to a string, it is represented " "as ``array(typecode, initializer)``. The *initializer* is omitted if the " @@ -493,19 +493,19 @@ msgstr "" "func:`eval`, tant que la classe :class:`~array.array` a été importée en " "utilisant ``from array import array``. Exemples ::" -#: library/array.rst:254 +#: library/array.rst:253 msgid "Module :mod:`struct`" msgstr "Module :mod:`struct`" -#: library/array.rst:254 +#: library/array.rst:253 msgid "Packing and unpacking of heterogeneous binary data." msgstr "Empaquetage et dépaquetage de données binaires hétérogènes." -#: library/array.rst:258 +#: library/array.rst:257 msgid "Module :mod:`xdrlib`" msgstr "Module :mod:`xdrlib`" -#: library/array.rst:257 +#: library/array.rst:256 msgid "" "Packing and unpacking of External Data Representation (XDR) data as used in " "some remote procedure call systems." @@ -514,17 +514,24 @@ msgstr "" "telles qu'elles sont utilisées dans certains systèmes d'appels de procédures " "à distance (ou RPC pour *remote procedure call* en anglais)." -#: library/array.rst:261 -msgid "`The Numerical Python Documentation `_" -msgstr "`La documentation de *Numerical Python* `" +#: library/array.rst:259 +msgid "`NumPy `_" +msgstr "" -#: library/array.rst:261 -msgid "" -"The Numeric Python extension (NumPy) defines another array type; see http://" -"www.numpy.org/ for further information about Numerical Python." +#: library/array.rst:260 +msgid "The NumPy package defines another array type." msgstr "" -"L'extension *Numeric Python* (NumPy) définit un autre type de tableau ; voir " -"http://www.numpy.org/ pour plus d'informations sur *Numeric Python*." + +#~ msgid "`The Numerical Python Documentation `_" +#~ msgstr "" +#~ "`La documentation de *Numerical Python* `" + +#~ msgid "" +#~ "The Numeric Python extension (NumPy) defines another array type; see " +#~ "http://www.numpy.org/ for further information about Numerical Python." +#~ msgstr "" +#~ "L'extension *Numeric Python* (NumPy) définit un autre type de tableau ; " +#~ "voir http://www.numpy.org/ pour plus d'informations sur *Numeric Python*." #~ msgid "Py_UNICODE" #~ msgstr "Py_UNICODE" diff --git a/library/ast.po b/library/ast.po index 49ec4d1f48..c600314837 100644 --- a/library/ast.po +++ b/library/ast.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-09-11 07:42+0200\n" "Last-Translator: Julien VITARD \n" "Language-Team: FRENCH \n" @@ -131,10 +131,10 @@ msgstr "" #, fuzzy msgid "" "Instances of :class:`ast.expr` and :class:`ast.stmt` subclasses have :attr:" -"`lineno`, :attr:`col_offset`, :attr:`lineno`, and :attr:`col_offset` " +"`lineno`, :attr:`col_offset`, :attr:`end_lineno`, and :attr:`end_col_offset` " "attributes. The :attr:`lineno` and :attr:`end_lineno` are the first and " -"last line numbers of source text span (1-indexed so the first line is line " -"1) and the :attr:`col_offset` and :attr:`end_col_offset` are the " +"last line numbers of the source text span (1-indexed so the first line is " +"line 1), and the :attr:`col_offset` and :attr:`end_col_offset` are the " "corresponding UTF-8 byte offsets of the first and last tokens that generated " "the node. The UTF-8 offset is recorded because the parser uses UTF-8 " "internally." @@ -147,22 +147,26 @@ msgstr "" "nœud. Le décalage UTF-8 est enregistré parce que l'analyseur syntaxique " "utilise l'UTF-8 en interne." -#: library/ast.rst:90 +#: library/ast.rst:91 msgid "" "Note that the end positions are not required by the compiler and are " "therefore optional. The end offset is *after* the last symbol, for example " "one can get the source segment of a one-line expression node using " "``source_line[node.col_offset : node.end_col_offset]``." msgstr "" +"Les décalages *end…* ne sont pas obligatoires ni nécessaires au compilateur. " +"*end_col_offset* pointe *après* le dernier lexème. On peut donc obtenir la " +"partie du code source ayant donné lieu à une expression avec " +"``ligne_source[nœud.col_offset : nœud.end_col_offset]``." -#: library/ast.rst:95 +#: library/ast.rst:96 msgid "" "The constructor of a class :class:`ast.T` parses its arguments as follows:" msgstr "" "Le constructeur d'une classe :class:`ast.T` analyse ses arguments comme " "suit :" -#: library/ast.rst:97 +#: library/ast.rst:98 msgid "" "If there are positional arguments, there must be as many as there are items " "in :attr:`T._fields`; they will be assigned as attributes of these names." @@ -170,7 +174,7 @@ msgstr "" "S'il y a des arguments positionnels, il doit y avoir autant de termes dans :" "attr:`T._fields`; ils sont assignés comme attributs portant ces noms." -#: library/ast.rst:99 +#: library/ast.rst:100 msgid "" "If there are keyword arguments, they will set the attributes of the same " "names to the given values." @@ -178,7 +182,7 @@ msgstr "" "S'il y a des arguments nommés, ils définissent les attributs de mêmes noms " "avec les valeurs données." -#: library/ast.rst:102 +#: library/ast.rst:103 msgid "" "For example, to create and populate an :class:`ast.UnaryOp` node, you could " "use ::" @@ -186,47 +190,60 @@ msgstr "" "Par exemple, pour créer et peupler un nœud :class:`ast.UnaryOp`, on peut " "utiliser ::" -#: library/ast.rst:114 +#: library/ast.rst:115 msgid "or the more compact ::" msgstr "ou, plus compact ::" -#: library/ast.rst:121 +#: library/ast.rst:122 msgid "Class :class:`ast.Constant` is now used for all constants." msgstr "" +"toutes les constantes sont désormais représentées par des instances de :" +"class:`ast.Constant`." -#: library/ast.rst:125 +#: library/ast.rst:126 msgid "" "Simple indices are represented by their value, extended slices are " "represented as tuples." msgstr "" -#: library/ast.rst:130 +#: library/ast.rst:131 msgid "" "Old classes :class:`ast.Num`, :class:`ast.Str`, :class:`ast.Bytes`, :class:" "`ast.NameConstant` and :class:`ast.Ellipsis` are still available, but they " "will be removed in future Python releases. In the meantime, instantiating " "them will return an instance of a different class." msgstr "" +"les classes :class:`ast.Num`, :class:`ast.Str`, :class:`ast.Bytes`, :class:" +"`ast.NameConstant` et :class:`ast.Ellipsis` sont toujours présentes, mais " +"seront supprimées dans une version future. Pour l'instant, leurs " +"constructeurs renvoient des instances de classes différentes." -#: library/ast.rst:137 +#: library/ast.rst:138 msgid "" "Old classes :class:`ast.Index` and :class:`ast.ExtSlice` are still " "available, but they will be removed in future Python releases. In the " "meantime, instantiating them will return an instance of a different class." msgstr "" +"les classes :class:`ast.Index` et :class:`ast.ExtSlice` seront retirées à " +"l'avenir. Pour l'instant, elles sont toujours disponibles mais leurs " +"constructeurs renvoient des instances de classes différentes." -#: library/ast.rst:143 +#: library/ast.rst:144 msgid "" "The descriptions of the specific node classes displayed here were initially " "adapted from the fantastic `Green Tree Snakes `__ project and all its contributors." msgstr "" +"Les descriptions individuelles des classes de nœuds dans la prochaine " +"section sont au départ adaptées du merveilleux projet `Green Tree Snakes " +"`_, porté par de nombreux " +"contributeurs." -#: library/ast.rst:149 +#: library/ast.rst:150 msgid "Literals" -msgstr "" +msgstr "Littéraux" -#: library/ast.rst:153 +#: library/ast.rst:154 msgid "" "A constant value. The ``value`` attribute of the ``Constant`` literal " "contains the Python object it represents. The values represented can be " @@ -234,107 +251,143 @@ msgid "" "container types (tuples and frozensets) if all of their elements are " "constant." msgstr "" +"Valeur constante, contenue dans le champ *value*. Les valeurs possibles sont " +"celles de types simples comme les nombres, les chaînes de caractères, ou " +"encore ``None``, mais aussi certains conteneurs immuables (*n*-uplets et " +"ensembles figés) lorsque tous leurs éléments sont constants." -#: library/ast.rst:167 +#: library/ast.rst:168 msgid "" "Node representing a single formatting field in an f-string. If the string " "contains a single formatting field and nothing else the node can be isolated " "otherwise it appears in :class:`JoinedStr`." msgstr "" +"Champ de formatage dans une chaîne littérale formatée (*f-string*). Ce nœud " +"peut être isolé si la chaîne contient un unique champ et rien d'autre. " +"Sinon, il apparaît dans :class:`JoinedStr`." -#: library/ast.rst:171 +#: library/ast.rst:172 msgid "" "``value`` is any expression node (such as a literal, a variable, or a " "function call)." msgstr "" +"*value* est un nœud d'expression quelconque (comme un littéral, une " +"variable, ou encore un appel de fonction)." -#: library/ast.rst:173 +#: library/ast.rst:174 msgid "``conversion`` is an integer:" -msgstr "" +msgstr "*conversion* est un entier parmi les valeurs suivantes :" -#: library/ast.rst:175 +#: library/ast.rst:176 msgid "-1: no formatting" -msgstr "" +msgstr "-1, aucun formatage ;" -#: library/ast.rst:176 +#: library/ast.rst:177 msgid "115: ``!s`` string formatting" -msgstr "" +msgstr "115, pour le formatage par ``str()`` correspondant à ``!s`` ;" -#: library/ast.rst:177 +#: library/ast.rst:178 msgid "114: ``!r`` repr formatting" -msgstr "" +msgstr "114, pour le formatage par ``repr()`` correspondant à ``!r`` ;" -#: library/ast.rst:178 +#: library/ast.rst:179 msgid "97: ``!a`` ascii formatting" -msgstr "" +msgstr "97, pour le formatage par ``ascii()`` correspondant à ``!a``." -#: library/ast.rst:180 +#: library/ast.rst:181 msgid "" "``format_spec`` is a :class:`JoinedStr` node representing the formatting of " "the value, or ``None`` if no format was specified. Both ``conversion`` and " "``format_spec`` can be set at the same time." msgstr "" +"*format_spec* est un nœud :class:`JoinedStr` qui précise la manière de " +"formater la valeur. Si aucun formatage particulier n'a été donné, " +"*format_spec* vaut ``None``. *conversion* et *format_spec* peuvent tout à " +"fait coexister." -#: library/ast.rst:187 +#: library/ast.rst:188 msgid "" "An f-string, comprising a series of :class:`FormattedValue` and :class:" "`Constant` nodes." msgstr "" +"Chaîne littérale formatée (*f-string*), qui contient une liste de nœuds :" +"class:`FormattedValue` et :class:`Constant`." -#: library/ast.rst:216 +#: library/ast.rst:217 msgid "" "A list or tuple. ``elts`` holds a list of nodes representing the elements. " "``ctx`` is :class:`Store` if the container is an assignment target (i.e. " "``(x,y)=something``), and :class:`Load` otherwise." msgstr "" +"Liste ou *n*-uplet, dont les éléments sont rassemblés dans la liste *elts*. " +"*ctx* est une instance de :class:`Store` si la liste ou le *n*-uplet est la " +"cible d'une affectation (par exemple ``(x, y) = quelque_chose``). Sinon, " +"c'est une instance de :class:`Load`." -#: library/ast.rst:242 +#: library/ast.rst:243 msgid "A set. ``elts`` holds a list of nodes representing the set's elements." -msgstr "" +msgstr "Ensemble. *elts* est la liste de ses éléments." -#: library/ast.rst:257 +#: library/ast.rst:258 msgid "" "A dictionary. ``keys`` and ``values`` hold lists of nodes representing the " "keys and the values respectively, in matching order (what would be returned " "when calling :code:`dictionary.keys()` and :code:`dictionary.values()`)." msgstr "" +"Dictionnaire. Les listes *keys* et *values* contiennent respectivement les " +"clés et les valeurs. Leurs ordres se correspondent, c'est-à-dire que la " +"valeur associée à l'élément d'indice *i* dans *keys* est à chercher à " +"l'indice *i* de *values*. *keys* et *values* sont donc des équivalents à " +"``dictionnaire.keys()`` et ``dictionnaire.values()``." -#: library/ast.rst:261 +#: library/ast.rst:262 msgid "" "When doing dictionary unpacking using dictionary literals the expression to " "be expanded goes in the ``values`` list, with a ``None`` at the " "corresponding position in ``keys``." msgstr "" +"Si un dictionnaire littéral contient une expression doublement étoilée à " +"déballer, elle est intégrée dans *values*, et ``None`` est mis à la place " +"correspondante dans *keys*." -#: library/ast.rst:279 +#: library/ast.rst:280 msgid "Variables" -msgstr "" +msgstr "Variables" -#: library/ast.rst:283 +#: library/ast.rst:284 msgid "" "A variable name. ``id`` holds the name as a string, and ``ctx`` is one of " "the following types." msgstr "" +"Variable, dont le nom est *id* (une chaîne de caractères). *ctx* est de l'un " +"des trois types :" -#: library/ast.rst:291 +#: library/ast.rst:292 msgid "" "Variable references can be used to load the value of a variable, to assign a " "new value to it, or to delete it. Variable references are given a context to " "distinguish these cases." msgstr "" +"Ces types de contexte distinguent les variables selon qu'elles sont " +"utilisées pour lire la valeur, mettre la variable à une nouvelle valeur, ou " +"supprimer la variable." -#: library/ast.rst:324 +#: library/ast.rst:325 msgid "" "A ``*var`` variable reference. ``value`` holds the variable, typically a :" "class:`Name` node. This type must be used when building a :class:`Call` node " "with ``*args``." msgstr "" +"Élément étoilé. *value* est le nœud auquel s'applique l'étoile. Le plus " +"souvent, *value* est une instance de :class:`Name`. Ce type est notamment " +"nécessaire pour les appels de fonction avec déballage d'arguments (par " +"exemple ``fonction(*args)`` ; voir aussi :class:`Call`)." -#: library/ast.rst:347 +#: library/ast.rst:348 msgid "Expressions" -msgstr "" +msgstr "Expressions" -#: library/ast.rst:351 +#: library/ast.rst:352 msgid "" "When an expression, such as a function call, appears as a statement by " "itself with its return value not used or stored, it is wrapped in this " @@ -342,177 +395,249 @@ msgid "" "`Constant`, a :class:`Name`, a :class:`Lambda`, a :class:`Yield` or :class:" "`YieldFrom` node." msgstr "" +"Lorsque une expression, comme l'appel d'une fonction, apparaît comme une " +"instruction à elle seule, sans que la valeur ne soit utilisée ou " +"sauvegardée, l'expression est insérée dans ce conteneur. Le type de *value* " +"peut être l'un des autres nœuds décrits dans cette section, ou bien parmi :" +"class:`Constant`, :class:`Name`, :class:`Lambda`, :class:`Yield` et :class:" +"`YieldFrom`." -#: library/ast.rst:370 +#: library/ast.rst:371 msgid "" "A unary operation. ``op`` is the operator, and ``operand`` any expression " "node." msgstr "" +"Unité lexicale désignant une opération unaire. L'opérateur est *op*, " +"l'opérande *operand* est un nœud d'expression quelconque." -#: library/ast.rst:379 +#: library/ast.rst:380 msgid "" "Unary operator tokens. :class:`Not` is the ``not`` keyword, :class:`Invert` " "is the ``~`` operator." msgstr "" +"Unités lexicales désignant des opérations unaires. :class:`Not` correspond " +"au mot-clé ``not``, :class:`Invert` à l'opérateur ``~``." -#: library/ast.rst:393 +#: library/ast.rst:394 msgid "" "A binary operation (like addition or division). ``op`` is the operator, and " "``left`` and ``right`` are any expression nodes." msgstr "" +"Opération binaire (comme l'addition ou la division). L'opérateur est *op*, " +"les opérandes *left* et *right* sont des nœuds d'expression quelconques." -#: library/ast.rst:420 +#: library/ast.rst:421 msgid "Binary operator tokens." -msgstr "" +msgstr "Unités lexicales pour les opérations binaires." -#: library/ast.rst:425 +#: library/ast.rst:426 msgid "" "A boolean operation, 'or' or 'and'. ``op`` is :class:`Or` or :class:`And`. " "``values`` are the values involved. Consecutive operations with the same " "operator, such as ``a or b or c``, are collapsed into one node with several " "values." msgstr "" +"Opération booléenne, c'est-à-dire ``and`` ou ``or``, entre *op* et les " +"éléments de *values*. Les deux opérateurs sont distingués par le type de " +"*op*, à savoir :class:`And` ou :class:`Or`. Les applications successives du " +"même opérateur (comme ``a or b or c``) sont regroupées dans un nœud unique " +"avec plusieurs éléments dans la liste *values*." -#: library/ast.rst:430 +#: library/ast.rst:431 msgid "This doesn't include ``not``, which is a :class:`UnaryOp`." msgstr "" +"L'opérateur ``not`` n'est pas implémenté ici, mais bien dans :class:" +"`UnaryOp`." -#: library/ast.rst:446 +#: library/ast.rst:447 msgid "Boolean operator tokens." -msgstr "" +msgstr "Unités lexicales pour les opérations booléennes." -#: library/ast.rst:451 +#: library/ast.rst:452 msgid "" "A comparison of two or more values. ``left`` is the first value in the " "comparison, ``ops`` the list of operators, and ``comparators`` the list of " "values after the first element in the comparison." msgstr "" +"Comparaison de deux valeurs ou plus. *left* est le premier élément de la " +"comparaison, *ops* la liste des opérateurs, et *comparators* la liste des " +"éléments restants de la comparaison." -#: library/ast.rst:480 +#: library/ast.rst:481 msgid "Comparison operator tokens." -msgstr "" +msgstr "Unités lexicales pour les comparaisons." -#: library/ast.rst:485 +#: library/ast.rst:486 msgid "" "A function call. ``func`` is the function, which will often be a :class:" "`Name` or :class:`Attribute` object. Of the arguments:" msgstr "" +"Appel d'une fonction. Le nœud *func*, représentant la fonction appelée, est " +"habituellement de type :class:`Name` ou :class:`Attribute`. Les arguments " +"sont contenus dans :" -#: library/ast.rst:488 +#: library/ast.rst:489 msgid "``args`` holds a list of the arguments passed by position." msgstr "" +"*args*, la liste des arguments passés sans les nommer (arguments " +"positionnels) ;" -#: library/ast.rst:489 +#: library/ast.rst:490 msgid "" "``keywords`` holds a list of :class:`keyword` objects representing arguments " "passed by keyword." msgstr "" +"*keywords*, la liste des arguments nommés sous forme de nœuds :class:" +"`keyword`." -#: library/ast.rst:492 +#: library/ast.rst:493 msgid "" "When creating a ``Call`` node, ``args`` and ``keywords`` are required, but " "they can be empty lists. ``starargs`` and ``kwargs`` are optional." msgstr "" +"Les arguments *args* et *keywords* du constructeur de ``Call`` sont " +"obligatoires (mais peuvent être des listes vides). *starargs* (arguments " +"étoilés) et *kwargs* (arguments nommés) sont facultatifs." -#: library/ast.rst:516 +#: library/ast.rst:517 msgid "" "A keyword argument to a function call or class definition. ``arg`` is a raw " "string of the parameter name, ``value`` is a node to pass in." msgstr "" -#: library/ast.rst:522 +#: library/ast.rst:523 msgid "" "An expression such as ``a if b else c``. Each field holds a single node, so " "in the following example, all three are :class:`Name` nodes." msgstr "" +"Expression ternaire (``a if b else c``). Chaque champ contient un unique " +"nœud. Dans l'exemple suivant, les trois sont de la classe :class:`Name`." -#: library/ast.rst:537 +#: library/ast.rst:538 msgid "" "Attribute access, e.g. ``d.keys``. ``value`` is a node, typically a :class:" "`Name`. ``attr`` is a bare string giving the name of the attribute, and " "``ctx`` is :class:`Load`, :class:`Store` or :class:`Del` according to how " "the attribute is acted on." msgstr "" +"Accès à un attribut (comme ``d.keys``). *value* est un nœud, souvent de la " +"classe :class:`Name`. *attr* est le nom de l'attribut, sous forme de chaîne " +"de caractères. *ctx* est de classe :class:`Load`, :class:`Store` ou :class:" +"`Del` selon le type de l'action effectuée sur l'attribut." -#: library/ast.rst:554 +#: library/ast.rst:555 msgid "" "A named expression. This AST node is produced by the assignment expressions " "operator (also known as the walrus operator). As opposed to the :class:" "`Assign` node in which the first argument can be multiple nodes, in this " "case both ``target`` and ``value`` must be single nodes." msgstr "" +"Expression d'affectation. Ces nœuds proviennent de l'opérateur « morse » ``:" +"=``. Contrairement à :class:`Assign`, dont le premier argument est une liste " +"qui peut contenir plusieurs cibles, les arguments *target* et *value* sont " +"ici des nœuds simples." -#: library/ast.rst:569 +#: library/ast.rst:570 msgid "Subscripting" -msgstr "" +msgstr "Indiçage" -#: library/ast.rst:573 +#: library/ast.rst:574 msgid "" "A subscript, such as ``l[1]``. ``value`` is the subscripted object (usually " "sequence or mapping). ``slice`` is an index, slice or key. It can be a :" "class:`Tuple` and contain a :class:`Slice`. ``ctx`` is :class:`Load`, :class:" "`Store` or :class:`Del` according to the action performed with the subscript." msgstr "" +"Accès à un indice, par exemple ``liste[1]``. *value* est l'objet où l'indice " +"est pris, donc la plupart du temps une séquence ou une table associative. " +"*slice* est soit un indice, soit une tranche, soit une clé. Les instances " +"de :class:`Tuple` pour *slice* peuvent contenir des objets :class:`Slice`. " +"*ctx* est de type :class:`Load`, :class:`Store` ou :class:`Del` selon " +"l'action appliquée à l'indice." -#: library/ast.rst:597 +#: library/ast.rst:598 msgid "" "Regular slicing (on the form ``lower:upper`` or ``lower:upper:step``). Can " "occur only inside the *slice* field of :class:`Subscript`, either directly " "or as an element of :class:`Tuple`." msgstr "" +"Tranches normales (de la forme ``début:fin`` ou ``début:fin:pas``). Les " +"instances de cette classe ne peuvent apparaître que dans le champ *slice* " +"d'un :class:`Subscript`, que ce soit directement ou en tant qu'élément d'un :" +"class:`Tuple`." -#: library/ast.rst:614 +#: library/ast.rst:615 msgid "Comprehensions" -msgstr "" +msgstr "Compréhensions" -#: library/ast.rst:621 +#: library/ast.rst:622 msgid "" "List and set comprehensions, generator expressions, and dictionary " "comprehensions. ``elt`` (or ``key`` and ``value``) is a single node " "representing the part that will be evaluated for each item." msgstr "" +"Liste, ensemble ou dictionnaire en compréhension, ou expression génératrice. " +"*elt* est l'expression avant le premier ``for``, évaluée à chaque itération. " +"Il est remplacé par *key* (expression pour la clé) et *value* (expression " +"pour la valeur) dans le cas des dictionnaires." -#: library/ast.rst:625 +#: library/ast.rst:626 msgid "``generators`` is a list of :class:`comprehension` nodes." -msgstr "" +msgstr "*generators* est une liste de nœuds :class:`comprehension`." -#: library/ast.rst:667 +#: library/ast.rst:668 msgid "" "One ``for`` clause in a comprehension. ``target`` is the reference to use " "for each element - typically a :class:`Name` or :class:`Tuple` node. " "``iter`` is the object to iterate over. ``ifs`` is a list of test " "expressions: each ``for`` clause can have multiple ``ifs``." msgstr "" +"Une clause ``for`` à l'intérieur d'une compréhension. *iter* est l'objet à " +"parcourir, *target* est la cible de l'affectation qui se produit à chaque " +"itération (la plupart du temps un nœud :class:`Name` ou :class:`Tuple`). " +"*ifs* contient les tests qui décident si l'élément doit être inséré. C'est " +"une liste, car chaque ``for`` peut être suivi de plusieurs ``if``." -#: library/ast.rst:672 +#: library/ast.rst:673 msgid "" "``is_async`` indicates a comprehension is asynchronous (using an ``async " "for`` instead of ``for``). The value is an integer (0 or 1)." msgstr "" +"*is_async* est une valeur booléenne sous forme d'entier, 0 ou 1, qui indique " +"si la compréhension est asynchrone, c'est-à-dire qu'elle a été écrite avec " +"``async for`` au lieu de ``for``." -#: library/ast.rst:738 +#: library/ast.rst:739 msgid "Statements" -msgstr "" +msgstr "Instructions" -#: library/ast.rst:742 +#: library/ast.rst:743 msgid "" "An assignment. ``targets`` is a list of nodes, and ``value`` is a single " "node." msgstr "" +"Affectation. *targets* est une liste de nœuds, *value* est simplement un " +"nœud." -#: library/ast.rst:744 +#: library/ast.rst:745 msgid "" "Multiple nodes in ``targets`` represents assigning the same value to each. " "Unpacking is represented by putting a :class:`Tuple` or :class:`List` within " "``targets``." msgstr "" +"S'il y a plusieurs nœuds dans *targets*, ils sont tous pris comme des cibles " +"auxquelles est affectée la même expression. Le déballage de séquences est " +"représenté par des nœuds :class:`Tuple` ou :class:`List` comme éléments de " +"*targets*." -#: library/ast.rst:1037 library/ast.rst:1263 +#: library/ast.rst:1038 library/ast.rst:1264 msgid "" "``type_comment`` is an optional string with the type annotation as a comment." msgstr "" +"Le champ facultatif *type_comment* contient une annotation de type fournie " +"par un commentaire, et ce sous la forme d'une chaîne de caractères." -#: library/ast.rst:780 +#: library/ast.rst:781 msgid "" "An assignment with a type annotation. ``target`` is a single node and can be " "a :class:`Name`, a :class:`Attribute` or a :class:`Subscript`. " @@ -521,96 +646,141 @@ msgid "" "integer set to True for a :class:`Name` node in ``target`` that do not " "appear in between parenthesis and are hence pure names and not expressions." msgstr "" +"Affectation accompagnée d'une annotation de type. La cible *target* est un " +"nœud de type :class:`Name`, :class:`Attribute` ou :class:`Subscript`. " +"*annotation* est le contenu de l'annotation, par exemple un nœud :class:" +"`Constant` ou :class:`Name`. Le champ *value* est facultatif et peut " +"contenir un nœud, la valeur affectée à la cible. *simple* est une valeur " +"booléenne sous forme d'entier, 0 ou 1, qui vaut 1 si et seulement si " +"*target* est de type :class:`Name` et provient d'un nom sans parenthèses, " +"donc un nom simple plutôt qu'une expression." -#: library/ast.rst:835 +#: library/ast.rst:836 msgid "" "Augmented assignment, such as ``a += 1``. In the following example, " "``target`` is a :class:`Name` node for ``x`` (with the :class:`Store` " "context), ``op`` is :class:`Add`, and ``value`` is a :class:`Constant` with " "value for 1." msgstr "" +"Affectation incrémentale, par exemple ``a += 1``. Dans l'exemple qui suit, " +"*target* est un nœud de type :class:`Name` avec le nom ``'x'`` (de contexte :" +"class:`Store`), *op* est une instance de :class:`Add`, et *value* est un " +"nœud :class:`Constant` contenant la valeur 1." -#: library/ast.rst:840 +#: library/ast.rst:841 msgid "" "The ``target`` attribute connot be of class :class:`Tuple` or :class:`List`, " "unlike the targets of :class:`Assign`." msgstr "" -#: library/ast.rst:857 +#: library/ast.rst:858 msgid "" "A ``raise`` statement. ``exc`` is the exception object to be raised, " "normally a :class:`Call` or :class:`Name`, or ``None`` for a standalone " "``raise``. ``cause`` is the optional part for ``y`` in ``raise x from y``." msgstr "" +"Instruction ``raise``. *exc* est l'exception à lever, la plupart du temps un " +"nœud de type :class:`Call` ou :class:`Name`. Ce champ vaut ``None`` dans le " +"cas d'un ``raise`` sans rien d'autre. Le champ facultatif *cause* correspond " +"à la partie après le ``from`` dans ``raise ... from ...``." -#: library/ast.rst:874 +#: library/ast.rst:875 msgid "" "An assertion. ``test`` holds the condition, such as a :class:`Compare` node. " "``msg`` holds the failure message." msgstr "" +"Assertion. *test* est la condition, par exemple un nœud :class:`Compare`. " +"*msg* est le message d'erreur affiché si le test s'évalue comme faux." -#: library/ast.rst:890 +#: library/ast.rst:891 msgid "" "Represents a ``del`` statement. ``targets`` is a list of nodes, such as :" "class:`Name`, :class:`Attribute` or :class:`Subscript` nodes." msgstr "" +"Instruction ``del``. Les éléments à supprimer sont rassemblés dans la liste " +"*target*. Ce sont généralement des nœuds de type :class:`Name`, :class:" +"`Attribute` ou :class:`Subscript`." -#: library/ast.rst:908 +#: library/ast.rst:909 msgid "A ``pass`` statement." -msgstr "" +msgstr "Instruction ``pass``." -#: library/ast.rst:919 +#: library/ast.rst:920 msgid "" "Other statements which are only applicable inside functions or loops are " "described in other sections." msgstr "" +"Il existe d'autres instructions, qui ne peuvent apparaître que dans certains " +"contextes spécifiques comme l'intérieur d'une fonction ou d'une boucle. " +"Elles sont décrites dans d'autres sections de ce document." -#: library/ast.rst:923 +#: library/ast.rst:924 msgid "Imports" -msgstr "" +msgstr "Importations" -#: library/ast.rst:927 +#: library/ast.rst:928 msgid "An import statement. ``names`` is a list of :class:`alias` nodes." msgstr "" +"Instruction ``import``. *names* prend la forme d'une liste de nœuds :class:" +"`alias`." -#: library/ast.rst:944 +#: library/ast.rst:945 msgid "" "Represents ``from x import y``. ``module`` is a raw string of the 'from' " "name, without any leading dots, or ``None`` for statements such as ``from . " "import foo``. ``level`` is an integer holding the level of the relative " "import (0 means absolute import)." msgstr "" +"Instruction ``from ... import ...``. La partie après ``from`` est mise dans " +"*module* comme une simple chaîne de caractères. Dans le cas des importations " +"relatives, comme ``from ..module import quelque_chose``, *module* ne " +"contient pas les points au début. Dans les instructions de la forme ``from . " +"import toto``, *module* vaut ``None``. *level* est le niveau d'importation " +"relative sous forme d'entier (0 pour les importations absolues)." -#: library/ast.rst:966 +#: library/ast.rst:967 msgid "" "Both parameters are raw strings of the names. ``asname`` can be ``None`` if " "the regular name is to be used." msgstr "" +"Correspond à ``... as ...`` dans une importation. *name* et *asname* sont de " +"simples chaînes de caractères, qui correspondent aux deux parties de ``... " +"as ...``. Dans les instructions sans ``as`` (où le module n'est pas " +"renommé), *asname* vaut ``None``." -#: library/ast.rst:983 +#: library/ast.rst:984 msgid "Control flow" -msgstr "" +msgstr "Contrôle de l'exécution" -#: library/ast.rst:986 +#: library/ast.rst:987 msgid "" "Optional clauses such as ``else`` are stored as an empty list if they're not " "present." msgstr "" +"Si une clause facultative comme ``else`` est absente, le champ correspondant " +"dans l'arbre est une liste vide." -#: library/ast.rst:991 +#: library/ast.rst:992 msgid "" "An ``if`` statement. ``test`` holds a single node, such as a :class:" "`Compare` node. ``body`` and ``orelse`` each hold a list of nodes." msgstr "" +"Instruction ``if``. La condition, *test*, est un nœud, par exemple une " +"instance de :class:`Compare`. *body* est la liste des instructions du bloc. " +"*orelse* contient les instructions dans le ``else`` (liste vide s'il n'y a " +"pas de ``else``)." -#: library/ast.rst:994 +#: library/ast.rst:995 msgid "" "``elif`` clauses don't have a special representation in the AST, but rather " "appear as extra :class:`If` nodes within the ``orelse`` section of the " "previous one." msgstr "" +"Les clauses ``elif`` ne possèdent pas de représentation particulière. Elles " +"sont simplement mises dans le *orelse* du ``if`` ou ``elif`` précédent, " +"comme nœuds de type :class:`If`." -#: library/ast.rst:1029 +#: library/ast.rst:1030 msgid "" "A ``for`` loop. ``target`` holds the variable(s) the loop assigns to, as a " "single :class:`Name`, :class:`Tuple` or :class:`List` node. ``iter`` holds " @@ -618,198 +788,269 @@ msgid "" "contain lists of nodes to execute. Those in ``orelse`` are executed if the " "loop finishes normally, rather than via a ``break`` statement." msgstr "" +"Boucle ``for``. Elle porte sur l'itérable donné par le nœud *iter*. La cible " +"des affectations successives est *target*, qui est un nœud de type :class:" +"`Name`, :class:`Tuple` ou :class:`List`. Les instructions du bloc ``for`` " +"forment la liste *body*. Celles de la liste *orelse* proviennent d'une " +"éventuelle clause ``else`` et sont exécutées si la boucle se termine par " +"épuisement de l'itérable, et non pas par un ``break``." -#: library/ast.rst:1063 +#: library/ast.rst:1064 msgid "" "A ``while`` loop. ``test`` holds the condition, such as a :class:`Compare` " "node." msgstr "" +"Boucle ``while``. *test* est la condition évaluée à chaque itération, par " +"exemple un nœud :class:`Compare`. *body* contient les instructions du bloc, " +"et *orelse* celles d'un éventuel bloc ``else``, exécuté lorsque la boucle " +"termine parce que la condition devient fausse et non pas à cause d'une " +"instruction ``break``." -#: library/ast.rst:1090 +#: library/ast.rst:1091 msgid "The ``break`` and ``continue`` statements." -msgstr "" +msgstr "Instructions ``break`` et ``continue``." -#: library/ast.rst:1125 +#: library/ast.rst:1126 msgid "" "``try`` blocks. All attributes are list of nodes to execute, except for " "``handlers``, which is a list of :class:`ExceptHandler` nodes." msgstr "" +"Bloc ``try``. Les nœuds de la liste *body* sont les instructions à exécuter " +"sous contrôle des exceptions. La liste *handlers* contient des nœuds :class:" +"`ExceptHandler`, un par ``except``. Les listes *orelse* et *finalbody* " +"contiennent respectivement les instructions se trouvant dans d'éventuels " +"blocs ``else`` et ``finally``." -#: library/ast.rst:1171 +#: library/ast.rst:1172 msgid "" "A single ``except`` clause. ``type`` is the exception type it will match, " "typically a :class:`Name` node (or ``None`` for a catch-all ``except:`` " "clause). ``name`` is a raw string for the name to hold the exception, or " "``None`` if the clause doesn't have ``as foo``. ``body`` is a list of nodes." msgstr "" +"Une clause ``except``. Elle intercepte les exceptions de types donnés par " +"*type*, qui est le plus souvent un nœud :class:`Name` ou bien ``None`` " +"(cette dernière valeur pour les clauses fourre-tout ``except:``). Le nom " +"éventuel de la variable à laquelle affecter l'exception est dans la chaîne " +"de caractères *name* (``None`` s'il n'y a pas de ``as``). Les instructions " +"sous le ``except`` sont dans la liste *body*." -#: library/ast.rst:1205 +#: library/ast.rst:1206 msgid "" "A ``with`` block. ``items`` is a list of :class:`withitem` nodes " "representing the context managers, and ``body`` is the indented block inside " "the context." msgstr "" +"Bloc ``with``. Les gestionnaires de contexte sont stockés dans *items* comme " +"instances de :class:`withitem`. Les instructions sous le ``with`` forment la " +"liste *body*." -#: library/ast.rst:1215 +#: library/ast.rst:1216 msgid "" "A single context manager in a ``with`` block. ``context_expr`` is the " "context manager, often a :class:`Call` node. ``optional_vars`` is a :class:" "`Name`, :class:`Tuple` or :class:`List` for the ``as foo`` part, or ``None`` " "if that isn't used." msgstr "" +"Gestionnaire de contexte dans un bloc ``with``. Le gestionnaire est donné " +"par le nœud *context_expr*, souvent une instance de :class:`Call`. S'il y a " +"affectation avec ``as``, *optional_vars* contient sa cible, qui est un nœud " +"de type :class:`Name`, :class:`Tuple` ou :class:`List`. Sinon, " +"*optional_vars* vaut ``None``." -#: library/ast.rst:1248 +#: library/ast.rst:1249 msgid "Function and class definitions" -msgstr "" +msgstr "Définition de fonctions et de classes" -#: library/ast.rst:1252 +#: library/ast.rst:1253 msgid "A function definition." -msgstr "" - -#: library/ast.rst:1254 -msgid "``name`` is a raw string of the function name." -msgstr "" +msgstr "Définition d'une fonction." #: library/ast.rst:1255 -msgid "``args`` is a :class:`arguments` node." +msgid "``name`` is a raw string of the function name." msgstr "" +"*name* donne le nom de la fonction sous forme d'une chaîne de caractères." #: library/ast.rst:1256 -msgid "``body`` is the list of nodes inside the function." +msgid "``args`` is an :class:`arguments` node." msgstr "" #: library/ast.rst:1257 +msgid "``body`` is the list of nodes inside the function." +msgstr "*body* est la liste des instructions dans le corps de la fonction." + +#: library/ast.rst:1258 msgid "" "``decorator_list`` is the list of decorators to be applied, stored outermost " "first (i.e. the first in the list will be applied last)." msgstr "" +"*decorators_list* est une liste de décorateurs appliqués à la fonction. Ils " +"sont rangés dans leur ordre d'apparition, c'est-à-dire que le premier de la " +"liste est appliqué en dernier." -#: library/ast.rst:1259 +#: library/ast.rst:1260 msgid "``returns`` is the return annotation." -msgstr "" +msgstr "*returns* est l'annotation de renvoi éventuelle." -#: library/ast.rst:1268 +#: library/ast.rst:1269 msgid "" "``lambda`` is a minimal function definition that can be used inside an " "expression. Unlike :class:`FunctionDef`, ``body`` holds a single node." msgstr "" +"Fonction anonyme. Elle est créée avec le mot-clé ``lambda``, limitée à " +"renvoyer une simple expression, et peut être intégrée à une expression plus " +"large. Contrairement à :class:`FunctionDef`, *body* est ici un nœud unique. " +"*args* est une instance de ``arguments`` qui contient les arguments de la " +"signature." -#: library/ast.rst:1292 +#: library/ast.rst:1293 msgid "The arguments for a function." -msgstr "" +msgstr "Arguments d'une fonction." -#: library/ast.rst:1294 +#: library/ast.rst:1295 msgid "" "``posonlyargs``, ``args`` and ``kwonlyargs`` are lists of :class:`arg` nodes." msgstr "" +"*posonlyargs*, *args* et *kwonlyargs* sont des listes de nœuds :class:`arg` " +"qui correspondent respectivement aux arguments obligatoirement positionnels, " +"positionnels ou nommés et obligatoirement nommés." -#: library/ast.rst:1295 +#: library/ast.rst:1296 msgid "" "``vararg`` and ``kwarg`` are single :class:`arg` nodes, referring to the " "``*args, **kwargs`` parameters." msgstr "" +"*varargs* et *kwargs* sont des nœuds :class:`arg` qui apparaissent avec la " +"capture des arguments restants, positionnels (``*arguments_positionnels``) " +"et nommés (``**arguments_nommés``)." -#: library/ast.rst:1297 +#: library/ast.rst:1298 msgid "" "``kw_defaults`` is a list of default values for keyword-only arguments. If " "one is ``None``, the corresponding argument is required." msgstr "" +"*kw_defaults* est la liste des valeurs par défaut pour les arguments " +"obligatoirement nommés. Si l'un des éléments n'est pas un nœud mais " +"``None``, il n'y a pas de valeur par défaut et l'argument correspondant doit " +"être passé obligatoirement à la fonction." -#: library/ast.rst:1299 +#: library/ast.rst:1300 msgid "" "``defaults`` is a list of default values for arguments that can be passed " "positionally. If there are fewer defaults, they correspond to the last n " "arguments." msgstr "" +"*defaults* est, quant à elle, la liste des valeurs par défauts pour les " +"arguments qui peuvent être passés de manière positionnelle (obligatoirement " +"ou non). S'il y a moins d'éléments dans la liste que d'arguments " +"positionnels, ces éléments donnent les valeurs par défaut des *n* derniers " +"arguments positionnels (avec *n* la longueur de *defaults*)." -#: library/ast.rst:1306 +#: library/ast.rst:1307 msgid "" "A single argument in a list. ``arg`` is a raw string of the argument name, " "``annotation`` is its annotation, such as a :class:`Str` or :class:`Name` " "node." msgstr "" -#: library/ast.rst:1312 +#: library/ast.rst:1313 msgid "" "``type_comment`` is an optional string with the type annotation as a comment" msgstr "" +"Le champ facultatif *type_comment* est, sous forme de chaîne, une annotation " +"de type fournie par un commentaire." -#: library/ast.rst:1356 +#: library/ast.rst:1357 msgid "A ``return`` statement." -msgstr "" +msgstr "Instruction ``return``, qui renvoie *value*." -#: library/ast.rst:1371 +#: library/ast.rst:1372 msgid "" "A ``yield`` or ``yield from`` expression. Because these are expressions, " "they must be wrapped in a :class:`Expr` node if the value sent back is not " "used." msgstr "" +"Expression ``yield`` ou ``yield from``. Ce sont bien des expressions, non " +"pas des instructions. Il faut donc les placer dans un nœud :class:`Expr` si " +"la valeur qu'elles renvoient n'est pas utilisée dans une expression plus " +"large." -#: library/ast.rst:1396 +#: library/ast.rst:1397 msgid "" "``global`` and ``nonlocal`` statements. ``names`` is a list of raw strings." msgstr "" +"Instruction ``global`` ou ``nonlocal``. Elle s'applique aux noms de " +"variables donnés dans *names*, une liste de chaînes de caractères." -#: library/ast.rst:1423 +#: library/ast.rst:1424 msgid "A class definition." -msgstr "" +msgstr "Définition d'une classe." -#: library/ast.rst:1425 +#: library/ast.rst:1426 msgid "``name`` is a raw string for the class name" -msgstr "" +msgstr "*name* est le nom de la classe sous forme de chaîne de caractères ;" -#: library/ast.rst:1426 +#: library/ast.rst:1427 msgid "``bases`` is a list of nodes for explicitly specified base classes." -msgstr "" +msgstr "*bases* est la liste des classes mères données explicitement ;" -#: library/ast.rst:1427 +#: library/ast.rst:1428 msgid "" "``keywords`` is a list of :class:`keyword` nodes, principally for " "'metaclass'. Other keywords will be passed to the metaclass, as per " -"`PEP-3115 `_." +"`PEP-3115 `_." msgstr "" -#: library/ast.rst:1430 +#: library/ast.rst:1431 msgid "" "``starargs`` and ``kwargs`` are each a single node, as in a function call. " "starargs will be expanded to join the list of base classes, and kwargs will " "be passed to the metaclass." msgstr "" -#: library/ast.rst:1433 +#: library/ast.rst:1434 msgid "" "``body`` is a list of nodes representing the code within the class " "definition." msgstr "" +"*body* est la liste des instructions contenues dans la définition de classe ;" -#: library/ast.rst:1435 +#: library/ast.rst:1436 msgid "``decorator_list`` is a list of nodes, as in :class:`FunctionDef`." msgstr "" +"*decorators_list* est une liste de nœuds, comme pour :class:`FunctionDef`." -#: library/ast.rst:1464 +#: library/ast.rst:1465 msgid "Async and await" -msgstr "" +msgstr "``async`` et ``await``" -#: library/ast.rst:1468 +#: library/ast.rst:1469 msgid "" "An ``async def`` function definition. Has the same fields as :class:" "`FunctionDef`." msgstr "" +"Fonction déclarée avec ``async def``. Les champs sont les mêmes que dans :" +"class:`FunctionDef`." -#: library/ast.rst:1474 +#: library/ast.rst:1475 msgid "" "An ``await`` expression. ``value`` is what it waits for. Only valid in the " "body of an :class:`AsyncFunctionDef`." msgstr "" +"Expression ``await``, qui attend *value*. Ces nœuds ne peuvent apparaître " +"qu'à l'intérieur de :class:`AsyncFunctionDef`." -#: library/ast.rst:1507 +#: library/ast.rst:1508 msgid "" "``async for`` loops and ``async with`` context managers. They have the same " "fields as :class:`For` and :class:`With`, respectively. Only valid in the " "body of an :class:`AsyncFunctionDef`." msgstr "" +"Instruction ``async for`` ou ``async with``. Les champs sont les mêmes que " +"ceux de :class:`For` et :class:`With`. Ces nœuds ne peuvent apparaître qu'à " +"l'intérieur de :class:`AsyncFunctionDef`." -#: library/ast.rst:1512 +#: library/ast.rst:1513 msgid "" "When a string is parsed by :func:`ast.parse`, operator nodes (subclasses of :" "class:`ast.operator`, :class:`ast.unaryop`, :class:`ast.cmpop`, :class:`ast." @@ -817,12 +1058,19 @@ msgid "" "singletons. Changes to one will be reflected in all other occurrences of the " "same value (e.g. :class:`ast.Add`)." msgstr "" +"Lorsqu'une chaîne contenant du code est transformée en arbre syntaxique par :" +"func:`ast.parse`, les nœuds représentants les opérateurs (classes filles de :" +"class:`ast.operator`, :class:`ast.unaryop`, :class:`ast.cmpop`, :class:`ast." +"boolop` et :class:`ast.expr_context`) sont des singletons à l'intérieur de " +"l'arbre renvoyé. Si l'un, par exemple une instance de :class:`ast.Add`, est " +"muté, la modification sera visible sur toutes les autres apparitions de " +"l'opérateur." -#: library/ast.rst:1520 +#: library/ast.rst:1521 msgid ":mod:`ast` Helpers" msgstr "Outils du module :mod:`ast`" -#: library/ast.rst:1522 +#: library/ast.rst:1523 msgid "" "Apart from the node classes, the :mod:`ast` module defines these utility " "functions and classes for traversing abstract syntax trees:" @@ -830,7 +1078,7 @@ msgstr "" "À part la classe nœud, le module :mod:`ast` définit ces fonctions et classes " "utilitaires pour traverser les arbres syntaxiques abstraits :" -#: library/ast.rst:1527 +#: library/ast.rst:1528 msgid "" "Parse the source into an AST node. Equivalent to ``compile(source, " "filename, mode, ast.PyCF_ONLY_AST)``." @@ -838,7 +1086,7 @@ msgstr "" "Analyse le code source en un nœud AST. Équivalent à ``compile(source, " "filename, mode, ast.PyCF_ONLY_AST)``." -#: library/ast.rst:1530 +#: library/ast.rst:1531 msgid "" "If ``type_comments=True`` is given, the parser is modified to check and " "return type comments as specified by :pep:`484` and :pep:`526`. This is " @@ -850,15 +1098,25 @@ msgid "" "the ``type_ignores`` attribute of :class:`Module` (otherwise it is always an " "empty list)." msgstr "" +"Si *type_comments* est mis à ``True``, l'analyseur syntaxique reconnaît les " +"commentaires de type et les ajoute à l'arbre, comme décrit dans la :pep:" +"`484` et la :pep:`526`. Ceci revient à ajouter :data:`ast." +"PyCF_TYPE_COMMENTS` à l'argument *flags* de :func:`compile`. Une erreur de " +"syntaxe est levée si un commentaire de type est placé au mauvais endroit. " +"Les commentaires ``# type: ignore`` sont également détectés et leurs " +"positions dans la source sont placées dans l'attribut *type_ignores* du " +"nœud :class:`Module`. Sans cette option, les commentaires de type sont " +"ignorés tout comme les commentaires ordinaires, et l'attribut *type_comment* " +"des nœuds dont le type possède ce champ sera toujours mis à ``None``." -#: library/ast.rst:1540 +#: library/ast.rst:1541 msgid "" "In addition, if ``mode`` is ``'func_type'``, the input syntax is modified to " "correspond to :pep:`484` \"signature type comments\", e.g. ``(str, int) -> " "List[str]``." msgstr "" -#: library/ast.rst:1544 +#: library/ast.rst:1545 msgid "" "Also, setting ``feature_version`` to a tuple ``(major, minor)`` will attempt " "to parse using that Python version's grammar. Currently ``major`` must equal " @@ -866,8 +1124,35 @@ msgid "" "use of ``async`` and ``await`` as variable names. The lowest supported " "version is ``(3, 4)``; the highest is ``sys.version_info[0:2]``." msgstr "" +"Si *feature_version* est défini à une version de Python, sous la forme d'un " +"couple ``(version_majeure, version_mineure)``, l'analyseur tentera de lire " +"la source en se conformant à la syntaxe de cette version. Ainsi, avec " +"``feature_version=(3, 4)``, les noms ``async`` et ``await`` peuvent nommer " +"des variables. La version la plus ancienne prise en charge est actuellement " +"``(3, 4)`` ; la plus récente est ``sys.version_info[0:2]``." + +#: library/ast.rst:1552 +msgid "" +"If source contains a null character ('\\0'), :exc:`ValueError` is raised." +msgstr "" + +#: library/ast.rst:1555 +msgid "" +"Note that successfully parsing source code into an AST object doesn't " +"guarantee that the source code provided is valid Python code that can be " +"executed as the compilation step can raise further :exc:`SyntaxError` " +"exceptions. For instance, the source ``return 42`` generates a valid AST " +"node for a return statement, but it cannot be compiled alone (it needs to be " +"inside a function node)." +msgstr "" + +#: library/ast.rst:1562 +msgid "" +"In particular, :func:`ast.parse` won't do any scoping checks, which the " +"compilation step does." +msgstr "" -#: library/ast.rst:1591 +#: library/ast.rst:1605 msgid "" "It is possible to crash the Python interpreter with a sufficiently large/" "complex string due to stack depth limitations in Python's AST compiler." @@ -876,31 +1161,38 @@ msgstr "" "suffisamment grandes ou complexes lors de la compilation d'un objet AST dû à " "la limitation de la profondeur de la pile d'appels." -#: library/ast.rst:1556 +#: library/ast.rst:1570 msgid "Added ``type_comments``, ``mode='func_type'`` and ``feature_version``." msgstr "" +"ajout des paramètres *type_comments* et *feature_version* ainsi que de la " +"valeur ``'func_type'`` pour *mode*." -#: library/ast.rst:1562 +#: library/ast.rst:1576 msgid "" "Unparse an :class:`ast.AST` object and generate a string with code that " "would produce an equivalent :class:`ast.AST` object if parsed back with :" "func:`ast.parse`." msgstr "" +"À partir d'un arbre syntaxique :class:`ast.AST`, reconstruit un code sous " +"forme de chaîne de caractères. S'il est passé à :func:`ast.parse`, le " +"résultat produit un arbre :class:`ast.AST` équivalent à l'original." -#: library/ast.rst:1567 +#: library/ast.rst:1581 msgid "" "The produced code string will not necessarily be equal to the original code " "that generated the :class:`ast.AST` object (without any compiler " "optimizations, such as constant tuples/frozensets)." msgstr "" -#: library/ast.rst:1572 +#: library/ast.rst:1586 msgid "" "Trying to unparse a highly complex expression would result with :exc:" "`RecursionError`." msgstr "" +"Une :exc:`RecursionError` est levée si l'expression comporte de très " +"nombreux niveaux d'imbrication." -#: library/ast.rst:1580 +#: library/ast.rst:1594 msgid "" "Safely evaluate an expression node or a string containing a Python literal " "or container display. The string or node provided may only consist of the " @@ -913,7 +1205,7 @@ msgstr "" "Python suivants : chaînes de caractères, bytes, nombres, *n*-uplets, listes, " "dictionnaires, ensembles, booléens, et ``None``." -#: library/ast.rst:1585 +#: library/ast.rst:1599 msgid "" "This can be used for safely evaluating strings containing Python values from " "untrusted sources without the need to parse the values oneself. It is not " @@ -926,15 +1218,15 @@ msgstr "" "d'évaluer des expressions complexes arbitraires, par exemple impliquant des " "opérateurs ou de l'indexation." -#: library/ast.rst:1595 +#: library/ast.rst:1609 msgid "Now allows bytes and set literals." msgstr "Accepte maintenant les littéraux suivants *bytes* et *sets*." -#: library/ast.rst:1598 +#: library/ast.rst:1612 msgid "Now supports creating empty sets with ``'set()'``." -msgstr "" +msgstr "accepte ``set()`` pour les ensembles vides." -#: library/ast.rst:1604 +#: library/ast.rst:1618 msgid "" "Return the docstring of the given *node* (which must be a :class:" "`FunctionDef`, :class:`AsyncFunctionDef`, :class:`ClassDef`, or :class:" @@ -947,24 +1239,28 @@ msgstr "" "cette fonction nettoie l'indentation de la *docstring* avec :func:`inspect." "cleandoc`." -#: library/ast.rst:1610 +#: library/ast.rst:1624 msgid ":class:`AsyncFunctionDef` is now supported." msgstr ":class:`AsyncFunctionDef` est maintenant gérée" -#: library/ast.rst:1616 +#: library/ast.rst:1630 msgid "" "Get source code segment of the *source* that generated *node*. If some " "location information (:attr:`lineno`, :attr:`end_lineno`, :attr:" "`col_offset`, or :attr:`end_col_offset`) is missing, return ``None``." msgstr "" +"Donne la partie de *source* (le code source) qui a donné lieu à *node*. Si " +"l'un des attributs de localisation du nœud (:attr:`lineno`, :attr:" +"`end_lineno`, :attr:`col_offset` et :attr:`end_col_offset`) n'est pas " +"rempli, cette fonction renvoie ``None``." -#: library/ast.rst:1620 +#: library/ast.rst:1634 msgid "" "If *padded* is ``True``, the first line of a multi-line statement will be " "padded with spaces to match its original position." msgstr "" -#: library/ast.rst:1628 +#: library/ast.rst:1642 msgid "" "When you compile a node tree with :func:`compile`, the compiler expects :" "attr:`lineno` and :attr:`col_offset` attributes for every node that supports " @@ -979,29 +1275,28 @@ msgstr "" "ils ne sont pas déjà définis, en les définissant comme les valeurs du nœud " "parent. Elle fonctionne récursivement en démarrant de *node*." -#: library/ast.rst:1637 -#, fuzzy +#: library/ast.rst:1651 msgid "" "Increment the line number and end line number of each node in the tree " "starting at *node* by *n*. This is useful to \"move code\" to a different " "location in a file." msgstr "" -"Incrémente de *n* le numéro de ligne de chaque nœud dans l'arbre en " -"commençant par le nœud *node*. C'est utile pour \"déplacer du code\" à un " -"endroit différent dans un fichier." +"Incrémente de *n* les numéros des lignes de début et ligne de fin de chaque " +"nœud dans l'arbre, en commençant par le nœud *node*. C'est utile pour " +"« déplacer du code » à un endroit différent dans un fichier." -#: library/ast.rst:1644 -#, fuzzy +#: library/ast.rst:1658 msgid "" "Copy source location (:attr:`lineno`, :attr:`col_offset`, :attr:" "`end_lineno`, and :attr:`end_col_offset`) from *old_node* to *new_node* if " "possible, and return *new_node*." msgstr "" -"Copie le code source (:attr:`lineno` et :attr:`col_offset`) de l'ancien nœud " -"*old_node* vers le nouveau nœud *new_node* si possible, et renvoie " +"Copie la position dans la source (attributs :attr:`lineno`, :attr:" +"`col_offset`, :attr:`end_lineno` et :attr:`end_col_offset`) de l'ancien nœud " +"*old_node* vers le nouveau nœud *new_node*, si possible, et renvoie " "*new_node*." -#: library/ast.rst:1651 +#: library/ast.rst:1665 msgid "" "Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` " "that is present on *node*." @@ -1009,7 +1304,7 @@ msgstr "" "Produit un *n*-uplet de ``(fieldname, value)`` pour chaque champ de ``node." "_fields`` qui est présent dans *node*." -#: library/ast.rst:1657 +#: library/ast.rst:1671 msgid "" "Yield all direct child nodes of *node*, that is, all fields that are nodes " "and all items of fields that are lists of nodes." @@ -1018,7 +1313,7 @@ msgstr "" "champs qui sont des nœuds et tous les éléments des champs qui sont des " "listes de nœuds." -#: library/ast.rst:1663 +#: library/ast.rst:1677 msgid "" "Recursively yield all descendant nodes in the tree starting at *node* " "(including *node* itself), in no specified order. This is useful if you " @@ -1029,7 +1324,7 @@ msgstr "" "lorsque l'on souhaite modifier les nœuds sur place sans prêter attention au " "contexte." -#: library/ast.rst:1670 +#: library/ast.rst:1684 msgid "" "A node visitor base class that walks the abstract syntax tree and calls a " "visitor function for every node found. This function may return a value " @@ -1040,7 +1335,7 @@ msgstr "" "Cette fonction peut renvoyer une valeur qui est transmise par la méthode :" "meth:`visit`." -#: library/ast.rst:1674 +#: library/ast.rst:1688 msgid "" "This class is meant to be subclassed, with the subclass adding visitor " "methods." @@ -1048,7 +1343,7 @@ msgstr "" "Cette classe est faite pour être dérivée, en ajoutant des méthodes de visite " "à la sous-classe." -#: library/ast.rst:1679 +#: library/ast.rst:1693 msgid "" "Visit a node. The default implementation calls the method called :samp:" "`self.visit_{classname}` where *classname* is the name of the node class, " @@ -1058,12 +1353,12 @@ msgstr "" "visit_{classname}` où *classname* représente le nom de la classe du nœud, " "ou :meth:`generic_visit` si cette méthode n'existe pas." -#: library/ast.rst:1685 +#: library/ast.rst:1699 msgid "This visitor calls :meth:`visit` on all children of the node." msgstr "" "Le visiteur appelle la méthode :meth:`visit` de tous les enfants du nœud." -#: library/ast.rst:1687 +#: library/ast.rst:1701 msgid "" "Note that child nodes of nodes that have a custom visitor method won't be " "visited unless the visitor calls :meth:`generic_visit` or visits them itself." @@ -1072,7 +1367,7 @@ msgstr "" "seront pas visités à moins que le visiteur n'appelle la méthode :meth:" "`generic_visit` ou ne les visite lui-même." -#: library/ast.rst:1691 +#: library/ast.rst:1705 msgid "" "Don't use the :class:`NodeVisitor` if you want to apply changes to nodes " "during traversal. For this a special visitor exists (:class:" @@ -1082,15 +1377,20 @@ msgstr "" "changements sur les nœuds lors du parcours. Pour cela, un visiteur spécial " "existe (:class:`NodeTransformer`) qui permet les modifications." -#: library/ast.rst:1697 +#: library/ast.rst:1711 msgid "" "Methods :meth:`visit_Num`, :meth:`visit_Str`, :meth:`visit_Bytes`, :meth:" "`visit_NameConstant` and :meth:`visit_Ellipsis` are deprecated now and will " "not be called in future Python versions. Add the :meth:`visit_Constant` " "method to handle all constant nodes." msgstr "" +"les méthodes :meth:`visit_Num`, :meth:`visit_Str`, :meth:`visit_Bytes`, :" +"meth:`visit_NameConstant` et :meth:`visit_Ellipsis` sont devenues obsolètes " +"et cesseront d'être appelées dans une version ultérieure de Python. Écrivez " +"une méthode :meth:`visit_Constant` pour traiter tous les nœuds qui " +"représentent des valeurs constantes." -#: library/ast.rst:1705 +#: library/ast.rst:1719 msgid "" "A :class:`NodeVisitor` subclass that walks the abstract syntax tree and " "allows modification of nodes." @@ -1098,7 +1398,7 @@ msgstr "" "Une sous-classe :class:`NodeVisitor` qui traverse l'arbre syntaxique " "abstrait et permet les modifications des nœuds." -#: library/ast.rst:1708 +#: library/ast.rst:1722 msgid "" "The :class:`NodeTransformer` will walk the AST and use the return value of " "the visitor methods to replace or remove the old node. If the return value " @@ -1113,7 +1413,7 @@ msgstr "" "valeur de retour peut être le nœud original et dans ce cas, il n'y a pas de " "remplacement. " -#: library/ast.rst:1714 +#: library/ast.rst:1728 msgid "" "Here is an example transformer that rewrites all occurrences of name lookups " "(``foo``) to ``data['foo']``::" @@ -1121,7 +1421,7 @@ msgstr "" "Voici un exemple du *transformer* qui réécrit les occurrences du " "dictionnaire (``foo``) en ``data['foo']`` ::" -#: library/ast.rst:1726 +#: library/ast.rst:1740 msgid "" "Keep in mind that if the node you're operating on has child nodes you must " "either transform the child nodes yourself or call the :meth:`generic_visit` " @@ -1131,7 +1431,7 @@ msgstr "" "enfants, vous devez transformer également ces nœuds enfant vous-même ou " "appeler d'abord la méthode :meth:`generic_visit` sur le nœud." -#: library/ast.rst:1730 +#: library/ast.rst:1744 msgid "" "For nodes that were part of a collection of statements (that applies to all " "statement nodes), the visitor may also return a list of nodes rather than " @@ -1141,20 +1441,23 @@ msgstr "" "s'applique à tous les nœuds instruction), le visiteur peut aussi renvoyer la " "liste des nœuds plutôt qu'un seul nœud." -#: library/ast.rst:1734 +#: library/ast.rst:1748 msgid "" "If :class:`NodeTransformer` introduces new nodes (that weren't part of " "original tree) without giving them location information (such as :attr:" "`lineno`), :func:`fix_missing_locations` should be called with the new sub-" "tree to recalculate the location information::" msgstr "" +"Si :class:`NodeTransformer` ajoute de nouveaux nœuds à l'original sans leur " +"donner les attributs de position dans la source (:attr:`lineno` et " +"consorts), il faut passer le nouvel arbre (ou la nouvelle partie de l'arbre) " +"à :func:`fix_missing_locations` pour calculer les positions manquantes :" -#: library/ast.rst:1742 +#: library/ast.rst:1756 msgid "Usually you use the transformer like this::" msgstr "Utilisation typique du *transformer* ::" -#: library/ast.rst:1749 -#, fuzzy +#: library/ast.rst:1763 msgid "" "Return a formatted dump of the tree in *node*. This is mainly useful for " "debugging purposes. If *annotate_fields* is true (by default), the returned " @@ -1164,99 +1467,124 @@ msgid "" "dumped by default. If this is wanted, *include_attributes* can be set to " "true." msgstr "" -"Renvoie un *dump* formaté de l'arbre dans *node*. C'est principalement utile " -"à des fins de débogage. La chaîne de caractères renvoyée présente les noms " -"et valeurs des champs. Cela rend le code impossible à évaluer, si l'on " -"souhaite évaluer ce code, l'option *annotate_fields* doit être définie comme " -"``False``. Les attributs comme les numéros de ligne et les décalages de " -"colonne ne sont pas récupérés par défaut. Si l'on souhaite les récupérer, " -"l'option *include_attributes* peut être définie comme ``True``." +"Renvoie une représentation sous forme de chaîne de caractères de l'arbre " +"contenu dans *node*. Ceci est principalement utile à des fins de débogage. " +"Par défaut, les champs sont passés comme paramètres nommés aux constructeurs " +"des classes d'arbre syntaxiques. Cependant, si *annotate_fields* est mis à " +"``False``, les valeurs sont passées, lorsque cela est possible, comme " +"arguments positionnels, rendant la représentation plus compacte. Les " +"attributs comme les numéros de lignes et positions sur les lignes sont " +"masqués par défaut, mais on peut les inclure en mettant *include_attributes* " +"à ``True``." -#: library/ast.rst:1757 +#: library/ast.rst:1771 msgid "" "If *indent* is a non-negative integer or string, then the tree will be " -"pretty-printed with that indent level. An indent level of 0, negative, or ``" -"\"\"`` will only insert newlines. ``None`` (the default) selects the single " -"line representation. Using a positive integer indent indents that many " -"spaces per level. If *indent* is a string (such as ``\"\\t\"``), that " +"pretty-printed with that indent level. An indent level of 0, negative, or " +"``\"\"`` will only insert newlines. ``None`` (the default) selects the " +"single line representation. Using a positive integer indent indents that " +"many spaces per level. If *indent* is a string (such as ``\"\\t\"``), that " "string is used to indent each level." msgstr "" +"La représentation peut comprendre une indentation afin d'être plus lisible. " +"Si *indent* est une chaîne de caractères (par exemple une tabulation " +"``\"\\t\"``), elle est insérée au début des lignes en la répétant autant de " +"fois que le niveau d'indentation. Un entier positif équivaut à un certain " +"nombre d'espaces. Un entier strictement négatif produit un effet identique à " +"0 ou la chaîne vide, c'est-à-dire des retours à la ligne sans indentation. " +"Avec la valeur par défaut de ``None``, la sortie tient sur une seule ligne." -#: library/ast.rst:1764 +#: library/ast.rst:1778 msgid "Added the *indent* option." -msgstr "" +msgstr "ajout du paramètre *indent*." -#: library/ast.rst:1771 +#: library/ast.rst:1785 msgid "Compiler Flags" -msgstr "" +msgstr "Options du compilateur" -#: library/ast.rst:1773 +#: library/ast.rst:1787 msgid "" "The following flags may be passed to :func:`compile` in order to change " "effects on the compilation of a program:" msgstr "" +"Les options suivantes sont prises en charge par la fonction :func:`compile`. " +"Elles permettent de modifier le comportement de la compilation." -#: library/ast.rst:1778 +#: library/ast.rst:1792 msgid "" "Enables support for top-level ``await``, ``async for``, ``async with`` and " "async comprehensions." msgstr "" +"Active la reconnaissance de ``await``, ``async for``, ``async with`` et des " +"compréhensions asynchrones au niveau le plus haut." -#: library/ast.rst:1785 +#: library/ast.rst:1799 msgid "" "Generates and returns an abstract syntax tree instead of returning a " "compiled code object." msgstr "" +"Génère et renvoie un arbre syntaxique au lieu d'un objet de code compilé." -#: library/ast.rst:1790 +#: library/ast.rst:1804 msgid "" "Enables support for :pep:`484` and :pep:`526` style type comments (``# type: " "``, ``# type: ignore ``)." msgstr "" +"Ajoute la prise en charge des commentaires de types tels que définis dans " +"la :pep:`484` et la :pep:`526` (``# type: un_type`` et ``# type: ignore``)." -#: library/ast.rst:1799 +#: library/ast.rst:1813 msgid "Command-Line Usage" -msgstr "" +msgstr "Utilisation en ligne de commande." -#: library/ast.rst:1803 +#: library/ast.rst:1817 msgid "" "The :mod:`ast` module can be executed as a script from the command line. It " "is as simple as:" msgstr "" +"Le module :mod:`ast` peut être exécuté en tant que script en ligne de " +"commande. C'est aussi simple que ceci :" -#: library/ast.rst:1810 +#: library/ast.rst:1824 msgid "The following options are accepted:" -msgstr "" +msgstr "Les options suivantes sont acceptées :" -#: library/ast.rst:1816 +#: library/ast.rst:1830 msgid "Show the help message and exit." -msgstr "" +msgstr "Affiche un message d'aide et quitte." -#: library/ast.rst:1821 +#: library/ast.rst:1835 msgid "" "Specify what kind of code must be compiled, like the *mode* argument in :" "func:`parse`." msgstr "" +"Précise le type de code à compiler, comme l'argument *mode* de la fonction :" +"func:`parse`." -#: library/ast.rst:1826 +#: library/ast.rst:1840 msgid "Don't parse type comments." -msgstr "" +msgstr "Désactive la reconnaissance des commentaires de type." -#: library/ast.rst:1830 +#: library/ast.rst:1844 msgid "Include attributes such as line numbers and column offsets." msgstr "" +"Affiche les attributs comme les numéros de lignes et les décalages par " +"rapport aux débuts des lignes." -#: library/ast.rst:1835 +#: library/ast.rst:1849 msgid "Indentation of nodes in AST (number of spaces)." -msgstr "" +msgstr "Nombre d'espaces pour chaque niveau d'indentation dans la sortie." -#: library/ast.rst:1837 +#: library/ast.rst:1851 msgid "" "If :file:`infile` is specified its contents are parsed to AST and dumped to " "stdout. Otherwise, the content is read from stdin." msgstr "" +"L'entrée est lue dans le fichier :file:`infile`, s'il est donné, ou l'entrée " +"standard sinon. Le code source est transformé en un arbre syntaxique, qui " +"est affiché sur la sortie standard." -#: library/ast.rst:1843 +#: library/ast.rst:1857 msgid "" "`Green Tree Snakes `_, an external " "documentation resource, has good details on working with Python ASTs." @@ -1265,32 +1593,45 @@ msgstr "" "ressource documentaire externe, qui possède plus de détails pour travailler " "avec des ASTs Python." -#: library/ast.rst:1846 +#: library/ast.rst:1860 msgid "" "`ASTTokens `_ " "annotates Python ASTs with the positions of tokens and text in the source " "code that generated them. This is helpful for tools that make source code " "transformations." msgstr "" +"`ASTTokens `_ " +"annote les arbres syntaxiques Python avec les positions des lexèmes et les " +"extraits de code source à partir desquels ils sont produits. Ceci est utile " +"pour les outils qui transforment du code source." -#: library/ast.rst:1851 +#: library/ast.rst:1865 msgid "" "`leoAst.py `_ unifies the " "token-based and parse-tree-based views of python programs by inserting two-" "way links between tokens and ast nodes." msgstr "" -#: library/ast.rst:1855 +#: library/ast.rst:1869 msgid "" "`LibCST `_ parses code as a Concrete Syntax " "Tree that looks like an ast tree and keeps all formatting details. It's " "useful for building automated refactoring (codemod) applications and linters." msgstr "" +"`LibCST `_ produit à partir du code source " +"des arbres syntaxiques concrets, qui ressemblent à leurs homologues " +"abstraits et conservent tous les détails du formatage. Cette bibliothèque " +"est utile aux outils de réusinage et d'analyse de code." -#: library/ast.rst:1860 +#: library/ast.rst:1874 msgid "" "`Parso `_ is a Python parser that supports " "error recovery and round-trip parsing for different Python versions (in " "multiple Python versions). Parso is also able to list multiple syntax errors " "in your python file." msgstr "" +"`Parso `_ est un analyseur syntaxique de code " +"Python qui gère la récupération d'erreurs et la génération de code (de " +"l'arbre syntaxique vers le code source), le tout pour les grammaires de " +"différentes versions de Python et en utilisant différentes versions. Il sait " +"également donner plusieurs erreurs de syntaxe en une seule fois." diff --git a/library/asynchat.po b/library/asynchat.po index 0cdb440a7a..a4d87d3d3b 100644 --- a/library/asynchat.po +++ b/library/asynchat.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-10-06 17:04+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -21,15 +21,17 @@ msgstr "" ":mod:`asynchat` --- Gestionnaire d'interfaces de connexion (*socket*) " "commande/réponse asynchrones" -#: library/asynchat.rst:10 +#: library/asynchat.rst:11 msgid "**Source code:** :source:`Lib/asynchat.py`" msgstr "*Code source :** :source:`Lib/asynchat.py`" -#: library/asynchat.rst:12 -msgid "Please use :mod:`asyncio` instead." -msgstr "Utilisez :mod:`asyncio` à la place." +#: library/asynchat.rst:13 +msgid "" +":mod:`asynchat` will be removed in Python 3.12 (see :pep:`PEP 594 " +"<594#asynchat>` for details). Please use :mod:`asyncio` instead." +msgstr "" -#: library/asynchat.rst:19 +#: library/asynchat.rst:22 msgid "" "This module exists for backwards compatibility only. For new code we " "recommend using :mod:`asyncio`." @@ -37,7 +39,7 @@ msgstr "" "Ce module n'existe que pour des raisons de rétrocompatibilité. Pour du code " "nouveau, l'utilisation de :mod:`asyncio` est recommandée." -#: library/asynchat.rst:22 +#: library/asynchat.rst:25 msgid "" "This module builds on the :mod:`asyncore` infrastructure, simplifying " "asynchronous clients and servers and making it easier to handle protocols " @@ -64,7 +66,7 @@ msgstr "" "d'objets :class:`asynchat.async_chat` à la réception de requêtes de " "connexion." -#: library/asynchat.rst:37 +#: library/asynchat.rst:40 msgid "" "This class is an abstract subclass of :class:`asyncore.dispatcher`. To make " "practical use of the code you must subclass :class:`async_chat`, providing " @@ -79,7 +81,7 @@ msgstr "" "de :class:`asyncore.dispatcher` peuvent être utilisées, même si toutes " "n'ont pas de sens dans un contexte de messages/réponse." -#: library/asynchat.rst:44 +#: library/asynchat.rst:47 msgid "" "Like :class:`asyncore.dispatcher`, :class:`async_chat` defines a set of " "events that are generated by an analysis of socket conditions after a :c:" @@ -94,7 +96,7 @@ msgstr "" "objets :class:`async_chat` sont appelées par le *framework* de traitement " "d’événements sans que le programmeur n'ait à le spécifier." -#: library/asynchat.rst:50 +#: library/asynchat.rst:53 msgid "" "Two class attributes can be modified, to improve performance, or possibly " "even to conserve memory." @@ -102,15 +104,15 @@ msgstr "" "Deux attributs de classe peuvent être modifiés, pour améliorer la " "performance, ou potentiellement pour économiser de la mémoire." -#: library/asynchat.rst:56 +#: library/asynchat.rst:59 msgid "The asynchronous input buffer size (default ``4096``)." msgstr "La taille du tampon d'entrées asynchrones (``4096`` par défaut)." -#: library/asynchat.rst:61 +#: library/asynchat.rst:64 msgid "The asynchronous output buffer size (default ``4096``)." msgstr "La taille du tampon de sorties asynchrones (``4096`` par défaut)." -#: library/asynchat.rst:63 +#: library/asynchat.rst:66 msgid "" "Unlike :class:`asyncore.dispatcher`, :class:`async_chat` allows you to " "define a :abbr:`FIFO (first-in, first-out)` queue of *producers*. A producer " @@ -137,7 +139,7 @@ msgstr "" "d'un point d'arrêt, dans in transmission entrante depuis le point d’accès " "distant." -#: library/asynchat.rst:76 +#: library/asynchat.rst:79 msgid "" "To build a functioning :class:`async_chat` subclass your input methods :" "meth:`collect_incoming_data` and :meth:`found_terminator` must handle the " @@ -149,7 +151,7 @@ msgstr "" "`found_terminator` doivent gérer la donnée que le canal reçoit de manière " "asynchrone. Ces méthodes sont décrites ci-dessous." -#: library/asynchat.rst:84 +#: library/asynchat.rst:87 msgid "" "Pushes a ``None`` on to the producer queue. When this producer is popped off " "the queue it causes the channel to be closed." @@ -157,7 +159,7 @@ msgstr "" "Pousse un ``None`` sur la pile de producteurs. Quand ce producteur est " "récupéré dans la queue, le canal est fermé." -#: library/asynchat.rst:90 +#: library/asynchat.rst:93 msgid "" "Called with *data* holding an arbitrary amount of received data. The " "default method, which must be overridden, raises a :exc:" @@ -166,7 +168,7 @@ msgstr "" "Appelé avec *data* contenant une quantité arbitraire de données. La méthode " "par défaut, qui doit être écrasée, lève une :exc:`NotImplementedError`." -#: library/asynchat.rst:97 +#: library/asynchat.rst:100 msgid "" "In emergencies this method will discard any data held in the input and/or " "output buffers and the producer queue." @@ -174,7 +176,7 @@ msgstr "" "En cas d'urgence, cette méthode va supprimer tout donnée présente dans les " "tampons d'entrée et/ou de sortie dans la queue de producteurs." -#: library/asynchat.rst:103 +#: library/asynchat.rst:106 msgid "" "Called when the incoming data stream matches the termination condition set " "by :meth:`set_terminator`. The default method, which must be overridden, " @@ -186,11 +188,11 @@ msgstr "" "lève une :exc:`NotImplementedError`. Les données entrantes mise en tampon " "devraient être disponible via un attribut de l'instance." -#: library/asynchat.rst:111 +#: library/asynchat.rst:114 msgid "Returns the current terminator for the channel." msgstr "Renvoie le terminateur courant pour le canal." -#: library/asynchat.rst:116 +#: library/asynchat.rst:119 msgid "" "Pushes data on to the channel's queue to ensure its transmission. This is " "all you need to do to have the channel write the data out to the network, " @@ -203,7 +205,7 @@ msgstr "" "schémas plus complexes qui implémentent de la cryptographie et du *chunking* " "par exemple." -#: library/asynchat.rst:124 +#: library/asynchat.rst:127 msgid "" "Takes a producer object and adds it to the producer queue associated with " "the channel. When all currently-pushed producers have been exhausted the " @@ -215,7 +217,7 @@ msgstr "" "canal consomme les données de ce producteur en appelant sa méthode :meth:" "`more` et envoie les données au point d’accès distant." -#: library/asynchat.rst:132 +#: library/asynchat.rst:135 msgid "" "Sets the terminating condition to be recognized on the channel. ``term`` " "may be any of three types of value, corresponding to three different ways to " @@ -225,19 +227,19 @@ msgstr "" "n'importe lequel des trois types de valeurs, correspondant aux trois " "différentes manières de gérer les données entrantes." -#: library/asynchat.rst:137 +#: library/asynchat.rst:140 msgid "term" msgstr "*term*" -#: library/asynchat.rst:137 +#: library/asynchat.rst:140 msgid "Description" msgstr "Description" -#: library/asynchat.rst:139 +#: library/asynchat.rst:142 msgid "*string*" msgstr "*string*" -#: library/asynchat.rst:139 +#: library/asynchat.rst:142 msgid "" "Will call :meth:`found_terminator` when the string is found in the input " "stream" @@ -245,11 +247,11 @@ msgstr "" "Appellera :meth:`found_terminator` quand la chaîne est trouvée dans le flux " "d'entré" -#: library/asynchat.rst:142 +#: library/asynchat.rst:145 msgid "*integer*" msgstr "*integer*" -#: library/asynchat.rst:142 +#: library/asynchat.rst:145 msgid "" "Will call :meth:`found_terminator` when the indicated number of characters " "have been received" @@ -257,15 +259,15 @@ msgstr "" "Appellera :meth:`found_terminator` quand le nombre de caractère indiqué à " "été reçu" -#: library/asynchat.rst:146 +#: library/asynchat.rst:149 msgid "``None``" msgstr "``None``" -#: library/asynchat.rst:146 +#: library/asynchat.rst:149 msgid "The channel continues to collect data forever" msgstr "Le canal continue de collecter des informations indéfiniment" -#: library/asynchat.rst:150 +#: library/asynchat.rst:153 msgid "" "Note that any data following the terminator will be available for reading by " "the channel after :meth:`found_terminator` is called." @@ -273,11 +275,11 @@ msgstr "" "Notez que toute donnée située après le marqueur de fin sera accessible en " "lecture par le canal après que :meth:`found_terminator` ai été appelé." -#: library/asynchat.rst:157 +#: library/asynchat.rst:160 msgid "asynchat Example" msgstr "Exemple *asynchat*" -#: library/asynchat.rst:159 +#: library/asynchat.rst:162 msgid "" "The following partial example shows how HTTP requests can be read with :" "class:`async_chat`. A web server might create an :class:" @@ -293,7 +295,7 @@ msgstr "" "lignes vides à la fin des entêtes HTTP, et une option indique que les " "entêtes sont en train d'être lues." -#: library/asynchat.rst:166 +#: library/asynchat.rst:169 msgid "" "Once the headers have been read, if the request is of type POST (indicating " "that further data are present in the input stream) then the ``Content-Length:" @@ -305,7 +307,7 @@ msgstr "" "alors l'entête ``Content-Length:`` est utilisé pour définir un marqueur de " "fin numérique pour lire la bonne quantité de donné depuis le canal." -#: library/asynchat.rst:171 +#: library/asynchat.rst:174 msgid "" "The :meth:`handle_request` method is called once all relevant input has been " "marshalled, after setting the channel terminator to ``None`` to ensure that " @@ -315,3 +317,6 @@ msgstr "" "données pertinentes ont été rassemblées, après avoir définit le marqueur de " "fin à ``None`` pour s'assurer que toute données étrangères envoyées par le " "client web sont ignorées. ::" + +#~ msgid "Please use :mod:`asyncio` instead." +#~ msgstr "Utilisez :mod:`asyncio` à la place." diff --git a/library/asyncio-api-index.po b/library/asyncio-api-index.po index 0a5d13a1c0..37f2a80255 100644 --- a/library/asyncio-api-index.po +++ b/library/asyncio-api-index.po @@ -43,7 +43,7 @@ msgstr "" #: library/asyncio-api-index.rst:24 msgid ":func:`create_task`" -msgstr "" +msgstr ":func:`create_task`" #: library/asyncio-api-index.rst:25 msgid "Start an asyncio Task." @@ -91,7 +91,7 @@ msgstr "" #: library/asyncio-api-index.rst:42 msgid ":func:`current_task`" -msgstr "" +msgstr ":func:`current_task`" #: library/asyncio-api-index.rst:43 msgid "Return the current Task." @@ -99,7 +99,7 @@ msgstr "" #: library/asyncio-api-index.rst:45 msgid ":func:`all_tasks`" -msgstr "" +msgstr ":func:`all_tasks`" #: library/asyncio-api-index.rst:46 msgid "Return all tasks for an event loop." @@ -107,7 +107,7 @@ msgstr "" #: library/asyncio-api-index.rst:48 msgid ":class:`Task`" -msgstr "" +msgstr ":class:`Task`" #: library/asyncio-api-index.rst:49 msgid "Task object." @@ -124,7 +124,7 @@ msgstr "" #: library/asyncio-api-index.rst:54 msgid ":func:`run_coroutine_threadsafe`" -msgstr "" +msgstr ":func:`run_coroutine_threadsafe`" #: library/asyncio-api-index.rst:55 msgid "Schedule a coroutine from another OS thread." @@ -226,7 +226,7 @@ msgstr "" #: library/asyncio-api-index.rst:115 msgid "Create a subprocess." -msgstr "" +msgstr "Crée un sous-processus." #: library/asyncio-api-index.rst:117 msgid "``await`` :func:`create_subprocess_shell`" @@ -286,7 +286,7 @@ msgstr "" #: library/asyncio-api-index.rst:150 msgid ":class:`StreamReader`" -msgstr "" +msgstr ":class:`StreamReader`" #: library/asyncio-api-index.rst:151 msgid "High-level async/await object to receive network data." @@ -294,7 +294,7 @@ msgstr "" #: library/asyncio-api-index.rst:153 msgid ":class:`StreamWriter`" -msgstr "" +msgstr ":class:`StreamWriter`" #: library/asyncio-api-index.rst:154 msgid "High-level async/await object to send network data." @@ -383,7 +383,7 @@ msgstr "" #: library/asyncio-api-index.rst:211 msgid ":exc:`asyncio.CancelledError`" -msgstr "" +msgstr ":exc:`asyncio.CancelledError`" #: library/asyncio-api-index.rst:212 msgid "Raised when a Task is cancelled. See also :meth:`Task.cancel`." diff --git a/library/asyncio-dev.po b/library/asyncio-dev.po index 4787e5fd19..d41e0f0455 100644 --- a/library/asyncio-dev.po +++ b/library/asyncio-dev.po @@ -23,45 +23,54 @@ msgid "" "Asynchronous programming is different from classic \"sequential\" " "programming." msgstr "" +"La programmation asynchrone est différente de la programmation " +"« séquentielle » classique." #: library/asyncio-dev.rst:12 msgid "" "This page lists common mistakes and traps and explains how to avoid them." msgstr "" +"Cette page liste les pièges et erreurs communs que le développeur pourrait " +"rencontrer et décrit comment les éviter." #: library/asyncio-dev.rst:19 msgid "Debug Mode" -msgstr "" +msgstr "Mode débogage" #: library/asyncio-dev.rst:21 msgid "" "By default asyncio runs in production mode. In order to ease the " "development asyncio has a *debug mode*." msgstr "" +"Par défaut, *asyncio* s'exécute en mode production. Pour faciliter le " +"développement, *asyncio* possède un « mode débogage »." #: library/asyncio-dev.rst:24 msgid "There are several ways to enable asyncio debug mode:" -msgstr "" +msgstr "Il existe plusieurs façons d'activer le mode débogage de *asyncio* :" #: library/asyncio-dev.rst:26 msgid "Setting the :envvar:`PYTHONASYNCIODEBUG` environment variable to ``1``." msgstr "" +"en réglant la variable d’environnement :envvar:`PYTHONASYNCIODEBUG` à ``1`` ;" #: library/asyncio-dev.rst:28 msgid "Using the :ref:`Python Development Mode `." msgstr "" +"en utilisant le mode développement de Python (:ref:`Python Development Mode " +"`) ;" #: library/asyncio-dev.rst:30 msgid "Passing ``debug=True`` to :func:`asyncio.run`." -msgstr "" +msgstr "en passant ``debug=True`` à la fonction :func:`asyncio.run` ;" #: library/asyncio-dev.rst:32 msgid "Calling :meth:`loop.set_debug`." -msgstr "" +msgstr "en appelant la méthode :meth:`loop.set_debug`." #: library/asyncio-dev.rst:34 msgid "In addition to enabling the debug mode, consider also:" -msgstr "" +msgstr "En plus d'activer le mode débogage, vous pouvez également :" #: library/asyncio-dev.rst:36 msgid "" @@ -69,6 +78,10 @@ msgid "" "data:`logging.DEBUG`, for example the following snippet of code can be run " "at startup of the application::" msgstr "" +"régler le niveau de journalisation pour l'enregistreur d'*asyncio* (:ref:" +"`asyncio logger `) à :py:data:`logging.DEBUG` ; par exemple, " +"le fragment de code suivant peut être exécuté au démarrage de " +"l'application ::" #: library/asyncio-dev.rst:42 msgid "" @@ -76,10 +89,13 @@ msgid "" "warnings. One way of doing that is by using the :option:`-W` ``default`` " "command line option." msgstr "" +"configurer le module :mod:`warnings` afin d'afficher les avertissements de " +"type :exc:`ResourceWarning` ; vous pouvez faire cela en utilisant l'option :" +"option:`-W` ``default`` sur la ligne de commande." #: library/asyncio-dev.rst:47 msgid "When the debug mode is enabled:" -msgstr "" +msgstr "Lorsque le mode débogage est activé :" #: library/asyncio-dev.rst:49 msgid "" @@ -87,6 +103,9 @@ msgid "" "not-scheduled>` and logs them; this mitigates the \"forgotten await\" " "pitfall." msgstr "" +"*asyncio* surveille les :ref:`coroutines qui ne sont jamais attendues " +"` et les journalise ; cela atténue le " +"problème des « *await* oubliés » ;" #: library/asyncio-dev.rst:53 msgid "" @@ -94,12 +113,18 @@ msgid "" "`loop.call_at` methods) raise an exception if they are called from a wrong " "thread." msgstr "" +"beaucoup d'*API* *asyncio* ne prenant pas en charge les fils d'exécution " +"multiples (comme les méthodes :meth:`loop.call_soon` et :meth:`loop." +"call_at`) lèvent une exception si elles sont appelées par le mauvais fil " +"d’exécution ;" #: library/asyncio-dev.rst:57 msgid "" "The execution time of the I/O selector is logged if it takes too long to " "perform an I/O operation." msgstr "" +"le temps d'exécution du sélecteur d'entrée-sortie est journalisé si une " +"opération prend trop de temps à s'effectuer ;" #: library/asyncio-dev.rst:60 msgid "" @@ -120,12 +145,21 @@ msgid "" "``await`` expression, the running Task gets suspended, and the event loop " "executes the next Task." msgstr "" +"Une boucle d'évènements s'exécute dans un fil d’exécution (typiquement dans " +"le fil principal) et traite toutes les fonctions de rappel (*callbacks*) " +"ainsi que toutes les tâches dans ce même fil. Lorsqu'une tâche est en cours " +"d'exécution dans la boucle d'évènements, aucune autre tâche ne peut " +"s'exécuter dans ce fil. Quand une tâche traite une expression ``await``, " +"elle se suspend et laisse la boucle d’évènements traiter la tâche suivante." #: library/asyncio-dev.rst:76 msgid "" "To schedule a :term:`callback` from another OS thread, the :meth:`loop." "call_soon_threadsafe` method should be used. Example::" msgstr "" +"Pour planifier un :term:`rappel ` depuis un autre fil d'exécution " +"système, utilisez la méthode :meth:`loop.call_soon_threadsafe`. Par " +"exemple ::" #: library/asyncio-dev.rst:81 msgid "" @@ -134,6 +168,12 @@ msgid "" "a callback. If there's a need for such code to call a low-level asyncio " "API, the :meth:`loop.call_soon_threadsafe` method should be used, e.g.::" msgstr "" +"La plupart des objets *asyncio* ne sont pas conçus pour être exécutés dans " +"un contexte multi-fils (*thread-safe*) mais cela n'est en général pas un " +"problème à moins que l'objet ne fasse appel à du code se trouvant en dehors " +"d'une tâche ou d'une fonction de rappel. Dans ce dernier cas, si le code " +"appelle les *API* bas niveau de *asyncio*, utilisez la méthode :meth:`loop." +"call_soon_threadsafe`. Par exemple ::" #: library/asyncio-dev.rst:89 msgid "" @@ -141,12 +181,17 @@ msgid "" "`run_coroutine_threadsafe` function should be used. It returns a :class:" "`concurrent.futures.Future` to access the result::" msgstr "" +"Pour planifier un objet concurrent depuis un autre fil d'exécution système, " +"utilisez :func:`run_coroutine_threadsafe`. Cette fonction renvoie un objet :" +"class:`concurrent.futures.Future` pour accéder au résultat ::" #: library/asyncio-dev.rst:102 msgid "" "To handle signals and to execute subprocesses, the event loop must be run in " "the main thread." msgstr "" +"Pour pouvoir traiter les signaux et démarrer des processus enfants, la " +"boucle d'évènements doit être exécutée dans le fil principal." #: library/asyncio-dev.rst:105 msgid "" @@ -155,6 +200,10 @@ msgid "" "different OS thread without blocking the OS thread that the event loop runs " "in." msgstr "" +"La méthode :meth:`loop.run_in_executor` peut être utilisée avec :class:" +"`concurrent.futures.ThreadPoolExecutor` pour exécuter du code bloquant dans " +"un autre fil d'exécution, afin de ne pas bloquer le fil où la boucle " +"d'évènements se trouve." #: library/asyncio-dev.rst:110 msgid "" @@ -171,7 +220,7 @@ msgstr "" #: library/asyncio-dev.rst:124 msgid "Running Blocking Code" -msgstr "" +msgstr "Exécution de code bloquant" #: library/asyncio-dev.rst:126 msgid "" @@ -179,6 +228,11 @@ msgid "" "function performs a CPU-intensive calculation for 1 second, all concurrent " "asyncio Tasks and IO operations would be delayed by 1 second." msgstr "" +"Du code bloquant sur des opérations de calcul (*CPU-bound*) ne devrait pas " +"être appelé directement. Par exemple, si une fonction effectue des calculs " +"utilisant le CPU intensivement pendant une seconde, toutes les tâches " +"*asyncio* concurrentes et les opérations d'entrées-sorties seront bloquées " +"pour une seconde." #: library/asyncio-dev.rst:131 msgid "" @@ -186,6 +240,10 @@ msgid "" "different process to avoid blocking the OS thread with the event loop. See " "the :meth:`loop.run_in_executor` method for more details." msgstr "" +"Un exécuteur peut être utilisé pour traiter une tâche dans un fil " +"d'exécution ou un processus différent, afin d'éviter de bloquer le fil " +"d'exécution système dans lequel se trouve la boucle d’évènements. Voir :meth:" +"`loop.run_in_executor` pour plus de détails." #: library/asyncio-dev.rst:140 msgid "Logging" @@ -196,16 +254,20 @@ msgid "" "asyncio uses the :mod:`logging` module and all logging is performed via the " "``\"asyncio\"`` logger." msgstr "" +"*Asyncio* utilise le module :mod:`logging`. Toutes les opérations de " +"journalisation sont effectuées via l'enregistreur (*logger*) ``\"asyncio\"``." #: library/asyncio-dev.rst:145 msgid "" "The default log level is :py:data:`logging.INFO`, which can be easily " "adjusted::" msgstr "" +"Le niveau de journalisation par défaut est :py:data:`logging.INFO` mais peut " +"être ajusté facilement ::" #: library/asyncio-dev.rst:154 msgid "Detect never-awaited coroutines" -msgstr "" +msgstr "Détection des coroutines jamais attendues" #: library/asyncio-dev.rst:156 msgid "" @@ -213,6 +275,10 @@ msgid "" "instead of ``await coro()``) or the coroutine is not scheduled with :meth:" "`asyncio.create_task`, asyncio will emit a :exc:`RuntimeWarning`::" msgstr "" +"Lorsqu'une fonction coroutine est appelée mais qu'elle n'est pas attendue " +"(p. ex. ``coro()`` au lieu de ``await coro()``) ou si la coroutine n'est " +"pas planifiée avec :meth:`asyncio.create_task`, *asyncio* émet un :exc:" +"`RuntimeWarning` ::" #: library/asyncio-dev.rst:216 msgid "Output::" @@ -227,10 +293,12 @@ msgid "" "The usual fix is to either await the coroutine or call the :meth:`asyncio." "create_task` function::" msgstr "" +"La façon habituelle de régler ce problème est d'attendre (*await*) la " +"coroutine ou bien d'appeler la fonction :meth:`asyncio.create_task` ::" #: library/asyncio-dev.rst:197 msgid "Detect never-retrieved exceptions" -msgstr "" +msgstr "Détection des exceptions jamais récupérées" #: library/asyncio-dev.rst:199 msgid "" @@ -239,13 +307,19 @@ msgid "" "this case, asyncio would emit a log message when the Future object is " "garbage collected." msgstr "" +"Si la méthode :meth:`Future.set_exception` est appelée mais que l'objet " +"*Future* n'est pas attendu, l'exception n'est pas propagée au code " +"utilisateur. Dans ce cas, *asyncio* écrit un message dans le journal lorsque " +"l'objet *Future* est récupéré par le ramasse-miette." #: library/asyncio-dev.rst:204 msgid "Example of an unhandled exception::" -msgstr "" +msgstr "Exemple d'une exception non-gérée ::" #: library/asyncio-dev.rst:227 msgid "" ":ref:`Enable the debug mode ` to get the traceback where " "the task was created::" msgstr "" +":ref:`Activez le mode débogage ` pour récupérer la trace " +"d'appels indiquant où la tâche a été créée ::" diff --git a/library/asyncio-eventloop.po b/library/asyncio-eventloop.po index fb25af6243..1396383b1a 100644 --- a/library/asyncio-eventloop.po +++ b/library/asyncio-eventloop.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-06-10 15:50+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -95,8 +95,8 @@ msgid "Set *loop* as a current event loop for the current OS thread." msgstr "" #: library/asyncio-eventloop.rst:62 -msgid "Create a new event loop object." -msgstr "" +msgid "Create and return a new event loop object." +msgstr "Crée et renvoie un nouvel objet de boucle d'événements." #: library/asyncio-eventloop.rst:64 msgid "" @@ -240,8 +240,8 @@ msgid "" "used." msgstr "" -#: library/asyncio-eventloop.rst:166 library/asyncio-eventloop.rst:1074 -#: library/asyncio-eventloop.rst:1456 +#: library/asyncio-eventloop.rst:166 library/asyncio-eventloop.rst:1083 +#: library/asyncio-eventloop.rst:1469 msgid "Example::" msgstr "Exemple ::" @@ -269,12 +269,15 @@ msgid "" "callback will be called exactly once." msgstr "" -#: library/asyncio-eventloop.rst:200 library/asyncio-eventloop.rst:263 +#: library/asyncio-eventloop.rst:200 library/asyncio-eventloop.rst:267 msgid "" "An optional keyword-only *context* argument allows specifying a custom :" "class:`contextvars.Context` for the *callback* to run in. The current " "context is used when no *context* is provided." msgstr "" +"L'argument nommé optionnel *context* permet de spécifier une classe :class:" +"`contextvars.Context` personnalisée dans laquelle la fonction de rappel " +"s’exécutera. Le contexte actuel est utilisé si *context* n'est pas fourni." #: library/asyncio-eventloop.rst:204 msgid "" @@ -294,147 +297,154 @@ msgstr "" #: library/asyncio-eventloop.rst:214 msgid "" +"Raises :exc:`RuntimeError` if called on a loop that's been closed. This can " +"happen on a secondary thread when the main application is shutting down." +msgstr "" + +#: library/asyncio-eventloop.rst:218 +msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." msgstr "" "Voir la section :ref:`exécution concurrente et multi-fils d'exécution " "` de la documentation." -#: library/asyncio-eventloop.rst:217 library/asyncio-eventloop.rst:267 -#: library/asyncio-eventloop.rst:287 +#: library/asyncio-eventloop.rst:221 library/asyncio-eventloop.rst:271 +#: library/asyncio-eventloop.rst:291 msgid "" "The *context* keyword-only parameter was added. See :pep:`567` for more " "details." msgstr "" +"Ajout de l'argument nommé *context*. Voir :pep:`567` pour plus de détails." -#: library/asyncio-eventloop.rst:225 +#: library/asyncio-eventloop.rst:229 msgid "" "Most :mod:`asyncio` scheduling functions don't allow passing keyword " "arguments. To do that, use :func:`functools.partial`::" msgstr "" -#: library/asyncio-eventloop.rst:232 +#: library/asyncio-eventloop.rst:236 msgid "" "Using partial objects is usually more convenient than using lambdas, as " "asyncio can render partial objects better in debug and error messages." msgstr "" -#: library/asyncio-eventloop.rst:240 +#: library/asyncio-eventloop.rst:244 msgid "Scheduling delayed callbacks" msgstr "" -#: library/asyncio-eventloop.rst:242 +#: library/asyncio-eventloop.rst:246 msgid "" "Event loop provides mechanisms to schedule callback functions to be called " "at some point in the future. Event loop uses monotonic clocks to track time." msgstr "" -#: library/asyncio-eventloop.rst:249 +#: library/asyncio-eventloop.rst:253 msgid "" "Schedule *callback* to be called after the given *delay* number of seconds " "(can be either an int or a float)." msgstr "" -#: library/asyncio-eventloop.rst:252 library/asyncio-eventloop.rst:284 +#: library/asyncio-eventloop.rst:256 library/asyncio-eventloop.rst:288 msgid "" "An instance of :class:`asyncio.TimerHandle` is returned which can be used to " "cancel the callback." msgstr "" -#: library/asyncio-eventloop.rst:255 +#: library/asyncio-eventloop.rst:259 msgid "" "*callback* will be called exactly once. If two callbacks are scheduled for " "exactly the same time, the order in which they are called is undefined." msgstr "" -#: library/asyncio-eventloop.rst:259 +#: library/asyncio-eventloop.rst:263 msgid "" "The optional positional *args* will be passed to the callback when it is " "called. If you want the callback to be called with keyword arguments use :" "func:`functools.partial`." msgstr "" -#: library/asyncio-eventloop.rst:271 +#: library/asyncio-eventloop.rst:275 msgid "" "In Python 3.7 and earlier with the default event loop implementation, the " "*delay* could not exceed one day. This has been fixed in Python 3.8." msgstr "" -#: library/asyncio-eventloop.rst:278 +#: library/asyncio-eventloop.rst:282 msgid "" "Schedule *callback* to be called at the given absolute timestamp *when* (an " "int or a float), using the same time reference as :meth:`loop.time`." msgstr "" -#: library/asyncio-eventloop.rst:282 +#: library/asyncio-eventloop.rst:286 msgid "This method's behavior is the same as :meth:`call_later`." msgstr "" -#: library/asyncio-eventloop.rst:291 +#: library/asyncio-eventloop.rst:295 msgid "" "In Python 3.7 and earlier with the default event loop implementation, the " "difference between *when* and the current time could not exceed one day. " "This has been fixed in Python 3.8." msgstr "" -#: library/asyncio-eventloop.rst:298 +#: library/asyncio-eventloop.rst:302 msgid "" "Return the current time, as a :class:`float` value, according to the event " "loop's internal monotonic clock." msgstr "" -#: library/asyncio-eventloop.rst:302 +#: library/asyncio-eventloop.rst:306 msgid "" "In Python 3.7 and earlier timeouts (relative *delay* or absolute *when*) " "should not exceed one day. This has been fixed in Python 3.8." msgstr "" -#: library/asyncio-eventloop.rst:308 +#: library/asyncio-eventloop.rst:312 msgid "The :func:`asyncio.sleep` function." msgstr "La fonction :func:`asyncio.sleep`." -#: library/asyncio-eventloop.rst:312 +#: library/asyncio-eventloop.rst:316 msgid "Creating Futures and Tasks" msgstr "" -#: library/asyncio-eventloop.rst:316 +#: library/asyncio-eventloop.rst:320 msgid "Create an :class:`asyncio.Future` object attached to the event loop." msgstr "" -#: library/asyncio-eventloop.rst:318 +#: library/asyncio-eventloop.rst:322 msgid "" "This is the preferred way to create Futures in asyncio. This lets third-" "party event loops provide alternative implementations of the Future object " "(with better performance or instrumentation)." msgstr "" -#: library/asyncio-eventloop.rst:326 +#: library/asyncio-eventloop.rst:330 msgid "" "Schedule the execution of a :ref:`coroutine`. Return a :class:`Task` object." msgstr "" -#: library/asyncio-eventloop.rst:329 +#: library/asyncio-eventloop.rst:333 msgid "" "Third-party event loops can use their own subclass of :class:`Task` for " "interoperability. In this case, the result type is a subclass of :class:" "`Task`." msgstr "" -#: library/asyncio-eventloop.rst:333 +#: library/asyncio-eventloop.rst:337 msgid "" "If the *name* argument is provided and not ``None``, it is set as the name " "of the task using :meth:`Task.set_name`." msgstr "" -#: library/asyncio-eventloop.rst:336 +#: library/asyncio-eventloop.rst:340 msgid "Added the ``name`` parameter." -msgstr "" +msgstr "ajout du paramètre ``name``." -#: library/asyncio-eventloop.rst:341 +#: library/asyncio-eventloop.rst:345 msgid "Set a task factory that will be used by :meth:`loop.create_task`." msgstr "" -#: library/asyncio-eventloop.rst:344 +#: library/asyncio-eventloop.rst:348 msgid "" "If *factory* is ``None`` the default task factory will be set. Otherwise, " "*factory* must be a *callable* with the signature matching ``(loop, coro)``, " @@ -443,80 +453,80 @@ msgid "" "compatible object." msgstr "" -#: library/asyncio-eventloop.rst:352 +#: library/asyncio-eventloop.rst:356 msgid "Return a task factory or ``None`` if the default one is in use." msgstr "" -#: library/asyncio-eventloop.rst:356 +#: library/asyncio-eventloop.rst:360 msgid "Opening network connections" msgstr "Créer des connexions" -#: library/asyncio-eventloop.rst:365 +#: library/asyncio-eventloop.rst:369 msgid "" "Open a streaming transport connection to a given address specified by *host* " "and *port*." msgstr "" -#: library/asyncio-eventloop.rst:368 +#: library/asyncio-eventloop.rst:372 msgid "" "The socket family can be either :py:data:`~socket.AF_INET` or :py:data:" "`~socket.AF_INET6` depending on *host* (or the *family* argument, if " "provided)." msgstr "" -#: library/asyncio-eventloop.rst:372 +#: library/asyncio-eventloop.rst:376 msgid "The socket type will be :py:data:`~socket.SOCK_STREAM`." msgstr "" -#: library/asyncio-eventloop.rst:374 library/asyncio-eventloop.rst:990 -#: library/asyncio-eventloop.rst:1006 +#: library/asyncio-eventloop.rst:378 library/asyncio-eventloop.rst:999 +#: library/asyncio-eventloop.rst:1015 msgid "" "*protocol_factory* must be a callable returning an :ref:`asyncio protocol " "` implementation." msgstr "" -#: library/asyncio-eventloop.rst:377 +#: library/asyncio-eventloop.rst:381 msgid "" "This method will try to establish the connection in the background. When " "successful, it returns a ``(transport, protocol)`` pair." msgstr "" -#: library/asyncio-eventloop.rst:380 +#: library/asyncio-eventloop.rst:384 msgid "The chronological synopsis of the underlying operation is as follows:" msgstr "" -#: library/asyncio-eventloop.rst:382 +#: library/asyncio-eventloop.rst:386 msgid "" "The connection is established and a :ref:`transport ` is " "created for it." msgstr "" -#: library/asyncio-eventloop.rst:385 +#: library/asyncio-eventloop.rst:389 msgid "" "*protocol_factory* is called without arguments and is expected to return a :" "ref:`protocol ` instance." msgstr "" -#: library/asyncio-eventloop.rst:388 +#: library/asyncio-eventloop.rst:392 msgid "" "The protocol instance is coupled with the transport by calling its :meth:" "`~BaseProtocol.connection_made` method." msgstr "" -#: library/asyncio-eventloop.rst:391 +#: library/asyncio-eventloop.rst:395 msgid "A ``(transport, protocol)`` tuple is returned on success." msgstr "" -#: library/asyncio-eventloop.rst:393 +#: library/asyncio-eventloop.rst:397 msgid "" "The created transport is an implementation-dependent bidirectional stream." msgstr "" -#: library/asyncio-eventloop.rst:396 library/asyncio-eventloop.rst:518 +#: library/asyncio-eventloop.rst:400 library/asyncio-eventloop.rst:522 msgid "Other arguments:" msgstr "" -#: library/asyncio-eventloop.rst:398 +#: library/asyncio-eventloop.rst:402 msgid "" "*ssl*: if given and not false, a SSL/TLS transport is created (by default a " "plain TCP transport is created). If *ssl* is a :class:`ssl.SSLContext` " @@ -525,11 +535,11 @@ msgid "" "is used." msgstr "" -#: library/asyncio-eventloop.rst:404 +#: library/asyncio-eventloop.rst:408 msgid ":ref:`SSL/TLS security considerations `" msgstr "" -#: library/asyncio-eventloop.rst:406 +#: library/asyncio-eventloop.rst:410 msgid "" "*server_hostname* sets or overrides the hostname that the target server's " "certificate will be matched against. Should only be passed if *ssl* is not " @@ -540,7 +550,7 @@ msgid "" "potential man-in-the-middle attacks)." msgstr "" -#: library/asyncio-eventloop.rst:414 +#: library/asyncio-eventloop.rst:418 msgid "" "*family*, *proto*, *flags* are the optional address family, protocol and " "flags to be passed through to getaddrinfo() for *host* resolution. If given, " @@ -548,28 +558,28 @@ msgid "" "constants." msgstr "" -#: library/asyncio-eventloop.rst:419 +#: library/asyncio-eventloop.rst:423 msgid "" "*happy_eyeballs_delay*, if given, enables Happy Eyeballs for this " "connection. It should be a floating-point number representing the amount of " "time in seconds to wait for a connection attempt to complete, before " -"starting the next attempt in parallel. This is the \"Connection Attempt Delay" -"\" as defined in :rfc:`8305`. A sensible default value recommended by the " -"RFC is ``0.25`` (250 milliseconds)." +"starting the next attempt in parallel. This is the \"Connection Attempt " +"Delay\" as defined in :rfc:`8305`. A sensible default value recommended by " +"the RFC is ``0.25`` (250 milliseconds)." msgstr "" -#: library/asyncio-eventloop.rst:427 +#: library/asyncio-eventloop.rst:431 msgid "" "*interleave* controls address reordering when a host name resolves to " "multiple IP addresses. If ``0`` or unspecified, no reordering is done, and " "addresses are tried in the order returned by :meth:`getaddrinfo`. If a " "positive integer is specified, the addresses are interleaved by address " -"family, and the given integer is interpreted as \"First Address Family Count" -"\" as defined in :rfc:`8305`. The default is ``0`` if *happy_eyeballs_delay* " -"is not specified, and ``1`` if it is." +"family, and the given integer is interpreted as \"First Address Family " +"Count\" as defined in :rfc:`8305`. The default is ``0`` if " +"*happy_eyeballs_delay* is not specified, and ``1`` if it is." msgstr "" -#: library/asyncio-eventloop.rst:436 +#: library/asyncio-eventloop.rst:440 msgid "" "*sock*, if given, should be an existing, already connected :class:`socket." "socket` object to be used by the transport. If *sock* is given, none of " @@ -577,25 +587,25 @@ msgid "" "*interleave* and *local_addr* should be specified." msgstr "" -#: library/asyncio-eventloop.rst:442 +#: library/asyncio-eventloop.rst:446 msgid "" "*local_addr*, if given, is a ``(local_host, local_port)`` tuple used to bind " -"the socket to locally. The *local_host* and *local_port* are looked up " -"using ``getaddrinfo()``, similarly to *host* and *port*." +"the socket locally. The *local_host* and *local_port* are looked up using " +"``getaddrinfo()``, similarly to *host* and *port*." msgstr "" -#: library/asyncio-eventloop.rst:446 library/asyncio-eventloop.rst:799 +#: library/asyncio-eventloop.rst:450 library/asyncio-eventloop.rst:808 msgid "" "*ssl_handshake_timeout* is (for a TLS connection) the time in seconds to " "wait for the TLS handshake to complete before aborting the connection. " "``60.0`` seconds if ``None`` (default)." msgstr "" -#: library/asyncio-eventloop.rst:452 +#: library/asyncio-eventloop.rst:456 msgid "Added the *happy_eyeballs_delay* and *interleave* parameters." msgstr "" -#: library/asyncio-eventloop.rst:454 +#: library/asyncio-eventloop.rst:458 msgid "" "Happy Eyeballs Algorithm: Success with Dual-Stack Hosts. When a server's " "IPv4 path and protocol are working, but the server's IPv6 path and protocol " @@ -606,47 +616,47 @@ msgid "" "visible delay and provides an algorithm." msgstr "" -#: library/asyncio-eventloop.rst:463 +#: library/asyncio-eventloop.rst:467 msgid "For more information: https://tools.ietf.org/html/rfc6555" msgstr "" -#: library/asyncio-eventloop.rst:467 library/asyncio-eventloop.rst:584 -#: library/asyncio-eventloop.rst:737 +#: library/asyncio-eventloop.rst:471 library/asyncio-eventloop.rst:588 +#: library/asyncio-eventloop.rst:746 msgid "The *ssl_handshake_timeout* parameter." msgstr "" -#: library/asyncio-eventloop.rst:471 library/asyncio-eventloop.rst:667 +#: library/asyncio-eventloop.rst:475 library/asyncio-eventloop.rst:676 msgid "" "The socket option :py:data:`~socket.TCP_NODELAY` is set by default for all " "TCP connections." msgstr "" -#: library/asyncio-eventloop.rst:476 library/asyncio-eventloop.rst:672 +#: library/asyncio-eventloop.rst:480 library/asyncio-eventloop.rst:681 msgid "Added support for SSL/TLS in :class:`ProactorEventLoop`." msgstr "" -#: library/asyncio-eventloop.rst:480 +#: library/asyncio-eventloop.rst:484 msgid "" "The :func:`open_connection` function is a high-level alternative API. It " "returns a pair of (:class:`StreamReader`, :class:`StreamWriter`) that can be " "used directly in async/await code." msgstr "" -#: library/asyncio-eventloop.rst:491 +#: library/asyncio-eventloop.rst:495 msgid "" "The parameter *reuse_address* is no longer supported, as using :py:data:" "`~sockets.SO_REUSEADDR` poses a significant security concern for UDP. " "Explicitly passing ``reuse_address=True`` will raise an exception." msgstr "" -#: library/asyncio-eventloop.rst:495 +#: library/asyncio-eventloop.rst:499 msgid "" "When multiple processes with differing UIDs assign sockets to an identical " "UDP socket address with ``SO_REUSEADDR``, incoming packets can become " "randomly distributed among the sockets." msgstr "" -#: library/asyncio-eventloop.rst:499 +#: library/asyncio-eventloop.rst:503 msgid "" "For supported platforms, *reuse_port* can be used as a replacement for " "similar functionality. With *reuse_port*, :py:data:`~sockets.SO_REUSEPORT` " @@ -654,47 +664,47 @@ msgid "" "from assigning sockets to the same socket address." msgstr "" -#: library/asyncio-eventloop.rst:505 +#: library/asyncio-eventloop.rst:509 msgid "Create a datagram connection." msgstr "Créer une connexion par datagramme" -#: library/asyncio-eventloop.rst:507 +#: library/asyncio-eventloop.rst:511 msgid "" "The socket family can be either :py:data:`~socket.AF_INET`, :py:data:" "`~socket.AF_INET6`, or :py:data:`~socket.AF_UNIX`, depending on *host* (or " "the *family* argument, if provided)." msgstr "" -#: library/asyncio-eventloop.rst:511 +#: library/asyncio-eventloop.rst:515 msgid "The socket type will be :py:data:`~socket.SOCK_DGRAM`." msgstr "" -#: library/asyncio-eventloop.rst:513 library/asyncio-eventloop.rst:609 -#: library/asyncio-eventloop.rst:720 +#: library/asyncio-eventloop.rst:517 library/asyncio-eventloop.rst:613 +#: library/asyncio-eventloop.rst:729 msgid "" "*protocol_factory* must be a callable returning a :ref:`protocol ` implementation." msgstr "" -#: library/asyncio-eventloop.rst:516 library/asyncio-eventloop.rst:570 +#: library/asyncio-eventloop.rst:520 library/asyncio-eventloop.rst:574 msgid "A tuple of ``(transport, protocol)`` is returned on success." msgstr "" -#: library/asyncio-eventloop.rst:520 +#: library/asyncio-eventloop.rst:524 msgid "" "*local_addr*, if given, is a ``(local_host, local_port)`` tuple used to bind " -"the socket to locally. The *local_host* and *local_port* are looked up " -"using :meth:`getaddrinfo`." +"the socket locally. The *local_host* and *local_port* are looked up using :" +"meth:`getaddrinfo`." msgstr "" -#: library/asyncio-eventloop.rst:524 +#: library/asyncio-eventloop.rst:528 msgid "" "*remote_addr*, if given, is a ``(remote_host, remote_port)`` tuple used to " "connect the socket to a remote address. The *remote_host* and *remote_port* " "are looked up using :meth:`getaddrinfo`." msgstr "" -#: library/asyncio-eventloop.rst:528 +#: library/asyncio-eventloop.rst:532 msgid "" "*family*, *proto*, *flags* are the optional address family, protocol and " "flags to be passed through to :meth:`getaddrinfo` for *host* resolution. If " @@ -702,7 +712,7 @@ msgid "" "module constants." msgstr "" -#: library/asyncio-eventloop.rst:533 +#: library/asyncio-eventloop.rst:537 msgid "" "*reuse_port* tells the kernel to allow this endpoint to be bound to the same " "port as other existing endpoints are bound to, so long as they all set this " @@ -711,13 +721,13 @@ msgid "" "this capability is unsupported." msgstr "" -#: library/asyncio-eventloop.rst:539 +#: library/asyncio-eventloop.rst:543 msgid "" "*allow_broadcast* tells the kernel to allow this endpoint to send messages " "to the broadcast address." msgstr "" -#: library/asyncio-eventloop.rst:542 +#: library/asyncio-eventloop.rst:546 msgid "" "*sock* can optionally be specified in order to use a preexisting, already " "connected, :class:`socket.socket` object to be used by the transport. If " @@ -725,155 +735,163 @@ msgid "" "`None`)." msgstr "" -#: library/asyncio-eventloop.rst:547 +#: library/asyncio-eventloop.rst:551 msgid "" "See :ref:`UDP echo client protocol ` and :" "ref:`UDP echo server protocol ` examples." msgstr "" -#: library/asyncio-eventloop.rst:550 +#: library/asyncio-eventloop.rst:554 msgid "" "The *family*, *proto*, *flags*, *reuse_address*, *reuse_port, " "*allow_broadcast*, and *sock* parameters were added." msgstr "" -#: library/asyncio-eventloop.rst:554 +#: library/asyncio-eventloop.rst:558 msgid "" "The *reuse_address* parameter is no longer supported due to security " "concerns." msgstr "" -#: library/asyncio-eventloop.rst:558 +#: library/asyncio-eventloop.rst:562 msgid "Added support for Windows." msgstr "Prise en charge sur Windows." -#: library/asyncio-eventloop.rst:565 +#: library/asyncio-eventloop.rst:569 msgid "Create a Unix connection." msgstr "Créer une connexion Unix" -#: library/asyncio-eventloop.rst:567 +#: library/asyncio-eventloop.rst:571 msgid "" "The socket family will be :py:data:`~socket.AF_UNIX`; socket type will be :" "py:data:`~socket.SOCK_STREAM`." msgstr "" -#: library/asyncio-eventloop.rst:572 +#: library/asyncio-eventloop.rst:576 msgid "" "*path* is the name of a Unix domain socket and is required, unless a *sock* " "parameter is specified. Abstract Unix sockets, :class:`str`, :class:" "`bytes`, and :class:`~pathlib.Path` paths are supported." msgstr "" -#: library/asyncio-eventloop.rst:577 +#: library/asyncio-eventloop.rst:581 msgid "" "See the documentation of the :meth:`loop.create_connection` method for " "information about arguments to this method." msgstr "" -#: library/asyncio-eventloop.rst:581 library/asyncio-eventloop.rst:701 -#: library/asyncio-eventloop.rst:1057 +#: library/asyncio-eventloop.rst:585 library/asyncio-eventloop.rst:710 +#: library/asyncio-eventloop.rst:1066 msgid ":ref:`Availability `: Unix." msgstr ":ref:`Disponibilité ` : Unix." -#: library/asyncio-eventloop.rst:588 +#: library/asyncio-eventloop.rst:592 msgid "The *path* parameter can now be a :term:`path-like object`." msgstr "" -#: library/asyncio-eventloop.rst:592 +#: library/asyncio-eventloop.rst:596 msgid "Creating network servers" msgstr "Créer des serveurs" -#: library/asyncio-eventloop.rst:602 +#: library/asyncio-eventloop.rst:606 msgid "" "Create a TCP server (socket type :data:`~socket.SOCK_STREAM`) listening on " "*port* of the *host* address." msgstr "" -#: library/asyncio-eventloop.rst:605 +#: library/asyncio-eventloop.rst:609 msgid "Returns a :class:`Server` object." msgstr "" -#: library/asyncio-eventloop.rst:607 +#: library/asyncio-eventloop.rst:611 #, fuzzy msgid "Arguments:" msgstr "Arguments" -#: library/asyncio-eventloop.rst:612 +#: library/asyncio-eventloop.rst:616 msgid "" "The *host* parameter can be set to several types which determine where the " "server would be listening:" msgstr "" -#: library/asyncio-eventloop.rst:615 +#: library/asyncio-eventloop.rst:619 msgid "" "If *host* is a string, the TCP server is bound to a single network interface " "specified by *host*." msgstr "" -#: library/asyncio-eventloop.rst:618 +#: library/asyncio-eventloop.rst:622 msgid "" "If *host* is a sequence of strings, the TCP server is bound to all network " "interfaces specified by the sequence." msgstr "" -#: library/asyncio-eventloop.rst:621 +#: library/asyncio-eventloop.rst:625 msgid "" "If *host* is an empty string or ``None``, all interfaces are assumed and a " "list of multiple sockets will be returned (most likely one for IPv4 and " "another one for IPv6)." msgstr "" -#: library/asyncio-eventloop.rst:625 +#: library/asyncio-eventloop.rst:629 +msgid "" +"The *port* parameter can be set to specify which port the server should " +"listen on. If ``0`` or ``None`` (the default), a random unused port will be " +"selected (note that if *host* resolves to multiple network interfaces, a " +"different random port will be selected for each interface)." +msgstr "" + +#: library/asyncio-eventloop.rst:634 msgid "" "*family* can be set to either :data:`socket.AF_INET` or :data:`~socket." "AF_INET6` to force the socket to use IPv4 or IPv6. If not set, the *family* " "will be determined from host name (defaults to :data:`~socket.AF_UNSPEC`)." msgstr "" -#: library/asyncio-eventloop.rst:630 +#: library/asyncio-eventloop.rst:639 msgid "*flags* is a bitmask for :meth:`getaddrinfo`." msgstr "*flags* est un masque de bits pour :meth:`getaddrinfo`." -#: library/asyncio-eventloop.rst:632 +#: library/asyncio-eventloop.rst:641 msgid "" "*sock* can optionally be specified in order to use a preexisting socket " "object. If specified, *host* and *port* must not be specified." msgstr "" -#: library/asyncio-eventloop.rst:635 +#: library/asyncio-eventloop.rst:644 msgid "" "*backlog* is the maximum number of queued connections passed to :meth:" "`~socket.socket.listen` (defaults to 100)." msgstr "" -#: library/asyncio-eventloop.rst:638 +#: library/asyncio-eventloop.rst:647 msgid "" "*ssl* can be set to an :class:`~ssl.SSLContext` instance to enable TLS over " "the accepted connections." msgstr "" -#: library/asyncio-eventloop.rst:641 +#: library/asyncio-eventloop.rst:650 msgid "" "*reuse_address* tells the kernel to reuse a local socket in ``TIME_WAIT`` " "state, without waiting for its natural timeout to expire. If not specified " "will automatically be set to ``True`` on Unix." msgstr "" -#: library/asyncio-eventloop.rst:646 +#: library/asyncio-eventloop.rst:655 msgid "" "*reuse_port* tells the kernel to allow this endpoint to be bound to the same " "port as other existing endpoints are bound to, so long as they all set this " "flag when being created. This option is not supported on Windows." msgstr "" -#: library/asyncio-eventloop.rst:651 +#: library/asyncio-eventloop.rst:660 msgid "" "*ssl_handshake_timeout* is (for a TLS server) the time in seconds to wait " "for the TLS handshake to complete before aborting the connection. ``60.0`` " "seconds if ``None`` (default)." msgstr "" -#: library/asyncio-eventloop.rst:655 +#: library/asyncio-eventloop.rst:664 msgid "" "*start_serving* set to ``True`` (the default) causes the created server to " "start accepting connections immediately. When set to ``False``, the user " @@ -881,103 +899,103 @@ msgid "" "to make the server to start accepting connections." msgstr "" -#: library/asyncio-eventloop.rst:663 +#: library/asyncio-eventloop.rst:672 msgid "Added *ssl_handshake_timeout* and *start_serving* parameters." msgstr "" -#: library/asyncio-eventloop.rst:676 +#: library/asyncio-eventloop.rst:685 msgid "The *host* parameter can be a sequence of strings." msgstr "" -#: library/asyncio-eventloop.rst:680 +#: library/asyncio-eventloop.rst:689 msgid "" "The :func:`start_server` function is a higher-level alternative API that " "returns a pair of :class:`StreamReader` and :class:`StreamWriter` that can " "be used in an async/await code." msgstr "" -#: library/asyncio-eventloop.rst:689 +#: library/asyncio-eventloop.rst:698 msgid "" "Similar to :meth:`loop.create_server` but works with the :py:data:`~socket." "AF_UNIX` socket family." msgstr "" -#: library/asyncio-eventloop.rst:692 +#: library/asyncio-eventloop.rst:701 msgid "" "*path* is the name of a Unix domain socket, and is required, unless a *sock* " "argument is provided. Abstract Unix sockets, :class:`str`, :class:`bytes`, " "and :class:`~pathlib.Path` paths are supported." msgstr "" -#: library/asyncio-eventloop.rst:697 +#: library/asyncio-eventloop.rst:706 msgid "" "See the documentation of the :meth:`loop.create_server` method for " "information about arguments to this method." msgstr "" -#: library/asyncio-eventloop.rst:704 +#: library/asyncio-eventloop.rst:713 msgid "The *ssl_handshake_timeout* and *start_serving* parameters." msgstr "" -#: library/asyncio-eventloop.rst:708 +#: library/asyncio-eventloop.rst:717 msgid "The *path* parameter can now be a :class:`~pathlib.Path` object." msgstr "" -#: library/asyncio-eventloop.rst:713 +#: library/asyncio-eventloop.rst:722 msgid "Wrap an already accepted connection into a transport/protocol pair." msgstr "" -#: library/asyncio-eventloop.rst:715 +#: library/asyncio-eventloop.rst:724 msgid "" "This method can be used by servers that accept connections outside of " "asyncio but that use asyncio to handle them." msgstr "" -#: library/asyncio-eventloop.rst:718 library/asyncio-eventloop.rst:785 +#: library/asyncio-eventloop.rst:727 library/asyncio-eventloop.rst:794 msgid "Parameters:" msgstr "Paramètres :" -#: library/asyncio-eventloop.rst:723 +#: library/asyncio-eventloop.rst:732 msgid "" "*sock* is a preexisting socket object returned from :meth:`socket.accept " "`." msgstr "" -#: library/asyncio-eventloop.rst:726 +#: library/asyncio-eventloop.rst:735 msgid "" "*ssl* can be set to an :class:`~ssl.SSLContext` to enable SSL over the " "accepted connections." msgstr "" -#: library/asyncio-eventloop.rst:729 +#: library/asyncio-eventloop.rst:738 msgid "" "*ssl_handshake_timeout* is (for an SSL connection) the time in seconds to " "wait for the SSL handshake to complete before aborting the connection. " "``60.0`` seconds if ``None`` (default)." msgstr "" -#: library/asyncio-eventloop.rst:733 +#: library/asyncio-eventloop.rst:742 msgid "Returns a ``(transport, protocol)`` pair." msgstr "" -#: library/asyncio-eventloop.rst:743 +#: library/asyncio-eventloop.rst:752 msgid "Transferring files" msgstr "" -#: library/asyncio-eventloop.rst:748 +#: library/asyncio-eventloop.rst:757 msgid "" "Send a *file* over a *transport*. Return the total number of bytes sent." msgstr "" -#: library/asyncio-eventloop.rst:751 +#: library/asyncio-eventloop.rst:760 msgid "The method uses high-performance :meth:`os.sendfile` if available." msgstr "" -#: library/asyncio-eventloop.rst:753 +#: library/asyncio-eventloop.rst:762 msgid "*file* must be a regular file object opened in binary mode." msgstr "" -#: library/asyncio-eventloop.rst:755 library/asyncio-eventloop.rst:945 +#: library/asyncio-eventloop.rst:764 library/asyncio-eventloop.rst:954 msgid "" "*offset* tells from where to start reading the file. If specified, *count* " "is the total number of bytes to transmit as opposed to sending the file " @@ -986,97 +1004,97 @@ msgid "" "obtain the actual number of bytes sent." msgstr "" -#: library/asyncio-eventloop.rst:762 +#: library/asyncio-eventloop.rst:771 msgid "" "*fallback* set to ``True`` makes asyncio to manually read and send the file " "when the platform does not support the sendfile system call (e.g. Windows or " "SSL socket on Unix)." msgstr "" -#: library/asyncio-eventloop.rst:766 +#: library/asyncio-eventloop.rst:775 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support the " "*sendfile* syscall and *fallback* is ``False``." msgstr "" -#: library/asyncio-eventloop.rst:773 +#: library/asyncio-eventloop.rst:782 msgid "TLS Upgrade" msgstr "" -#: library/asyncio-eventloop.rst:779 +#: library/asyncio-eventloop.rst:788 msgid "Upgrade an existing transport-based connection to TLS." msgstr "Convertit une connexion existante en connexion TLS." -#: library/asyncio-eventloop.rst:781 +#: library/asyncio-eventloop.rst:790 msgid "" "Return a new transport instance, that the *protocol* must start using " "immediately after the *await*. The *transport* instance passed to the " "*start_tls* method should never be used again." msgstr "" -#: library/asyncio-eventloop.rst:787 +#: library/asyncio-eventloop.rst:796 msgid "" "*transport* and *protocol* instances that methods like :meth:`~loop." "create_server` and :meth:`~loop.create_connection` return." msgstr "" -#: library/asyncio-eventloop.rst:791 +#: library/asyncio-eventloop.rst:800 msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." msgstr "" -#: library/asyncio-eventloop.rst:793 +#: library/asyncio-eventloop.rst:802 msgid "" "*server_side* pass ``True`` when a server-side connection is being upgraded " "(like the one created by :meth:`~loop.create_server`)." msgstr "" -#: library/asyncio-eventloop.rst:796 +#: library/asyncio-eventloop.rst:805 msgid "" "*server_hostname*: sets or overrides the host name that the target server's " "certificate will be matched against." msgstr "" -#: library/asyncio-eventloop.rst:807 +#: library/asyncio-eventloop.rst:816 msgid "Watching file descriptors" msgstr "Surveiller des descripteurs de fichiers" -#: library/asyncio-eventloop.rst:811 +#: library/asyncio-eventloop.rst:820 msgid "" "Start monitoring the *fd* file descriptor for read availability and invoke " "*callback* with the specified arguments once *fd* is available for reading." msgstr "" -#: library/asyncio-eventloop.rst:817 +#: library/asyncio-eventloop.rst:826 msgid "Stop monitoring the *fd* file descriptor for read availability." msgstr "" -#: library/asyncio-eventloop.rst:821 +#: library/asyncio-eventloop.rst:830 msgid "" "Start monitoring the *fd* file descriptor for write availability and invoke " "*callback* with the specified arguments once *fd* is available for writing." msgstr "" -#: library/asyncio-eventloop.rst:825 library/asyncio-eventloop.rst:1044 +#: library/asyncio-eventloop.rst:834 library/asyncio-eventloop.rst:1053 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *callback*." msgstr "" -#: library/asyncio-eventloop.rst:830 +#: library/asyncio-eventloop.rst:839 msgid "Stop monitoring the *fd* file descriptor for write availability." msgstr "" -#: library/asyncio-eventloop.rst:832 +#: library/asyncio-eventloop.rst:841 msgid "" "See also :ref:`Platform Support ` section for some " "limitations of these methods." msgstr "" -#: library/asyncio-eventloop.rst:837 +#: library/asyncio-eventloop.rst:846 msgid "Working with socket objects directly" msgstr "" -#: library/asyncio-eventloop.rst:839 +#: library/asyncio-eventloop.rst:848 msgid "" "In general, protocol implementations that use transport-based APIs such as :" "meth:`loop.create_connection` and :meth:`loop.create_server` are faster than " @@ -1085,46 +1103,46 @@ msgid "" "socket` objects directly is more convenient." msgstr "" -#: library/asyncio-eventloop.rst:848 +#: library/asyncio-eventloop.rst:857 msgid "" "Receive up to *nbytes* from *sock*. Asynchronous version of :meth:`socket." "recv() `." msgstr "" -#: library/asyncio-eventloop.rst:851 +#: library/asyncio-eventloop.rst:860 msgid "Return the received data as a bytes object." msgstr "" -#: library/asyncio-eventloop.rst:853 library/asyncio-eventloop.rst:867 -#: library/asyncio-eventloop.rst:882 library/asyncio-eventloop.rst:895 -#: library/asyncio-eventloop.rst:921 library/asyncio-eventloop.rst:959 +#: library/asyncio-eventloop.rst:862 library/asyncio-eventloop.rst:876 +#: library/asyncio-eventloop.rst:891 library/asyncio-eventloop.rst:904 +#: library/asyncio-eventloop.rst:930 library/asyncio-eventloop.rst:968 msgid "*sock* must be a non-blocking socket." msgstr "Le connecteur *sock* ne doit pas être bloquant." -#: library/asyncio-eventloop.rst:855 +#: library/asyncio-eventloop.rst:864 msgid "" "Even though this method was always documented as a coroutine method, " "releases before Python 3.7 returned a :class:`Future`. Since Python 3.7 this " "is an ``async def`` method." msgstr "" -#: library/asyncio-eventloop.rst:862 +#: library/asyncio-eventloop.rst:871 msgid "" "Receive data from *sock* into the *buf* buffer. Modeled after the blocking :" "meth:`socket.recv_into() ` method." msgstr "" -#: library/asyncio-eventloop.rst:865 +#: library/asyncio-eventloop.rst:874 msgid "Return the number of bytes written to the buffer." msgstr "" -#: library/asyncio-eventloop.rst:873 +#: library/asyncio-eventloop.rst:882 msgid "" "Send *data* to the *sock* socket. Asynchronous version of :meth:`socket." "sendall() `." msgstr "" -#: library/asyncio-eventloop.rst:876 +#: library/asyncio-eventloop.rst:885 msgid "" "This method continues to send to the socket until either all data in *data* " "has been sent or an error occurs. ``None`` is returned on success. On " @@ -1133,23 +1151,23 @@ msgid "" "the connection." msgstr "" -#: library/asyncio-eventloop.rst:884 +#: library/asyncio-eventloop.rst:893 msgid "" "Even though the method was always documented as a coroutine method, before " "Python 3.7 it returned an :class:`Future`. Since Python 3.7, this is an " "``async def`` method." msgstr "" -#: library/asyncio-eventloop.rst:891 +#: library/asyncio-eventloop.rst:900 msgid "Connect *sock* to a remote socket at *address*." msgstr "" -#: library/asyncio-eventloop.rst:893 +#: library/asyncio-eventloop.rst:902 msgid "" "Asynchronous version of :meth:`socket.connect() `." msgstr "" -#: library/asyncio-eventloop.rst:897 +#: library/asyncio-eventloop.rst:906 msgid "" "``address`` no longer needs to be resolved. ``sock_connect`` will try to " "check if the *address* is already resolved by calling :func:`socket." @@ -1157,19 +1175,19 @@ msgid "" "*address*." msgstr "" -#: library/asyncio-eventloop.rst:906 +#: library/asyncio-eventloop.rst:915 msgid "" ":meth:`loop.create_connection` and :func:`asyncio.open_connection() " "`." msgstr "" -#: library/asyncio-eventloop.rst:912 +#: library/asyncio-eventloop.rst:921 msgid "" "Accept a connection. Modeled after the blocking :meth:`socket.accept() " "` method." msgstr "" -#: library/asyncio-eventloop.rst:915 +#: library/asyncio-eventloop.rst:924 msgid "" "The socket must be bound to an address and listening for connections. The " "return value is a pair ``(conn, address)`` where *conn* is a *new* socket " @@ -1177,64 +1195,64 @@ msgid "" "the address bound to the socket on the other end of the connection." msgstr "" -#: library/asyncio-eventloop.rst:923 +#: library/asyncio-eventloop.rst:932 msgid "" "Even though the method was always documented as a coroutine method, before " "Python 3.7 it returned a :class:`Future`. Since Python 3.7, this is an " "``async def`` method." msgstr "" -#: library/asyncio-eventloop.rst:930 +#: library/asyncio-eventloop.rst:939 msgid ":meth:`loop.create_server` and :func:`start_server`." msgstr "" -#: library/asyncio-eventloop.rst:935 +#: library/asyncio-eventloop.rst:944 msgid "" "Send a file using high-performance :mod:`os.sendfile` if possible. Return " "the total number of bytes sent." msgstr "" -#: library/asyncio-eventloop.rst:938 +#: library/asyncio-eventloop.rst:947 msgid "" "Asynchronous version of :meth:`socket.sendfile() `." msgstr "" -#: library/asyncio-eventloop.rst:940 +#: library/asyncio-eventloop.rst:949 msgid "" "*sock* must be a non-blocking :const:`socket.SOCK_STREAM` :class:`~socket." "socket`." msgstr "" -#: library/asyncio-eventloop.rst:943 +#: library/asyncio-eventloop.rst:952 msgid "*file* must be a regular file object open in binary mode." msgstr "" -#: library/asyncio-eventloop.rst:952 +#: library/asyncio-eventloop.rst:961 msgid "" "*fallback*, when set to ``True``, makes asyncio manually read and send the " "file when the platform does not support the sendfile syscall (e.g. Windows " "or SSL socket on Unix)." msgstr "" -#: library/asyncio-eventloop.rst:956 +#: library/asyncio-eventloop.rst:965 msgid "" "Raise :exc:`SendfileNotAvailableError` if the system does not support " "*sendfile* syscall and *fallback* is ``False``." msgstr "" -#: library/asyncio-eventloop.rst:965 +#: library/asyncio-eventloop.rst:974 msgid "DNS" msgstr "" -#: library/asyncio-eventloop.rst:970 +#: library/asyncio-eventloop.rst:979 msgid "Asynchronous version of :meth:`socket.getaddrinfo`." msgstr "" -#: library/asyncio-eventloop.rst:974 +#: library/asyncio-eventloop.rst:983 msgid "Asynchronous version of :meth:`socket.getnameinfo`." msgstr "" -#: library/asyncio-eventloop.rst:976 +#: library/asyncio-eventloop.rst:985 msgid "" "Both *getaddrinfo* and *getnameinfo* methods were always documented to " "return a coroutine, but prior to Python 3.7 they were, in fact, returning :" @@ -1242,67 +1260,67 @@ msgid "" "coroutines." msgstr "" -#: library/asyncio-eventloop.rst:984 +#: library/asyncio-eventloop.rst:993 msgid "Working with pipes" msgstr "" -#: library/asyncio-eventloop.rst:988 +#: library/asyncio-eventloop.rst:997 msgid "Register the read end of *pipe* in the event loop." msgstr "" "Branche l'extrémité en lecture du tube *pipe* à la boucle d'évènements." -#: library/asyncio-eventloop.rst:993 +#: library/asyncio-eventloop.rst:1002 msgid "*pipe* is a :term:`file-like object `." msgstr "" -#: library/asyncio-eventloop.rst:995 +#: library/asyncio-eventloop.rst:1004 msgid "" "Return pair ``(transport, protocol)``, where *transport* supports the :class:" "`ReadTransport` interface and *protocol* is an object instantiated by the " "*protocol_factory*." msgstr "" -#: library/asyncio-eventloop.rst:999 library/asyncio-eventloop.rst:1015 +#: library/asyncio-eventloop.rst:1008 library/asyncio-eventloop.rst:1024 msgid "" "With :class:`SelectorEventLoop` event loop, the *pipe* is set to non-" "blocking mode." msgstr "" -#: library/asyncio-eventloop.rst:1004 +#: library/asyncio-eventloop.rst:1013 msgid "Register the write end of *pipe* in the event loop." msgstr "Branche l'extrémité en écriture de *pipe* à la boucle d'évènements." -#: library/asyncio-eventloop.rst:1009 +#: library/asyncio-eventloop.rst:1018 msgid "*pipe* is :term:`file-like object `." msgstr "" -#: library/asyncio-eventloop.rst:1011 +#: library/asyncio-eventloop.rst:1020 msgid "" "Return pair ``(transport, protocol)``, where *transport* supports :class:" "`WriteTransport` interface and *protocol* is an object instantiated by the " "*protocol_factory*." msgstr "" -#: library/asyncio-eventloop.rst:1020 +#: library/asyncio-eventloop.rst:1029 msgid "" ":class:`SelectorEventLoop` does not support the above methods on Windows. " "Use :class:`ProactorEventLoop` instead for Windows." msgstr "" -#: library/asyncio-eventloop.rst:1025 +#: library/asyncio-eventloop.rst:1034 msgid "" "The :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` methods." msgstr "" -#: library/asyncio-eventloop.rst:1030 +#: library/asyncio-eventloop.rst:1039 msgid "Unix signals" msgstr "Signaux Unix" -#: library/asyncio-eventloop.rst:1034 +#: library/asyncio-eventloop.rst:1043 msgid "Set *callback* as the handler for the *signum* signal." msgstr "" -#: library/asyncio-eventloop.rst:1036 +#: library/asyncio-eventloop.rst:1045 msgid "" "The callback will be invoked by *loop*, along with other queued callbacks " "and runnable coroutines of that event loop. Unlike signal handlers " @@ -1310,56 +1328,56 @@ msgid "" "function is allowed to interact with the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1041 +#: library/asyncio-eventloop.rst:1050 msgid "" "Raise :exc:`ValueError` if the signal number is invalid or uncatchable. " "Raise :exc:`RuntimeError` if there is a problem setting up the handler." msgstr "" -#: library/asyncio-eventloop.rst:1047 +#: library/asyncio-eventloop.rst:1056 msgid "" "Like :func:`signal.signal`, this function must be invoked in the main thread." msgstr "" -#: library/asyncio-eventloop.rst:1052 +#: library/asyncio-eventloop.rst:1061 msgid "Remove the handler for the *sig* signal." msgstr "Supprime le gestionnaire du signal *sig*." -#: library/asyncio-eventloop.rst:1054 +#: library/asyncio-eventloop.rst:1063 msgid "" "Return ``True`` if the signal handler was removed, or ``False`` if no " "handler was set for the given signal." msgstr "" -#: library/asyncio-eventloop.rst:1061 +#: library/asyncio-eventloop.rst:1070 msgid "The :mod:`signal` module." msgstr "Le module :mod:`signal`." -#: library/asyncio-eventloop.rst:1065 +#: library/asyncio-eventloop.rst:1074 msgid "Executing code in thread or process pools" msgstr "" -#: library/asyncio-eventloop.rst:1069 +#: library/asyncio-eventloop.rst:1078 msgid "Arrange for *func* to be called in the specified executor." msgstr "" -#: library/asyncio-eventloop.rst:1071 +#: library/asyncio-eventloop.rst:1080 msgid "" "The *executor* argument should be an :class:`concurrent.futures.Executor` " "instance. The default executor is used if *executor* is ``None``." msgstr "" -#: library/asyncio-eventloop.rst:1115 +#: library/asyncio-eventloop.rst:1124 msgid "This method returns a :class:`asyncio.Future` object." msgstr "" -#: library/asyncio-eventloop.rst:1117 +#: library/asyncio-eventloop.rst:1126 msgid "" "Use :func:`functools.partial` :ref:`to pass keyword arguments ` to *func*." msgstr "" -#: library/asyncio-eventloop.rst:1120 +#: library/asyncio-eventloop.rst:1129 msgid "" ":meth:`loop.run_in_executor` no longer configures the ``max_workers`` of the " "thread pool executor it creates, instead leaving it up to the thread pool " @@ -1367,38 +1385,38 @@ msgid "" "default." msgstr "" -#: library/asyncio-eventloop.rst:1129 +#: library/asyncio-eventloop.rst:1138 msgid "" "Set *executor* as the default executor used by :meth:`run_in_executor`. " "*executor* should be an instance of :class:`~concurrent.futures." "ThreadPoolExecutor`." msgstr "" -#: library/asyncio-eventloop.rst:1133 +#: library/asyncio-eventloop.rst:1142 msgid "" "Using an executor that is not an instance of :class:`~concurrent.futures." "ThreadPoolExecutor` is deprecated and will trigger an error in Python 3.9." msgstr "" -#: library/asyncio-eventloop.rst:1138 +#: library/asyncio-eventloop.rst:1147 msgid "" "*executor* must be an instance of :class:`concurrent.futures." "ThreadPoolExecutor`." msgstr "" -#: library/asyncio-eventloop.rst:1143 +#: library/asyncio-eventloop.rst:1152 msgid "Error Handling API" msgstr "API de gestion d'erreur" -#: library/asyncio-eventloop.rst:1145 +#: library/asyncio-eventloop.rst:1154 msgid "Allows customizing how exceptions are handled in the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1149 +#: library/asyncio-eventloop.rst:1158 msgid "Set *handler* as the new event loop exception handler." msgstr "" -#: library/asyncio-eventloop.rst:1151 +#: library/asyncio-eventloop.rst:1160 msgid "" "If *handler* is ``None``, the default exception handler will be set. " "Otherwise, *handler* must be a callable with the signature matching ``(loop, " @@ -1407,148 +1425,161 @@ msgid "" "(see :meth:`call_exception_handler` documentation for details about context)." msgstr "" -#: library/asyncio-eventloop.rst:1161 +#: library/asyncio-eventloop.rst:1170 msgid "" "Return the current exception handler, or ``None`` if no custom exception " "handler was set." msgstr "" -#: library/asyncio-eventloop.rst:1168 +#: library/asyncio-eventloop.rst:1177 msgid "Default exception handler." msgstr "Gestionnaire d'exception par défaut." -#: library/asyncio-eventloop.rst:1170 +#: library/asyncio-eventloop.rst:1179 msgid "" "This is called when an exception occurs and no exception handler is set. " "This can be called by a custom exception handler that wants to defer to the " "default handler behavior." msgstr "" -#: library/asyncio-eventloop.rst:1174 +#: library/asyncio-eventloop.rst:1183 msgid "" "*context* parameter has the same meaning as in :meth:" "`call_exception_handler`." msgstr "" -#: library/asyncio-eventloop.rst:1179 +#: library/asyncio-eventloop.rst:1188 msgid "Call the current event loop exception handler." msgstr "" "Appelle le gestionnaire d'exception de la boucle d'évènements actuelle." -#: library/asyncio-eventloop.rst:1181 +#: library/asyncio-eventloop.rst:1190 msgid "" "*context* is a ``dict`` object containing the following keys (new keys may " "be introduced in future Python versions):" msgstr "" -#: library/asyncio-eventloop.rst:1184 +#: library/asyncio-eventloop.rst:1193 msgid "'message': Error message;" msgstr "``message`` : Message d'erreur ;" -#: library/asyncio-eventloop.rst:1185 +#: library/asyncio-eventloop.rst:1194 msgid "'exception' (optional): Exception object;" msgstr "``exception`` (optionnel): Un objet exception ;" -#: library/asyncio-eventloop.rst:1186 +#: library/asyncio-eventloop.rst:1195 msgid "'future' (optional): :class:`asyncio.Future` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1187 +#: library/asyncio-eventloop.rst:1196 +msgid "'task' (optional): :class:`asyncio.Task` instance;" +msgstr "" + +#: library/asyncio-eventloop.rst:1197 msgid "'handle' (optional): :class:`asyncio.Handle` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1188 +#: library/asyncio-eventloop.rst:1198 msgid "'protocol' (optional): :ref:`Protocol ` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1189 +#: library/asyncio-eventloop.rst:1199 msgid "'transport' (optional): :ref:`Transport ` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1190 -msgid "'socket' (optional): :class:`socket.socket` instance." +#: library/asyncio-eventloop.rst:1200 +msgid "'socket' (optional): :class:`socket.socket` instance;" msgstr "" -#: library/asyncio-eventloop.rst:1194 +#: library/asyncio-eventloop.rst:1202 +msgid "'asyncgen' (optional): Asynchronous generator that caused" +msgstr "" + +#: library/asyncio-eventloop.rst:1202 +#, fuzzy +msgid "the exception." +msgstr "Gestionnaire d'exception par défaut." + +#: library/asyncio-eventloop.rst:1206 msgid "" "This method should not be overloaded in subclassed event loops. For custom " "exception handling, use the :meth:`set_exception_handler()` method." msgstr "" -#: library/asyncio-eventloop.rst:1199 +#: library/asyncio-eventloop.rst:1211 msgid "Enabling debug mode" msgstr "Active le mode débogage" -#: library/asyncio-eventloop.rst:1203 +#: library/asyncio-eventloop.rst:1215 msgid "Get the debug mode (:class:`bool`) of the event loop." msgstr "" -#: library/asyncio-eventloop.rst:1205 +#: library/asyncio-eventloop.rst:1217 msgid "" "The default value is ``True`` if the environment variable :envvar:" "`PYTHONASYNCIODEBUG` is set to a non-empty string, ``False`` otherwise." msgstr "" -#: library/asyncio-eventloop.rst:1211 +#: library/asyncio-eventloop.rst:1223 msgid "Set the debug mode of the event loop." msgstr "Active le mode débogage pour la boucle d'évènements." -#: library/asyncio-eventloop.rst:1215 +#: library/asyncio-eventloop.rst:1227 msgid "" "The new :ref:`Python Development Mode ` can now also be used to " "enable the debug mode." msgstr "" -#: library/asyncio-eventloop.rst:1220 +#: library/asyncio-eventloop.rst:1232 msgid "The :ref:`debug mode of asyncio `." msgstr "" -#: library/asyncio-eventloop.rst:1224 +#: library/asyncio-eventloop.rst:1236 msgid "Running Subprocesses" msgstr "" -#: library/asyncio-eventloop.rst:1226 +#: library/asyncio-eventloop.rst:1238 msgid "" "Methods described in this subsections are low-level. In regular async/await " "code consider using the high-level :func:`asyncio.create_subprocess_shell` " "and :func:`asyncio.create_subprocess_exec` convenience functions instead." msgstr "" -#: library/asyncio-eventloop.rst:1233 +#: library/asyncio-eventloop.rst:1245 msgid "" -"The default asyncio event loop on **Windows** does not support subprocesses. " -"See :ref:`Subprocess Support on Windows ` for " -"details." +"On Windows, the default event loop :class:`ProactorEventLoop` supports " +"subprocesses, whereas :class:`SelectorEventLoop` does not. See :ref:" +"`Subprocess Support on Windows ` for details." msgstr "" -#: library/asyncio-eventloop.rst:1241 +#: library/asyncio-eventloop.rst:1254 msgid "" "Create a subprocess from one or more string arguments specified by *args*." msgstr "" -#: library/asyncio-eventloop.rst:1244 +#: library/asyncio-eventloop.rst:1257 msgid "*args* must be a list of strings represented by:" msgstr "" -#: library/asyncio-eventloop.rst:1246 +#: library/asyncio-eventloop.rst:1259 #, fuzzy msgid ":class:`str`;" msgstr ":class:`str`" -#: library/asyncio-eventloop.rst:1247 +#: library/asyncio-eventloop.rst:1260 msgid "" "or :class:`bytes`, encoded to the :ref:`filesystem encoding `." msgstr "" -#: library/asyncio-eventloop.rst:1250 +#: library/asyncio-eventloop.rst:1263 msgid "" "The first string specifies the program executable, and the remaining strings " "specify the arguments. Together, string arguments form the ``argv`` of the " "program." msgstr "" -#: library/asyncio-eventloop.rst:1254 +#: library/asyncio-eventloop.rst:1267 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=False`` and the list of strings passed as the first " @@ -1556,133 +1587,133 @@ msgid "" "which is list of strings, *subprocess_exec* takes multiple string arguments." msgstr "" -#: library/asyncio-eventloop.rst:1260 +#: library/asyncio-eventloop.rst:1273 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`asyncio.SubprocessProtocol` class." msgstr "" -#: library/asyncio-eventloop.rst:1263 +#: library/asyncio-eventloop.rst:1276 msgid "Other parameters:" msgstr "Autres paramètres :" -#: library/asyncio-eventloop.rst:1265 +#: library/asyncio-eventloop.rst:1278 msgid "*stdin* can be any of these:" msgstr "" -#: library/asyncio-eventloop.rst:1267 +#: library/asyncio-eventloop.rst:1280 msgid "" "a file-like object representing a pipe to be connected to the subprocess's " "standard input stream using :meth:`~loop.connect_write_pipe`" msgstr "" -#: library/asyncio-eventloop.rst:1270 library/asyncio-eventloop.rst:1282 -#: library/asyncio-eventloop.rst:1294 +#: library/asyncio-eventloop.rst:1283 library/asyncio-eventloop.rst:1295 +#: library/asyncio-eventloop.rst:1307 msgid "" "the :const:`subprocess.PIPE` constant (default) which will create a new pipe " "and connect it," msgstr "" -#: library/asyncio-eventloop.rst:1272 library/asyncio-eventloop.rst:1284 -#: library/asyncio-eventloop.rst:1296 +#: library/asyncio-eventloop.rst:1285 library/asyncio-eventloop.rst:1297 +#: library/asyncio-eventloop.rst:1309 msgid "" "the value ``None`` which will make the subprocess inherit the file " "descriptor from this process" msgstr "" -#: library/asyncio-eventloop.rst:1274 library/asyncio-eventloop.rst:1286 -#: library/asyncio-eventloop.rst:1298 +#: library/asyncio-eventloop.rst:1287 library/asyncio-eventloop.rst:1299 +#: library/asyncio-eventloop.rst:1311 msgid "" "the :const:`subprocess.DEVNULL` constant which indicates that the special :" "data:`os.devnull` file will be used" msgstr "" -#: library/asyncio-eventloop.rst:1277 +#: library/asyncio-eventloop.rst:1290 msgid "*stdout* can be any of these:" msgstr "" -#: library/asyncio-eventloop.rst:1279 +#: library/asyncio-eventloop.rst:1292 msgid "" "a file-like object representing a pipe to be connected to the subprocess's " "standard output stream using :meth:`~loop.connect_write_pipe`" msgstr "" -#: library/asyncio-eventloop.rst:1289 +#: library/asyncio-eventloop.rst:1302 msgid "*stderr* can be any of these:" msgstr "" -#: library/asyncio-eventloop.rst:1291 +#: library/asyncio-eventloop.rst:1304 msgid "" "a file-like object representing a pipe to be connected to the subprocess's " "standard error stream using :meth:`~loop.connect_write_pipe`" msgstr "" -#: library/asyncio-eventloop.rst:1300 +#: library/asyncio-eventloop.rst:1313 msgid "" "the :const:`subprocess.STDOUT` constant which will connect the standard " "error stream to the process' standard output stream" msgstr "" -#: library/asyncio-eventloop.rst:1303 +#: library/asyncio-eventloop.rst:1316 msgid "" "All other keyword arguments are passed to :class:`subprocess.Popen` without " "interpretation, except for *bufsize*, *universal_newlines*, *shell*, *text*, " "*encoding* and *errors*, which should not be specified at all." msgstr "" -#: library/asyncio-eventloop.rst:1308 +#: library/asyncio-eventloop.rst:1321 msgid "" "The ``asyncio`` subprocess API does not support decoding the streams as " "text. :func:`bytes.decode` can be used to convert the bytes returned from " "the stream to text." msgstr "" -#: library/asyncio-eventloop.rst:1312 +#: library/asyncio-eventloop.rst:1325 msgid "" "See the constructor of the :class:`subprocess.Popen` class for documentation " "on other arguments." msgstr "" -#: library/asyncio-eventloop.rst:1315 +#: library/asyncio-eventloop.rst:1328 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`asyncio.SubprocessTransport` base class and *protocol* is an " "object instantiated by the *protocol_factory*." msgstr "" -#: library/asyncio-eventloop.rst:1323 +#: library/asyncio-eventloop.rst:1336 msgid "" "Create a subprocess from *cmd*, which can be a :class:`str` or a :class:" "`bytes` string encoded to the :ref:`filesystem encoding `, using the platform's \"shell\" syntax." msgstr "" -#: library/asyncio-eventloop.rst:1328 +#: library/asyncio-eventloop.rst:1341 msgid "" "This is similar to the standard library :class:`subprocess.Popen` class " "called with ``shell=True``." msgstr "" -#: library/asyncio-eventloop.rst:1331 +#: library/asyncio-eventloop.rst:1344 msgid "" "The *protocol_factory* must be a callable returning a subclass of the :class:" "`SubprocessProtocol` class." msgstr "" -#: library/asyncio-eventloop.rst:1334 +#: library/asyncio-eventloop.rst:1347 msgid "" "See :meth:`~loop.subprocess_exec` for more details about the remaining " "arguments." msgstr "" -#: library/asyncio-eventloop.rst:1337 +#: library/asyncio-eventloop.rst:1350 msgid "" "Returns a pair of ``(transport, protocol)``, where *transport* conforms to " "the :class:`SubprocessTransport` base class and *protocol* is an object " "instantiated by the *protocol_factory*." msgstr "" -#: library/asyncio-eventloop.rst:1342 +#: library/asyncio-eventloop.rst:1355 msgid "" "It is the application's responsibility to ensure that all whitespace and " "special characters are quoted appropriately to avoid `shell injection " @@ -1692,105 +1723,105 @@ msgid "" "used to construct shell commands." msgstr "" -#: library/asyncio-eventloop.rst:1351 +#: library/asyncio-eventloop.rst:1364 msgid "Callback Handles" msgstr "" -#: library/asyncio-eventloop.rst:1355 +#: library/asyncio-eventloop.rst:1368 msgid "" "A callback wrapper object returned by :meth:`loop.call_soon`, :meth:`loop." "call_soon_threadsafe`." msgstr "" -#: library/asyncio-eventloop.rst:1360 +#: library/asyncio-eventloop.rst:1373 msgid "" "Cancel the callback. If the callback has already been canceled or executed, " "this method has no effect." msgstr "" -#: library/asyncio-eventloop.rst:1365 +#: library/asyncio-eventloop.rst:1378 msgid "Return ``True`` if the callback was cancelled." msgstr "Renvoie ``True`` si la fonction de rappel à été annulé." -#: library/asyncio-eventloop.rst:1371 +#: library/asyncio-eventloop.rst:1384 msgid "" "A callback wrapper object returned by :meth:`loop.call_later`, and :meth:" "`loop.call_at`." msgstr "" -#: library/asyncio-eventloop.rst:1374 +#: library/asyncio-eventloop.rst:1387 msgid "This class is a subclass of :class:`Handle`." msgstr "" -#: library/asyncio-eventloop.rst:1378 +#: library/asyncio-eventloop.rst:1391 msgid "Return a scheduled callback time as :class:`float` seconds." msgstr "" -#: library/asyncio-eventloop.rst:1380 +#: library/asyncio-eventloop.rst:1393 msgid "" "The time is an absolute timestamp, using the same time reference as :meth:" "`loop.time`." msgstr "" -#: library/asyncio-eventloop.rst:1387 +#: library/asyncio-eventloop.rst:1400 msgid "Server Objects" msgstr "Objets Serveur" -#: library/asyncio-eventloop.rst:1389 +#: library/asyncio-eventloop.rst:1402 msgid "" "Server objects are created by :meth:`loop.create_server`, :meth:`loop." "create_unix_server`, :func:`start_server`, and :func:`start_unix_server` " "functions." msgstr "" -#: library/asyncio-eventloop.rst:1393 +#: library/asyncio-eventloop.rst:1406 msgid "Do not instantiate the class directly." msgstr "" -#: library/asyncio-eventloop.rst:1397 +#: library/asyncio-eventloop.rst:1410 msgid "" "*Server* objects are asynchronous context managers. When used in an ``async " "with`` statement, it's guaranteed that the Server object is closed and not " "accepting new connections when the ``async with`` statement is completed::" msgstr "" -#: library/asyncio-eventloop.rst:1410 +#: library/asyncio-eventloop.rst:1423 msgid "Server object is an asynchronous context manager since Python 3.7." msgstr "" -#: library/asyncio-eventloop.rst:1415 +#: library/asyncio-eventloop.rst:1428 msgid "" "Stop serving: close listening sockets and set the :attr:`sockets` attribute " "to ``None``." msgstr "" -#: library/asyncio-eventloop.rst:1418 +#: library/asyncio-eventloop.rst:1431 msgid "" "The sockets that represent existing incoming client connections are left " "open." msgstr "" -#: library/asyncio-eventloop.rst:1421 +#: library/asyncio-eventloop.rst:1434 msgid "" "The server is closed asynchronously, use the :meth:`wait_closed` coroutine " "to wait until the server is closed." msgstr "" -#: library/asyncio-eventloop.rst:1426 +#: library/asyncio-eventloop.rst:1439 msgid "Return the event loop associated with the server object." msgstr "" -#: library/asyncio-eventloop.rst:1432 +#: library/asyncio-eventloop.rst:1445 msgid "Start accepting connections." msgstr "Commence à accepter les connexions." -#: library/asyncio-eventloop.rst:1434 +#: library/asyncio-eventloop.rst:1447 msgid "" "This method is idempotent, so it can be called when the server is already " "being serving." msgstr "" -#: library/asyncio-eventloop.rst:1437 +#: library/asyncio-eventloop.rst:1450 msgid "" "The *start_serving* keyword-only parameter to :meth:`loop.create_server` " "and :meth:`asyncio.start_server` allows creating a Server object that is not " @@ -1799,97 +1830,97 @@ msgid "" "accepting connections." msgstr "" -#: library/asyncio-eventloop.rst:1448 +#: library/asyncio-eventloop.rst:1461 msgid "" "Start accepting connections until the coroutine is cancelled. Cancellation " "of ``serve_forever`` task causes the server to be closed." msgstr "" -#: library/asyncio-eventloop.rst:1452 +#: library/asyncio-eventloop.rst:1465 msgid "" "This method can be called if the server is already accepting connections. " "Only one ``serve_forever`` task can exist per one *Server* object." msgstr "" -#: library/asyncio-eventloop.rst:1474 +#: library/asyncio-eventloop.rst:1487 msgid "Return ``True`` if the server is accepting new connections." msgstr "Donne ``True`` si le serveur accepte de nouvelles connexions." -#: library/asyncio-eventloop.rst:1480 +#: library/asyncio-eventloop.rst:1493 msgid "Wait until the :meth:`close` method completes." msgstr "Attends que la méthode :meth:`close` se termine." -#: library/asyncio-eventloop.rst:1484 +#: library/asyncio-eventloop.rst:1497 msgid "List of :class:`socket.socket` objects the server is listening on." msgstr "" -#: library/asyncio-eventloop.rst:1486 +#: library/asyncio-eventloop.rst:1499 msgid "" "Prior to Python 3.7 ``Server.sockets`` used to return an internal list of " "server sockets directly. In 3.7 a copy of that list is returned." msgstr "" -#: library/asyncio-eventloop.rst:1495 +#: library/asyncio-eventloop.rst:1508 msgid "Event Loop Implementations" msgstr "Implémentations de boucle d'évènements" -#: library/asyncio-eventloop.rst:1497 +#: library/asyncio-eventloop.rst:1510 msgid "" "asyncio ships with two different event loop implementations: :class:" "`SelectorEventLoop` and :class:`ProactorEventLoop`." msgstr "" -#: library/asyncio-eventloop.rst:1500 +#: library/asyncio-eventloop.rst:1513 msgid "" "By default asyncio is configured to use :class:`SelectorEventLoop` on Unix " "and :class:`ProactorEventLoop` on Windows." msgstr "" -#: library/asyncio-eventloop.rst:1506 +#: library/asyncio-eventloop.rst:1519 msgid "An event loop based on the :mod:`selectors` module." msgstr "" -#: library/asyncio-eventloop.rst:1508 +#: library/asyncio-eventloop.rst:1521 msgid "" "Uses the most efficient *selector* available for the given platform. It is " "also possible to manually configure the exact selector implementation to be " "used::" msgstr "" -#: library/asyncio-eventloop.rst:1520 +#: library/asyncio-eventloop.rst:1533 msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`Disponibilité ` : Unix, Windows." -#: library/asyncio-eventloop.rst:1525 +#: library/asyncio-eventloop.rst:1538 msgid "An event loop for Windows that uses \"I/O Completion Ports\" (IOCP)." msgstr "" -#: library/asyncio-eventloop.rst:1528 +#: library/asyncio-eventloop.rst:1541 msgid ":ref:`Availability `: Windows." msgstr ":ref:`Disponibilité ` : Windows." -#: library/asyncio-eventloop.rst:1531 +#: library/asyncio-eventloop.rst:1544 msgid "" "`MSDN documentation on I/O Completion Ports `_." msgstr "" -#: library/asyncio-eventloop.rst:1537 +#: library/asyncio-eventloop.rst:1550 msgid "Abstract base class for asyncio-compliant event loops." msgstr "" -#: library/asyncio-eventloop.rst:1539 +#: library/asyncio-eventloop.rst:1552 msgid "" "The :ref:`Event Loop Methods ` section lists all methods " "that an alternative implementation of ``AbstractEventLoop`` should have " "defined." msgstr "" -#: library/asyncio-eventloop.rst:1545 +#: library/asyncio-eventloop.rst:1558 msgid "Examples" msgstr "Exemples" -#: library/asyncio-eventloop.rst:1547 +#: library/asyncio-eventloop.rst:1560 msgid "" "Note that all examples in this section **purposefully** show how to use the " "low-level event loop APIs, such as :meth:`loop.run_forever` and :meth:`loop." @@ -1897,70 +1928,70 @@ msgid "" "consider using the high-level functions like :func:`asyncio.run`." msgstr "" -#: library/asyncio-eventloop.rst:1557 +#: library/asyncio-eventloop.rst:1570 msgid "Hello World with call_soon()" msgstr "\"Hello World\" avec ``call_soon()``" -#: library/asyncio-eventloop.rst:1559 +#: library/asyncio-eventloop.rst:1572 msgid "" "An example using the :meth:`loop.call_soon` method to schedule a callback. " "The callback displays ``\"Hello World\"`` and then stops the event loop::" msgstr "" -#: library/asyncio-eventloop.rst:1583 +#: library/asyncio-eventloop.rst:1596 msgid "" "A similar :ref:`Hello World ` example created with a coroutine " "and the :func:`run` function." msgstr "" -#: library/asyncio-eventloop.rst:1590 +#: library/asyncio-eventloop.rst:1603 msgid "Display the current date with call_later()" msgstr "Afficher la date actuelle avec ``call_later()``" -#: library/asyncio-eventloop.rst:1592 +#: library/asyncio-eventloop.rst:1605 msgid "" "An example of a callback displaying the current date every second. The " "callback uses the :meth:`loop.call_later` method to reschedule itself after " "5 seconds, and then stops the event loop::" msgstr "" -#: library/asyncio-eventloop.rst:1620 +#: library/asyncio-eventloop.rst:1633 msgid "" "A similar :ref:`current date ` example created with a " "coroutine and the :func:`run` function." msgstr "" -#: library/asyncio-eventloop.rst:1627 +#: library/asyncio-eventloop.rst:1640 msgid "Watch a file descriptor for read events" msgstr "" -#: library/asyncio-eventloop.rst:1629 +#: library/asyncio-eventloop.rst:1642 msgid "" "Wait until a file descriptor received some data using the :meth:`loop." "add_reader` method and then close the event loop::" msgstr "" -#: library/asyncio-eventloop.rst:1667 +#: library/asyncio-eventloop.rst:1680 msgid "" "A similar :ref:`example ` using " "transports, protocols, and the :meth:`loop.create_connection` method." msgstr "" -#: library/asyncio-eventloop.rst:1671 +#: library/asyncio-eventloop.rst:1684 msgid "" "Another similar :ref:`example ` " "using the high-level :func:`asyncio.open_connection` function and streams." msgstr "" -#: library/asyncio-eventloop.rst:1679 +#: library/asyncio-eventloop.rst:1692 msgid "Set signal handlers for SIGINT and SIGTERM" msgstr "Définit les gestionnaires de signaux pour *SIGINT* et *SIGTERM*" -#: library/asyncio-eventloop.rst:1681 +#: library/asyncio-eventloop.rst:1694 msgid "(This ``signals`` example only works on Unix.)" msgstr "(Cet exemple ne fonctionne que sur Unix.)" -#: library/asyncio-eventloop.rst:1683 +#: library/asyncio-eventloop.rst:1696 msgid "" "Register handlers for signals :py:data:`SIGINT` and :py:data:`SIGTERM` using " "the :meth:`loop.add_signal_handler` method::" diff --git a/library/asyncio-future.po b/library/asyncio-future.po index b908f0f7ef..77cdf6511b 100644 --- a/library/asyncio-future.po +++ b/library/asyncio-future.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -23,42 +23,51 @@ msgid "" "**Source code:** :source:`Lib/asyncio/futures.py`, :source:`Lib/asyncio/" "base_futures.py`" msgstr "" +"**Code source :** :source:`Lib/asyncio/futures.py`, :source:`Lib/asyncio/" +"base_futures.py`" #: library/asyncio-future.rst:15 msgid "" "*Future* objects are used to bridge **low-level callback-based code** with " "high-level async/await code." msgstr "" +"Les objets *Future* sont utilisés comme passerelles entre du **code bas " +"niveau basé sur des fonctions de rappel** et du code haut niveau utilisant " +"*async* et *await*." #: library/asyncio-future.rst:20 msgid "Future Functions" -msgstr "" +msgstr "Fonctions pour *Future*" #: library/asyncio-future.rst:24 msgid "Return ``True`` if *obj* is either of:" -msgstr "" +msgstr "Renvoie ``True`` si *obj* est soit :" #: library/asyncio-future.rst:26 msgid "an instance of :class:`asyncio.Future`," -msgstr "" +msgstr "une instance de :class:`asyncio.Future` ;" #: library/asyncio-future.rst:27 msgid "an instance of :class:`asyncio.Task`," -msgstr "" +msgstr "une instance de :class:`asyncio.Task` ;" #: library/asyncio-future.rst:28 msgid "a Future-like object with a ``_asyncio_future_blocking`` attribute." msgstr "" +"un objet se comportant comme *Future* et possédant un attribut " +"``_asyncio_future_blocking``." #: library/asyncio-future.rst:36 msgid "Return:" -msgstr "" +msgstr "Renvoie :" #: library/asyncio-future.rst:38 msgid "" "*obj* argument as is, if *obj* is a :class:`Future`, a :class:`Task`, or a " "Future-like object (:func:`isfuture` is used for the test.)" msgstr "" +"l'objet *obj* tel quel si c'est un objet :class:`Future`, :class:`Task` ou " +"se comportant comme un *Future*. :func:`isfuture` est utilisée pour le test ;" #: library/asyncio-future.rst:42 msgid "" @@ -66,95 +75,126 @@ msgid "" "`iscoroutine` is used for the test); in this case the coroutine will be " "scheduled by ``ensure_future()``." msgstr "" +"un objet :class:`Task` encapsulant *obj* si ce dernier est une coroutine (:" +"func:`iscoroutine` est utilisée pour le test). Dans ce cas, l’exécution de " +"la coroutine sera planifiée par ``ensure_future()`` ;" #: library/asyncio-future.rst:47 msgid "" "a :class:`Task` object that would await on *obj*, if *obj* is an awaitable (:" "func:`inspect.isawaitable` is used for the test.)" msgstr "" +"un objet :class:`Task` qui attendra (*await*) *obj* si ce dernier peut être " +"attendu (*awaitable*). :func:`iscoroutine` est utilisée pour le test." #: library/asyncio-future.rst:50 msgid "If *obj* is neither of the above a :exc:`TypeError` is raised." msgstr "" +"Si *obj* ne correspond à aucun des critères ci-dessus, une exception :exc:" +"`TypeError` est levée." #: library/asyncio-future.rst:54 msgid "" "See also the :func:`create_task` function which is the preferred way for " "creating new Tasks." msgstr "" +"Voir aussi la fonction :func:`create_task` qui est la manière privilégiée " +"pour créer des nouvelles tâches." #: library/asyncio-future.rst:57 +msgid "" +"Save a reference to the result of this function, to avoid a task " +"disappearing mid execution." +msgstr "" + +#: library/asyncio-future.rst:60 msgid "The function accepts any :term:`awaitable` object." msgstr "La fonction accepte n'importe quel objet :term:`awaitable`." -#: library/asyncio-future.rst:63 +#: library/asyncio-future.rst:66 msgid "" "Wrap a :class:`concurrent.futures.Future` object in a :class:`asyncio." "Future` object." msgstr "" +"Encapsule un objet :class:`concurrent.futures.Future` dans un objet :class:" +"`asyncio.Future`." -#: library/asyncio-future.rst:68 +#: library/asyncio-future.rst:71 msgid "Future Object" -msgstr "" +msgstr "Objet *Future*" -#: library/asyncio-future.rst:72 +#: library/asyncio-future.rst:75 msgid "" "A Future represents an eventual result of an asynchronous operation. Not " "thread-safe." msgstr "" +"Un *Future* représente le résultat final d'une opération asynchrone. Il " +"n'est pas conçu pour pouvoir être utilisé par plusieurs fils d'exécution." -#: library/asyncio-future.rst:75 +#: library/asyncio-future.rst:78 msgid "" "Future is an :term:`awaitable` object. Coroutines can await on Future " "objects until they either have a result or an exception set, or until they " "are cancelled." msgstr "" -#: library/asyncio-future.rst:79 +#: library/asyncio-future.rst:82 msgid "" "Typically Futures are used to enable low-level callback-based code (e.g. in " "protocols implemented using asyncio :ref:`transports `) to interoperate with high-level async/await code." msgstr "" +"Les *Futures* sont habituellement utilisés pour permettre à du code bas " +"niveau basé sur des fonctions de rappel (par exemple : les protocoles " +"utilisant *asyncio* :ref:`transports `) " +"d'interagir avec du code haut niveau utilisant *async* et *await*." -#: library/asyncio-future.rst:84 +#: library/asyncio-future.rst:87 msgid "" "The rule of thumb is to never expose Future objects in user-facing APIs, and " "the recommended way to create a Future object is to call :meth:`loop." "create_future`. This way alternative event loop implementations can inject " "their own optimized implementations of a Future object." msgstr "" +"Une bonne règle empirique est de ne jamais exposer des objets *Future* dans " +"des *API* destinées à l'utilisateur. La façon privilégiée de créer des " +"objets *Future* est d'appeler la méthode :meth:`loop.create_future`. Cela " +"permet aux implémentations alternatives de la boucle d'évènements d'utiliser " +"leur propre implémentation de l'objet *Future*." -#: library/asyncio-future.rst:90 +#: library/asyncio-future.rst:93 msgid "Added support for the :mod:`contextvars` module." msgstr "Ajout du support du module :mod:`contextvars`." -#: library/asyncio-future.rst:95 +#: library/asyncio-future.rst:98 msgid "Return the result of the Future." -msgstr "" +msgstr "Renvoie le résultat du *Future*." -#: library/asyncio-future.rst:97 +#: library/asyncio-future.rst:100 msgid "" "If the Future is *done* and has a result set by the :meth:`set_result` " "method, the result value is returned." msgstr "" +"Si le *Future* est « terminé » et a un résultat défini par la méthode :meth:" +"`set_result`, ce résultat est renvoyé." -#: library/asyncio-future.rst:100 +#: library/asyncio-future.rst:103 msgid "" "If the Future is *done* and has an exception set by the :meth:" "`set_exception` method, this method raises the exception." msgstr "" +"Si le *Future* est « terminé » et a une exception définie par la méthode :" +"meth:`set_exception`, cette méthode lève l'exception." -#: library/asyncio-future.rst:191 -#, fuzzy +#: library/asyncio-future.rst:194 msgid "" "If the Future has been *cancelled*, this method raises a :exc:" "`CancelledError` exception." msgstr "" -"Si la tâche a été *annulée*, cette méthode lève une exception :exc:" +"Si le *Future* a été *annulé*, cette méthode lève une exception :exc:" "`CancelledError`." -#: library/asyncio-future.rst:106 +#: library/asyncio-future.rst:109 #, fuzzy msgid "" "If the Future's result isn't yet available, this method raises a :exc:" @@ -163,166 +203,206 @@ msgstr "" "Si le résultat de la tâche n'est pas encore disponible, cette méthode lève " "une exception :exc:`InvalidStateError`." -#: library/asyncio-future.rst:111 -#, fuzzy +#: library/asyncio-future.rst:114 msgid "Mark the Future as *done* and set its result." -msgstr "Marque le futur comme terminé et définit son résultat." +msgstr "Marque le *Future* comme « terminé » et définit son résultat." -#: library/asyncio-future.rst:120 +#: library/asyncio-future.rst:123 msgid "" "Raises a :exc:`InvalidStateError` error if the Future is already *done*." msgstr "" +"Lève une erreur :exc:`InvalidStateError` si le *Future* est déjà « terminé »." -#: library/asyncio-future.rst:118 -#, fuzzy +#: library/asyncio-future.rst:121 msgid "Mark the Future as *done* and set an exception." -msgstr "Marque le futur comme terminé et définit une exception." +msgstr "Marque le *Future* comme « terminé » et définit une exception." -#: library/asyncio-future.rst:125 +#: library/asyncio-future.rst:128 msgid "Return ``True`` if the Future is *done*." -msgstr "" +msgstr "Renvoie ``True`` si le *Future* est « terminé »." -#: library/asyncio-future.rst:127 +#: library/asyncio-future.rst:130 msgid "" "A Future is *done* if it was *cancelled* or if it has a result or an " "exception set with :meth:`set_result` or :meth:`set_exception` calls." msgstr "" +"Un *Future* est « terminé » s'il a été « annulé » ou si un résultat ou une " +"exception a été définie par les méthodes :meth:`set_result` ou :meth:" +"`set_exception`." -#: library/asyncio-future.rst:133 +#: library/asyncio-future.rst:136 msgid "Return ``True`` if the Future was *cancelled*." -msgstr "" +msgstr "Renvoie ``True`` si le *Future* a été « annulé »." -#: library/asyncio-future.rst:135 +#: library/asyncio-future.rst:138 msgid "" "The method is usually used to check if a Future is not *cancelled* before " "setting a result or an exception for it::" msgstr "" +"Cette méthode est habituellement utilisée pour vérifier qu'un *Future* n'est " +"pas « annulé » avant de définir un résultat ou une exception pour celui-ci ::" -#: library/asyncio-future.rst:143 +#: library/asyncio-future.rst:146 msgid "Add a callback to be run when the Future is *done*." msgstr "" +"Ajoute une fonction de rappel à exécuter lorsque le *Future* est « terminé »." -#: library/asyncio-future.rst:145 +#: library/asyncio-future.rst:148 msgid "The *callback* is called with the Future object as its only argument." msgstr "" +"L'argument *callback* est appelé avec l'objet *Future* comme seul argument." -#: library/asyncio-future.rst:148 +#: library/asyncio-future.rst:151 msgid "" "If the Future is already *done* when this method is called, the callback is " "scheduled with :meth:`loop.call_soon`." msgstr "" +"Si le *Future* est déjà « terminé » lorsque la méthode est appelée, " +"l'exécution de la fonction de rappel est planifiée avec :meth:`loop." +"call_soon`." -#: library/asyncio-future.rst:151 +#: library/asyncio-future.rst:154 msgid "" "An optional keyword-only *context* argument allows specifying a custom :" "class:`contextvars.Context` for the *callback* to run in. The current " "context is used when no *context* is provided." msgstr "" +"L'argument nommé optionnel *context* permet de spécifier une classe :class:" +"`contextvars.Context` personnalisée dans laquelle la fonction de rappel " +"s’exécutera. Le contexte actuel est utilisé si *context* n'est pas fourni." -#: library/asyncio-future.rst:155 +#: library/asyncio-future.rst:158 msgid "" ":func:`functools.partial` can be used to pass parameters to the callback, e." "g.::" msgstr "" +":func:`functools.partial` peut être utilisée pour passer des paramètres à la " +"fonction de rappel ::" -#: library/asyncio-future.rst:162 +#: library/asyncio-future.rst:165 msgid "" "The *context* keyword-only parameter was added. See :pep:`567` for more " "details." msgstr "" +"Ajout de l'argument nommé *context*. Voir :pep:`567` pour plus de détails." -#: library/asyncio-future.rst:168 +#: library/asyncio-future.rst:171 msgid "Remove *callback* from the callbacks list." msgstr "Retire *callback* de la liste de fonctions de rappel." -#: library/asyncio-future.rst:170 +#: library/asyncio-future.rst:173 msgid "" "Returns the number of callbacks removed, which is typically 1, unless a " "callback was added more than once." msgstr "" +"Renvoie le nombre de fonctions de rappel retiré. La méthode renvoie " +"généralement 1, à moins que la fonction ait été ajoutée plus d'une fois." -#: library/asyncio-future.rst:175 +#: library/asyncio-future.rst:178 msgid "Cancel the Future and schedule callbacks." -msgstr "" +msgstr "Annule le *Future* et planifie l'exécution des fonctions de rappel." -#: library/asyncio-future.rst:177 +#: library/asyncio-future.rst:180 msgid "" "If the Future is already *done* or *cancelled*, return ``False``. Otherwise, " "change the Future's state to *cancelled*, schedule the callbacks, and return " "``True``." msgstr "" +"Si le *Future* est déjà « terminé » ou « annulé », renvoie ``False``. " +"Autrement, change l'état du *Future* à « annulé », planifie l'exécution des " +"fonctions de rappel et renvoie ``True``." -#: library/asyncio-future.rst:181 +#: library/asyncio-future.rst:184 msgid "Added the ``msg`` parameter." msgstr "" -#: library/asyncio-future.rst:186 +#: library/asyncio-future.rst:189 msgid "Return the exception that was set on this Future." -msgstr "" +msgstr "Renvoie l'exception définie pour ce *Future*." -#: library/asyncio-future.rst:188 +#: library/asyncio-future.rst:191 msgid "" "The exception (or ``None`` if no exception was set) is returned only if the " "Future is *done*." msgstr "" +"L'exception, ou ``None`` si aucune exception n'a été définie, est renvoyé " +"seulement si le *Future* est « terminé »." -#: library/asyncio-future.rst:194 -#, fuzzy +#: library/asyncio-future.rst:197 msgid "" "If the Future isn't *done* yet, this method raises an :exc:" "`InvalidStateError` exception." msgstr "" -"Si la tâche n'est pas encore *achevée*, cette méthode lève une exception :" -"exc:`InvalidStateError`." +"Si le *Future* n'est pas encore « terminé », cette méthode lève une " +"exception :exc:`InvalidStateError`." -#: library/asyncio-future.rst:199 +#: library/asyncio-future.rst:202 msgid "Return the event loop the Future object is bound to." -msgstr "" +msgstr "Renvoie la boucle d'évènements à laquelle le *Future* est attaché." -#: library/asyncio-future.rst:206 +#: library/asyncio-future.rst:209 msgid "" "This example creates a Future object, creates and schedules an asynchronous " "Task to set result for the Future, and waits until the Future has a result::" msgstr "" +"Cet exemple crée un objet *Future*, puis crée et planifie l’exécution d'une " +"tâche asynchrone qui définira le résultat du *Future* et attend jusqu'à ce " +"que le *Future* ait un résultat ::" -#: library/asyncio-future.rst:241 +#: library/asyncio-future.rst:244 msgid "" "The Future object was designed to mimic :class:`concurrent.futures.Future`. " "Key differences include:" msgstr "" +"L'objet *Future* est conçu pour imiter la classe :class:`concurrent.futures." +"Future`. Les principales différences sont :" -#: library/asyncio-future.rst:244 +#: library/asyncio-future.rst:247 msgid "" "unlike asyncio Futures, :class:`concurrent.futures.Future` instances cannot " "be awaited." msgstr "" +"contrairement au *Future asyncio*, les instances de :class:`concurrent." +"futures.Future` ne peuvent pas être attendues ;" -#: library/asyncio-future.rst:247 +#: library/asyncio-future.rst:250 msgid "" ":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` do not " "accept the *timeout* argument." msgstr "" +":meth:`asyncio.Future.result` et :meth:`asyncio.Future.exception` " +"n'acceptent pas d'argument *timeout* ;" -#: library/asyncio-future.rst:250 +#: library/asyncio-future.rst:253 msgid "" ":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` raise an :" "exc:`InvalidStateError` exception when the Future is not *done*." msgstr "" +":meth:`asyncio.Future.result` et :meth:`asyncio.Future.exception` lèvent une " +"exception :exc:`InvalidStateError` lorsque le *Future* n'est pas " +"« terminé » ;" -#: library/asyncio-future.rst:254 +#: library/asyncio-future.rst:257 msgid "" "Callbacks registered with :meth:`asyncio.Future.add_done_callback` are not " "called immediately. They are scheduled with :meth:`loop.call_soon` instead." msgstr "" +"les fonctions de rappel enregistrées à l'aide de :meth:`asyncio.Future." +"add_done_callback` ne sont pas exécutées immédiatement mais planifiées avec :" +"meth:`loop.call_soon` ;" -#: library/asyncio-future.rst:258 +#: library/asyncio-future.rst:261 msgid "" "asyncio Future is not compatible with the :func:`concurrent.futures.wait` " "and :func:`concurrent.futures.as_completed` functions." msgstr "" +"les *Future asyncio* ne sont pas compatibles avec les fonctions :func:" +"`concurrent.futures.wait` et :func:`concurrent.futures.as_completed` ;" -#: library/asyncio-future.rst:262 +#: library/asyncio-future.rst:265 msgid "" ":meth:`asyncio.Future.cancel` accepts an optional ``msg`` argument, but :" "func:`concurrent.futures.cancel` does not." msgstr "" +":meth:`asyncio.Future.cancel` accepte un argument optionnel ``msg`` mais " +"pas :func:`concurrent.futures.cancel`." diff --git a/library/asyncio-llapi-index.po b/library/asyncio-llapi-index.po index 0f66c5e75e..5aaf396766 100644 --- a/library/asyncio-llapi-index.po +++ b/library/asyncio-llapi-index.po @@ -28,7 +28,7 @@ msgstr "Obtenir une boucle d'évènements" #: library/asyncio-llapi-index.rst:18 msgid ":func:`asyncio.get_running_loop`" -msgstr "" +msgstr ":func:`asyncio.get_running_loop`" #: library/asyncio-llapi-index.rst:19 msgid "The **preferred** function to get the running event loop." @@ -36,7 +36,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:21 msgid ":func:`asyncio.get_event_loop`" -msgstr "" +msgstr ":func:`asyncio.get_event_loop`" #: library/asyncio-llapi-index.rst:22 msgid "Get an event loop instance (current or via the policy)." @@ -44,7 +44,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:24 msgid ":func:`asyncio.set_event_loop`" -msgstr "" +msgstr ":func:`asyncio.set_event_loop`" #: library/asyncio-llapi-index.rst:25 msgid "Set the event loop as current via the current policy." @@ -52,7 +52,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:27 msgid ":func:`asyncio.new_event_loop`" -msgstr "" +msgstr ":func:`asyncio.new_event_loop`" #: library/asyncio-llapi-index.rst:28 msgid "Create a new event loop." @@ -82,7 +82,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:47 msgid ":meth:`loop.run_until_complete`" -msgstr "" +msgstr ":meth:`loop.run_until_complete`" #: library/asyncio-llapi-index.rst:48 msgid "Run a Future/Task/awaitable until complete." @@ -90,7 +90,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:50 msgid ":meth:`loop.run_forever`" -msgstr "" +msgstr ":meth:`loop.run_forever`" #: library/asyncio-llapi-index.rst:51 msgid "Run the event loop forever." @@ -98,7 +98,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:53 msgid ":meth:`loop.stop`" -msgstr "" +msgstr ":meth:`loop.stop`" #: library/asyncio-llapi-index.rst:54 msgid "Stop the event loop." @@ -106,7 +106,7 @@ msgstr "Arrête l'exécution de la boucle d'évènements." #: library/asyncio-llapi-index.rst:56 msgid ":meth:`loop.close`" -msgstr "" +msgstr ":meth:`loop.close`" #: library/asyncio-llapi-index.rst:57 msgid "Close the event loop." @@ -114,7 +114,7 @@ msgstr "Arrête la boucle d'évènements." #: library/asyncio-llapi-index.rst:59 msgid ":meth:`loop.is_running()`" -msgstr "" +msgstr ":meth:`loop.is_running()`" #: library/asyncio-llapi-index.rst:60 msgid "Return ``True`` if the event loop is running." @@ -122,7 +122,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:62 msgid ":meth:`loop.is_closed()`" -msgstr "" +msgstr ":meth:`loop.is_closed()`" #: library/asyncio-llapi-index.rst:63 #, fuzzy @@ -139,11 +139,11 @@ msgstr "" #: library/asyncio-llapi-index.rst:69 msgid "Debugging" -msgstr "" +msgstr "Débogage" #: library/asyncio-llapi-index.rst:74 msgid ":meth:`loop.set_debug`" -msgstr "" +msgstr ":meth:`loop.set_debug`" #: library/asyncio-llapi-index.rst:75 msgid "Enable or disable the debug mode." @@ -151,7 +151,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:77 msgid ":meth:`loop.get_debug`" -msgstr "" +msgstr ":meth:`loop.get_debug`" #: library/asyncio-llapi-index.rst:78 msgid "Get the current debug mode." @@ -163,7 +163,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:86 msgid ":meth:`loop.call_soon`" -msgstr "" +msgstr ":meth:`loop.call_soon`" #: library/asyncio-llapi-index.rst:87 msgid "Invoke a callback soon." @@ -171,7 +171,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:89 msgid ":meth:`loop.call_soon_threadsafe`" -msgstr "" +msgstr ":meth:`loop.call_soon_threadsafe`" #: library/asyncio-llapi-index.rst:90 msgid "A thread-safe variant of :meth:`loop.call_soon`." @@ -179,7 +179,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:92 msgid ":meth:`loop.call_later`" -msgstr "" +msgstr ":meth:`loop.call_later`" #: library/asyncio-llapi-index.rst:93 msgid "Invoke a callback *after* the given time." @@ -187,7 +187,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:95 msgid ":meth:`loop.call_at`" -msgstr "" +msgstr ":meth:`loop.call_at`" #: library/asyncio-llapi-index.rst:96 msgid "Invoke a callback *at* the given time." @@ -209,7 +209,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:108 msgid ":meth:`loop.set_default_executor`" -msgstr "" +msgstr ":meth:`loop.set_default_executor`" #: library/asyncio-llapi-index.rst:109 msgid "Set the default executor for :meth:`loop.run_in_executor`." @@ -221,7 +221,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:117 msgid ":meth:`loop.create_future`" -msgstr "" +msgstr ":meth:`loop.create_future`" #: library/asyncio-llapi-index.rst:118 msgid "Create a :class:`Future` object." @@ -229,7 +229,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:120 msgid ":meth:`loop.create_task`" -msgstr "" +msgstr ":meth:`loop.create_task`" #: library/asyncio-llapi-index.rst:121 msgid "Schedule coroutine as a :class:`Task`." @@ -237,7 +237,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:123 msgid ":meth:`loop.set_task_factory`" -msgstr "" +msgstr ":meth:`loop.set_task_factory`" #: library/asyncio-llapi-index.rst:124 msgid "" @@ -247,7 +247,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:127 msgid ":meth:`loop.get_task_factory`" -msgstr "" +msgstr ":meth:`loop.get_task_factory`" #: library/asyncio-llapi-index.rst:128 msgid "" @@ -413,7 +413,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:204 msgid ":meth:`loop.add_reader`" -msgstr "" +msgstr ":meth:`loop.add_reader`" #: library/asyncio-llapi-index.rst:205 msgid "Start watching a file descriptor for read availability." @@ -421,7 +421,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:207 msgid ":meth:`loop.remove_reader`" -msgstr "" +msgstr ":meth:`loop.remove_reader`" #: library/asyncio-llapi-index.rst:208 msgid "Stop watching a file descriptor for read availability." @@ -429,7 +429,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:210 msgid ":meth:`loop.add_writer`" -msgstr "" +msgstr ":meth:`loop.add_writer`" #: library/asyncio-llapi-index.rst:211 msgid "Start watching a file descriptor for write availability." @@ -437,7 +437,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:213 msgid ":meth:`loop.remove_writer`" -msgstr "" +msgstr ":meth:`loop.remove_writer`" #: library/asyncio-llapi-index.rst:214 msgid "Stop watching a file descriptor for write availability." @@ -450,7 +450,7 @@ msgstr "Signaux Unix" #: library/asyncio-llapi-index.rst:222 msgid ":meth:`loop.add_signal_handler`" -msgstr "" +msgstr ":meth:`loop.add_signal_handler`" #: library/asyncio-llapi-index.rst:223 msgid "Add a handler for a :mod:`signal`." @@ -458,7 +458,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:225 msgid ":meth:`loop.remove_signal_handler`" -msgstr "" +msgstr ":meth:`loop.remove_signal_handler`" #: library/asyncio-llapi-index.rst:226 msgid "Remove a handler for a :mod:`signal`." @@ -470,7 +470,7 @@ msgstr "Sous-processus" #: library/asyncio-llapi-index.rst:234 msgid ":meth:`loop.subprocess_exec`" -msgstr "" +msgstr ":meth:`loop.subprocess_exec`" #: library/asyncio-llapi-index.rst:235 msgid "Spawn a subprocess." @@ -478,7 +478,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:237 msgid ":meth:`loop.subprocess_shell`" -msgstr "" +msgstr ":meth:`loop.subprocess_shell`" #: library/asyncio-llapi-index.rst:238 msgid "Spawn a subprocess from a shell command." @@ -490,7 +490,7 @@ msgstr "Gestion des erreurs" #: library/asyncio-llapi-index.rst:246 msgid ":meth:`loop.call_exception_handler`" -msgstr "" +msgstr ":meth:`loop.call_exception_handler`" #: library/asyncio-llapi-index.rst:247 msgid "Call the exception handler." @@ -498,7 +498,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:249 msgid ":meth:`loop.set_exception_handler`" -msgstr "" +msgstr ":meth:`loop.set_exception_handler`" #: library/asyncio-llapi-index.rst:250 msgid "Set a new exception handler." @@ -506,7 +506,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:252 msgid ":meth:`loop.get_exception_handler`" -msgstr "" +msgstr ":meth:`loop.get_exception_handler`" #: library/asyncio-llapi-index.rst:253 msgid "Get the current exception handler." @@ -514,7 +514,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:255 msgid ":meth:`loop.default_exception_handler`" -msgstr "" +msgstr ":meth:`loop.default_exception_handler`" #: library/asyncio-llapi-index.rst:256 msgid "The default exception handler implementation." @@ -802,7 +802,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:407 msgid "Protocols" -msgstr "" +msgstr "Protocoles" #: library/asyncio-llapi-index.rst:409 msgid "Protocol classes can implement the following **callback methods**:" @@ -963,7 +963,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:503 msgid ":meth:`asyncio.get_event_loop_policy`" -msgstr "" +msgstr ":meth:`asyncio.get_event_loop_policy`" #: library/asyncio-llapi-index.rst:504 msgid "Return the current process-wide policy." @@ -971,7 +971,7 @@ msgstr "Renvoie la stratégie actuelle à l'échelle du processus." #: library/asyncio-llapi-index.rst:506 msgid ":meth:`asyncio.set_event_loop_policy`" -msgstr "" +msgstr ":meth:`asyncio.set_event_loop_policy`" #: library/asyncio-llapi-index.rst:507 msgid "Set a new process-wide policy." @@ -979,7 +979,7 @@ msgstr "" #: library/asyncio-llapi-index.rst:509 msgid ":class:`AbstractEventLoopPolicy`" -msgstr "" +msgstr ":class:`AbstractEventLoopPolicy`" #: library/asyncio-llapi-index.rst:510 msgid "Base class for policy objects." diff --git a/library/asyncio-policy.po b/library/asyncio-policy.po index 2d380dadc9..d7647af080 100644 --- a/library/asyncio-policy.po +++ b/library/asyncio-policy.po @@ -323,6 +323,8 @@ msgid "" "Spawning a subprocess with *inactive* current child watcher raises :exc:" "`RuntimeError`." msgstr "" +"Instancier un sous-processus avec un observateur enfant actuel *inactif* " +"lève l'exception :exc:`RuntimeError`." #: library/asyncio-policy.rst:200 msgid "Close the watcher." diff --git a/library/asyncio-protocol.po b/library/asyncio-protocol.po index 02b8cca98a..e4e372df39 100644 --- a/library/asyncio-protocol.po +++ b/library/asyncio-protocol.po @@ -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-05-19 22:36+0200\n" "PO-Revision-Date: 2019-06-18 22:29+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -585,7 +585,7 @@ msgstr "" #: library/asyncio-protocol.rst:436 msgid "Protocols" -msgstr "" +msgstr "Protocoles" #: library/asyncio-protocol.rst:438 msgid "**Source code:** :source:`Lib/asyncio/protocols.py`" @@ -897,7 +897,7 @@ msgstr "Protocoles liés aux sous-processus" #: library/asyncio-protocol.rst:686 msgid "" -"Datagram Protocol instances should be constructed by protocol factories " +"Subprocess Protocol instances should be constructed by protocol factories " "passed to the :meth:`loop.subprocess_exec` and :meth:`loop.subprocess_shell` " "methods." msgstr "" diff --git a/library/asyncio-queue.po b/library/asyncio-queue.po index cd3f862174..37298f7ec6 100644 --- a/library/asyncio-queue.po +++ b/library/asyncio-queue.po @@ -63,11 +63,13 @@ msgstr "" #: library/asyncio-queue.rst:42 msgid "The *loop* parameter." -msgstr "" +msgstr "Le paramètre *loop*." #: library/asyncio-queue.rst:43 msgid "This class is :ref:`not thread safe `." msgstr "" +"Cette classe n'est :ref:`pas conçue pour un contexte multi-fils `." #: library/asyncio-queue.rst:47 msgid "Number of items allowed in the queue." diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index d5337ffed1..54b705f74d 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-09-06 13:48+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -48,45 +48,49 @@ msgid "" "with streams:" msgstr "" -#: library/asyncio-stream.rst:56 +#: library/asyncio-stream.rst:57 msgid "" "Establish a network connection and return a pair of ``(reader, writer)`` " "objects." msgstr "" -#: library/asyncio-stream.rst:59 +#: library/asyncio-stream.rst:60 msgid "" "The returned *reader* and *writer* objects are instances of :class:" "`StreamReader` and :class:`StreamWriter` classes." msgstr "" -#: library/asyncio-stream.rst:62 +#: library/asyncio-stream.rst:63 msgid "" "The *loop* argument is optional and can always be determined automatically " "when this function is awaited from a coroutine." msgstr "" -#: library/asyncio-stream.rst:98 +#: library/asyncio-stream.rst:103 msgid "" "*limit* determines the buffer size limit used by the returned :class:" "`StreamReader` instance. By default the *limit* is set to 64 KiB." msgstr "" -#: library/asyncio-stream.rst:69 +#: library/asyncio-stream.rst:70 msgid "" "The rest of the arguments are passed directly to :meth:`loop." "create_connection`." msgstr "" -#: library/asyncio-stream.rst:127 +#: library/asyncio-stream.rst:132 msgid "The *ssl_handshake_timeout* parameter." msgstr "" -#: library/asyncio-stream.rst:84 +#: library/asyncio-stream.rst:79 +msgid "Added *happy_eyeballs_delay* and *interleave* parameters." +msgstr "" + +#: library/asyncio-stream.rst:89 msgid "Start a socket server." msgstr "" -#: library/asyncio-stream.rst:86 +#: library/asyncio-stream.rst:91 msgid "" "The *client_connected_cb* callback is called whenever a new client " "connection is established. It receives a ``(reader, writer)`` pair as two " @@ -94,143 +98,143 @@ msgid "" "classes." msgstr "" -#: library/asyncio-stream.rst:91 +#: library/asyncio-stream.rst:96 msgid "" "*client_connected_cb* can be a plain callable or a :ref:`coroutine function " "`; if it is a coroutine function, it will be automatically " "scheduled as a :class:`Task`." msgstr "" -#: library/asyncio-stream.rst:95 +#: library/asyncio-stream.rst:100 msgid "" "The *loop* argument is optional and can always be determined automatically " "when this method is awaited from a coroutine." msgstr "" -#: library/asyncio-stream.rst:102 +#: library/asyncio-stream.rst:107 msgid "" "The rest of the arguments are passed directly to :meth:`loop.create_server`." msgstr "" -#: library/asyncio-stream.rst:149 +#: library/asyncio-stream.rst:154 msgid "The *ssl_handshake_timeout* and *start_serving* parameters." msgstr "" -#: library/asyncio-stream.rst:111 +#: library/asyncio-stream.rst:116 msgid "Unix Sockets" msgstr "" -#: library/asyncio-stream.rst:116 +#: library/asyncio-stream.rst:121 msgid "" "Establish a Unix socket connection and return a pair of ``(reader, writer)``." msgstr "" -#: library/asyncio-stream.rst:119 +#: library/asyncio-stream.rst:124 msgid "Similar to :func:`open_connection` but operates on Unix sockets." msgstr "" -#: library/asyncio-stream.rst:121 +#: library/asyncio-stream.rst:126 msgid "See also the documentation of :meth:`loop.create_unix_connection`." msgstr "" -#: library/asyncio-stream.rst:146 +#: library/asyncio-stream.rst:151 msgid ":ref:`Availability `: Unix." msgstr ":ref:`Disponibilité ` : Unix." -#: library/asyncio-stream.rst:131 +#: library/asyncio-stream.rst:136 msgid "The *path* parameter can now be a :term:`path-like object`" msgstr "" -#: library/asyncio-stream.rst:139 +#: library/asyncio-stream.rst:144 msgid "Start a Unix socket server." msgstr "" -#: library/asyncio-stream.rst:141 +#: library/asyncio-stream.rst:146 msgid "Similar to :func:`start_server` but works with Unix sockets." msgstr "" -#: library/asyncio-stream.rst:143 +#: library/asyncio-stream.rst:148 msgid "See also the documentation of :meth:`loop.create_unix_server`." msgstr "" -#: library/asyncio-stream.rst:153 +#: library/asyncio-stream.rst:158 msgid "The *path* parameter can now be a :term:`path-like object`." msgstr "" -#: library/asyncio-stream.rst:157 +#: library/asyncio-stream.rst:162 msgid "StreamReader" msgstr "StreamReader" -#: library/asyncio-stream.rst:161 +#: library/asyncio-stream.rst:166 msgid "" "Represents a reader object that provides APIs to read data from the IO " "stream." msgstr "" -#: library/asyncio-stream.rst:164 +#: library/asyncio-stream.rst:169 msgid "" "It is not recommended to instantiate *StreamReader* objects directly; use :" "func:`open_connection` and :func:`start_server` instead." msgstr "" -#: library/asyncio-stream.rst:170 +#: library/asyncio-stream.rst:175 msgid "" "Read up to *n* bytes. If *n* is not provided, or set to ``-1``, read until " "EOF and return all read bytes." msgstr "" -#: library/asyncio-stream.rst:173 +#: library/asyncio-stream.rst:178 msgid "" "If EOF was received and the internal buffer is empty, return an empty " "``bytes`` object." msgstr "" -#: library/asyncio-stream.rst:178 +#: library/asyncio-stream.rst:183 msgid "" "Read one line, where \"line\" is a sequence of bytes ending with ``\\n``." msgstr "" -#: library/asyncio-stream.rst:181 +#: library/asyncio-stream.rst:186 msgid "" "If EOF is received and ``\\n`` was not found, the method returns partially " "read data." msgstr "" -#: library/asyncio-stream.rst:184 +#: library/asyncio-stream.rst:189 msgid "" "If EOF is received and the internal buffer is empty, return an empty " "``bytes`` object." msgstr "" -#: library/asyncio-stream.rst:189 +#: library/asyncio-stream.rst:194 msgid "Read exactly *n* bytes." msgstr "" -#: library/asyncio-stream.rst:191 +#: library/asyncio-stream.rst:196 msgid "" "Raise an :exc:`IncompleteReadError` if EOF is reached before *n* can be " "read. Use the :attr:`IncompleteReadError.partial` attribute to get the " "partially read data." msgstr "" -#: library/asyncio-stream.rst:197 +#: library/asyncio-stream.rst:202 msgid "Read data from the stream until *separator* is found." msgstr "" -#: library/asyncio-stream.rst:199 +#: library/asyncio-stream.rst:204 msgid "" "On success, the data and separator will be removed from the internal buffer " "(consumed). Returned data will include the separator at the end." msgstr "" -#: library/asyncio-stream.rst:203 +#: library/asyncio-stream.rst:208 msgid "" "If the amount of data read exceeds the configured stream limit, a :exc:" "`LimitOverrunError` exception is raised, and the data is left in the " "internal buffer and can be read again." msgstr "" -#: library/asyncio-stream.rst:207 +#: library/asyncio-stream.rst:212 msgid "" "If EOF is reached before the complete separator is found, an :exc:" "`IncompleteReadError` exception is raised, and the internal buffer is " @@ -238,77 +242,77 @@ msgid "" "portion of the separator." msgstr "" -#: library/asyncio-stream.rst:216 +#: library/asyncio-stream.rst:221 msgid "Return ``True`` if the buffer is empty and :meth:`feed_eof` was called." msgstr "" -#: library/asyncio-stream.rst:221 +#: library/asyncio-stream.rst:226 msgid "StreamWriter" msgstr "StreamWriter" -#: library/asyncio-stream.rst:225 +#: library/asyncio-stream.rst:230 msgid "" "Represents a writer object that provides APIs to write data to the IO stream." msgstr "" -#: library/asyncio-stream.rst:228 +#: library/asyncio-stream.rst:233 msgid "" "It is not recommended to instantiate *StreamWriter* objects directly; use :" "func:`open_connection` and :func:`start_server` instead." msgstr "" -#: library/asyncio-stream.rst:234 +#: library/asyncio-stream.rst:239 msgid "" "The method attempts to write the *data* to the underlying socket " "immediately. If that fails, the data is queued in an internal write buffer " "until it can be sent." msgstr "" -#: library/asyncio-stream.rst:250 +#: library/asyncio-stream.rst:255 msgid "The method should be used along with the ``drain()`` method::" msgstr "" -#: library/asyncio-stream.rst:245 +#: library/asyncio-stream.rst:250 msgid "" "The method writes a list (or any iterable) of bytes to the underlying socket " "immediately. If that fails, the data is queued in an internal write buffer " "until it can be sent." msgstr "" -#: library/asyncio-stream.rst:257 +#: library/asyncio-stream.rst:262 msgid "The method closes the stream and the underlying socket." msgstr "" -#: library/asyncio-stream.rst:259 +#: library/asyncio-stream.rst:264 msgid "The method should be used along with the ``wait_closed()`` method::" msgstr "" -#: library/asyncio-stream.rst:266 +#: library/asyncio-stream.rst:271 msgid "" "Return ``True`` if the underlying transport supports the :meth:`write_eof` " "method, ``False`` otherwise." msgstr "" -#: library/asyncio-stream.rst:271 +#: library/asyncio-stream.rst:276 msgid "" "Close the write end of the stream after the buffered write data is flushed." msgstr "" -#: library/asyncio-stream.rst:276 +#: library/asyncio-stream.rst:281 msgid "Return the underlying asyncio transport." msgstr "" -#: library/asyncio-stream.rst:280 +#: library/asyncio-stream.rst:285 msgid "" "Access optional transport information; see :meth:`BaseTransport." "get_extra_info` for details." msgstr "" -#: library/asyncio-stream.rst:285 +#: library/asyncio-stream.rst:290 msgid "Wait until it is appropriate to resume writing to the stream. Example::" msgstr "" -#: library/asyncio-stream.rst:291 +#: library/asyncio-stream.rst:296 msgid "" "This is a flow control method that interacts with the underlying IO write " "buffer. When the size of the buffer reaches the high watermark, *drain()* " @@ -317,90 +321,90 @@ msgid "" "`drain` returns immediately." msgstr "" -#: library/asyncio-stream.rst:300 +#: library/asyncio-stream.rst:305 msgid "" "Return ``True`` if the stream is closed or in the process of being closed." msgstr "" -#: library/asyncio-stream.rst:307 +#: library/asyncio-stream.rst:312 msgid "Wait until the stream is closed." msgstr "" -#: library/asyncio-stream.rst:309 +#: library/asyncio-stream.rst:314 msgid "" "Should be called after :meth:`close` to wait until the underlying connection " "is closed." msgstr "" -#: library/asyncio-stream.rst:316 +#: library/asyncio-stream.rst:321 msgid "Examples" msgstr "Exemples" -#: library/asyncio-stream.rst:321 +#: library/asyncio-stream.rst:326 msgid "TCP echo client using streams" msgstr "" -#: library/asyncio-stream.rst:323 +#: library/asyncio-stream.rst:328 msgid "TCP echo client using the :func:`asyncio.open_connection` function::" msgstr "" -#: library/asyncio-stream.rst:345 +#: library/asyncio-stream.rst:350 msgid "" "The :ref:`TCP echo client protocol " "` example uses the low-level :meth:" "`loop.create_connection` method." msgstr "" -#: library/asyncio-stream.rst:352 +#: library/asyncio-stream.rst:357 msgid "TCP echo server using streams" msgstr "" -#: library/asyncio-stream.rst:354 +#: library/asyncio-stream.rst:359 msgid "TCP echo server using the :func:`asyncio.start_server` function::" msgstr "" -#: library/asyncio-stream.rst:387 +#: library/asyncio-stream.rst:392 msgid "" "The :ref:`TCP echo server protocol " "` example uses the :meth:`loop." "create_server` method." msgstr "" -#: library/asyncio-stream.rst:392 +#: library/asyncio-stream.rst:397 msgid "Get HTTP headers" msgstr "Récupère les en-têtes HTTP" -#: library/asyncio-stream.rst:394 +#: library/asyncio-stream.rst:399 msgid "" "Simple example querying HTTP headers of the URL passed on the command line::" msgstr "" -#: library/asyncio-stream.rst:432 +#: library/asyncio-stream.rst:437 msgid "Usage::" msgstr "Utilisation ::" -#: library/asyncio-stream.rst:436 +#: library/asyncio-stream.rst:441 msgid "or with HTTPS::" msgstr "ou avec HTTPS ::" -#: library/asyncio-stream.rst:444 +#: library/asyncio-stream.rst:449 msgid "Register an open socket to wait for data using streams" msgstr "" -#: library/asyncio-stream.rst:446 +#: library/asyncio-stream.rst:451 msgid "" "Coroutine waiting until a socket receives data using the :func:" "`open_connection` function::" msgstr "" -#: library/asyncio-stream.rst:480 +#: library/asyncio-stream.rst:485 msgid "" "The :ref:`register an open socket to wait for data using a protocol " "` example uses a low-level protocol and " "the :meth:`loop.create_connection` method." msgstr "" -#: library/asyncio-stream.rst:484 +#: library/asyncio-stream.rst:489 msgid "" "The :ref:`watch a file descriptor for read events " "` example uses the low-level :meth:`loop." diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po index 7a635ef830..6d2278e3cd 100644 --- a/library/asyncio-subprocess.po +++ b/library/asyncio-subprocess.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-10-15 00:37+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -29,12 +29,16 @@ msgid "" "This section describes high-level async/await asyncio APIs to create and " "manage subprocesses." msgstr "" +"Cette section décrit des API de haut niveau de *asyncio* pour créer et gérer " +"des sous-processus via ``async``/``await``." #: library/asyncio-subprocess.rst:19 msgid "" "Here's an example of how asyncio can run a shell command and obtain its " "result::" msgstr "" +"Voici un exemple de comment *asyncio* peut lancer une commande shell et " +"obtenir son résultat ::" #: library/asyncio-subprocess.rst:40 #, fuzzy @@ -51,15 +55,15 @@ msgstr "" #: library/asyncio-subprocess.rst:58 msgid "See also the `Examples`_ subsection." -msgstr "" +msgstr "Voir également la section `Exemples`_." #: library/asyncio-subprocess.rst:62 msgid "Creating Subprocesses" -msgstr "" +msgstr "Créer des sous-processus" #: library/asyncio-subprocess.rst:68 msgid "Create a subprocess." -msgstr "" +msgstr "Crée un sous-processus." #: library/asyncio-subprocess.rst:70 library/asyncio-subprocess.rst:89 msgid "" @@ -67,15 +71,21 @@ msgid "" "wrappers for :attr:`Process.stdout` and :attr:`Process.stderr` (if :attr:" "`subprocess.PIPE` is passed to *stdout* and *stderr* arguments)." msgstr "" +"Le paramètre *limit* définit la taille maximale du tampon pour les instances " +"de :class:`StreamReader` encapsulant :attr:`Process.stdout` et :attr:" +"`Process.stderr` (Si :attr:`subprocess.PIPE` est passé aux paramètres " +"*stdout* et *stderr*)." #: library/asyncio-subprocess.rst:74 library/asyncio-subprocess.rst:93 msgid "Return a :class:`~asyncio.subprocess.Process` instance." -msgstr "" +msgstr "Renvoie une instance de :class:`~asyncio.subprocess.Process`." #: library/asyncio-subprocess.rst:76 msgid "" "See the documentation of :meth:`loop.subprocess_exec` for other parameters." msgstr "" +"Voir la documentation de :meth:`loop.subprocess_exec` pour d'autres " +"paramètres." #: library/asyncio-subprocess.rst:81 library/asyncio-subprocess.rst:109 #, fuzzy @@ -90,6 +100,8 @@ msgstr "Exécute la commande *cmd* dans un *shell*." msgid "" "See the documentation of :meth:`loop.subprocess_shell` for other parameters." msgstr "" +"Voir la documentation de :meth:`loop.subprocess_shell` pour d'autres " +"paramètres." #: library/asyncio-subprocess.rst:100 msgid "" @@ -100,6 +112,13 @@ msgid "" "escape whitespace and special shell characters in strings that are going to " "be used to construct shell commands." msgstr "" +"Il est de la responsabilité de l'application de s'assurer que tous les " +"espaces et les caractères spéciaux sont correctement mis entre guillemets " +"pour éviter les vulnérabilités de type `injection de code `_. La fonction :func:" +"`shlex.quote` peut être utilisée pour l’échappement des espaces et " +"caractères spéciaux dans les chaînes utilisées pour construire des commandes " +"shell." #: library/asyncio-subprocess.rst:113 msgid "" @@ -107,6 +126,9 @@ msgid "" "used. See :ref:`Subprocess Support on Windows ` " "for details." msgstr "" +"Les sous-processus sont disponibles pour Windows si un :class:" +"`ProactorEventLoop` est utilisé. Voir :ref:`Support des sous-processus sous " +"Windows ` pour plus de précisions." #: library/asyncio-subprocess.rst:119 msgid "" @@ -121,43 +143,55 @@ msgstr "" msgid "Constants" msgstr "Constantes" -#: library/asyncio-subprocess.rst:131 +#: library/asyncio-subprocess.rst:132 msgid "Can be passed to the *stdin*, *stdout* or *stderr* parameters." -msgstr "" +msgstr "Peut être passé aux paramètres *stdin*, *stdout* ou *stderr*." -#: library/asyncio-subprocess.rst:133 +#: library/asyncio-subprocess.rst:134 msgid "" "If *PIPE* is passed to *stdin* argument, the :attr:`Process.stdin ` attribute will point to a :class:`StreamWriter` " "instance." msgstr "" +"Si *PIPE* est passé au paramètre *stdin*, l'attribut :attr:`Process.stdin " +"` ne pointera pas vers une instance de :" +"class:`StreamWriter`." -#: library/asyncio-subprocess.rst:137 +#: library/asyncio-subprocess.rst:138 msgid "" "If *PIPE* is passed to *stdout* or *stderr* arguments, the :attr:`Process." "stdout ` and :attr:`Process.stderr " "` attributes will point to :class:" "`StreamReader` instances." msgstr "" +"Si *PIPE* est passé au paramètre *stdout* ou *stderr* , l'attribut :attr:" +"`Process.stdout ` et :attr:`Process." +"stderr ` pointeront vers des instances " +"de :class:`StreamReader`." -#: library/asyncio-subprocess.rst:144 +#: library/asyncio-subprocess.rst:146 msgid "" "Special value that can be used as the *stderr* argument and indicates that " "standard error should be redirected into standard output." msgstr "" +"Une valeur spéciale qui peut être passée au paramètre *stderr* et qui " +"indique que la sortie d'erreur doit être redirigée vers la sortie standard." -#: library/asyncio-subprocess.rst:149 +#: library/asyncio-subprocess.rst:152 msgid "" "Special value that can be used as the *stdin*, *stdout* or *stderr* argument " "to process creation functions. It indicates that the special file :data:`os." "devnull` will be used for the corresponding subprocess stream." msgstr "" +"Une valeur spéciale qui peut être passée à l'argument *stdin*, *stdout* ou " +"*stderr* des fonctions créant des processus. Elle implique l'utilisation du " +"fichier :data:`os.devnull` pour le flux correspondant du processus." -#: library/asyncio-subprocess.rst:155 +#: library/asyncio-subprocess.rst:158 msgid "Interacting with Subprocesses" -msgstr "" +msgstr "Interagir avec les sous-processus" -#: library/asyncio-subprocess.rst:157 +#: library/asyncio-subprocess.rst:160 msgid "" "Both :func:`create_subprocess_exec` and :func:`create_subprocess_shell` " "functions return instances of the *Process* class. *Process* is a high-" @@ -165,47 +199,49 @@ msgid "" "their completion." msgstr "" -#: library/asyncio-subprocess.rst:164 +#: library/asyncio-subprocess.rst:168 msgid "" "An object that wraps OS processes created by the :func:" "`create_subprocess_exec` and :func:`create_subprocess_shell` functions." msgstr "" -#: library/asyncio-subprocess.rst:168 +#: library/asyncio-subprocess.rst:172 msgid "" "This class is designed to have a similar API to the :class:`subprocess." "Popen` class, but there are some notable differences:" msgstr "" -#: library/asyncio-subprocess.rst:172 +#: library/asyncio-subprocess.rst:176 msgid "" "unlike Popen, Process instances do not have an equivalent to the :meth:" "`~subprocess.Popen.poll` method;" msgstr "" -#: library/asyncio-subprocess.rst:175 +#: library/asyncio-subprocess.rst:179 msgid "" "the :meth:`~asyncio.subprocess.Process.communicate` and :meth:`~asyncio." "subprocess.Process.wait` methods don't have a *timeout* parameter: use the :" "func:`wait_for` function;" msgstr "" -#: library/asyncio-subprocess.rst:179 +#: library/asyncio-subprocess.rst:183 msgid "" "the :meth:`Process.wait() ` method is " "asynchronous, whereas :meth:`subprocess.Popen.wait` method is implemented as " "a blocking busy loop;" msgstr "" -#: library/asyncio-subprocess.rst:183 +#: library/asyncio-subprocess.rst:187 msgid "the *universal_newlines* parameter is not supported." -msgstr "" +msgstr "le paramètre *universal_newlines* n'est pas pris en charge." -#: library/asyncio-subprocess.rst:185 +#: library/asyncio-subprocess.rst:189 msgid "This class is :ref:`not thread safe `." msgstr "" +"Cette classe n'est :ref:`pas conçue pour un contexte multi-fils `." -#: library/asyncio-subprocess.rst:187 +#: library/asyncio-subprocess.rst:191 msgid "" "See also the :ref:`Subprocess and Threads ` " "section." @@ -213,49 +249,58 @@ msgstr "" "Voir aussi la section :ref:`sous-processus et fils d'exécution `." -#: library/asyncio-subprocess.rst:192 +#: library/asyncio-subprocess.rst:196 msgid "Wait for the child process to terminate." -msgstr "" +msgstr "Attend que le sous processus s'arrête." -#: library/asyncio-subprocess.rst:194 +#: library/asyncio-subprocess.rst:198 msgid "Set and return the :attr:`returncode` attribute." -msgstr "" +msgstr "Définit et renvoie l'attribut :attr:`returncode`." -#: library/asyncio-subprocess.rst:198 +#: library/asyncio-subprocess.rst:202 msgid "" "This method can deadlock when using ``stdout=PIPE`` or ``stderr=PIPE`` and " "the child process generates so much output that it blocks waiting for the OS " "pipe buffer to accept more data. Use the :meth:`communicate` method when " "using pipes to avoid this condition." msgstr "" +"Cette méthode peut générer un interblocage quand ``stdout=PIPE`` ou " +"``stderr=PIPE`` est utilisé et que le sous-processus génère tellement de " +"sorties qu'il se bloque, dans l'attente que le tampon du tube côté OS " +"accepte des données supplémentaires. Pour éviter cette situation, choisissez " +"la méthode :meth:`communicate` quand vous utilisez des tubes." -#: library/asyncio-subprocess.rst:206 +#: library/asyncio-subprocess.rst:210 msgid "Interact with process:" -msgstr "" +msgstr "Interagit avec le processus :" -#: library/asyncio-subprocess.rst:208 +#: library/asyncio-subprocess.rst:212 msgid "send data to *stdin* (if *input* is not ``None``);" -msgstr "" +msgstr "envoie des données sur le *stdin* (si *input* n'est pas ``None``);" -#: library/asyncio-subprocess.rst:209 +#: library/asyncio-subprocess.rst:213 msgid "read data from *stdout* and *stderr*, until EOF is reached;" msgstr "" +"lit les données sur *stdout* et *stderr*, jusqu'à ce que le EOF soit " +"atteint ;" -#: library/asyncio-subprocess.rst:210 +#: library/asyncio-subprocess.rst:214 msgid "wait for process to terminate." -msgstr "" +msgstr "attend que le processus s'arrête." -#: library/asyncio-subprocess.rst:212 +#: library/asyncio-subprocess.rst:216 msgid "" "The optional *input* argument is the data (:class:`bytes` object) that will " "be sent to the child process." msgstr "" +"Le paramètre optionnel *input* (objet de type :class:`bytes`) représente les " +"données transmises au sous-processus." -#: library/asyncio-subprocess.rst:215 +#: library/asyncio-subprocess.rst:219 msgid "Return a tuple ``(stdout_data, stderr_data)``." -msgstr "" +msgstr "Renvoie un tuple ``(stdout_data, stderr_data)``." -#: library/asyncio-subprocess.rst:217 +#: library/asyncio-subprocess.rst:221 msgid "" "If either :exc:`BrokenPipeError` or :exc:`ConnectionResetError` exception is " "raised when writing *input* into *stdin*, the exception is ignored. This " @@ -263,7 +308,7 @@ msgid "" "*stdin*." msgstr "" -#: library/asyncio-subprocess.rst:222 +#: library/asyncio-subprocess.rst:226 msgid "" "If it is desired to send data to the process' *stdin*, the process needs to " "be created with ``stdin=PIPE``. Similarly, to get anything other than " @@ -271,7 +316,7 @@ msgid "" "``stdout=PIPE`` and/or ``stderr=PIPE`` arguments." msgstr "" -#: library/asyncio-subprocess.rst:228 +#: library/asyncio-subprocess.rst:232 msgid "" "Note, that the data read is buffered in memory, so do not use this method if " "the data size is large or unlimited." @@ -279,26 +324,26 @@ msgstr "" "Notez que les données lues sont mises en cache en mémoire, donc n'utilisez " "pas cette méthode si la taille des données est importante voire illimitée." -#: library/asyncio-subprocess.rst:233 +#: library/asyncio-subprocess.rst:237 msgid "Sends the signal *signal* to the child process." msgstr "Envoie le signal *signal* au sous-processus." -#: library/asyncio-subprocess.rst:237 -#, fuzzy +#: library/asyncio-subprocess.rst:241 msgid "" "On Windows, :py:data:`SIGTERM` is an alias for :meth:`terminate`. " "``CTRL_C_EVENT`` and ``CTRL_BREAK_EVENT`` can be sent to processes started " "with a *creationflags* parameter which includes ``CREATE_NEW_PROCESS_GROUP``." msgstr "" -"Sous Windows, *SIGTERM* est un alias pour :meth:`terminate`. *CTRL_C_EVENT* " -"et *CTRL_BREAK_EVENT* peuvent être envoyés aux processus démarrés avec un " -"paramètre *creationflags* incluant `CREATE_NEW_PROCESS_GROUP`." +"Sous Windows, :py:data:`SIGTERM` est un alias pour :meth:`terminate`. " +"*CTRL_C_EVENT* et *CTRL_BREAK_EVENT* peuvent être envoyés aux processus " +"démarrés avec un paramètre *creationflags* incluant " +"``CREATE_NEW_PROCESS_GROUP``." -#: library/asyncio-subprocess.rst:244 +#: library/asyncio-subprocess.rst:248 msgid "Stop the child process." msgstr "Arrête le sous-processus." -#: library/asyncio-subprocess.rst:246 +#: library/asyncio-subprocess.rst:250 msgid "" "On POSIX systems this method sends :py:data:`signal.SIGTERM` to the child " "process." @@ -306,73 +351,75 @@ msgstr "" "Sur les systèmes POSIX, cette méthode envoie un :py:data:`signal.SIGTERM` au " "sous-processus." -#: library/asyncio-subprocess.rst:249 +#: library/asyncio-subprocess.rst:253 msgid "" "On Windows the Win32 API function :c:func:`TerminateProcess` is called to " "stop the child process." msgstr "" -#: library/asyncio-subprocess.rst:254 -msgid "Kill the child." -msgstr "" - -#: library/asyncio-subprocess.rst:256 +#: library/asyncio-subprocess.rst:258 #, fuzzy +msgid "Kill the child process." +msgstr "Arrête le sous-processus." + +#: library/asyncio-subprocess.rst:260 msgid "" "On POSIX systems this method sends :py:data:`SIGKILL` to the child process." msgstr "" -"Sur les systèmes POSIX, cette méthode envoie un :py:data:`signal.SIGTERM` au " +"Sur les systèmes POSIX, cette méthode envoie :py:data:`signal.SIGTERM` au " "sous-processus." -#: library/asyncio-subprocess.rst:259 +#: library/asyncio-subprocess.rst:263 msgid "On Windows this method is an alias for :meth:`terminate`." -msgstr "" +msgstr "Sous Windows, cette méthode est un alias pour :meth:`terminate`." -#: library/asyncio-subprocess.rst:263 +#: library/asyncio-subprocess.rst:267 msgid "" "Standard input stream (:class:`StreamWriter`) or ``None`` if the process was " "created with ``stdin=None``." msgstr "" -#: library/asyncio-subprocess.rst:268 +#: library/asyncio-subprocess.rst:272 msgid "" "Standard output stream (:class:`StreamReader`) or ``None`` if the process " "was created with ``stdout=None``." msgstr "" -#: library/asyncio-subprocess.rst:273 +#: library/asyncio-subprocess.rst:277 msgid "" "Standard error stream (:class:`StreamReader`) or ``None`` if the process was " "created with ``stderr=None``." msgstr "" -#: library/asyncio-subprocess.rst:278 +#: library/asyncio-subprocess.rst:282 msgid "" "Use the :meth:`communicate` method rather than :attr:`process.stdin.write() " "`, :attr:`await process.stdout.read() ` or :attr:`await " -"process.stderr.read `. This avoids deadlocks due to streams pausing " -"reading or writing and blocking the child process." +"process.stderr.read() `. This avoids deadlocks due to streams " +"pausing reading or writing and blocking the child process." msgstr "" -#: library/asyncio-subprocess.rst:287 +#: library/asyncio-subprocess.rst:291 msgid "Process identification number (PID)." msgstr "" +"Numéro d'identification du processus (PID, pour *Process Identification " +"Number* en anglais)." -#: library/asyncio-subprocess.rst:289 +#: library/asyncio-subprocess.rst:293 msgid "" "Note that for processes created by the :func:`create_subprocess_shell` " "function, this attribute is the PID of the spawned shell." msgstr "" -#: library/asyncio-subprocess.rst:294 +#: library/asyncio-subprocess.rst:298 msgid "Return code of the process when it exits." -msgstr "" +msgstr "Code de retour du processus quand il se termine." -#: library/asyncio-subprocess.rst:296 +#: library/asyncio-subprocess.rst:300 msgid "A ``None`` value indicates that the process has not terminated yet." msgstr "" -#: library/asyncio-subprocess.rst:298 +#: library/asyncio-subprocess.rst:302 msgid "" "A negative value ``-N`` indicates that the child was terminated by signal " "``N`` (POSIX only)." @@ -380,70 +427,83 @@ msgstr "" "Une valeur négative ``-N`` indique que le sous-processus a été terminé par " "un signal ``N`` (seulement sur les systèmes *POSIX*)." -#: library/asyncio-subprocess.rst:305 +#: library/asyncio-subprocess.rst:309 msgid "Subprocess and Threads" msgstr "Sous-processus et fils d'exécution" -#: library/asyncio-subprocess.rst:307 +#: library/asyncio-subprocess.rst:311 msgid "" "Standard asyncio event loop supports running subprocesses from different " "threads by default." msgstr "" -#: library/asyncio-subprocess.rst:310 +#: library/asyncio-subprocess.rst:314 msgid "" "On Windows subprocesses are provided by :class:`ProactorEventLoop` only " "(default), :class:`SelectorEventLoop` has no subprocess support." msgstr "" -#: library/asyncio-subprocess.rst:313 +#: library/asyncio-subprocess.rst:317 msgid "" "On UNIX *child watchers* are used for subprocess finish waiting, see :ref:" "`asyncio-watchers` for more info." msgstr "" -#: library/asyncio-subprocess.rst:319 +#: library/asyncio-subprocess.rst:323 msgid "" "UNIX switched to use :class:`ThreadedChildWatcher` for spawning subprocesses " "from different threads without any limitation." msgstr "" -#: library/asyncio-subprocess.rst:322 +#: library/asyncio-subprocess.rst:326 msgid "" "Spawning a subprocess with *inactive* current child watcher raises :exc:" "`RuntimeError`." msgstr "" +"Instancier un sous-processus avec un observateur enfant actuel *inactif* " +"lève l'exception :exc:`RuntimeError`." -#: library/asyncio-subprocess.rst:325 +#: library/asyncio-subprocess.rst:329 msgid "" "Note that alternative event loop implementations might have own limitations; " "please refer to their documentation." msgstr "" +"Notez que ces implémentations alternatives de la boucle d'événements peuvent " +"comporter leurs propres limitations. Veuillez vous référer à leur " +"documentation." -#: library/asyncio-subprocess.rst:330 +#: library/asyncio-subprocess.rst:334 msgid "" "The :ref:`Concurrency and multithreading in asyncio ` section." msgstr "" +"La section :ref:`Exécution concurrente et multi-fils d'exécution `." -#: library/asyncio-subprocess.rst:335 +#: library/asyncio-subprocess.rst:339 msgid "Examples" msgstr "Exemples" -#: library/asyncio-subprocess.rst:337 +#: library/asyncio-subprocess.rst:341 msgid "" "An example using the :class:`~asyncio.subprocess.Process` class to control a " "subprocess and the :class:`StreamReader` class to read from its standard " "output." msgstr "" +"Un exemple utilisant la classe :class:`~asyncio.subprocess.Process` pour " +"contrôler un sous-processus et la classe :class:`StreamReader` pour lire sa " +"sortie standard." -#: library/asyncio-subprocess.rst:343 +#: library/asyncio-subprocess.rst:347 msgid "" "The subprocess is created by the :func:`create_subprocess_exec` function::" msgstr "" +"Le sous-processus est créé par la fonction :func:`create_subprocess_exec` ::" -#: library/asyncio-subprocess.rst:370 +#: library/asyncio-subprocess.rst:374 msgid "" "See also the :ref:`same example ` written " "using low-level APIs." msgstr "" +"Voir également :ref:`le même exemple `, " +"écrit en utilisant des API de bas niveau." diff --git a/library/asyncio-sync.po b/library/asyncio-sync.po index 6f04710c07..74698634b8 100644 --- a/library/asyncio-sync.po +++ b/library/asyncio-sync.po @@ -91,7 +91,7 @@ msgstr "" #: library/asyncio-sync.rst:114 library/asyncio-sync.rst:290 #: library/asyncio-sync.rst:345 msgid "The *loop* parameter." -msgstr "" +msgstr "Le paramètre *loop*." #: library/asyncio-sync.rst:71 msgid "Acquire the lock." diff --git a/library/asyncio-task.po b/library/asyncio-task.po index b039e21a6a..d3482e0104 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-09-22 17:11+0200\n" "Last-Translator: Philippe GALVAN \n" "Language-Team: FRENCH \n" @@ -32,11 +32,11 @@ msgid "Coroutines" msgstr "Coroutines" #: library/asyncio-task.rst:21 +#, fuzzy msgid "" ":term:`Coroutines ` declared with the async/await syntax is the " "preferred way of writing asyncio applications. For example, the following " -"snippet of code (requires Python 3.7+) prints \"hello\", waits 1 second, and " -"then prints \"world\"::" +"snippet of code prints \"hello\", waits 1 second, and then prints \"world\"::" msgstr "" "Les :term:`coroutines ` déclarées avec la syntaxe *async/await* " "sont la manière privilégiée d’écrire des applications *asyncio*. Par " @@ -267,7 +267,7 @@ msgstr "" "fin. Elle doit être utilisée comme point d'entrée principal des programmes " "*asyncio* et ne doit être idéalement appelée qu'une seule fois." -#: library/asyncio-task.rst:356 library/asyncio-task.rst:606 +#: library/asyncio-task.rst:350 library/asyncio-task.rst:603 msgid "Example::" msgstr "Exemple ::" @@ -312,28 +312,25 @@ msgstr "" "`get_running_loop` ; :exc:`RuntimeError` est levée s'il n'y a pas de boucle " "en cours d'exécution dans le fil actuel." -#: library/asyncio-task.rst:262 +#: library/asyncio-task.rst:264 msgid "" -"This function has been **added in Python 3.7**. Prior to Python 3.7, the " -"low-level :func:`asyncio.ensure_future` function can be used instead::" +"Save a reference to the result of this function, to avoid a task " +"disappearing mid execution." msgstr "" -"Cette fonction a été **ajoutée dans Python 3.7**. Pour les versions " -"antérieures à la 3.7, la fonction de bas-niveau :func:`asyncio." -"ensure_future` peut-être utilisée ::" -#: library/asyncio-task.rst:788 +#: library/asyncio-task.rst:785 msgid "Added the ``name`` parameter." msgstr "ajout du paramètre ``name``." -#: library/asyncio-task.rst:284 +#: library/asyncio-task.rst:274 msgid "Sleeping" msgstr "Attente" -#: library/asyncio-task.rst:288 +#: library/asyncio-task.rst:278 msgid "Block for *delay* seconds." msgstr "Attend pendant *delay* secondes." -#: library/asyncio-task.rst:290 +#: library/asyncio-task.rst:280 msgid "" "If *result* is provided, it is returned to the caller when the coroutine " "completes." @@ -341,30 +338,37 @@ msgstr "" "Si *result* est spécifié, il est renvoyé à l'appelant quand la coroutine se " "termine." -#: library/asyncio-task.rst:293 +#: library/asyncio-task.rst:283 msgid "" "``sleep()`` always suspends the current task, allowing other tasks to run." msgstr "" "``sleep()`` suspend systématiquement la tâche courante, ce qui permet aux " "autres tâches de s'exécuter." -#: library/asyncio-task.rst:353 library/asyncio-task.rst:471 -#: library/asyncio-task.rst:605 library/asyncio-task.rst:793 +#: library/asyncio-task.rst:286 +msgid "" +"Setting the delay to 0 provides an optimized path to allow other tasks to " +"run. This can be used by long-running functions to avoid blocking the event " +"loop for the full duration of the function call." +msgstr "" + +#: library/asyncio-task.rst:347 library/asyncio-task.rst:468 +#: library/asyncio-task.rst:602 library/asyncio-task.rst:790 msgid "The *loop* parameter." msgstr "Le paramètre *loop*." -#: library/asyncio-task.rst:301 +#: library/asyncio-task.rst:295 msgid "" "Example of coroutine displaying the current date every second for 5 seconds::" msgstr "" "Exemple d'une coroutine affichant la date toutes les secondes pendant 5 " "secondes ::" -#: library/asyncio-task.rst:320 +#: library/asyncio-task.rst:314 msgid "Running Tasks Concurrently" msgstr "Exécution de tâches de manière concurrente" -#: library/asyncio-task.rst:324 +#: library/asyncio-task.rst:318 msgid "" "Run :ref:`awaitable objects ` in the *aws* sequence " "*concurrently*." @@ -372,7 +376,7 @@ msgstr "" "Exécute les objets :ref:`awaitable ` de la séquence " "*aws*, *de manière concurrente*." -#: library/asyncio-task.rst:327 +#: library/asyncio-task.rst:321 msgid "" "If any awaitable in *aws* is a coroutine, it is automatically scheduled as a " "Task." @@ -380,7 +384,7 @@ msgstr "" "Si un *attendable* de *aws* est une coroutine, celui-ci est automatiquement " "planifié comme une tâche *Task*." -#: library/asyncio-task.rst:330 +#: library/asyncio-task.rst:324 msgid "" "If all awaitables are completed successfully, the result is an aggregate " "list of returned values. The order of result values corresponds to the " @@ -390,7 +394,7 @@ msgstr "" "des valeurs renvoyées. L'ordre de cette liste correspond à l'ordre des " "*awaitables* dans *aws*." -#: library/asyncio-task.rst:334 +#: library/asyncio-task.rst:328 msgid "" "If *return_exceptions* is ``False`` (default), the first raised exception is " "immediately propagated to the task that awaits on ``gather()``. Other " @@ -402,7 +406,7 @@ msgstr "" "``gather()``. Les autres *attendables* dans la séquence *aws* **ne sont pas " "annulés** et poursuivent leur exécution." -#: library/asyncio-task.rst:339 +#: library/asyncio-task.rst:333 msgid "" "If *return_exceptions* is ``True``, exceptions are treated the same as " "successful results, and aggregated in the result list." @@ -411,7 +415,7 @@ msgstr "" "même manière que les exécutions normales, et incluses dans la liste des " "résultats." -#: library/asyncio-task.rst:342 +#: library/asyncio-task.rst:336 msgid "" "If ``gather()`` is *cancelled*, all submitted awaitables (that have not " "completed yet) are also *cancelled*." @@ -419,7 +423,7 @@ msgstr "" "Si ``gather()`` est *annulé*, tous les *awaitables* en cours (ceux qui n'ont " "pas encore fini de s'exécuter) sont également *annulés*." -#: library/asyncio-task.rst:345 +#: library/asyncio-task.rst:339 msgid "" "If any Task or Future from the *aws* sequence is *cancelled*, it is treated " "as if it raised :exc:`CancelledError` -- the ``gather()`` call is **not** " @@ -432,7 +436,7 @@ msgstr "" "l'annulation d'une tâche ou d'un futur entraîne l'annulation des autres " "tâches ou futurs." -#: library/asyncio-task.rst:391 +#: library/asyncio-task.rst:388 msgid "" "If *return_exceptions* is False, cancelling gather() after it has been " "marked done won't cancel any submitted awaitables. For instance, gather can " @@ -441,7 +445,7 @@ msgid "" "the awaitables) from gather won't cancel any other awaitables." msgstr "" -#: library/asyncio-task.rst:398 +#: library/asyncio-task.rst:395 msgid "" "If the *gather* itself is cancelled, the cancellation is propagated " "regardless of *return_exceptions*." @@ -449,11 +453,11 @@ msgstr "" "Si *gather* est lui-même annulé, l'annulation est propagée indépendamment de " "*return_exceptions*." -#: library/asyncio-task.rst:404 +#: library/asyncio-task.rst:401 msgid "Shielding From Cancellation" msgstr "Protection contre l'annulation" -#: library/asyncio-task.rst:408 +#: library/asyncio-task.rst:405 msgid "" "Protect an :ref:`awaitable object ` from being :meth:" "`cancelled `." @@ -461,21 +465,21 @@ msgstr "" "Empêche qu'un objet :ref:`awaitable ` puisse être :meth:" "`annulé `." -#: library/asyncio-task.rst:451 +#: library/asyncio-task.rst:448 msgid "If *aw* is a coroutine it is automatically scheduled as a Task." msgstr "" "Si *aw* est une coroutine, elle est planifiée automatiquement comme une " "tâche." -#: library/asyncio-task.rst:413 +#: library/asyncio-task.rst:410 msgid "The statement::" msgstr "L'instruction ::" -#: library/asyncio-task.rst:417 +#: library/asyncio-task.rst:414 msgid "is equivalent to::" msgstr "est équivalente à ::" -#: library/asyncio-task.rst:421 +#: library/asyncio-task.rst:418 msgid "" "*except* that if the coroutine containing it is cancelled, the Task running " "in ``something()`` is not cancelled. From the point of view of " @@ -488,7 +492,7 @@ msgstr "" "``something()``, il n'y a pas eu d'annulation. Cependant, son appelant est " "bien annulé, donc l'expression *await* lève bien une :exc:`CancelledError`." -#: library/asyncio-task.rst:427 +#: library/asyncio-task.rst:424 msgid "" "If ``something()`` is cancelled by other means (i.e. from within itself) " "that would also cancel ``shield()``." @@ -496,7 +500,7 @@ msgstr "" "Si ``something()`` est annulée d'une autre façon (c.-à-d. depuis elle-même) " "ceci annule également ``shield()``." -#: library/asyncio-task.rst:430 +#: library/asyncio-task.rst:427 msgid "" "If it is desired to completely ignore cancellation (not recommended) the " "``shield()`` function should be combined with a try/except clause, as " @@ -506,11 +510,11 @@ msgstr "" "``shield()`` peut être combinée à une clause *try* / *except*, comme dans le " "code ci-dessous ::" -#: library/asyncio-task.rst:444 +#: library/asyncio-task.rst:441 msgid "Timeouts" msgstr "Délais d'attente" -#: library/asyncio-task.rst:448 +#: library/asyncio-task.rst:445 msgid "" "Wait for the *aw* :ref:`awaitable ` to complete with a " "timeout." @@ -518,7 +522,7 @@ msgstr "" "Attend la fin de l':ref:`awaitable ` *aw* avec délai " "d'attente." -#: library/asyncio-task.rst:453 +#: library/asyncio-task.rst:450 msgid "" "*timeout* can either be ``None`` or a float or int number of seconds to wait " "for. If *timeout* is ``None``, block until the future completes." @@ -527,7 +531,7 @@ msgstr "" "décimal) d'attente. Si *timeout* vaut ``None``, la fonction s'interrompt " "jusqu'à ce que le futur s'achève." -#: library/asyncio-task.rst:457 +#: library/asyncio-task.rst:454 msgid "" "If a timeout occurs, it cancels the task and raises :exc:`asyncio." "TimeoutError`." @@ -535,7 +539,7 @@ msgstr "" "Si le délai d'attente maximal est dépassé, la tâche est annulée et " "l'exception :exc:`asyncio.TimeoutError` est levée." -#: library/asyncio-task.rst:460 +#: library/asyncio-task.rst:457 msgid "" "To avoid the task :meth:`cancellation `, wrap it in :func:" "`shield`." @@ -543,7 +547,7 @@ msgstr "" "Pour empêcher :meth:`l'annulation ` de la tâche, il est " "nécessaire de l'encapsuler dans une fonction :func:`shield`." -#: library/asyncio-task.rst:463 +#: library/asyncio-task.rst:460 #, fuzzy msgid "" "The function will wait until the future is actually cancelled, so the total " @@ -553,11 +557,11 @@ msgstr "" "Cette fonction attend que le futur soit réellement annulé, donc le temps " "d'attente total peut être supérieur à *timeout*." -#: library/asyncio-task.rst:467 +#: library/asyncio-task.rst:464 msgid "If the wait is cancelled, the future *aw* is also cancelled." msgstr "Si l'attente est annulée, le futur *aw* est également annulé." -#: library/asyncio-task.rst:494 +#: library/asyncio-task.rst:491 msgid "" "When *aw* is cancelled due to a timeout, ``wait_for`` waits for *aw* to be " "cancelled. Previously, it raised :exc:`asyncio.TimeoutError` immediately." @@ -566,11 +570,11 @@ msgstr "" "``wait_for`` attend que *aw* soit annulée. Auparavant, l'exception :exc:" "`asyncio.TimeoutError` était immédiatement levée." -#: library/asyncio-task.rst:501 +#: library/asyncio-task.rst:498 msgid "Waiting Primitives" msgstr "Primitives d'attente" -#: library/asyncio-task.rst:506 +#: library/asyncio-task.rst:503 #, fuzzy msgid "" "Run :ref:`awaitable objects ` in the *aws* iterable " @@ -580,19 +584,19 @@ msgstr "" "*aws* de manière concurrente, et s'interrompt jusqu'à ce que la condition " "décrite dans *return_when* soit vraie." -#: library/asyncio-task.rst:510 +#: library/asyncio-task.rst:507 msgid "The *aws* iterable must not be empty." msgstr "" -#: library/asyncio-task.rst:512 +#: library/asyncio-task.rst:509 msgid "Returns two sets of Tasks/Futures: ``(done, pending)``." msgstr "Renvoie deux ensembles de *Tasks* / *Futures* : ``(done, pending)``." -#: library/asyncio-task.rst:514 +#: library/asyncio-task.rst:511 msgid "Usage::" msgstr "Utilisation ::" -#: library/asyncio-task.rst:518 +#: library/asyncio-task.rst:515 msgid "" "*timeout* (a float or int), if specified, can be used to control the maximum " "number of seconds to wait before returning." @@ -600,7 +604,7 @@ msgstr "" "*timeout* (entier ou décimal), si précisé, peut-être utilisé pour contrôler " "le nombre maximal de secondes d'attente avant de se terminer." -#: library/asyncio-task.rst:521 +#: library/asyncio-task.rst:518 msgid "" "Note that this function does not raise :exc:`asyncio.TimeoutError`. Futures " "or Tasks that aren't done when the timeout occurs are simply returned in the " @@ -610,7 +614,7 @@ msgstr "" "tâches qui ne sont pas finis quand le délai d'attente maximal est dépassé " "sont tout simplement renvoyés dans le second ensemble." -#: library/asyncio-task.rst:525 +#: library/asyncio-task.rst:522 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" @@ -618,28 +622,28 @@ msgstr "" "*return_when* indique quand la fonction doit se terminer. Il peut prendre " "les valeurs suivantes :" -#: library/asyncio-task.rst:531 +#: library/asyncio-task.rst:528 msgid "Constant" msgstr "Constante" -#: library/asyncio-task.rst:531 +#: library/asyncio-task.rst:528 msgid "Description" msgstr "Description" -#: library/asyncio-task.rst:533 +#: library/asyncio-task.rst:530 msgid ":const:`FIRST_COMPLETED`" msgstr ":const:`FIRST_COMPLETED`" -#: library/asyncio-task.rst:533 +#: library/asyncio-task.rst:530 msgid "The function will return when any future finishes or is cancelled." msgstr "" "La fonction se termine lorsque n'importe quel futur se termine ou est annulé." -#: library/asyncio-task.rst:536 +#: library/asyncio-task.rst:533 msgid ":const:`FIRST_EXCEPTION`" msgstr ":const:`FIRST_EXCEPTION`" -#: library/asyncio-task.rst:536 +#: library/asyncio-task.rst:533 msgid "" "The function will return when any future finishes by raising an exception. " "If no future raises an exception then it is equivalent to :const:" @@ -649,16 +653,16 @@ msgstr "" "exception. Si aucun *futur* ne lève d'exception, équivaut à :const:" "`ALL_COMPLETED`." -#: library/asyncio-task.rst:542 +#: library/asyncio-task.rst:539 msgid ":const:`ALL_COMPLETED`" msgstr ":const:`ALL_COMPLETED`" -#: library/asyncio-task.rst:542 +#: library/asyncio-task.rst:539 msgid "The function will return when all futures finish or are cancelled." msgstr "" "La fonction se termine lorsque les *futurs* sont tous finis ou annulés." -#: library/asyncio-task.rst:546 +#: library/asyncio-task.rst:543 msgid "" "Unlike :func:`~asyncio.wait_for`, ``wait()`` does not cancel the futures " "when a timeout occurs." @@ -666,7 +670,7 @@ msgstr "" "À la différence de :func:`~asyncio.wait_for`, ``wait()`` n'annule pas les " "futurs quand le délai d'attente est dépassé." -#: library/asyncio-task.rst:551 +#: library/asyncio-task.rst:548 msgid "" "If any awaitable in *aws* is a coroutine, it is automatically scheduled as a " "Task. Passing coroutines objects to ``wait()`` directly is deprecated as it " @@ -677,7 +681,7 @@ msgstr "" "``wait()`` est obsolète, car ceci conduisait :ref:`à un comportement portant " "à confusion `." -#: library/asyncio-task.rst:563 +#: library/asyncio-task.rst:560 msgid "" "``wait()`` schedules coroutines as Tasks automatically and later returns " "those implicitly created Task objects in ``(done, pending)`` sets. " @@ -687,15 +691,15 @@ msgstr "" "renvoie les objets *Task* ainsi créés dans les ensembles ``(done, " "pending)``. Le code suivant ne fonctionne donc pas comme voulu ::" -#: library/asyncio-task.rst:576 +#: library/asyncio-task.rst:573 msgid "Here is how the above snippet can be fixed::" msgstr "Voici comment corriger le morceau de code ci-dessus ::" -#: library/asyncio-task.rst:589 +#: library/asyncio-task.rst:586 msgid "Passing coroutine objects to ``wait()`` directly is deprecated." msgstr "Passer directement des objets coroutines à ``wait()`` est obsolète." -#: library/asyncio-task.rst:595 +#: library/asyncio-task.rst:592 #, fuzzy msgid "" "Run :ref:`awaitable objects ` in the *aws* iterable " @@ -708,7 +712,7 @@ msgstr "" "`Future`. Chaque objet *futur* renvoyé représente le résultat le plus récent " "de l'ensemble des *awaitables* restants." -#: library/asyncio-task.rst:600 +#: library/asyncio-task.rst:597 msgid "" "Raises :exc:`asyncio.TimeoutError` if the timeout occurs before all Futures " "are done." @@ -716,15 +720,15 @@ msgstr "" "Lève une exception :exc:`asyncio.TimeoutError` si le délai d'attente est " "dépassé avant que tous les futurs ne soient achevés." -#: library/asyncio-task.rst:614 +#: library/asyncio-task.rst:611 msgid "Running in Threads" msgstr "" -#: library/asyncio-task.rst:618 +#: library/asyncio-task.rst:615 msgid "Asynchronously run function *func* in a separate thread." msgstr "" -#: library/asyncio-task.rst:620 +#: library/asyncio-task.rst:617 msgid "" "Any \\*args and \\*\\*kwargs supplied for this function are directly passed " "to *func*. Also, the current :class:`contextvars.Context` is propagated, " @@ -732,19 +736,19 @@ msgid "" "separate thread." msgstr "" -#: library/asyncio-task.rst:625 +#: library/asyncio-task.rst:622 msgid "" "Return a coroutine that can be awaited to get the eventual result of *func*." msgstr "" -#: library/asyncio-task.rst:627 +#: library/asyncio-task.rst:624 msgid "" "This coroutine function is primarily intended to be used for executing IO-" "bound functions/methods that would otherwise block the event loop if they " "were ran in the main thread. For example::" msgstr "" -#: library/asyncio-task.rst:657 +#: library/asyncio-task.rst:654 msgid "" "Directly calling `blocking_io()` in any coroutine would block the event loop " "for its duration, resulting in an additional 1 second of run time. Instead, " @@ -752,7 +756,7 @@ msgid "" "blocking the event loop." msgstr "" -#: library/asyncio-task.rst:664 +#: library/asyncio-task.rst:661 msgid "" "Due to the :term:`GIL`, `asyncio.to_thread()` can typically only be used to " "make IO-bound functions non-blocking. However, for extension modules that " @@ -760,18 +764,18 @@ msgid "" "`asyncio.to_thread()` can also be used for CPU-bound functions." msgstr "" -#: library/asyncio-task.rst:673 +#: library/asyncio-task.rst:670 msgid "Scheduling From Other Threads" msgstr "Planification depuis d'autres fils d'exécution" -#: library/asyncio-task.rst:677 +#: library/asyncio-task.rst:674 msgid "Submit a coroutine to the given event loop. Thread-safe." msgstr "" "Enregistre une coroutine dans la boucle d'exécution actuelle. Cette " "opération est compatible avec les programmes à multiples fils d'exécution " "(*thread-safe*)." -#: library/asyncio-task.rst:679 +#: library/asyncio-task.rst:676 msgid "" "Return a :class:`concurrent.futures.Future` to wait for the result from " "another OS thread." @@ -779,7 +783,7 @@ msgstr "" "Renvoie un :class:`concurrent.futures.Future` pour attendre le résultat d'un " "autre fil d'exécution du système d'exploitation." -#: library/asyncio-task.rst:682 +#: library/asyncio-task.rst:679 msgid "" "This function is meant to be called from a different OS thread than the one " "where the event loop is running. Example::" @@ -787,7 +791,7 @@ msgstr "" "Cette fonction est faite pour être appelée par un fil d'exécution distinct " "de celui dans laquelle la boucle d'événement s'exécute. Exemple ::" -#: library/asyncio-task.rst:694 +#: library/asyncio-task.rst:691 msgid "" "If an exception is raised in the coroutine, the returned Future will be " "notified. It can also be used to cancel the task in the event loop::" @@ -796,7 +800,7 @@ msgstr "" "averti. Elle peut également être utilisée pour annuler la tâche de la boucle " "d'événement ::" -#: library/asyncio-task.rst:708 +#: library/asyncio-task.rst:705 msgid "" "See the :ref:`concurrency and multithreading ` " "section of the documentation." @@ -804,7 +808,7 @@ msgstr "" "Voir la section :ref:`exécution concurrente et multi-fils d'exécution " "` de la documentation." -#: library/asyncio-task.rst:711 +#: library/asyncio-task.rst:708 msgid "" "Unlike other asyncio functions this function requires the *loop* argument to " "be passed explicitly." @@ -812,11 +816,11 @@ msgstr "" "À la différence des autres fonctions d'*asyncio*, cette fonction requiert " "que *loop* soit passé de manière explicite." -#: library/asyncio-task.rst:718 +#: library/asyncio-task.rst:715 msgid "Introspection" msgstr "Introspection" -#: library/asyncio-task.rst:723 +#: library/asyncio-task.rst:720 msgid "" "Return the currently running :class:`Task` instance, or ``None`` if no task " "is running." @@ -824,7 +828,7 @@ msgstr "" "Renvoie l'instance de la :class:`Task` en cours d'exécution, ou ``None`` " "s'il n'y a pas de tâche en cours." -#: library/asyncio-task.rst:726 +#: library/asyncio-task.rst:723 msgid "" "If *loop* is ``None`` :func:`get_running_loop` is used to get the current " "loop." @@ -832,13 +836,13 @@ msgstr "" "Si *loop* vaut ``None``, :func:`get_running_loop` est appelée pour récupérer " "la boucle en cours d'exécution." -#: library/asyncio-task.rst:734 +#: library/asyncio-task.rst:731 msgid "Return a set of not yet finished :class:`Task` objects run by the loop." msgstr "" "Renvoie l'ensemble des :class:`Task` non terminés en cours d'exécution dans " "la boucle." -#: library/asyncio-task.rst:737 +#: library/asyncio-task.rst:734 msgid "" "If *loop* is ``None``, :func:`get_running_loop` is used for getting current " "loop." @@ -846,11 +850,11 @@ msgstr "" "Si *loop* vaut ``None``, :func:`get_running_loop` est appelée pour récupérer " "la boucle en cours d'exécution." -#: library/asyncio-task.rst:744 +#: library/asyncio-task.rst:741 msgid "Task Object" msgstr "Objets *Task*" -#: library/asyncio-task.rst:748 +#: library/asyncio-task.rst:745 msgid "" "A :class:`Future-like ` object that runs a Python :ref:`coroutine " "`. Not thread-safe." @@ -859,7 +863,7 @@ msgstr "" "`coroutine ` Python. Cet objet n'est pas utilisable dans des " "programmes à fils d'exécution multiples." -#: library/asyncio-task.rst:751 +#: library/asyncio-task.rst:748 msgid "" "Tasks are used to run coroutines in event loops. If a coroutine awaits on a " "Future, the Task suspends the execution of the coroutine and waits for the " @@ -871,7 +875,7 @@ msgstr "" "attend la fin de ce *futur*. Quand celui-ci est terminé, l'exécution de la " "coroutine encapsulée reprend." -#: library/asyncio-task.rst:757 +#: library/asyncio-task.rst:754 msgid "" "Event loops use cooperative scheduling: an event loop runs one Task at a " "time. While a Task awaits for the completion of a Future, the event loop " @@ -882,7 +886,7 @@ msgstr "" "futur, la boucle d'événement exécute d'autres tâches, des fonctions de " "rappel, ou effectue des opérations d'entrées-sorties." -#: library/asyncio-task.rst:762 +#: library/asyncio-task.rst:759 msgid "" "Use the high-level :func:`asyncio.create_task` function to create Tasks, or " "the low-level :meth:`loop.create_task` or :func:`ensure_future` functions. " @@ -893,7 +897,7 @@ msgstr "" "créer des tâches. Il est déconseillé d'instancier manuellement des objets " "*Task*." -#: library/asyncio-task.rst:767 +#: library/asyncio-task.rst:764 msgid "" "To cancel a running Task use the :meth:`cancel` method. Calling it will " "cause the Task to throw a :exc:`CancelledError` exception into the wrapped " @@ -905,7 +909,7 @@ msgstr "" "`CancelledError` dans la coroutine encapsulée. Si la coroutine attendait un " "*futur* au moment de l'annulation, celui-ci est annulé." -#: library/asyncio-task.rst:772 +#: library/asyncio-task.rst:769 msgid "" ":meth:`cancelled` can be used to check if the Task was cancelled. The method " "returns ``True`` if the wrapped coroutine did not suppress the :exc:" @@ -915,7 +919,7 @@ msgstr "" "Elle renvoie ``True`` si la coroutine encapsulée n'a pas ignoré l'exception :" "exc:`CancelledError` et a bien été annulée." -#: library/asyncio-task.rst:777 +#: library/asyncio-task.rst:774 msgid "" ":class:`asyncio.Task` inherits from :class:`Future` all of its APIs except :" "meth:`Future.set_result` and :meth:`Future.set_exception`." @@ -923,7 +927,7 @@ msgstr "" ":class:`asyncio.Task` hérite de :class:`Future`, de toute son API, à " "l'exception de :meth:`Future.set_result` et de :meth:`Future.set_exception`." -#: library/asyncio-task.rst:781 +#: library/asyncio-task.rst:778 msgid "" "Tasks support the :mod:`contextvars` module. When a Task is created it " "copies the current context and later runs its coroutine in the copied " @@ -933,15 +937,15 @@ msgstr "" "tâche effectue une copie du contexte actuel et exécutera ses coroutines dans " "cette copie." -#: library/asyncio-task.rst:785 +#: library/asyncio-task.rst:782 msgid "Added support for the :mod:`contextvars` module." msgstr "Ajout du support du module :mod:`contextvars`." -#: library/asyncio-task.rst:796 +#: library/asyncio-task.rst:793 msgid "Request the Task to be cancelled." msgstr "Demande l'annulation d'une tâche." -#: library/asyncio-task.rst:798 +#: library/asyncio-task.rst:795 msgid "" "This arranges for a :exc:`CancelledError` exception to be thrown into the " "wrapped coroutine on the next cycle of the event loop." @@ -950,7 +954,7 @@ msgstr "" "encapsulée. L'exception sera levée au prochain cycle de la boucle " "d'exécution." -#: library/asyncio-task.rst:801 +#: library/asyncio-task.rst:798 msgid "" "The coroutine then has a chance to clean up or even deny the request by " "suppressing the exception with a :keyword:`try` ... ... ``except " @@ -966,11 +970,11 @@ msgstr "" "annulée, bien qu'ignorer totalement une annulation ne soit ni une pratique " "courante, ni encouragé." -#: library/asyncio-task.rst:809 +#: library/asyncio-task.rst:806 msgid "Added the ``msg`` parameter." msgstr "" -#: library/asyncio-task.rst:814 +#: library/asyncio-task.rst:811 msgid "" "The following example illustrates how coroutines can intercept the " "cancellation request::" @@ -978,11 +982,11 @@ msgstr "" "L'exemple ci-dessous illustre comment une coroutine peut intercepter une " "requête d'annulation ::" -#: library/asyncio-task.rst:853 +#: library/asyncio-task.rst:850 msgid "Return ``True`` if the Task is *cancelled*." msgstr "Renvoie ``True`` si la tâche est *annulée*." -#: library/asyncio-task.rst:855 +#: library/asyncio-task.rst:852 msgid "" "The Task is *cancelled* when the cancellation was requested with :meth:" "`cancel` and the wrapped coroutine propagated the :exc:`CancelledError` " @@ -992,11 +996,11 @@ msgstr "" "et la coroutine encapsulée a propagé l'exception :exc:`CancelledError` qui a " "été levée en son sein." -#: library/asyncio-task.rst:861 +#: library/asyncio-task.rst:858 msgid "Return ``True`` if the Task is *done*." msgstr "Renvoie ``True`` si la tâche est *achevée*." -#: library/asyncio-task.rst:863 +#: library/asyncio-task.rst:860 msgid "" "A Task is *done* when the wrapped coroutine either returned a value, raised " "an exception, or the Task was cancelled." @@ -1004,11 +1008,11 @@ msgstr "" "Une tâche est dite *achevée* quand la coroutine encapsulée a soit renvoyé " "une valeur, soit levé une exception, ou que la tâche a été annulée." -#: library/asyncio-task.rst:868 +#: library/asyncio-task.rst:865 msgid "Return the result of the Task." msgstr "Renvoie le résultat de la tâche." -#: library/asyncio-task.rst:870 +#: library/asyncio-task.rst:867 msgid "" "If the Task is *done*, the result of the wrapped coroutine is returned (or " "if the coroutine raised an exception, that exception is re-raised.)" @@ -1017,7 +1021,7 @@ msgstr "" "renvoyé (sinon, dans le cas où la coroutine a levé une exception, cette " "exception est de nouveau levée)." -#: library/asyncio-task.rst:888 +#: library/asyncio-task.rst:885 msgid "" "If the Task has been *cancelled*, this method raises a :exc:`CancelledError` " "exception." @@ -1025,7 +1029,7 @@ msgstr "" "Si la tâche a été *annulée*, cette méthode lève une exception :exc:" "`CancelledError`." -#: library/asyncio-task.rst:877 +#: library/asyncio-task.rst:874 msgid "" "If the Task's result isn't yet available, this method raises a :exc:" "`InvalidStateError` exception." @@ -1033,11 +1037,11 @@ msgstr "" "Si le résultat de la tâche n'est pas encore disponible, cette méthode lève " "une exception :exc:`InvalidStateError`." -#: library/asyncio-task.rst:882 +#: library/asyncio-task.rst:879 msgid "Return the exception of the Task." msgstr "Renvoie l'exception de la tâche." -#: library/asyncio-task.rst:884 +#: library/asyncio-task.rst:881 msgid "" "If the wrapped coroutine raised an exception that exception is returned. If " "the wrapped coroutine returned normally this method returns ``None``." @@ -1045,7 +1049,7 @@ msgstr "" "Si la coroutine encapsulée lève une exception, cette exception est renvoyée. " "Si la coroutine s'est exécutée normalement, cette méthode renvoie ``None``." -#: library/asyncio-task.rst:891 +#: library/asyncio-task.rst:888 msgid "" "If the Task isn't *done* yet, this method raises an :exc:`InvalidStateError` " "exception." @@ -1053,30 +1057,30 @@ msgstr "" "Si la tâche n'est pas encore *achevée*, cette méthode lève une exception :" "exc:`InvalidStateError`." -#: library/asyncio-task.rst:896 +#: library/asyncio-task.rst:893 msgid "Add a callback to be run when the Task is *done*." msgstr "" "Ajoute une fonction de rappel qui sera exécutée quand la tâche sera " "*achevée*." -#: library/asyncio-task.rst:907 +#: library/asyncio-task.rst:904 msgid "This method should only be used in low-level callback-based code." msgstr "" "Cette méthode ne doit être utilisée que dans du code basé sur les fonctions " "de rappel de bas-niveau." -#: library/asyncio-task.rst:900 +#: library/asyncio-task.rst:897 msgid "" "See the documentation of :meth:`Future.add_done_callback` for more details." msgstr "" "Se référer à la documentation de :meth:`Future.add_done_callback` pour plus " "de détails." -#: library/asyncio-task.rst:905 +#: library/asyncio-task.rst:902 msgid "Remove *callback* from the callbacks list." msgstr "Retire *callback* de la liste de fonctions de rappel." -#: library/asyncio-task.rst:909 +#: library/asyncio-task.rst:906 msgid "" "See the documentation of :meth:`Future.remove_done_callback` for more " "details." @@ -1084,11 +1088,11 @@ msgstr "" "Se référer à la documentation de :meth:`Future.remove_done_callback` pour " "plus de détails." -#: library/asyncio-task.rst:914 +#: library/asyncio-task.rst:911 msgid "Return the list of stack frames for this Task." msgstr "Renvoie une liste représentant la pile d'appels de la tâche." -#: library/asyncio-task.rst:916 +#: library/asyncio-task.rst:913 msgid "" "If the wrapped coroutine is not done, this returns the stack where it is " "suspended. If the coroutine has completed successfully or was cancelled, " @@ -1101,15 +1105,15 @@ msgstr "" "renvoie une liste vide. Si la coroutine a été terminée par une exception, " "ceci renvoie la pile d'erreurs." -#: library/asyncio-task.rst:922 +#: library/asyncio-task.rst:919 msgid "The frames are always ordered from oldest to newest." msgstr "La pile est toujours affichée de l'appelant à l'appelé." -#: library/asyncio-task.rst:924 +#: library/asyncio-task.rst:921 msgid "Only one stack frame is returned for a suspended coroutine." msgstr "Une seule ligne est renvoyée si la coroutine est suspendue." -#: library/asyncio-task.rst:926 +#: library/asyncio-task.rst:923 msgid "" "The optional *limit* argument sets the maximum number of frames to return; " "by default all available frames are returned. The ordering of the returned " @@ -1123,11 +1127,11 @@ msgstr "" "renvoyés, si la pile est une pile d'erreurs, ce sont les appels les plus " "anciens qui le sont (dans un souci de cohérence avec le module *traceback*)." -#: library/asyncio-task.rst:935 +#: library/asyncio-task.rst:932 msgid "Print the stack or traceback for this Task." msgstr "Affiche la pile d'appels ou d'erreurs de la tâche." -#: library/asyncio-task.rst:937 +#: library/asyncio-task.rst:934 msgid "" "This produces output similar to that of the traceback module for the frames " "retrieved by :meth:`get_stack`." @@ -1135,11 +1139,11 @@ msgstr "" "Le format de sortie des appels produits par :meth:`get_stack` est similaire " "à celui du module *traceback*." -#: library/asyncio-task.rst:940 +#: library/asyncio-task.rst:937 msgid "The *limit* argument is passed to :meth:`get_stack` directly." msgstr "Le paramètre *limit* est directement passé à :meth:`get_stack`." -#: library/asyncio-task.rst:942 +#: library/asyncio-task.rst:939 msgid "" "The *file* argument is an I/O stream to which the output is written; by " "default output is written to :data:`sys.stderr`." @@ -1147,15 +1151,15 @@ msgstr "" "Le paramètre *file* est un flux d'entrées-sorties sur lequel le résultat est " "écrit ; par défaut, :data:`sys.stderr`." -#: library/asyncio-task.rst:947 +#: library/asyncio-task.rst:944 msgid "Return the coroutine object wrapped by the :class:`Task`." msgstr "Renvoie l’objet *coroutine* encapsulé par la :class:`Task`." -#: library/asyncio-task.rst:953 +#: library/asyncio-task.rst:950 msgid "Return the name of the Task." msgstr "Renvoie le nom de la tâche." -#: library/asyncio-task.rst:955 +#: library/asyncio-task.rst:952 msgid "" "If no name has been explicitly assigned to the Task, the default asyncio " "Task implementation generates a default name during instantiation." @@ -1164,18 +1168,18 @@ msgstr "" "défaut d’une *Task* *asyncio* génère un nom par défaut durant " "l’instanciation." -#: library/asyncio-task.rst:963 +#: library/asyncio-task.rst:960 msgid "Set the name of the Task." msgstr "Définit le nom de la tâche." -#: library/asyncio-task.rst:965 +#: library/asyncio-task.rst:962 msgid "" "The *value* argument can be any object, which is then converted to a string." msgstr "" "L’argument *value* peut être n’importe quel objet qui sera ensuite converti " "en chaine de caractères." -#: library/asyncio-task.rst:968 +#: library/asyncio-task.rst:965 msgid "" "In the default Task implementation, the name will be visible in the :func:" "`repr` output of a task object." @@ -1183,19 +1187,20 @@ msgstr "" "Dans l’implémentation par défaut de *Task*, le nom sera visible dans le " "résultat de :func:`repr` d’un objet *Task*." -#: library/asyncio-task.rst:977 +#: library/asyncio-task.rst:974 msgid "Generator-based Coroutines" msgstr "Coroutines basées sur des générateurs" -#: library/asyncio-task.rst:981 +#: library/asyncio-task.rst:978 +#, fuzzy msgid "" -"Support for generator-based coroutines is **deprecated** and is scheduled " -"for removal in Python 3.10." +"Support for generator-based coroutines is **deprecated** and is removed in " +"Python 3.11." msgstr "" "Les coroutines basées sur des générateurs sont **obsolètes** et il est prévu " "de les supprimer en Python 3.10." -#: library/asyncio-task.rst:984 +#: library/asyncio-task.rst:981 msgid "" "Generator-based coroutines predate async/await syntax. They are Python " "generators that use ``yield from`` expressions to await on Futures and other " @@ -1205,7 +1210,7 @@ msgstr "" "*async* / *await*. Il existe des générateurs *Python* qui utilisent les " "expressions ``yield from`` pour attendre des *futurs* et autres coroutines." -#: library/asyncio-task.rst:988 +#: library/asyncio-task.rst:985 msgid "" "Generator-based coroutines should be decorated with :func:`@asyncio." "coroutine `, although this is not enforced." @@ -1214,11 +1219,11 @@ msgstr "" "`@asyncio.coroutine `, même si ce n'est pas vérifié par " "l'interpréteur." -#: library/asyncio-task.rst:995 +#: library/asyncio-task.rst:992 msgid "Decorator to mark generator-based coroutines." msgstr "Décorateur pour coroutines basées sur des générateurs." -#: library/asyncio-task.rst:997 +#: library/asyncio-task.rst:994 msgid "" "This decorator enables legacy generator-based coroutines to be compatible " "with async/await code::" @@ -1226,22 +1231,22 @@ msgstr "" "Ce décorateur rend compatibles les coroutines basées sur des générateurs " "avec le code *async* / *await* ::" -#: library/asyncio-task.rst:1007 +#: library/asyncio-task.rst:1004 msgid "This decorator should not be used for :keyword:`async def` coroutines." msgstr "" "Ce décorateur ne doit pas être utilisé avec des coroutines :keyword:`async " "def`." # pas de majuscule car suit un deux-points -#: library/asyncio-task.rst:1012 +#: library/asyncio-task.rst:1009 msgid "Use :keyword:`async def` instead." msgstr "utilisez :keyword:`async def` à la place." -#: library/asyncio-task.rst:1016 +#: library/asyncio-task.rst:1013 msgid "Return ``True`` if *obj* is a :ref:`coroutine object `." msgstr "Renvoie ``True`` si *obj* est un :ref:`objet coroutine `." -#: library/asyncio-task.rst:1018 +#: library/asyncio-task.rst:1015 msgid "" "This method is different from :func:`inspect.iscoroutine` because it returns " "``True`` for generator-based coroutines." @@ -1249,12 +1254,12 @@ msgstr "" "Cette méthode est différente de :func:`inspect.iscoroutine` car elle renvoie " "``True`` pour des coroutines basées sur des générateurs." -#: library/asyncio-task.rst:1023 +#: library/asyncio-task.rst:1020 msgid "Return ``True`` if *func* is a :ref:`coroutine function `." msgstr "" "Renvoie ``True`` si *func* est une :ref:`fonction coroutine `." -#: library/asyncio-task.rst:1026 +#: library/asyncio-task.rst:1023 msgid "" "This method is different from :func:`inspect.iscoroutinefunction` because it " "returns ``True`` for generator-based coroutine functions decorated with :" @@ -1263,3 +1268,11 @@ msgstr "" "Cette méthode est différente de :func:`inspect.iscoroutinefunction` car elle " "renvoie ``True`` pour des coroutines basées sur des générateurs, décorées " "avec :func:`@coroutine `." + +#~ msgid "" +#~ "This function has been **added in Python 3.7**. Prior to Python 3.7, the " +#~ "low-level :func:`asyncio.ensure_future` function can be used instead::" +#~ msgstr "" +#~ "Cette fonction a été **ajoutée dans Python 3.7**. Pour les versions " +#~ "antérieures à la 3.7, la fonction de bas-niveau :func:`asyncio." +#~ "ensure_future` peut-être utilisée ::" diff --git a/library/asyncio.po b/library/asyncio.po index c4d9401260..41f60589f8 100644 --- a/library/asyncio.po +++ b/library/asyncio.po @@ -6,14 +6,14 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2018-12-16 16:19+0100\n" +"PO-Revision-Date: 2021-05-24 21:49-0400\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.6\n" +"X-Generator: Poedit 2.4.3\n" #: library/asyncio.rst:66 msgid "High-level APIs" @@ -136,6 +136,6 @@ msgid "Reference" msgstr "Sommaire" #: library/asyncio.rst:96 -#, fuzzy msgid "The source code for asyncio can be found in :source:`Lib/asyncio/`." -msgstr "**Code source :** :source:`Lib/asyncio/`" +msgstr "" +"Le code source pour `asyncio` est disponible dans :source:`Lib/asyncio/`." diff --git a/library/asyncore.po b/library/asyncore.po index 2c366d3d72..f50842d409 100644 --- a/library/asyncore.po +++ b/library/asyncore.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-07-27 23:21+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -18,15 +18,17 @@ msgstr "" msgid ":mod:`asyncore` --- Asynchronous socket handler" msgstr ":mod:`asyncore` — Gestionnaire de socket asynchrone" -#: library/asyncore.rst:13 +#: library/asyncore.rst:14 msgid "**Source code:** :source:`Lib/asyncore.py`" msgstr "**Code source :** :source:`Lib/asyncore.py`" -#: library/asyncore.rst:15 -msgid "Please use :mod:`asyncio` instead." -msgstr "Utilisez :mod:`asyncio` à la place." +#: library/asyncore.rst:16 +msgid "" +":mod:`asyncore` will be removed in Python 3.12 (see :pep:`PEP 594 " +"<594#asyncore>` for details). Please use :mod:`asyncio` instead." +msgstr "" -#: library/asyncore.rst:22 +#: library/asyncore.rst:25 msgid "" "This module exists for backwards compatibility only. For new code we " "recommend using :mod:`asyncio`." @@ -34,13 +36,13 @@ msgstr "" "Ce module n'existe que pour des raisons de rétrocompatibilité. Pour du code " "nouveau, l'utilisation de :mod:`asyncio` est recommandée." -#: library/asyncore.rst:25 +#: library/asyncore.rst:28 msgid "" "This module provides the basic infrastructure for writing asynchronous " "socket service clients and servers." msgstr "" -#: library/asyncore.rst:28 +#: library/asyncore.rst:31 msgid "" "There are only two ways to have a program on a single processor do \"more " "than one thing at a time.\" Multi-threaded programming is the simplest and " @@ -52,7 +54,7 @@ msgid "" "servers are rarely processor bound, however." msgstr "" -#: library/asyncore.rst:37 +#: library/asyncore.rst:40 msgid "" "If your operating system supports the :c:func:`select` system call in its I/" "O library (and nearly all do), then you can use it to juggle multiple " @@ -66,7 +68,7 @@ msgid "" "module is invaluable." msgstr "" -#: library/asyncore.rst:48 +#: library/asyncore.rst:51 msgid "" "The basic idea behind both modules is to create one or more network " "*channels*, instances of class :class:`asyncore.dispatcher` and :class:" @@ -75,7 +77,7 @@ msgid "" "*map*." msgstr "" -#: library/asyncore.rst:54 +#: library/asyncore.rst:57 msgid "" "Once the initial channel(s) is(are) created, calling the :func:`loop` " "function activates channel service, which continues until the last channel " @@ -83,7 +85,7 @@ msgid "" "is closed." msgstr "" -#: library/asyncore.rst:61 +#: library/asyncore.rst:64 msgid "" "Enter a polling loop that terminates after count passes or all open channels " "have been closed. All arguments are optional. The *count* parameter " @@ -95,7 +97,7 @@ msgid "" "preference to :func:`~select.select` (the default is ``False``)." msgstr "" -#: library/asyncore.rst:70 +#: library/asyncore.rst:73 msgid "" "The *map* parameter is a dictionary whose items are the channels to watch. " "As channels are closed they are deleted from their map. If *map* is " @@ -104,7 +106,7 @@ msgid "" "be mixed in the map." msgstr "" -#: library/asyncore.rst:79 +#: library/asyncore.rst:82 msgid "" "The :class:`dispatcher` class is a thin wrapper around a low-level socket " "object. To make it more useful, it has a few methods for event-handling " @@ -112,7 +114,7 @@ msgid "" "as a normal non-blocking socket object." msgstr "" -#: library/asyncore.rst:84 +#: library/asyncore.rst:87 msgid "" "The firing of low-level events at certain times or in certain connection " "states tells the asynchronous loop that certain higher-level events have " @@ -123,39 +125,39 @@ msgid "" "events are:" msgstr "" -#: library/asyncore.rst:93 +#: library/asyncore.rst:96 msgid "Event" msgstr "" -#: library/asyncore.rst:93 +#: library/asyncore.rst:96 msgid "Description" msgstr "Description" -#: library/asyncore.rst:95 +#: library/asyncore.rst:98 msgid "``handle_connect()``" msgstr "``handle_connect()``" -#: library/asyncore.rst:95 +#: library/asyncore.rst:98 msgid "Implied by the first read or write event" msgstr "" -#: library/asyncore.rst:98 +#: library/asyncore.rst:101 msgid "``handle_close()``" msgstr "``handle_close()``" -#: library/asyncore.rst:98 +#: library/asyncore.rst:101 msgid "Implied by a read event with no data available" msgstr "" -#: library/asyncore.rst:101 +#: library/asyncore.rst:104 msgid "``handle_accepted()``" msgstr "``handle_accepted()``" -#: library/asyncore.rst:101 +#: library/asyncore.rst:104 msgid "Implied by a read event on a listening socket" msgstr "" -#: library/asyncore.rst:105 +#: library/asyncore.rst:108 msgid "" "During asynchronous processing, each mapped channel's :meth:`readable` and :" "meth:`writable` methods are used to determine whether the channel's socket " @@ -163,49 +165,49 @@ msgid "" "`poll`\\ ed for read and write events." msgstr "" -#: library/asyncore.rst:110 +#: library/asyncore.rst:113 msgid "" "Thus, the set of channel events is larger than the basic socket events. The " "full set of methods that can be overridden in your subclass follows:" msgstr "" -#: library/asyncore.rst:116 +#: library/asyncore.rst:119 msgid "" "Called when the asynchronous loop detects that a :meth:`read` call on the " "channel's socket will succeed." msgstr "" -#: library/asyncore.rst:122 +#: library/asyncore.rst:125 msgid "" "Called when the asynchronous loop detects that a writable socket can be " "written. Often this method will implement the necessary buffering for " "performance. For example::" msgstr "" -#: library/asyncore.rst:133 +#: library/asyncore.rst:136 msgid "" "Called when there is out of band (OOB) data for a socket connection. This " "will almost never happen, as OOB is tenuously supported and rarely used." msgstr "" -#: library/asyncore.rst:139 +#: library/asyncore.rst:142 msgid "" "Called when the active opener's socket actually makes a connection. Might " "send a \"welcome\" banner, or initiate a protocol negotiation with the " "remote endpoint, for example." msgstr "" -#: library/asyncore.rst:146 +#: library/asyncore.rst:149 msgid "Called when the socket is closed." msgstr "Appelé lorsque la socket est fermée." -#: library/asyncore.rst:151 +#: library/asyncore.rst:154 msgid "" "Called when an exception is raised and not otherwise handled. The default " "version prints a condensed traceback." msgstr "" -#: library/asyncore.rst:157 +#: library/asyncore.rst:160 msgid "" "Called on listening channels (passive openers) when a connection can be " "established with a new remote endpoint that has issued a :meth:`connect` " @@ -213,7 +215,7 @@ msgid "" "`handle_accepted` instead." msgstr "" -#: library/asyncore.rst:167 +#: library/asyncore.rst:170 msgid "" "Called on listening channels (passive openers) when a connection has been " "established with a new remote endpoint that has issued a :meth:`connect` " @@ -222,7 +224,7 @@ msgid "" "socket on the other end of the connection." msgstr "" -#: library/asyncore.rst:178 +#: library/asyncore.rst:181 msgid "" "Called each time around the asynchronous loop to determine whether a " "channel's socket should be added to the list on which read events can " @@ -230,7 +232,7 @@ msgid "" "default, all channels will be interested in read events." msgstr "" -#: library/asyncore.rst:186 +#: library/asyncore.rst:189 msgid "" "Called each time around the asynchronous loop to determine whether a " "channel's socket should be added to the list on which write events can " @@ -238,55 +240,55 @@ msgid "" "default, all channels will be interested in write events." msgstr "" -#: library/asyncore.rst:192 +#: library/asyncore.rst:195 msgid "" "In addition, each channel delegates or extends many of the socket methods. " "Most of these are nearly identical to their socket partners." msgstr "" -#: library/asyncore.rst:198 +#: library/asyncore.rst:201 msgid "" "This is identical to the creation of a normal socket, and will use the same " "options for creation. Refer to the :mod:`socket` documentation for " "information on creating sockets." msgstr "" -#: library/asyncore.rst:202 +#: library/asyncore.rst:205 msgid "*family* and *type* arguments can be omitted." msgstr "Les arguments *family* et *type* sont optionnels." -#: library/asyncore.rst:208 +#: library/asyncore.rst:211 msgid "" "As with the normal socket object, *address* is a tuple with the first " "element the host to connect to, and the second the port number." msgstr "" -#: library/asyncore.rst:214 +#: library/asyncore.rst:217 msgid "Send *data* to the remote end-point of the socket." msgstr "Envoie *data* à l'autre bout de la socket." -#: library/asyncore.rst:219 +#: library/asyncore.rst:222 msgid "" "Read at most *buffer_size* bytes from the socket's remote end-point. An " "empty bytes object implies that the channel has been closed from the other " "end." msgstr "" -#: library/asyncore.rst:223 +#: library/asyncore.rst:226 msgid "" "Note that :meth:`recv` may raise :exc:`BlockingIOError` , even though :func:" "`select.select` or :func:`select.poll` has reported the socket ready for " "reading." msgstr "" -#: library/asyncore.rst:230 +#: library/asyncore.rst:233 msgid "" "Listen for connections made to the socket. The *backlog* argument specifies " "the maximum number of queued connections and should be at least 1; the " "maximum value is system-dependent (usually 5)." msgstr "" -#: library/asyncore.rst:237 +#: library/asyncore.rst:240 msgid "" "Bind the socket to *address*. The socket must not already be bound. (The " "format of *address* depends on the address family --- refer to the :mod:" @@ -295,7 +297,7 @@ msgid "" "`dispatcher` object's :meth:`set_reuse_addr` method." msgstr "" -#: library/asyncore.rst:246 +#: library/asyncore.rst:249 msgid "" "Accept a connection. The socket must be bound to an address and listening " "for connections. The return value can be either ``None`` or a pair ``(conn, " @@ -306,21 +308,21 @@ msgid "" "this event and keep listening for further incoming connections." msgstr "" -#: library/asyncore.rst:258 +#: library/asyncore.rst:261 msgid "" "Close the socket. All future operations on the socket object will fail. The " "remote end-point will receive no more data (after queued data is flushed). " "Sockets are automatically closed when they are garbage-collected." msgstr "" -#: library/asyncore.rst:266 +#: library/asyncore.rst:269 msgid "" "A :class:`dispatcher` subclass which adds simple buffered output capability, " "useful for simple clients. For more sophisticated usage use :class:`asynchat." "async_chat`." msgstr "" -#: library/asyncore.rst:272 +#: library/asyncore.rst:275 msgid "" "A file_dispatcher takes a file descriptor or :term:`file object` along with " "an optional map argument and wraps it for use with the :c:func:`poll` or :c:" @@ -329,11 +331,11 @@ msgid "" "`file_wrapper` constructor." msgstr "" -#: library/asyncore.rst:287 +#: library/asyncore.rst:290 msgid ":ref:`Availability `: Unix." msgstr ":ref:`Disponibilité ` : Unix." -#: library/asyncore.rst:282 +#: library/asyncore.rst:285 msgid "" "A file_wrapper takes an integer file descriptor and calls :func:`os.dup` to " "duplicate the handle so that the original handle may be closed independently " @@ -341,22 +343,25 @@ msgid "" "socket for use by the :class:`file_dispatcher` class." msgstr "" -#: library/asyncore.rst:293 +#: library/asyncore.rst:296 msgid "asyncore Example basic HTTP client" msgstr "Exemple de client HTTP basique avec :mod:`asyncore`" -#: library/asyncore.rst:295 +#: library/asyncore.rst:298 msgid "" "Here is a very basic HTTP client that uses the :class:`dispatcher` class to " "implement its socket handling::" msgstr "" -#: library/asyncore.rst:332 +#: library/asyncore.rst:335 msgid "asyncore Example basic echo server" msgstr "Serveur *echo* basique avec :mod:`asyncore`" -#: library/asyncore.rst:334 +#: library/asyncore.rst:337 msgid "" "Here is a basic echo server that uses the :class:`dispatcher` class to " "accept connections and dispatches the incoming connections to a handler::" msgstr "" + +#~ msgid "Please use :mod:`asyncio` instead." +#~ msgstr "Utilisez :mod:`asyncio` à la place." diff --git a/library/atexit.po b/library/atexit.po index 6decdc3083..3184472dd7 100644 --- a/library/atexit.po +++ b/library/atexit.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-10-15 09:15+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -83,10 +83,11 @@ msgstr "" "nettoyés en dernier." #: library/atexit.rst:40 +#, fuzzy msgid "" "If an exception is raised during execution of the exit handlers, a traceback " "is printed (unless :exc:`SystemExit` is raised) and the exception " -"information is saved. After all exit handlers have had a chance to run the " +"information is saved. After all exit handlers have had a chance to run, the " "last exception to be raised is re-raised." msgstr "" "Si une exception est levée durant l'exécution du gestionnaire de fin de " @@ -105,22 +106,26 @@ msgstr "" #: library/atexit.rst:51 msgid "" -"Remove *func* from the list of functions to be run at interpreter shutdown. " -"After calling :func:`unregister`, *func* is guaranteed not to be called when " -"the interpreter shuts down, even if it was registered more than once. :func:" -"`unregister` silently does nothing if *func* was not previously registered." +"Remove *func* from the list of functions to be run at interpreter shutdown. :" +"func:`unregister` silently does nothing if *func* was not previously " +"registered. If *func* has been registered more than once, every occurrence " +"of that function in the :mod:`atexit` call stack will be removed. Equality " +"comparisons (``==``) are used internally during unregistration, so function " +"references do not need to have matching identities." msgstr "" -"Retire *func* de la liste des fonctions à exécuter à l'arrêt de " -"l’interpréteur. Après avoir appelé :func:`unregister`, *func* est garantie " -"de ne pas être appelée à l'arrêt de l’interpréteur, même si elle a été " -"inscrite plus d'une fois. :func:`unregister` ne fait rien et reste muette " -"dans le cas où *func* n'a pas été inscrite précédemment." - -#: library/atexit.rst:61 +"Retire *func* de la liste des fonctions à exécuter au moment de l'arrêt de " +"l'interpréteur. :func:`unregister` ne fait rien et reste silencieux si " +"*func* n'a pas été préalablement inscrite. Si *func* a été inscrite plus " +"d'une fois, toutes les occurrences de cette fonction sont retirées de la " +"pile d'appels de :mod:`atexit`. La comparaison d'égalité (``==``) est " +"utilisée dans l'implémentation interne de la désinscription. Les références " +"des fonctions n'ont donc pas besoin d'avoir la même identité." + +#: library/atexit.rst:62 msgid "Module :mod:`readline`" msgstr "Module :mod:`readline`" -#: library/atexit.rst:61 +#: library/atexit.rst:62 msgid "" "Useful example of :mod:`atexit` to read and write :mod:`readline` history " "files." @@ -128,11 +133,11 @@ msgstr "" "Un exemple utile de l'usage de :mod:`atexit` pour lire et écrire des " "fichiers d'historique :mod:`readline`." -#: library/atexit.rst:68 +#: library/atexit.rst:69 msgid ":mod:`atexit` Example" msgstr "Exemple avec :mod:`atexit`" -#: library/atexit.rst:70 +#: library/atexit.rst:71 msgid "" "The following simple example demonstrates how a module can initialize a " "counter from a file when it is imported and save the counter's updated value " @@ -145,7 +150,7 @@ msgstr "" "besoin que l'application fasse un appel explicite dans ce module au moment " "de l'arrêt de l'interpréteur. ::" -#: library/atexit.rst:92 +#: library/atexit.rst:94 msgid "" "Positional and keyword arguments may also be passed to :func:`register` to " "be passed along to the registered function when it is called::" @@ -153,12 +158,25 @@ msgstr "" "Les arguments positionnels et nommés peuvent aussi être passés à :func:" "`register` afin d'être repassés à la fonction inscrite lors de son appel ::" -#: library/atexit.rst:104 +#: library/atexit.rst:106 msgid "Usage as a :term:`decorator`::" msgstr "Utilisation en tant que :term:`décorateur ` ::" -#: library/atexit.rst:112 +#: library/atexit.rst:114 msgid "This only works with functions that can be called without arguments." msgstr "" "Ceci fonctionne uniquement avec des fonctions qui peuvent être appelées sans " "argument." + +#~ msgid "" +#~ "Remove *func* from the list of functions to be run at interpreter " +#~ "shutdown. After calling :func:`unregister`, *func* is guaranteed not to " +#~ "be called when the interpreter shuts down, even if it was registered more " +#~ "than once. :func:`unregister` silently does nothing if *func* was not " +#~ "previously registered." +#~ msgstr "" +#~ "Retire *func* de la liste des fonctions à exécuter à l'arrêt de " +#~ "l’interpréteur. Après avoir appelé :func:`unregister`, *func* est " +#~ "garantie de ne pas être appelée à l'arrêt de l’interpréteur, même si elle " +#~ "a été inscrite plus d'une fois. :func:`unregister` ne fait rien et reste " +#~ "muette dans le cas où *func* n'a pas été inscrite précédemment." diff --git a/library/audioop.po b/library/audioop.po index 490b93f3c1..84454308c0 100644 --- a/library/audioop.po +++ b/library/audioop.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,7 +18,13 @@ msgstr "" msgid ":mod:`audioop` --- Manipulate raw audio data" msgstr ":mod:`audioloop` — Manipulation de données audio brutes" -#: library/audioop.rst:9 +#: library/audioop.rst:8 +msgid "" +"The :mod:`audioop` module is deprecated (see :pep:`PEP 594 <594#audioop>` " +"for details)." +msgstr "" + +#: library/audioop.rst:14 msgid "" "The :mod:`audioop` module contains some useful operations on sound " "fragments. It operates on sound fragments consisting of signed integer " @@ -26,84 +32,104 @@ msgid "" "`. All scalar items are integers, unless specified " "otherwise." msgstr "" +"Le module :mod:`audioop` permet d'effectuer des opérations utiles sur des " +"fragments sonores. Ceux-ci sont constitués d'échantillons audio, suite " +"d'entiers signés de taille 8, 16, 24 ou 32 bits. Ils sont sauvegardés dans " +"des :term:`objets octet-compatibles `. Tous les nombres " +"sont des entiers, sauf mention particulière." -#: library/audioop.rst:14 +#: library/audioop.rst:19 msgid "" "Support for 24-bit samples was added. All functions now accept any :term:" "`bytes-like object`. String input now results in an immediate error." msgstr "" +"Ajout de la prise en charge d'échantillons 24 bits. Toutes les fonctions " +"acceptent maintenant les :term:`objets octet-compatibles `. Une chaîne de caractères reçue en entrée lève immédiatement une " +"erreur." -#: library/audioop.rst:25 +#: library/audioop.rst:30 msgid "" "This module provides support for a-LAW, u-LAW and Intel/DVI ADPCM encodings." msgstr "" +"Ce module prend en charge les encodages de la loi A, de la loi u et les " +"encodages Intel/DVI ADPCM." -#: library/audioop.rst:29 +#: library/audioop.rst:34 msgid "" "A few of the more complicated operations only take 16-bit samples, otherwise " "the sample size (in bytes) is always a parameter of the operation." msgstr "" +"Mis à part quelques opérations plus complexes ne prenant que des " +"échantillons de 16 bits, la taille de l'échantillon (en octets) est toujours " +"un paramètre de l'opération." -#: library/audioop.rst:32 +#: library/audioop.rst:37 msgid "The module defines the following variables and functions:" -msgstr "" +msgstr "Le module définit les fonctions et variables suivantes :" -#: library/audioop.rst:37 +#: library/audioop.rst:42 msgid "" "This exception is raised on all errors, such as unknown number of bytes per " "sample, etc." msgstr "" +"Cette exception est levée pour toutes les erreurs, comme un nombre inconnu " +"d'octets par échantillon, etc." -#: library/audioop.rst:43 +#: library/audioop.rst:48 msgid "" "Return a fragment which is the addition of the two samples passed as " "parameters. *width* is the sample width in bytes, either ``1``, ``2``, ``3`` " "or ``4``. Both fragments should have the same length. Samples are " "truncated in case of overflow." msgstr "" +"Renvoie un fragment constitué de l'addition des deux échantillons fournis " +"comme paramètres. *width* est la largeur de l'échantillon en octets, soit " +"``1``, ``2``, ``3`` ou ``4``. Les deux fragments doivent avoir la même " +"longueur. Les échantillons sont tronqués en cas de débordement." -#: library/audioop.rst:50 +#: library/audioop.rst:55 msgid "" "Decode an Intel/DVI ADPCM coded fragment to a linear fragment. See the " "description of :func:`lin2adpcm` for details on ADPCM coding. Return a tuple " "``(sample, newstate)`` where the sample has the width specified in *width*." msgstr "" -#: library/audioop.rst:57 +#: library/audioop.rst:62 msgid "" "Convert sound fragments in a-LAW encoding to linearly encoded sound " "fragments. a-LAW encoding always uses 8 bits samples, so *width* refers only " "to the sample width of the output fragment here." msgstr "" -#: library/audioop.rst:64 +#: library/audioop.rst:69 msgid "Return the average over all samples in the fragment." -msgstr "" +msgstr "Renvoie la moyenne prise sur l'ensemble des échantillons du fragment." -#: library/audioop.rst:69 +#: library/audioop.rst:74 msgid "" "Return the average peak-peak value over all samples in the fragment. No " "filtering is done, so the usefulness of this routine is questionable." msgstr "" -#: library/audioop.rst:75 +#: library/audioop.rst:80 msgid "" "Return a fragment that is the original fragment with a bias added to each " "sample. Samples wrap around in case of overflow." msgstr "" -#: library/audioop.rst:81 +#: library/audioop.rst:86 msgid "" "\"Byteswap\" all samples in a fragment and returns the modified fragment. " "Converts big-endian samples to little-endian and vice versa." msgstr "" -#: library/audioop.rst:89 +#: library/audioop.rst:94 msgid "" "Return the number of zero crossings in the fragment passed as an argument." msgstr "" -#: library/audioop.rst:94 +#: library/audioop.rst:99 msgid "" "Return a factor *F* such that ``rms(add(fragment, mul(reference, -F)))`` is " "minimal, i.e., return the factor with which you should multiply *reference* " @@ -111,11 +137,11 @@ msgid "" "both contain 2-byte samples." msgstr "" -#: library/audioop.rst:99 +#: library/audioop.rst:104 msgid "The time taken by this routine is proportional to ``len(fragment)``." -msgstr "" +msgstr "Le temps pris par cette routine est proportionnel à ``len(fragment)``." -#: library/audioop.rst:104 +#: library/audioop.rst:109 msgid "" "Try to match *reference* as well as possible to a portion of *fragment* " "(which should be the longer fragment). This is (conceptually) done by " @@ -126,22 +152,24 @@ msgid "" "*factor* is the (floating-point) factor as per :func:`findfactor`." msgstr "" -#: library/audioop.rst:115 +#: library/audioop.rst:120 msgid "" "Search *fragment* for a slice of length *length* samples (not bytes!) with " -"maximum energy, i.e., return *i* for which ``rms(fragment[i*2:(i" -"+length)*2])`` is maximal. The fragments should both contain 2-byte samples." +"maximum energy, i.e., return *i* for which ``rms(fragment[i*2:" +"(i+length)*2])`` is maximal. The fragments should both contain 2-byte " +"samples." msgstr "" -#: library/audioop.rst:119 +#: library/audioop.rst:124 msgid "The routine takes time proportional to ``len(fragment)``." -msgstr "" +msgstr "La routine s'exécute en un temps proportionnel à ``len(fragment)``." -#: library/audioop.rst:124 +#: library/audioop.rst:129 msgid "Return the value of sample *index* from the fragment." msgstr "" +"Renvoie la valeur de l'échantillon à l'indice *index* dans le fragment." -#: library/audioop.rst:129 +#: library/audioop.rst:134 msgid "" "Convert samples to 4 bit Intel/DVI ADPCM encoding. ADPCM coding is an " "adaptive coding scheme, whereby each 4 bit number is the difference between " @@ -150,7 +178,7 @@ msgid "" "standard." msgstr "" -#: library/audioop.rst:134 +#: library/audioop.rst:139 msgid "" "*state* is a tuple containing the state of the coder. The coder returns a " "tuple ``(adpcmfrag, newstate)``, and the *newstate* should be passed to the " @@ -159,7 +187,7 @@ msgid "" "per byte." msgstr "" -#: library/audioop.rst:142 +#: library/audioop.rst:147 msgid "" "Convert samples in the audio fragment to a-LAW encoding and return this as a " "bytes object. a-LAW is an audio encoding format whereby you get a dynamic " @@ -167,24 +195,26 @@ msgid "" "audio hardware, among others." msgstr "" -#: library/audioop.rst:150 +#: library/audioop.rst:155 msgid "Convert samples between 1-, 2-, 3- and 4-byte formats." -msgstr "" +msgstr "Convertit des échantillons pour les formats à 1, 2, 3, et 4 octets." -#: library/audioop.rst:154 +#: library/audioop.rst:159 msgid "" "In some audio formats, such as .WAV files, 16, 24 and 32 bit samples are " "signed, but 8 bit samples are unsigned. So when converting to 8 bit wide " "samples for these formats, you need to also add 128 to the result::" msgstr "" -#: library/audioop.rst:161 +#: library/audioop.rst:166 msgid "" "The same, in reverse, has to be applied when converting from 8 to 16, 24 or " "32 bit width samples." msgstr "" +"Le même procédé, mais inversé, doit être suivi lorsqu'on exécute une " +"conversion d'échantillons de 8 bits à 16, 24 ou 32 bits." -#: library/audioop.rst:167 +#: library/audioop.rst:172 msgid "" "Convert samples in the audio fragment to u-LAW encoding and return this as a " "bytes object. u-LAW is an audio encoding format whereby you get a dynamic " @@ -192,33 +222,39 @@ msgid "" "audio hardware, among others." msgstr "" -#: library/audioop.rst:175 +#: library/audioop.rst:180 msgid "" "Return the maximum of the *absolute value* of all samples in a fragment." msgstr "" +"Renvoie la *valeur absolue* maximale de tous les échantillons du fragment." -#: library/audioop.rst:180 +#: library/audioop.rst:185 msgid "Return the maximum peak-peak value in the sound fragment." msgstr "" -#: library/audioop.rst:185 +#: library/audioop.rst:190 msgid "" "Return a tuple consisting of the minimum and maximum values of all samples " "in the sound fragment." msgstr "" +"Renvoie un *n*-uplet contenant les valeurs maximale et minimale de tous les " +"échantillons du fragment sonore." -#: library/audioop.rst:191 +#: library/audioop.rst:196 msgid "" "Return a fragment that has all samples in the original fragment multiplied " "by the floating-point value *factor*. Samples are truncated in case of " "overflow." msgstr "" +"Renvoie un fragment contenant tous les échantillons du fragment original " +"multipliés par la valeur à décimale *factor*. Les échantillons sont tronqués " +"en cas de débordement." -#: library/audioop.rst:197 +#: library/audioop.rst:202 msgid "Convert the frame rate of the input fragment." -msgstr "" +msgstr "Transforme la fréquence d'échantillonnage du fragment d'entrée." -#: library/audioop.rst:199 +#: library/audioop.rst:204 msgid "" "*state* is a tuple containing the state of the converter. The converter " "returns a tuple ``(newfragment, newstate)``, and *newstate* should be passed " @@ -226,47 +262,61 @@ msgid "" "as the state." msgstr "" -#: library/audioop.rst:203 +#: library/audioop.rst:208 msgid "" "The *weightA* and *weightB* arguments are parameters for a simple digital " "filter and default to ``1`` and ``0`` respectively." msgstr "" +"Les arguments *weightA* et *weightB* sont les paramètres d'un filtre " +"numérique simple et ont comme valeur par défaut ``1`` et ``0``, " +"respectivement." -#: library/audioop.rst:209 +#: library/audioop.rst:214 msgid "Reverse the samples in a fragment and returns the modified fragment." msgstr "" +"Inverse les échantillons dans un fragment et renvoie le fragment modifié." -#: library/audioop.rst:214 +#: library/audioop.rst:219 msgid "" "Return the root-mean-square of the fragment, i.e. ``sqrt(sum(S_i^2)/n)``." msgstr "" +"Renvoie la moyenne quadratique du fragment, c'est-à-dire ``sqrt(sum(S_i^2)/" +"n)``." -#: library/audioop.rst:216 +#: library/audioop.rst:221 msgid "This is a measure of the power in an audio signal." msgstr "C'est une mesure de la puissance dans un signal audio." -#: library/audioop.rst:221 +#: library/audioop.rst:226 msgid "" "Convert a stereo fragment to a mono fragment. The left channel is " "multiplied by *lfactor* and the right channel by *rfactor* before adding the " "two channels to give a mono signal." msgstr "" +"Transforme un fragment stéréo en fragment mono. Le canal de gauche est " +"multiplié par *lfactor* et le canal de droite par *rfactor* avant " +"d'additionner les deux canaux afin d'obtenir un signal mono." -#: library/audioop.rst:228 +#: library/audioop.rst:233 msgid "" "Generate a stereo fragment from a mono fragment. Each pair of samples in " "the stereo fragment are computed from the mono sample, whereby left channel " "samples are multiplied by *lfactor* and right channel samples by *rfactor*." msgstr "" +"Génère un fragment stéréo à partir d'un fragment mono. Chaque paire " +"d'échantillons dans le fragment stéréo est obtenue à partir de l'échantillon " +"mono de la façon suivante : les échantillons du canal de gauche sont " +"multipliés par *lfactor* et les échantillons du canal de droite, par " +"*rfactor*." -#: library/audioop.rst:235 +#: library/audioop.rst:240 msgid "" "Convert sound fragments in u-LAW encoding to linearly encoded sound " "fragments. u-LAW encoding always uses 8 bits samples, so *width* refers only " "to the sample width of the output fragment here." msgstr "" -#: library/audioop.rst:239 +#: library/audioop.rst:244 msgid "" "Note that operations such as :func:`.mul` or :func:`.max` make no " "distinction between mono and stereo fragments, i.e. all samples are treated " @@ -275,7 +325,7 @@ msgid "" "that::" msgstr "" -#: library/audioop.rst:253 +#: library/audioop.rst:258 msgid "" "If you use the ADPCM coder to build network packets and you want your " "protocol to be stateless (i.e. to be able to tolerate packet loss) you " @@ -287,14 +337,14 @@ msgid "" "index) in 8." msgstr "" -#: library/audioop.rst:261 +#: library/audioop.rst:266 msgid "" "The ADPCM coders have never been tried against other ADPCM coders, only " "against themselves. It could well be that I misinterpreted the standards in " "which case they will not be interoperable with the respective standards." msgstr "" -#: library/audioop.rst:265 +#: library/audioop.rst:270 msgid "" "The :func:`find\\*` routines might look a bit funny at first sight. They are " "primarily meant to do echo cancellation. A reasonably fast way to do this " diff --git a/library/audit_events.po b/library/audit_events.po index 489147ee31..202a14317f 100644 --- a/library/audit_events.po +++ b/library/audit_events.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" +"POT-Creation-Date: 2021-05-19 22:36+0200\n" "PO-Revision-Date: 2020-03-03 21:32+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -20,10 +20,11 @@ msgid "Audit events table" msgstr "Table des évènements d'audit" #: library/audit_events.rst:8 +#, fuzzy msgid "" "This table contains all events raised by :func:`sys.audit` or :c:func:" "`PySys_Audit` calls throughout the CPython runtime and the standard " -"library. These calls were added in 3.8.0 or later." +"library. These calls were added in 3.8.0 or later (see :pep:`578`)." msgstr "" "Cette table contient tous les évènements levés par les appels de :func:`sys." "audit` ou :c:func:`PySys_Audit` durant l'exécution de CPython et de la " @@ -54,6 +55,8 @@ msgid "" "The following events are raised internally and do not correspond to any " "public API of CPython:" msgstr "" +"Les évènements suivants sont levés en interne et ne correspondent à aucune " +"API publique de CPython:" #: library/audit_events.rst:27 #, fuzzy @@ -62,66 +65,68 @@ msgstr "Table des évènements d'audit" #: library/audit_events.rst:27 msgid "Arguments" -msgstr "" +msgstr "Arguments" #: library/audit_events.rst:29 msgid "_winapi.CreateFile" -msgstr "" +msgstr "_winapi.CreateFile" #: library/audit_events.rst:29 msgid "" "``file_name``, ``desired_access``, ``share_mode``, ``creation_disposition``, " "``flags_and_attributes``" msgstr "" +"``file_name``, ``desired_access``, ``share_mode``, ``creation_disposition``, " +"``flags_and_attributes``" #: library/audit_events.rst:33 msgid "_winapi.CreateJunction" -msgstr "" +msgstr "_winapi.CreateJunction" #: library/audit_events.rst:33 msgid "``src_path``, ``dst_path``" -msgstr "" +msgstr "``src_path``, ``dst_path``" #: library/audit_events.rst:35 msgid "_winapi.CreateNamedPipe" -msgstr "" +msgstr "_winapi.CreateNamedPipe" #: library/audit_events.rst:35 msgid "``name``, ``open_mode``, ``pipe_mode``" -msgstr "" +msgstr "``name``, ``open_mode``, ``pipe_mode``" #: library/audit_events.rst:37 msgid "_winapi.CreatePipe" -msgstr "" +msgstr "_winapi.CreatePipe" #: library/audit_events.rst:39 msgid "_winapi.CreateProcess" -msgstr "" +msgstr "_winapi.CreateProcess" #: library/audit_events.rst:39 msgid "``application_name``, ``command_line``, ``current_directory``" -msgstr "" +msgstr "``application_name``, ``command_line``, ``current_directory``" #: library/audit_events.rst:42 msgid "_winapi.OpenProcess" -msgstr "" +msgstr "_winapi.OpenProcess" #: library/audit_events.rst:42 msgid "``process_id``, ``desired_access``" -msgstr "" +msgstr "``process_id``, ``desired_access``" #: library/audit_events.rst:44 msgid "_winapi.TerminateProcess" -msgstr "" +msgstr "_winapi.TerminateProcess" #: library/audit_events.rst:44 msgid "``handle``, ``exit_code``" -msgstr "" +msgstr "``handle``, ``exit_code``" #: library/audit_events.rst:46 msgid "ctypes.PyObj_FromPtr" -msgstr "" +msgstr "ctypes.PyObj_FromPtr" #: library/audit_events.rst:46 msgid "``obj``" -msgstr "" +msgstr "``obj``" diff --git a/library/binascii.po b/library/binascii.po index 49f38738d9..d699ba9fa4 100644 --- a/library/binascii.po +++ b/library/binascii.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-05-10 13:40+0200\n" "Last-Translator: ZepmanBC \n" "Language-Team: FRENCH \n" @@ -201,12 +201,13 @@ msgstr "" "CRC est utilisé dans le format *binhex4*." #: library/binascii.rst:138 +#, fuzzy msgid "" -"Compute CRC-32, the 32-bit checksum of *data*, starting with an initial CRC " -"of *value*. The default initial CRC is zero. The algorithm is consistent " -"with the ZIP file checksum. Since the algorithm is designed for use as a " -"checksum algorithm, it is not suitable for use as a general hash algorithm. " -"Use as follows::" +"Compute CRC-32, the unsigned 32-bit checksum of *data*, starting with an " +"initial CRC of *value*. The default initial CRC is zero. The algorithm is " +"consistent with the ZIP file checksum. Since the algorithm is designed for " +"use as a checksum algorithm, it is not suitable for use as a general hash " +"algorithm. Use as follows::" msgstr "" "Calcule CRC-32, la somme de contrôle 32-bit de *data*, commençant par un CRC " "initial de *value*. Le CRC initial par défaut est zéro. L’algorithme est " @@ -215,15 +216,16 @@ msgstr "" "convient pas comme algorithme de hachage général. Utiliser comme suit ::" #: library/binascii.rst:150 +#, fuzzy msgid "" -"The result is always unsigned. To generate the same numeric value across all " -"Python versions and platforms, use ``crc32(data) & 0xffffffff``." +"The result is always unsigned. To generate the same numeric value when using " +"Python 2 or earlier, use ``crc32(data) & 0xffffffff``." msgstr "" "Le résultat est toujours non signé. Pour générer la même valeur numérique " "sur toutes les versions de Python et plateformes, utilisez ``crc32(data) & " "0xffffffff``." -#: library/binascii.rst:159 +#: library/binascii.rst:158 msgid "" "Return the hexadecimal representation of the binary *data*. Every byte of " "*data* is converted into the corresponding 2-digit hex representation. The " @@ -233,7 +235,7 @@ msgstr "" "*data* est converti en la représentation 2 chiffres correspondante. L’objet " "octets renvoyé est donc deux fois plus long que la longueur de *data*." -#: library/binascii.rst:163 +#: library/binascii.rst:162 msgid "" "Similar functionality (but returning a text string) is also conveniently " "accessible using the :meth:`bytes.hex` method." @@ -241,7 +243,7 @@ msgstr "" "Fonctionnalité similaire est également commodément accessible en utilisant " "la méthode :meth:`bytes.hex`." -#: library/binascii.rst:166 +#: library/binascii.rst:165 msgid "" "If *sep* is specified, it must be a single character str or bytes object. It " "will be inserted in the output after every *bytes_per_sep* input bytes. " @@ -254,11 +256,11 @@ msgstr "" "droite de la sortie. Si vous souhaitez compter à partir de la gauche, " "indiquez une valeur *bytes_per_sep* négative." -#: library/binascii.rst:181 +#: library/binascii.rst:180 msgid "The *sep* and *bytes_per_sep* parameters were added." msgstr "ajout des paramètres *sep* et *bytes_per_sep*." -#: library/binascii.rst:187 +#: library/binascii.rst:186 msgid "" "Return the binary data represented by the hexadecimal string *hexstr*. This " "function is the inverse of :func:`b2a_hex`. *hexstr* must contain an even " @@ -270,7 +272,7 @@ msgstr "" "*hexstr* doit contenir un nombre pair de chiffres hexadécimaux (qui peuvent " "être en majuscule ou minuscule), sinon une exception :exc:`Error` est levée." -#: library/binascii.rst:192 +#: library/binascii.rst:191 msgid "" "Similar functionality (accepting only text string arguments, but more " "liberal towards whitespace) is also accessible using the :meth:`bytes." @@ -280,13 +282,13 @@ msgstr "" "texte, mais plus libérale vis-à-vis des espaces blancs) est également " "accessible en utilisant la méthode de classe :meth:`bytes.fromhex`." -#: library/binascii.rst:198 +#: library/binascii.rst:197 msgid "Exception raised on errors. These are usually programming errors." msgstr "" "Exception levée en cas d'erreurs. Ce sont typiquement des erreurs de " "programmation." -#: library/binascii.rst:203 +#: library/binascii.rst:202 msgid "" "Exception raised on incomplete data. These are usually not programming " "errors, but may be handled by reading a little more data and trying again." @@ -295,37 +297,37 @@ msgstr "" "d’erreurs de programmation, mais elles peuvent être traitées en lisant un " "peu plus de données et en réessayant." -#: library/binascii.rst:211 +#: library/binascii.rst:210 msgid "Module :mod:`base64`" msgstr "Module :mod:`base64`" -#: library/binascii.rst:210 +#: library/binascii.rst:209 msgid "" "Support for RFC compliant base64-style encoding in base 16, 32, 64, and 85." msgstr "" "Support de l’encodage *base64-style* conforme RFC en base 16, 32, 64 et 85." -#: library/binascii.rst:214 +#: library/binascii.rst:213 msgid "Module :mod:`binhex`" msgstr "Module :mod:`binhex`" -#: library/binascii.rst:214 +#: library/binascii.rst:213 msgid "Support for the binhex format used on the Macintosh." msgstr "Support pour le format *binhex* utilisé sur Macintosh." -#: library/binascii.rst:217 +#: library/binascii.rst:216 msgid "Module :mod:`uu`" msgstr "Module :mod:`uu`" -#: library/binascii.rst:217 +#: library/binascii.rst:216 msgid "Support for UU encoding used on Unix." msgstr "Gestion de l'encodage UU utilisé sur Unix." -#: library/binascii.rst:219 +#: library/binascii.rst:218 msgid "Module :mod:`quopri`" msgstr "Module :mod:`quopri`" -#: library/binascii.rst:220 +#: library/binascii.rst:219 msgid "Support for quoted-printable encoding used in MIME email messages." msgstr "" "Support de l’encodage *quote-printable* utilisé par les messages *email* " diff --git a/library/bz2.po b/library/bz2.po index fc751c235e..d30d38cea0 100644 --- a/library/bz2.po +++ b/library/bz2.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-09-25 16:52-0600\n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -488,8 +488,8 @@ msgstr "" #: library/bz2.rst:302 msgid "" -"The example above uses a very \"nonrandom\" stream of data (a stream of `b\"z" -"\"` chunks). Random data tends to compress poorly, while ordered, " +"The example above uses a very \"nonrandom\" stream of data (a stream of " +"`b\"z\"` chunks). Random data tends to compress poorly, while ordered, " "repetitive data usually yields a high compression ratio." msgstr "" "L'exemple ci-dessus utilise un flux de données vraiment pas aléatoire (un " diff --git a/library/calendar.po b/library/calendar.po index 231ddafd83..5a9cb88bd8 100644 --- a/library/calendar.po +++ b/library/calendar.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Gtranslator 3.38.0\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" +"X-Generator: Gtranslator 3.38.0\n" #: library/calendar.rst:2 msgid ":mod:`calendar` --- General calendar-related functions" diff --git a/library/cgi.po b/library/cgi.po index 03d97274a1..aa01acf429 100644 --- a/library/cgi.po +++ b/library/cgi.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-24 17:33+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,31 +18,37 @@ msgstr "" msgid ":mod:`cgi` --- Common Gateway Interface support" msgstr "" -#: library/cgi.rst:7 +#: library/cgi.rst:8 msgid "**Source code:** :source:`Lib/cgi.py`" msgstr "**Code source :** :source:`Lib/cgi.py`" -#: library/cgi.rst:19 +#: library/cgi.rst:18 +msgid "" +"The :mod:`cgi` module is deprecated (see :pep:`PEP 594 <594#cgi>` for " +"details and alternatives)." +msgstr "" + +#: library/cgi.rst:24 msgid "Support module for Common Gateway Interface (CGI) scripts." msgstr "" -#: library/cgi.rst:21 +#: library/cgi.rst:26 msgid "" "This module defines a number of utilities for use by CGI scripts written in " "Python." msgstr "" -#: library/cgi.rst:26 +#: library/cgi.rst:31 msgid "Introduction" msgstr "Introduction" -#: library/cgi.rst:30 +#: library/cgi.rst:35 msgid "" "A CGI script is invoked by an HTTP server, usually to process user input " "submitted through an HTML ``
`` or ```` element." msgstr "" -#: library/cgi.rst:33 +#: library/cgi.rst:38 msgid "" "Most often, CGI scripts live in the server's special :file:`cgi-bin` " "directory. The HTTP server places all sorts of information about the request " @@ -51,7 +57,7 @@ msgid "" "script, and sends the script's output back to the client." msgstr "" -#: library/cgi.rst:39 +#: library/cgi.rst:44 msgid "" "The script's input is connected to the client too, and sometimes the form " "data is read this way; at other times the form data is passed via the " @@ -62,7 +68,7 @@ msgid "" "supports it)." msgstr "" -#: library/cgi.rst:46 +#: library/cgi.rst:51 msgid "" "The output of a CGI script should consist of two sections, separated by a " "blank line. The first section contains a number of headers, telling the " @@ -70,26 +76,26 @@ msgid "" "header section looks like this::" msgstr "" -#: library/cgi.rst:54 +#: library/cgi.rst:59 msgid "" "The second section is usually HTML, which allows the client software to " "display nicely formatted text with header, in-line images, etc. Here's " "Python code that prints a simple piece of HTML::" msgstr "" -#: library/cgi.rst:66 +#: library/cgi.rst:71 msgid "Using the cgi module" msgstr "" -#: library/cgi.rst:68 +#: library/cgi.rst:73 msgid "Begin by writing ``import cgi``." msgstr "" -#: library/cgi.rst:70 +#: library/cgi.rst:75 msgid "When you write a new script, consider adding these lines::" msgstr "" -#: library/cgi.rst:75 +#: library/cgi.rst:80 msgid "" "This activates a special exception handler that will display detailed " "reports in the Web browser if any errors occur. If you'd rather not show " @@ -97,7 +103,7 @@ msgid "" "saved to files instead, with code like this::" msgstr "" -#: library/cgi.rst:83 +#: library/cgi.rst:88 msgid "" "It's very helpful to use this feature during script development. The reports " "produced by :mod:`cgitb` provide information that can save you a lot of time " @@ -105,19 +111,19 @@ msgid "" "you have tested your script and are confident that it works correctly." msgstr "" -#: library/cgi.rst:88 +#: library/cgi.rst:93 msgid "" "To get at submitted form data, use the :class:`FieldStorage` class. If the " "form contains non-ASCII characters, use the *encoding* keyword parameter set " "to the value of the encoding defined for the document. It is usually " "contained in the META tag in the HEAD section of the HTML document or by " -"the :mailheader:`Content-Type` header). This reads the form contents from " +"the :mailheader:`Content-Type` header. This reads the form contents from " "the standard input or the environment (depending on the value of various " "environment variables set according to the CGI standard). Since it may " "consume standard input, it should be instantiated only once." msgstr "" -#: library/cgi.rst:97 +#: library/cgi.rst:102 msgid "" "The :class:`FieldStorage` instance can be indexed like a Python dictionary. " "It allows membership testing with the :keyword:`in` operator, and also " @@ -128,14 +134,14 @@ msgid "" "class:`FieldStorage` instance." msgstr "" -#: library/cgi.rst:105 +#: library/cgi.rst:110 msgid "" "For instance, the following code (which assumes that the :mailheader:" "`Content-Type` header and blank line have already been printed) checks that " "the fields ``name`` and ``addr`` are both set to a non-empty string::" msgstr "" -#: library/cgi.rst:119 +#: library/cgi.rst:124 msgid "" "Here the fields, accessed through ``form[key]``, are themselves instances " "of :class:`FieldStorage` (or :class:`MiniFieldStorage`, depending on the " @@ -145,7 +151,7 @@ msgid "" "second argument as a default to return if the requested key is not present." msgstr "" -#: library/cgi.rst:126 +#: library/cgi.rst:131 msgid "" "If the submitted form data contains more than one field with the same name, " "the object retrieved by ``form[key]`` is not a :class:`FieldStorage` or :" @@ -158,7 +164,7 @@ msgid "" "username fields, separated by commas::" msgstr "" -#: library/cgi.rst:139 +#: library/cgi.rst:144 msgid "" "If a field represents an uploaded file, accessing the value via the :attr:" "`~FieldStorage.value` attribute or the :meth:`~FieldStorage.getvalue` method " @@ -171,13 +177,13 @@ msgid "" "IOBase.readline` methods will return bytes)::" msgstr "" -#: library/cgi.rst:159 +#: library/cgi.rst:164 msgid "" ":class:`FieldStorage` objects also support being used in a :keyword:`with` " "statement, which will automatically close them when done." msgstr "" -#: library/cgi.rst:162 +#: library/cgi.rst:167 msgid "" "If an error is encountered when obtaining the contents of an uploaded file " "(for example, when the user interrupts the form submission by clicking on a " @@ -185,7 +191,7 @@ msgid "" "object for the field will be set to the value -1." msgstr "" -#: library/cgi.rst:167 +#: library/cgi.rst:172 msgid "" "The file upload draft standard entertains the possibility of uploading " "multiple files from one field (using a recursive :mimetype:`multipart/\\*` " @@ -196,7 +202,7 @@ msgid "" "be iterated over recursively just like the top-level form object." msgstr "" -#: library/cgi.rst:175 +#: library/cgi.rst:180 msgid "" "When a form is submitted in the \"old\" format (as the query string or as a " "single data part of type :mimetype:`application/x-www-form-urlencoded`), the " @@ -205,29 +211,29 @@ msgid "" "are always ``None``." msgstr "" -#: library/cgi.rst:180 +#: library/cgi.rst:185 msgid "" "A form submitted via POST that also has a query string will contain both :" "class:`FieldStorage` and :class:`MiniFieldStorage` items." msgstr "" -#: library/cgi.rst:183 +#: library/cgi.rst:188 msgid "" "The :attr:`~FieldStorage.file` attribute is automatically closed upon the " "garbage collection of the creating :class:`FieldStorage` instance." msgstr "" -#: library/cgi.rst:187 +#: library/cgi.rst:192 msgid "" "Added support for the context management protocol to the :class:" "`FieldStorage` class." msgstr "" -#: library/cgi.rst:193 +#: library/cgi.rst:198 msgid "Higher Level Interface" msgstr "" -#: library/cgi.rst:195 +#: library/cgi.rst:200 msgid "" "The previous section explains how to read CGI form data using the :class:" "`FieldStorage` class. This section describes a higher level interface which " @@ -237,33 +243,33 @@ msgid "" "efficiently, for example." msgstr "" -#: library/cgi.rst:204 +#: library/cgi.rst:209 msgid "" "The interface consists of two simple methods. Using the methods you can " "process form data in a generic way, without the need to worry whether only " "one or more values were posted under one name." msgstr "" -#: library/cgi.rst:208 +#: library/cgi.rst:213 msgid "" "In the previous section, you learned to write following code anytime you " "expected a user to post more than one value under one name::" msgstr "" -#: library/cgi.rst:217 +#: library/cgi.rst:222 msgid "" "This situation is common for example when a form contains a group of " "multiple checkboxes with the same name::" msgstr "" -#: library/cgi.rst:223 +#: library/cgi.rst:228 msgid "" "In most situations, however, there's only one form control with a particular " "name in a form and then you expect and need only one value associated with " "this name. So you write a script containing for example this code::" msgstr "" -#: library/cgi.rst:229 +#: library/cgi.rst:234 msgid "" "The problem with the code is that you should never expect that a client will " "provide valid input to your scripts. For example, if a curious user appends " @@ -274,21 +280,21 @@ msgid "" "an :exc:`AttributeError` exception." msgstr "" -#: library/cgi.rst:237 +#: library/cgi.rst:242 msgid "" "Therefore, the appropriate way to read form data values was to always use " "the code which checks whether the obtained value is a single value or a list " "of values. That's annoying and leads to less readable scripts." msgstr "" -#: library/cgi.rst:241 +#: library/cgi.rst:246 msgid "" "A more convenient approach is to use the methods :meth:`~FieldStorage." "getfirst` and :meth:`~FieldStorage.getlist` provided by this higher level " "interface." msgstr "" -#: library/cgi.rst:247 +#: library/cgi.rst:252 msgid "" "This method always returns only one value associated with form field *name*. " "The method returns only the first value in case that more values were posted " @@ -299,7 +305,7 @@ msgid "" "defaults to ``None`` if not specified." msgstr "" -#: library/cgi.rst:258 +#: library/cgi.rst:263 msgid "" "This method always returns a list of values associated with form field " "*name*. The method returns an empty list if no such form field or value " @@ -307,28 +313,28 @@ msgid "" "such value exists." msgstr "" -#: library/cgi.rst:262 +#: library/cgi.rst:267 msgid "Using these methods you can write nice compact code::" msgstr "" -#: library/cgi.rst:274 +#: library/cgi.rst:279 msgid "Functions" msgstr "Fonctions" -#: library/cgi.rst:276 +#: library/cgi.rst:281 msgid "" "These are useful if you want more control, or if you want to employ some of " "the algorithms implemented in this module in other circumstances." msgstr "" -#: library/cgi.rst:282 +#: library/cgi.rst:287 msgid "" "Parse a query in the environment or from a file (the file defaults to ``sys." "stdin``). The *keep_blank_values*, *strict_parsing* and *separator* " "parameters are passed to :func:`urllib.parse.parse_qs` unchanged." msgstr "" -#: library/cgi.rst:289 +#: library/cgi.rst:294 msgid "" "Parse input of type :mimetype:`multipart/form-data` (for file uploads). " "Arguments are *fp* for the input file, *pdict* for a dictionary containing " @@ -336,92 +342,92 @@ msgid "" "the request encoding." msgstr "" -#: library/cgi.rst:294 +#: library/cgi.rst:299 msgid "" "Returns a dictionary just like :func:`urllib.parse.parse_qs`: keys are the " "field names, each value is a list of values for that field. For non-file " "fields, the value is a list of strings." msgstr "" -#: library/cgi.rst:298 +#: library/cgi.rst:303 msgid "" "This is easy to use but not much good if you are expecting megabytes to be " "uploaded --- in that case, use the :class:`FieldStorage` class instead which " "is much more flexible." msgstr "" -#: library/cgi.rst:302 +#: library/cgi.rst:307 msgid "" "Added the *encoding* and *errors* parameters. For non-file fields, the " "value is now a list of strings, not bytes." msgstr "" -#: library/cgi.rst:306 +#: library/cgi.rst:311 msgid "Added the *separator* parameter." msgstr "" -#: library/cgi.rst:312 +#: library/cgi.rst:317 msgid "" "Parse a MIME header (such as :mailheader:`Content-Type`) into a main value " "and a dictionary of parameters." msgstr "" -#: library/cgi.rst:318 +#: library/cgi.rst:323 msgid "" "Robust test CGI script, usable as main program. Writes minimal HTTP headers " -"and formats all information provided to the script in HTML form." +"and formats all information provided to the script in HTML format." msgstr "" -#: library/cgi.rst:324 +#: library/cgi.rst:329 msgid "Format the shell environment in HTML." msgstr "" -#: library/cgi.rst:329 +#: library/cgi.rst:334 msgid "Format a form in HTML." msgstr "" -#: library/cgi.rst:334 +#: library/cgi.rst:339 msgid "Format the current directory in HTML." msgstr "" -#: library/cgi.rst:339 +#: library/cgi.rst:344 msgid "Print a list of useful (used by CGI) environment variables in HTML." msgstr "" -#: library/cgi.rst:345 +#: library/cgi.rst:350 msgid "Caring about security" msgstr "" -#: library/cgi.rst:349 +#: library/cgi.rst:354 msgid "" -"There's one important rule: if you invoke an external program (via the :func:" -"`os.system` or :func:`os.popen` functions. or others with similar " -"functionality), make very sure you don't pass arbitrary strings received " -"from the client to the shell. This is a well-known security hole whereby " -"clever hackers anywhere on the Web can exploit a gullible CGI script to " -"invoke arbitrary shell commands. Even parts of the URL or field names " -"cannot be trusted, since the request doesn't have to come from your form!" +"There's one important rule: if you invoke an external program (via :func:`os." +"system`, :func:`os.popen` or other functions with similar functionality), " +"make very sure you don't pass arbitrary strings received from the client to " +"the shell. This is a well-known security hole whereby clever hackers " +"anywhere on the Web can exploit a gullible CGI script to invoke arbitrary " +"shell commands. Even parts of the URL or field names cannot be trusted, " +"since the request doesn't have to come from your form!" msgstr "" -#: library/cgi.rst:357 +#: library/cgi.rst:362 msgid "" "To be on the safe side, if you must pass a string gotten from a form to a " "shell command, you should make sure the string contains only alphanumeric " "characters, dashes, underscores, and periods." msgstr "" -#: library/cgi.rst:363 +#: library/cgi.rst:368 msgid "Installing your CGI script on a Unix system" msgstr "" -#: library/cgi.rst:365 +#: library/cgi.rst:370 msgid "" "Read the documentation for your HTTP server and check with your local system " "administrator to find the directory where CGI scripts should be installed; " "usually this is in a directory :file:`cgi-bin` in the server tree." msgstr "" -#: library/cgi.rst:369 +#: library/cgi.rst:374 msgid "" "Make sure that your script is readable and executable by \"others\"; the " "Unix file mode should be ``0o755`` octal (use ``chmod 0755 filename``). " @@ -429,12 +435,12 @@ msgid "" "column 1 followed by the pathname of the Python interpreter, for instance::" msgstr "" -#: library/cgi.rst:376 +#: library/cgi.rst:381 msgid "" "Make sure the Python interpreter exists and is executable by \"others\"." msgstr "" -#: library/cgi.rst:378 +#: library/cgi.rst:383 msgid "" "Make sure that any files your script needs to read or write are readable or " "writable, respectively, by \"others\" --- their mode should be ``0o644`` for " @@ -449,28 +455,28 @@ msgid "" "anything interesting." msgstr "" -#: library/cgi.rst:389 +#: library/cgi.rst:394 msgid "" "If you need to load modules from a directory which is not on Python's " "default module search path, you can change the path in your script, before " "importing other modules. For example::" msgstr "" -#: library/cgi.rst:397 +#: library/cgi.rst:402 msgid "(This way, the directory inserted last will be searched first!)" msgstr "" -#: library/cgi.rst:399 +#: library/cgi.rst:404 msgid "" "Instructions for non-Unix systems will vary; check your HTTP server's " "documentation (it will usually have a section on CGI scripts)." msgstr "" -#: library/cgi.rst:404 +#: library/cgi.rst:409 msgid "Testing your CGI script" msgstr "" -#: library/cgi.rst:406 +#: library/cgi.rst:411 msgid "" "Unfortunately, a CGI script will generally not run when you try it from the " "command line, and a script that works perfectly from the command line may " @@ -480,30 +486,30 @@ msgid "" "will most likely send a cryptic error to the client." msgstr "" -#: library/cgi.rst:413 +#: library/cgi.rst:418 msgid "" "Assuming your script has no syntax errors, yet it does not work, you have no " "choice but to read the next section." msgstr "" -#: library/cgi.rst:418 +#: library/cgi.rst:423 msgid "Debugging CGI scripts" msgstr "" -#: library/cgi.rst:422 +#: library/cgi.rst:427 msgid "" "First of all, check for trivial installation errors --- reading the section " "above on installing your CGI script carefully can save you a lot of time. " "If you wonder whether you have understood the installation procedure " "correctly, try installing a copy of this module file (:file:`cgi.py`) as a " "CGI script. When invoked as a script, the file will dump its environment " -"and the contents of the form in HTML form. Give it the right mode etc, and " -"send it a request. If it's installed in the standard :file:`cgi-bin` " +"and the contents of the form in HTML format. Give it the right mode etc., " +"and send it a request. If it's installed in the standard :file:`cgi-bin` " "directory, it should be possible to send it a request by entering a URL into " "your browser of the form:" msgstr "" -#: library/cgi.rst:435 +#: library/cgi.rst:440 msgid "" "If this gives an error of type 404, the server cannot find the script -- " "perhaps you need to install it in a different directory. If it gives " @@ -515,19 +521,19 @@ msgid "" "same procedure for your own script, you should now be able to debug it." msgstr "" -#: library/cgi.rst:444 +#: library/cgi.rst:449 msgid "" "The next step could be to call the :mod:`cgi` module's :func:`test` function " "from your script: replace its main code with the single statement ::" msgstr "" -#: library/cgi.rst:449 +#: library/cgi.rst:454 msgid "" "This should produce the same results as those gotten from installing the :" "file:`cgi.py` file itself." msgstr "" -#: library/cgi.rst:452 +#: library/cgi.rst:457 msgid "" "When an ordinary Python script raises an unhandled exception (for whatever " "reason: of a typo in a module name, a file that can't be opened, etc.), the " @@ -537,28 +543,28 @@ msgid "" "or be discarded altogether." msgstr "" -#: library/cgi.rst:459 +#: library/cgi.rst:464 msgid "" "Fortunately, once you have managed to get your script to execute *some* " "code, you can easily send tracebacks to the Web browser using the :mod:" "`cgitb` module. If you haven't done so already, just add the lines::" msgstr "" -#: library/cgi.rst:466 +#: library/cgi.rst:471 msgid "" "to the top of your script. Then try running it again; when a problem " "occurs, you should see a detailed report that will likely make apparent the " "cause of the crash." msgstr "" -#: library/cgi.rst:470 +#: library/cgi.rst:475 msgid "" "If you suspect that there may be a problem in importing the :mod:`cgitb` " "module, you can use an even more robust approach (which only uses built-in " "modules)::" msgstr "" -#: library/cgi.rst:479 +#: library/cgi.rst:484 msgid "" "This relies on the Python interpreter to print the traceback. The content " "type of the output is set to plain text, which disables all HTML " @@ -568,47 +574,47 @@ msgid "" "interpretation is going on, the traceback will be readable." msgstr "" -#: library/cgi.rst:488 +#: library/cgi.rst:493 msgid "Common problems and solutions" msgstr "" -#: library/cgi.rst:490 +#: library/cgi.rst:495 msgid "" "Most HTTP servers buffer the output from CGI scripts until the script is " "completed. This means that it is not possible to display a progress report " "on the client's display while the script is running." msgstr "" -#: library/cgi.rst:494 +#: library/cgi.rst:499 msgid "Check the installation instructions above." msgstr "" -#: library/cgi.rst:496 +#: library/cgi.rst:501 msgid "" "Check the HTTP server's log files. (``tail -f logfile`` in a separate " "window may be useful!)" msgstr "" -#: library/cgi.rst:499 +#: library/cgi.rst:504 msgid "" "Always check a script for syntax errors first, by doing something like " "``python script.py``." msgstr "" -#: library/cgi.rst:502 +#: library/cgi.rst:507 msgid "" "If your script does not have any syntax errors, try adding ``import cgitb; " "cgitb.enable()`` to the top of the script." msgstr "" -#: library/cgi.rst:505 +#: library/cgi.rst:510 msgid "" "When invoking external programs, make sure they can be found. Usually, this " "means using absolute path names --- :envvar:`PATH` is usually not set to a " "very useful value in a CGI script." msgstr "" -#: library/cgi.rst:509 +#: library/cgi.rst:514 msgid "" "When reading or writing external files, make sure they can be read or " "written by the userid under which your CGI script will be running: this is " @@ -616,17 +622,17 @@ msgid "" "explicitly specified userid for a web server's ``suexec`` feature." msgstr "" -#: library/cgi.rst:514 +#: library/cgi.rst:519 msgid "" "Don't try to give a CGI script a set-uid mode. This doesn't work on most " "systems, and is a security liability as well." msgstr "" -#: library/cgi.rst:518 +#: library/cgi.rst:523 msgid "Footnotes" msgstr "Notes" -#: library/cgi.rst:519 +#: library/cgi.rst:524 msgid "" "Note that some recent versions of the HTML specification do state what order " "the field values should be supplied in, but knowing whether a request was " diff --git a/library/cgitb.po b/library/cgitb.po index 92ba035e2a..7576caece9 100644 --- a/library/cgitb.po +++ b/library/cgitb.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-07-29 18:36+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -19,11 +19,17 @@ msgstr "" msgid ":mod:`cgitb` --- Traceback manager for CGI scripts" msgstr ":mod:`cgitb` — Gestionnaire d'exceptions pour les scripts CGI" -#: library/cgitb.rst:10 +#: library/cgitb.rst:11 msgid "**Source code:** :source:`Lib/cgitb.py`" msgstr "**Code source :** :source:`Lib/cgitb.py`" -#: library/cgitb.rst:20 +#: library/cgitb.rst:19 +msgid "" +"The :mod:`cgitb` module is deprecated (see :pep:`PEP 594 <594#cgitb>` for " +"details)." +msgstr "" + +#: library/cgitb.rst:25 msgid "" "The :mod:`cgitb` module provides a special exception handler for Python " "scripts. (Its name is a bit misleading. It was originally designed to " @@ -47,13 +53,13 @@ msgstr "" "problème. Il est aussi possible de sauvegarder cette information dans un " "fichier plutôt que de l'envoyer dans le navigateur." -#: library/cgitb.rst:30 +#: library/cgitb.rst:35 msgid "To enable this feature, simply add this to the top of your CGI script::" msgstr "" "Pour activer cette fonctionnalité, ajoutez simplement ceci au début de votre " "script CGI ::" -#: library/cgitb.rst:35 +#: library/cgitb.rst:40 msgid "" "The options to the :func:`enable` function control whether the report is " "displayed in the browser and whether the report is logged to a file for " @@ -63,7 +69,7 @@ msgstr "" "choisir si le rapport est envoyé au navigateur ou si le rapport est écrit " "dans un fichier pour analyse ultérieure." -#: library/cgitb.rst:44 +#: library/cgitb.rst:49 msgid "" "This function causes the :mod:`cgitb` module to take over the interpreter's " "default handling for exceptions by setting the value of :attr:`sys." @@ -73,7 +79,7 @@ msgstr "" "l'interpréteur par celui du module :mod:`cgitb`, en configurant :attr:`sys." "excepthook`." -#: library/cgitb.rst:47 +#: library/cgitb.rst:52 msgid "" "The optional argument *display* defaults to ``1`` and can be set to ``0`` to " "suppress sending the traceback to the browser. If the argument *logdir* is " @@ -82,8 +88,8 @@ msgid "" "argument *context* is the number of lines of context to display around the " "current line of source code in the traceback; this defaults to ``5``. If the " "optional argument *format* is ``\"html\"``, the output is formatted as " -"HTML. Any other value forces plain text output. The default value is ``" -"\"html\"``." +"HTML. Any other value forces plain text output. The default value is " +"``\"html\"``." msgstr "" "Le paramètre optionnel *display* vaut ``1`` par défaut, et peut être mis à " "``0`` pour désactiver l'envoi des piles d'appels au navigateur. Si " @@ -95,7 +101,7 @@ msgstr "" "HTML. Le rapport sera écrit en texte brut pour toute autre valeur. La " "valeur par défaut est ``\"html\"``." -#: library/cgitb.rst:59 +#: library/cgitb.rst:64 msgid "" "This function handles the exception described by *info* (a 3-tuple " "containing the result of :func:`sys.exc_info`), formatting its traceback as " @@ -110,7 +116,7 @@ msgstr "" "de la ligne courante du code source dans la pile d’appels ; la valeur par " "défaut est ``5``." -#: library/cgitb.rst:68 +#: library/cgitb.rst:73 msgid "" "This function handles the exception described by *info* (a 3-tuple " "containing the result of :func:`sys.exc_info`), formatting its traceback as " @@ -125,7 +131,7 @@ msgstr "" "de la ligne courante du code source dans la pile d’appels ; la valeur par " "défaut est ``5``." -#: library/cgitb.rst:77 +#: library/cgitb.rst:82 msgid "" "This function handles an exception using the default settings (that is, show " "a report in the browser, but don't log to a file). This can be used when " diff --git a/library/chunk.po b/library/chunk.po index 41ca71bb5b..94ba532730 100644 --- a/library/chunk.po +++ b/library/chunk.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,12 +18,18 @@ msgstr "" msgid ":mod:`chunk` --- Read IFF chunked data" msgstr "" -#: library/chunk.rst:10 +#: library/chunk.rst:11 #, fuzzy msgid "**Source code:** :source:`Lib/chunk.py`" msgstr "**Code source :** :source:`Lib/uu.py`" -#: library/chunk.rst:21 +#: library/chunk.rst:20 +msgid "" +"The :mod:`chunk` module is deprecated (see :pep:`PEP 594 <594#chunk>` for " +"details)." +msgstr "" + +#: library/chunk.rst:26 msgid "" "This module provides an interface for reading files that use EA IFF 85 " "chunks. [#]_ This format is used in at least the Audio Interchange File " @@ -31,73 +37,73 @@ msgid "" "file format is closely related and can also be read using this module." msgstr "" -#: library/chunk.rst:26 +#: library/chunk.rst:31 msgid "A chunk has the following structure:" msgstr "" -#: library/chunk.rst:29 +#: library/chunk.rst:34 msgid "Offset" msgstr "" -#: library/chunk.rst:29 +#: library/chunk.rst:34 msgid "Length" msgstr "" -#: library/chunk.rst:29 +#: library/chunk.rst:34 msgid "Contents" msgstr "Sommaire" -#: library/chunk.rst:31 +#: library/chunk.rst:36 msgid "0" msgstr "0" -#: library/chunk.rst:33 +#: library/chunk.rst:38 msgid "4" msgstr "4" -#: library/chunk.rst:31 +#: library/chunk.rst:36 msgid "Chunk ID" msgstr "" -#: library/chunk.rst:33 +#: library/chunk.rst:38 msgid "Size of chunk in big-endian byte order, not including the header" msgstr "" -#: library/chunk.rst:37 +#: library/chunk.rst:42 msgid "8" msgstr "8" -#: library/chunk.rst:37 +#: library/chunk.rst:42 msgid "*n*" msgstr "*n*" -#: library/chunk.rst:37 +#: library/chunk.rst:42 msgid "Data bytes, where *n* is the size given in the preceding field" msgstr "" -#: library/chunk.rst:41 +#: library/chunk.rst:46 msgid "8 + *n*" msgstr "8 + *n*" -#: library/chunk.rst:41 +#: library/chunk.rst:46 msgid "0 or 1" msgstr "0 or 1" -#: library/chunk.rst:41 +#: library/chunk.rst:46 msgid "Pad byte needed if *n* is odd and chunk alignment is used" msgstr "" -#: library/chunk.rst:45 +#: library/chunk.rst:50 msgid "The ID is a 4-byte string which identifies the type of chunk." msgstr "" -#: library/chunk.rst:47 +#: library/chunk.rst:52 msgid "" "The size field (a 32-bit value, encoded using big-endian byte order) gives " "the size of the chunk data, not including the 8-byte header." msgstr "" -#: library/chunk.rst:50 +#: library/chunk.rst:55 msgid "" "Usually an IFF-type file consists of one or more chunks. The proposed usage " "of the :class:`Chunk` class defined here is to instantiate an instance at " @@ -106,7 +112,7 @@ msgid "" "creating a new instance will fail with an :exc:`EOFError` exception." msgstr "" -#: library/chunk.rst:59 +#: library/chunk.rst:64 msgid "" "Class which represents a chunk. The *file* argument is expected to be a " "file-like object. An instance of this class is specifically allowed. The " @@ -123,37 +129,37 @@ msgid "" "The default value is false." msgstr "" -#: library/chunk.rst:73 +#: library/chunk.rst:78 msgid "A :class:`Chunk` object supports the following methods:" msgstr "" -#: library/chunk.rst:78 +#: library/chunk.rst:83 msgid "" "Returns the name (ID) of the chunk. This is the first 4 bytes of the chunk." msgstr "" -#: library/chunk.rst:84 +#: library/chunk.rst:89 msgid "Returns the size of the chunk." msgstr "" -#: library/chunk.rst:89 +#: library/chunk.rst:94 msgid "" "Close and skip to the end of the chunk. This does not close the underlying " "file." msgstr "" -#: library/chunk.rst:92 +#: library/chunk.rst:97 msgid "" "The remaining methods will raise :exc:`OSError` if called after the :meth:" "`close` method has been called. Before Python 3.3, they used to raise :exc:" "`IOError`, now an alias of :exc:`OSError`." msgstr "" -#: library/chunk.rst:99 +#: library/chunk.rst:104 msgid "Returns ``False``." msgstr "" -#: library/chunk.rst:104 +#: library/chunk.rst:109 msgid "" "Set the chunk's current position. The *whence* argument is optional and " "defaults to ``0`` (absolute file positioning); other values are ``1`` (seek " @@ -162,11 +168,11 @@ msgid "" "only forward seeks are allowed." msgstr "" -#: library/chunk.rst:113 +#: library/chunk.rst:118 msgid "Return the current position into the chunk." msgstr "" -#: library/chunk.rst:118 +#: library/chunk.rst:123 msgid "" "Read at most *size* bytes from the chunk (less if the read hits the end of " "the chunk before obtaining *size* bytes). If the *size* argument is " @@ -175,7 +181,7 @@ msgid "" "immediately." msgstr "" -#: library/chunk.rst:127 +#: library/chunk.rst:132 msgid "" "Skip to the end of the chunk. All further calls to :meth:`read` for the " "chunk will return ``b''``. If you are not interested in the contents of the " @@ -183,11 +189,11 @@ msgid "" "the next chunk." msgstr "" -#: library/chunk.rst:134 +#: library/chunk.rst:139 msgid "Footnotes" msgstr "Notes" -#: library/chunk.rst:135 +#: library/chunk.rst:140 msgid "" "\"EA IFF 85\" Standard for Interchange Format Files, Jerry Morrison, " "Electronic Arts, January 1985." diff --git a/library/cmd.po b/library/cmd.po index 1514dc8916..7cc29eb9df 100644 --- a/library/cmd.po +++ b/library/cmd.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-07-29 23:43+0200\n" "Last-Translator: Luka Peschke \n" "Language-Team: FRENCH \n" @@ -183,8 +183,8 @@ msgid "" "method, called with an argument ``'bar'``, invokes the corresponding method :" "meth:`help_bar`, and if that is not present, prints the docstring of :meth:" "`do_bar`, if available. With no argument, :meth:`do_help` lists all " -"available help topics (that is, all commands with corresponding :meth:`help_" -"\\*` methods or commands that have docstrings), and also lists any " +"available help topics (that is, all commands with corresponding :meth:" +"`help_\\*` methods or commands that have docstrings), and also lists any " "undocumented commands." msgstr "" "Toutes les classes filles de :class:`Cmd` héritent d'une méthode :meth:" @@ -357,8 +357,8 @@ msgid "" "meth:`help_\\*` methods)." msgstr "" "L'en-tête à afficher si la sortie de l'aide possède une section pour les " -"commandes non documentées (c'est-à-dire qu'il existe des méthodes :meth:`dop_" -"\\*` sans méthodes :meth:`help_\\*` correspondantes)." +"commandes non documentées (c'est-à-dire qu'il existe des méthodes :meth:" +"`dop_\\*` sans méthodes :meth:`help_\\*` correspondantes)." #: library/cmd.rst:208 msgid "" diff --git a/library/codecs.po b/library/codecs.po index 2e38ecfb1b..087d93efb4 100644 --- a/library/codecs.po +++ b/library/codecs.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-10-15 09:15+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -24,15 +24,17 @@ msgid "**Source code:** :source:`Lib/codecs.py`" msgstr "**Code source :** :source:`Lib/codecs.py`" #: library/codecs.rst:23 +#, fuzzy msgid "" "This module defines base classes for standard Python codecs (encoders and " "decoders) and provides access to the internal Python codec registry, which " "manages the codec and error handling lookup process. Most standard codecs " -"are :term:`text encodings `, which encode text to bytes, but " -"there are also codecs provided that encode text to text, and bytes to bytes. " -"Custom codecs may encode and decode between arbitrary types, but some module " -"features are restricted to use specifically with :term:`text encodings `, or with codecs that encode to :class:`bytes`." +"are :term:`text encodings `, which encode text to bytes (and " +"decode bytes to text), but there are also codecs provided that encode text " +"to text, and bytes to bytes. Custom codecs may encode and decode between " +"arbitrary types, but some module features are restricted to be used " +"specifically with :term:`text encodings ` or with codecs that " +"encode to :class:`bytes`." msgstr "" "Ce module définit les classes de base pour les codecs (encodeurs et " "décodeurs) standards Python et fournit l'interface avec le registre des " @@ -252,11 +254,13 @@ msgstr "" "de recherche de codecs adaptée :" #: library/codecs.rst:161 +#, fuzzy msgid "" "Register a codec search function. Search functions are expected to take one " -"argument, being the encoding name in all lower case letters, and return a :" -"class:`CodecInfo` object. In case a search function cannot find a given " -"encoding, it should return ``None``." +"argument, being the encoding name in all lower case letters with hyphens and " +"spaces converted to underscores, and return a :class:`CodecInfo` object. In " +"case a search function cannot find a given encoding, it should return " +"``None``." msgstr "" "Enregistre une fonction de recherche de codec. Il convient qu'une fonction " "de recherche prenne un argument, le nom de l'encodage écrit en lettres " @@ -264,8 +268,12 @@ msgstr "" "recherche ne trouve pas un encodage donné, il convient qu'elle renvoie `` " "None``." +#: library/codecs.rst:167 +msgid "Hyphens and spaces are converted to underscore." +msgstr "" + # Pas de majuscule en début car suit un deux-points. -#: library/codecs.rst:168 +#: library/codecs.rst:172 msgid "" "Search function registration is not currently reversible, which may cause " "problems in some cases, such as unit testing or module reloading." @@ -274,7 +282,7 @@ msgstr "" "réversible, ce qui peut entraîner des problèmes dans certains cas, par " "exemple pour les tests unitaires ou le rechargement de module." -#: library/codecs.rst:172 +#: library/codecs.rst:176 msgid "" "While the builtin :func:`open` and the associated :mod:`io` module are the " "recommended approach for working with encoded text files, this module " @@ -287,7 +295,7 @@ msgstr "" "qui permettent l'utilisation d'une plus large gamme de codecs si vous " "travaillez avec des fichiers binaires :" -#: library/codecs.rst:179 +#: library/codecs.rst:183 msgid "" "Open an encoded file using the given *mode* and return an instance of :class:" "`StreamReaderWriter`, providing transparent encoding/decoding. The default " @@ -299,7 +307,7 @@ msgstr "" "est ouvert en lecture." # Pas de majuscule en début car suit un deux-points. -#: library/codecs.rst:185 +#: library/codecs.rst:189 msgid "" "Underlying encoded files are always opened in binary mode. No automatic " "conversion of ``'\\n'`` is done on reading and writing. The *mode* argument " @@ -312,7 +320,7 @@ msgstr "" "acceptable pour la fonction native :func:`open` ; le ``'b'`` est " "automatiquement ajouté." -#: library/codecs.rst:190 +#: library/codecs.rst:194 msgid "" "*encoding* specifies the encoding which is to be used for the file. Any " "encoding that encodes to and decodes from bytes is allowed, and the data " @@ -323,7 +331,7 @@ msgstr "" "données pris en charge par les méthodes relatives aux fichiers dépendent du " "codec utilisé." -#: library/codecs.rst:194 +#: library/codecs.rst:198 msgid "" "*errors* may be given to define the error handling. It defaults to " "``'strict'`` which causes a :exc:`ValueError` to be raised in case an " @@ -333,7 +341,7 @@ msgstr "" "par défaut est ``'strict'``, ce qui lève une :exc:`ValueError` en cas " "d'erreur lors du codage." -#: library/codecs.rst:197 +#: library/codecs.rst:201 msgid "" "*buffering* has the same meaning as for the built-in :func:`open` function. " "It defaults to -1 which means that the default buffer size will be used." @@ -342,7 +350,7 @@ msgstr "" "`open`. Il vaut `-1` par défaut, ce qui signifie que la taille par défaut du " "tampon est utilisée." -#: library/codecs.rst:203 +#: library/codecs.rst:207 msgid "" "Return a :class:`StreamRecoder` instance, a wrapped version of *file* which " "provides transparent transcoding. The original file is closed when the " @@ -352,7 +360,7 @@ msgstr "" "qui fournit un transcodage transparent. Le fichier original est fermé quand " "la version encapsulée est fermée." -#: library/codecs.rst:207 +#: library/codecs.rst:211 msgid "" "Data written to the wrapped file is decoded according to the given " "*data_encoding* and then written to the original file as bytes using " @@ -365,13 +373,13 @@ msgstr "" "original sont décodés conformément à *file_encoding* et le résultat est " "encodé en utilisant *data_encoding*." -#: library/codecs.rst:213 +#: library/codecs.rst:217 msgid "If *file_encoding* is not given, it defaults to *data_encoding*." msgstr "" "Si *file_encoding* n'est pas spécifié, la valeur par défaut est " "*data_encoding*." -#: library/codecs.rst:215 +#: library/codecs.rst:219 msgid "" "*errors* may be given to define the error handling. It defaults to " "``'strict'``, which causes :exc:`ValueError` to be raised in case an " @@ -381,7 +389,7 @@ msgstr "" "par défaut est ``'strict'``, ce qui lève une :exc:`ValueError` en cas " "d'erreur lors du codage." -#: library/codecs.rst:222 +#: library/codecs.rst:226 msgid "" "Uses an incremental encoder to iteratively encode the input provided by " "*iterator*. This function is a :term:`generator`. The *errors* argument (as " @@ -393,7 +401,7 @@ msgstr "" "`. L'argument *errors* (ainsi que tout autre argument passé par " "son nom) est transmis à l'encodeur incrémental." -#: library/codecs.rst:227 +#: library/codecs.rst:231 msgid "" "This function requires that the codec accept text :class:`str` objects to " "encode. Therefore it does not support bytes-to-bytes encoders such as " @@ -403,7 +411,7 @@ msgstr "" "class:`str`) en entrée. Par conséquent, il ne prend pas en charge les " "encodeurs *bytes* vers *bytes* tels que ``base64_codec``." -#: library/codecs.rst:234 +#: library/codecs.rst:238 msgid "" "Uses an incremental decoder to iteratively decode the input provided by " "*iterator*. This function is a :term:`generator`. The *errors* argument (as " @@ -415,7 +423,7 @@ msgstr "" "*errors* (ainsi que tout autre argument passé par son nom) est transmis au " "décodeur incrémental." -#: library/codecs.rst:239 +#: library/codecs.rst:243 msgid "" "This function requires that the codec accept :class:`bytes` objects to " "decode. Therefore it does not support text-to-text encoders such as " @@ -427,7 +435,7 @@ msgstr "" "vers texte tels que ``rot_13``, bien que ``rot_13`` puisse être utilisé de " "manière équivalente avec :func:`iterencode`." -#: library/codecs.rst:245 +#: library/codecs.rst:249 msgid "" "The module also provides the following constants which are useful for " "reading and writing to platform dependent files:" @@ -435,7 +443,7 @@ msgstr "" "Le module fournit également les constantes suivantes qui sont utiles pour " "lire et écrire les fichiers dépendants de la plateforme :" -#: library/codecs.rst:260 +#: library/codecs.rst:264 msgid "" "These constants define various byte sequences, being Unicode byte order " "marks (BOMs) for several encodings. They are used in UTF-16 and UTF-32 data " @@ -456,11 +464,11 @@ msgstr "" "et :const:`BOM_BE` pour :const:`BOM_UTF16_BE`. Les autres sont les marques " "BOM dans les encodages UTF-8 et UTF-32." -#: library/codecs.rst:274 +#: library/codecs.rst:278 msgid "Codec Base Classes" msgstr "Classes de base de codecs" -#: library/codecs.rst:276 +#: library/codecs.rst:280 msgid "" "The :mod:`codecs` module defines a set of base classes which define the " "interfaces for working with codec objects, and can also be used as the basis " @@ -471,7 +479,7 @@ msgstr "" "peuvent également être utilisées comme base pour des implémentations de " "codecs personnalisés." -#: library/codecs.rst:280 +#: library/codecs.rst:284 msgid "" "Each codec has to define four interfaces to make it usable as codec in " "Python: stateless encoder, stateless decoder, stream reader and stream " @@ -486,16 +494,15 @@ msgstr "" "Les auteurs de codecs doivent également définir comment le codec gère les " "erreurs d'encodage et de décodage." -#: library/codecs.rst:291 +#: library/codecs.rst:295 msgid "Error Handlers" msgstr "Gestionnaires d'erreurs" -#: library/codecs.rst:293 +#: library/codecs.rst:297 +#, fuzzy msgid "" "To simplify and standardize error handling, codecs may implement different " -"error handling schemes by accepting the *errors* string argument. The " -"following string values are defined and implemented by all standard Python " -"codecs:" +"error handling schemes by accepting the *errors* string argument:" msgstr "" "Pour simplifier et standardiser la gestion des erreurs, les codecs peuvent " "implémenter différents schémas de gestion des erreurs en acceptant " @@ -503,31 +510,41 @@ msgstr "" "les gestionnaires correspondants implémentés par tous les codecs Python " "standards :" -#: library/codecs.rst:324 library/codecs.rst:357 +#: library/codecs.rst:317 +#, fuzzy +msgid "" +"The following error handlers can be used with all Python :ref:`standard-" +"encodings` codecs:" +msgstr "" +"Les gestionnaires d'erreurs suivants ne s'appliquent que pour les :term:" +"`encodeurs de texte ` :" + +#: library/codecs.rst:365 library/codecs.rst:384 msgid "Value" msgstr "Valeur" -#: library/codecs.rst:324 library/codecs.rst:1269 library/codecs.rst:1391 +#: library/codecs.rst:365 library/codecs.rst:1317 library/codecs.rst:1439 msgid "Meaning" msgstr "Signification" -#: library/codecs.rst:303 +#: library/codecs.rst:325 msgid "``'strict'``" msgstr "``'strict'``" -#: library/codecs.rst:303 +#: library/codecs.rst:325 +#, fuzzy msgid "" -"Raise :exc:`UnicodeError` (or a subclass); this is the default. Implemented " +"Raise :exc:`UnicodeError` (or a subclass), this is the default. Implemented " "in :func:`strict_errors`." msgstr "" "Lève :exc:`UnicodeError` (ou une sous-classe) ; c'est la valeur par défaut. " "Implémenté dans :func:`strict_errors`." -#: library/codecs.rst:307 +#: library/codecs.rst:329 msgid "``'ignore'``" msgstr "``'ignore'``" -#: library/codecs.rst:307 +#: library/codecs.rst:329 msgid "" "Ignore the malformed data and continue without further notice. Implemented " "in :func:`ignore_errors`." @@ -535,137 +552,147 @@ msgstr "" "Ignore les données incorrectement formatées et continue sans rien signaler. " "Implémenté dans :func:`ignore_errors`." -#: library/codecs.rst:312 -msgid "" -"The following error handlers are only applicable to :term:`text encodings " -"`:" -msgstr "" -"Les gestionnaires d'erreurs suivants ne s'appliquent que pour les :term:" -"`encodeurs de texte ` :" - -#: library/codecs.rst:326 +#: library/codecs.rst:333 msgid "``'replace'``" msgstr "``'replace'``" -#: library/codecs.rst:326 +#: library/codecs.rst:333 +#, fuzzy msgid "" -"Replace with a suitable replacement marker; Python will use the official ``U" -"+FFFD`` REPLACEMENT CHARACTER for the built-in codecs on decoding, and '?' " -"on encoding. Implemented in :func:`replace_errors`." +"Replace with a replacement marker. On encoding, use ``?`` (ASCII character). " +"On decoding, use ``�`` (U+FFFD, the official REPLACEMENT CHARACTER). " +"Implemented in :func:`replace_errors`." msgstr "" "Remplace avec une marque de substitution adaptée ; Python utilise le " "caractère de substitution officiel ``U+FFFD`` pour les codecs natifs lors du " "décodage et `'?'` lors de l'encodage. Implémenté dans :func:`replace_errors`." -#: library/codecs.rst:333 -msgid "``'xmlcharrefreplace'``" -msgstr "``'xmlcharrefreplace'``" - -#: library/codecs.rst:333 -msgid "" -"Replace with the appropriate XML character reference (only for encoding). " -"Implemented in :func:`xmlcharrefreplace_errors`." -msgstr "" -"Remplace avec la référence de caractère XML adaptée (uniquement pour " -"l'encodage). Implémenté dans :func:`xmlcharrefreplace_errors`." - -#: library/codecs.rst:337 +#: library/codecs.rst:339 msgid "``'backslashreplace'``" msgstr "``'backslashreplace'``" -#: library/codecs.rst:337 +#: library/codecs.rst:339 msgid "" -"Replace with backslashed escape sequences. Implemented in :func:" -"`backslashreplace_errors`." +"Replace with backslashed escape sequences. On encoding, use hexadecimal form " +"of Unicode code point with formats ``\\xhh`` ``\\uxxxx`` ``\\Uxxxxxxxx``. On " +"decoding, use hexadecimal form of byte value with format ``\\xhh``. " +"Implemented in :func:`backslashreplace_errors`." msgstr "" -"Remplace avec une séquence échappée par des antislashs. Implémenté dans :" -"func:`backslashreplace_errors`." - -#: library/codecs.rst:341 -msgid "``'namereplace'``" -msgstr "``'namereplace'``" -#: library/codecs.rst:341 -msgid "" -"Replace with ``\\N{...}`` escape sequences (only for encoding). Implemented " -"in :func:`namereplace_errors`." -msgstr "" -"Remplace avec des séquences échappées par ``\\N{...}`` (uniquement pour " -"l'encodage). Implémenté dans :func:`namereplace_errors`." - -#: library/codecs.rst:345 +#: library/codecs.rst:347 msgid "``'surrogateescape'``" msgstr "``'surrogateescape'``" -#: library/codecs.rst:345 +#: library/codecs.rst:347 msgid "" -"On decoding, replace byte with individual surrogate code ranging from ``U" -"+DC80`` to ``U+DCFF``. This code will then be turned back into the same byte " -"when the ``'surrogateescape'`` error handler is used when encoding the data. " -"(See :pep:`383` for more.)" +"On decoding, replace byte with individual surrogate code ranging from " +"``U+DC80`` to ``U+DCFF``. This code will then be turned back into the same " +"byte when the ``'surrogateescape'`` error handler is used when encoding the " +"data. (See :pep:`383` for more.)" msgstr "" "Lors du décodage, remplace un octet par un code de substitution individuel " "allant de ``U+DC80`` à ``U+DCFF``. Ce code est reconverti vers l'octet de " "départ quand le gestionnaire d'erreurs ``'surrogateescape'`` est utilisé " "pour l'encodage des données (voir la :pep:`383` pour plus de détails)." -#: library/codecs.rst:354 +#: library/codecs.rst:361 +#, fuzzy +msgid "" +"The following error handlers are only applicable to encoding (within :term:" +"`text encodings `):" +msgstr "" +"Les gestionnaires d'erreurs suivants ne s'appliquent que pour les :term:" +"`encodeurs de texte ` :" + +#: library/codecs.rst:367 +msgid "``'xmlcharrefreplace'``" +msgstr "``'xmlcharrefreplace'``" + +#: library/codecs.rst:367 +#, fuzzy +msgid "" +"Replace with XML/HTML numeric character reference, which is a decimal form " +"of Unicode code point with format ``&#num;`` Implemented in :func:" +"`xmlcharrefreplace_errors`." +msgstr "" +"Remplace avec la référence de caractère XML adaptée (uniquement pour " +"l'encodage). Implémenté dans :func:`xmlcharrefreplace_errors`." + +#: library/codecs.rst:372 +msgid "``'namereplace'``" +msgstr "``'namereplace'``" + +#: library/codecs.rst:372 +#, fuzzy +msgid "" +"Replace with ``\\N{...}`` escape sequences, what appears in the braces is " +"the Name property from Unicode Character Database. Implemented in :func:" +"`namereplace_errors`." +msgstr "" +"Remplace avec des séquences échappées par ``\\N{...}`` (uniquement pour " +"l'encodage). Implémenté dans :func:`namereplace_errors`." + +#: library/codecs.rst:381 msgid "" "In addition, the following error handler is specific to the given codecs:" msgstr "" "En plus, le gestionnaire d'erreurs suivant est spécifique aux codecs " "suivants :" -#: library/codecs.rst:357 +#: library/codecs.rst:384 msgid "Codecs" msgstr "Codecs" -#: library/codecs.rst:359 +#: library/codecs.rst:386 msgid "``'surrogatepass'``" msgstr "``'surrogatepass'``" -#: library/codecs.rst:359 +#: library/codecs.rst:386 msgid "utf-8, utf-16, utf-32, utf-16-be, utf-16-le, utf-32-be, utf-32-le" msgstr "utf-8, utf-16, utf-32, utf-16-be, utf-16-le, utf-32-be, utf-32-le" -#: library/codecs.rst:359 +#: library/codecs.rst:386 +#, fuzzy msgid "" -"Allow encoding and decoding of surrogate codes. These codecs normally treat " -"the presence of surrogates as an error." +"Allow encoding and decoding surrogate code point (``U+D800`` - ``U+DFFF``) " +"as normal code point. Otherwise these codecs treat the presence of surrogate " +"code point in :class:`str` as an error." msgstr "" "Autorise l'encodage et le décodage de codes de substitution. Ces codecs " "traitent normalement la présence d'un code de substitution comme une erreur." # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:364 +#: library/codecs.rst:393 msgid "The ``'surrogateescape'`` and ``'surrogatepass'`` error handlers." msgstr "" "les gestionnaires d'erreurs ``'surrogateescape'`` et ``'surrogatepass'``." # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:367 +#: library/codecs.rst:396 +#, fuzzy msgid "" -"The ``'surrogatepass'`` error handlers now works with utf-16\\* and " -"utf-32\\* codecs." +"The ``'surrogatepass'`` error handler now works with utf-16\\* and utf-32\\* " +"codecs." msgstr "" "le gestionnaire d'erreurs ``'surrogatepass'`` fonctionne maintenant avec les " "codecs utf-16\\* et utf-32\\*." # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:370 +#: library/codecs.rst:400 msgid "The ``'namereplace'`` error handler." msgstr "le gestionnaire d'erreurs ``'namereplace'``." # pas de majuscule en début de phrase car suit un deux-points. -#: library/codecs.rst:373 +#: library/codecs.rst:403 +#, fuzzy msgid "" -"The ``'backslashreplace'`` error handlers now works with decoding and " +"The ``'backslashreplace'`` error handler now works with decoding and " "translating." msgstr "" "le gestionnaire d'erreurs ``'backslashreplace'`` fonctionne maintenant pour " "le décodage et la traduction." -#: library/codecs.rst:377 +#: library/codecs.rst:407 msgid "" "The set of allowed values can be extended by registering a new named error " "handler:" @@ -673,14 +700,14 @@ msgstr "" "L'ensemble des valeurs autorisées peut être étendu en enregistrant un " "nouveau gestionnaire d'erreurs nommé :" -#: library/codecs.rst:382 +#: library/codecs.rst:412 msgid "" "Register the error handling function *error_handler* under the name *name*. " "The *error_handler* argument will be called during encoding and decoding in " "case of an error, when *name* is specified as the errors parameter." msgstr "" -#: library/codecs.rst:386 +#: library/codecs.rst:416 msgid "" "For encoding, *error_handler* will be called with a :exc:" "`UnicodeEncodeError` instance, which contains information about the location " @@ -695,85 +722,123 @@ msgid "" "position is out of bound an :exc:`IndexError` will be raised." msgstr "" -#: library/codecs.rst:398 +#: library/codecs.rst:428 msgid "" "Decoding and translating works similarly, except :exc:`UnicodeDecodeError` " "or :exc:`UnicodeTranslateError` will be passed to the handler and that the " "replacement from the error handler will be put into the output directly." msgstr "" -#: library/codecs.rst:403 +#: library/codecs.rst:433 msgid "" "Previously registered error handlers (including the standard error handlers) " "can be looked up by name:" msgstr "" -#: library/codecs.rst:408 +#: library/codecs.rst:438 msgid "Return the error handler previously registered under the name *name*." msgstr "" -#: library/codecs.rst:410 +#: library/codecs.rst:440 msgid "Raises a :exc:`LookupError` in case the handler cannot be found." msgstr "" -#: library/codecs.rst:412 +#: library/codecs.rst:442 msgid "" "The following standard error handlers are also made available as module " "level functions:" msgstr "" -#: library/codecs.rst:417 +# pas de majuscule en début de phrase car suit un deux-points. +#: library/codecs.rst:447 +#, fuzzy +msgid "Implements the ``'strict'`` error handling." +msgstr "le gestionnaire d'erreurs ``'namereplace'``." + +#: library/codecs.rst:449 +msgid "Each encoding or decoding error raises a :exc:`UnicodeError`." +msgstr "" + +# pas de majuscule en début de phrase car suit un deux-points. +#: library/codecs.rst:454 +#, fuzzy +msgid "Implements the ``'ignore'`` error handling." +msgstr "le gestionnaire d'erreurs ``'namereplace'``." + +#: library/codecs.rst:456 msgid "" -"Implements the ``'strict'`` error handling: each encoding or decoding error " -"raises a :exc:`UnicodeError`." +"Malformed data is ignored; encoding or decoding is continued without further " +"notice." msgstr "" -#: library/codecs.rst:423 +# pas de majuscule en début de phrase car suit un deux-points. +#: library/codecs.rst:462 +#, fuzzy +msgid "Implements the ``'replace'`` error handling." +msgstr "le gestionnaire d'erreurs ``'namereplace'``." + +#: library/codecs.rst:464 msgid "" -"Implements the ``'replace'`` error handling (for :term:`text encodings ` only): substitutes ``'?'`` for encoding errors (to be encoded by " -"the codec), and ``'\\ufffd'`` (the Unicode replacement character) for " -"decoding errors." +"Substitutes ``?`` (ASCII character) for encoding errors or ``�`` (U+FFFD, " +"the official REPLACEMENT CHARACTER) for decoding errors." msgstr "" -#: library/codecs.rst:431 +# pas de majuscule en début de phrase car suit un deux-points. +#: library/codecs.rst:470 +#, fuzzy +msgid "Implements the ``'backslashreplace'`` error handling." +msgstr "le gestionnaire d'erreurs ``'namereplace'``." + +#: library/codecs.rst:472 msgid "" -"Implements the ``'ignore'`` error handling: malformed data is ignored and " -"encoding or decoding is continued without further notice." +"Malformed data is replaced by a backslashed escape sequence. On encoding, " +"use the hexadecimal form of Unicode code point with formats ``\\xhh`` " +"``\\uxxxx`` ``\\Uxxxxxxxx``. On decoding, use the hexadecimal form of byte " +"value with format ``\\xhh``." +msgstr "" + +#: library/codecs.rst:477 +msgid "Works with decoding and translating." msgstr "" -#: library/codecs.rst:437 +#: library/codecs.rst:483 msgid "" -"Implements the ``'xmlcharrefreplace'`` error handling (for encoding with :" -"term:`text encodings ` only): the unencodable character is " -"replaced by an appropriate XML character reference." +"Implements the ``'xmlcharrefreplace'`` error handling (for encoding within :" +"term:`text encoding` only)." msgstr "" -#: library/codecs.rst:444 +#: library/codecs.rst:486 +msgid "" +"The unencodable character is replaced by an appropriate XML/HTML numeric " +"character reference, which is a decimal form of Unicode code point with " +"format ``&#num;`` ." +msgstr "" + +#: library/codecs.rst:493 msgid "" -"Implements the ``'backslashreplace'`` error handling (for :term:`text " -"encodings ` only): malformed data is replaced by a " -"backslashed escape sequence." +"Implements the ``'namereplace'`` error handling (for encoding within :term:" +"`text encoding` only)." msgstr "" -#: library/codecs.rst:450 +#: library/codecs.rst:496 msgid "" -"Implements the ``'namereplace'`` error handling (for encoding with :term:" -"`text encodings ` only): the unencodable character is " -"replaced by a ``\\N{...}`` escape sequence." +"The unencodable character is replaced by a ``\\N{...}`` escape sequence. The " +"set of characters that appear in the braces is the Name property from " +"Unicode Character Database. For example, the German lowercase letter ``'ß'`` " +"will be converted to byte sequence ``\\N{LATIN SMALL LETTER SHARP S}`` ." msgstr "" -#: library/codecs.rst:460 +#: library/codecs.rst:507 msgid "Stateless Encoding and Decoding" msgstr "" -#: library/codecs.rst:462 +#: library/codecs.rst:509 msgid "" "The base :class:`Codec` class defines these methods which also define the " "function interfaces of the stateless encoder and decoder:" msgstr "" -#: library/codecs.rst:468 +#: library/codecs.rst:515 msgid "" "Encodes the object *input* and returns a tuple (output object, length " "consumed). For instance, :term:`text encoding` converts a string object to a " @@ -781,26 +846,26 @@ msgid "" "``iso-8859-1``)." msgstr "" -#: library/codecs.rst:495 +#: library/codecs.rst:542 msgid "" "The *errors* argument defines the error handling to apply. It defaults to " "``'strict'`` handling." msgstr "" -#: library/codecs.rst:476 +#: library/codecs.rst:523 msgid "" "The method may not store state in the :class:`Codec` instance. Use :class:" "`StreamWriter` for codecs which have to keep state in order to make encoding " "efficient." msgstr "" -#: library/codecs.rst:480 +#: library/codecs.rst:527 msgid "" "The encoder must be able to handle zero length input and return an empty " "object of the output object type in this situation." msgstr "" -#: library/codecs.rst:486 +#: library/codecs.rst:533 msgid "" "Decodes the object *input* and returns a tuple (output object, length " "consumed). For instance, for a :term:`text encoding`, decoding converts a " @@ -808,31 +873,31 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:491 +#: library/codecs.rst:538 msgid "" "For text encodings and bytes-to-bytes codecs, *input* must be a bytes object " "or one which provides the read-only buffer interface -- for example, buffer " "objects and memory mapped files." msgstr "" -#: library/codecs.rst:498 +#: library/codecs.rst:545 msgid "" "The method may not store state in the :class:`Codec` instance. Use :class:" "`StreamReader` for codecs which have to keep state in order to make decoding " "efficient." msgstr "" -#: library/codecs.rst:502 +#: library/codecs.rst:549 msgid "" "The decoder must be able to handle zero length input and return an empty " "object of the output object type in this situation." msgstr "" -#: library/codecs.rst:507 +#: library/codecs.rst:554 msgid "Incremental Encoding and Decoding" msgstr "" -#: library/codecs.rst:509 +#: library/codecs.rst:556 msgid "" "The :class:`IncrementalEncoder` and :class:`IncrementalDecoder` classes " "provide the basic interface for incremental encoding and decoding. Encoding/" @@ -843,7 +908,7 @@ msgid "" "during method calls." msgstr "" -#: library/codecs.rst:517 +#: library/codecs.rst:564 msgid "" "The joined output of calls to the :meth:`~IncrementalEncoder.encode`/:meth:" "`~IncrementalDecoder.decode` method is the same as if all the single inputs " @@ -851,36 +916,36 @@ msgid "" "encoder/decoder." msgstr "" -#: library/codecs.rst:526 +#: library/codecs.rst:573 msgid "IncrementalEncoder Objects" msgstr "" -#: library/codecs.rst:528 +#: library/codecs.rst:575 msgid "" "The :class:`IncrementalEncoder` class is used for encoding an input in " "multiple steps. It defines the following methods which every incremental " "encoder must define in order to be compatible with the Python codec registry." msgstr "" -#: library/codecs.rst:535 +#: library/codecs.rst:582 msgid "Constructor for an :class:`IncrementalEncoder` instance." msgstr "" -#: library/codecs.rst:537 +#: library/codecs.rst:584 msgid "" "All incremental encoders must provide this constructor interface. They are " "free to add additional keyword arguments, but only the ones defined here are " "used by the Python codec registry." msgstr "" -#: library/codecs.rst:541 +#: library/codecs.rst:588 msgid "" "The :class:`IncrementalEncoder` may implement different error handling " "schemes by providing the *errors* keyword argument. See :ref:`error-" "handlers` for possible values." msgstr "" -#: library/codecs.rst:545 +#: library/codecs.rst:592 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -888,21 +953,21 @@ msgid "" "`IncrementalEncoder` object." msgstr "" -#: library/codecs.rst:553 +#: library/codecs.rst:600 msgid "" "Encodes *object* (taking the current state of the encoder into account) and " "returns the resulting encoded object. If this is the last call to :meth:" "`encode` *final* must be true (the default is false)." msgstr "" -#: library/codecs.rst:560 +#: library/codecs.rst:607 msgid "" "Reset the encoder to the initial state. The output is discarded: call ``." "encode(object, final=True)``, passing an empty byte or text string if " "necessary, to reset the encoder and to get the output." msgstr "" -#: library/codecs.rst:567 +#: library/codecs.rst:614 msgid "" "Return the current state of the encoder which must be an integer. The " "implementation should make sure that ``0`` is the most common state. (States " @@ -911,42 +976,42 @@ msgid "" "into an integer.)" msgstr "" -#: library/codecs.rst:576 +#: library/codecs.rst:623 msgid "" "Set the state of the encoder to *state*. *state* must be an encoder state " "returned by :meth:`getstate`." msgstr "" -#: library/codecs.rst:583 +#: library/codecs.rst:630 msgid "IncrementalDecoder Objects" msgstr "" -#: library/codecs.rst:585 +#: library/codecs.rst:632 msgid "" "The :class:`IncrementalDecoder` class is used for decoding an input in " "multiple steps. It defines the following methods which every incremental " "decoder must define in order to be compatible with the Python codec registry." msgstr "" -#: library/codecs.rst:592 +#: library/codecs.rst:639 msgid "Constructor for an :class:`IncrementalDecoder` instance." msgstr "" -#: library/codecs.rst:594 +#: library/codecs.rst:641 msgid "" "All incremental decoders must provide this constructor interface. They are " "free to add additional keyword arguments, but only the ones defined here are " "used by the Python codec registry." msgstr "" -#: library/codecs.rst:598 +#: library/codecs.rst:645 msgid "" "The :class:`IncrementalDecoder` may implement different error handling " "schemes by providing the *errors* keyword argument. See :ref:`error-" "handlers` for possible values." msgstr "" -#: library/codecs.rst:602 +#: library/codecs.rst:649 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -954,7 +1019,7 @@ msgid "" "`IncrementalDecoder` object." msgstr "" -#: library/codecs.rst:610 +#: library/codecs.rst:657 msgid "" "Decodes *object* (taking the current state of the decoder into account) and " "returns the resulting decoded object. If this is the last call to :meth:" @@ -965,11 +1030,11 @@ msgid "" "(which might raise an exception)." msgstr "" -#: library/codecs.rst:621 +#: library/codecs.rst:668 msgid "Reset the decoder to the initial state." msgstr "" -#: library/codecs.rst:626 +#: library/codecs.rst:673 msgid "" "Return the current state of the decoder. This must be a tuple with two " "items, the first must be the buffer containing the still undecoded input. " @@ -984,59 +1049,59 @@ msgid "" "bytes of the resulting string into an integer.)" msgstr "" -#: library/codecs.rst:641 +#: library/codecs.rst:688 msgid "" "Set the state of the decoder to *state*. *state* must be a decoder state " "returned by :meth:`getstate`." msgstr "" -#: library/codecs.rst:646 +#: library/codecs.rst:693 msgid "Stream Encoding and Decoding" msgstr "" -#: library/codecs.rst:649 +#: library/codecs.rst:696 msgid "" "The :class:`StreamWriter` and :class:`StreamReader` classes provide generic " "working interfaces which can be used to implement new encoding submodules " "very easily. See :mod:`encodings.utf_8` for an example of how this is done." msgstr "" -#: library/codecs.rst:657 +#: library/codecs.rst:704 msgid "StreamWriter Objects" msgstr "" -#: library/codecs.rst:659 +#: library/codecs.rst:706 msgid "" "The :class:`StreamWriter` class is a subclass of :class:`Codec` and defines " "the following methods which every stream writer must define in order to be " "compatible with the Python codec registry." msgstr "" -#: library/codecs.rst:666 +#: library/codecs.rst:713 msgid "Constructor for a :class:`StreamWriter` instance." msgstr "" -#: library/codecs.rst:668 +#: library/codecs.rst:715 msgid "" "All stream writers must provide this constructor interface. They are free to " "add additional keyword arguments, but only the ones defined here are used by " "the Python codec registry." msgstr "" -#: library/codecs.rst:672 +#: library/codecs.rst:719 msgid "" "The *stream* argument must be a file-like object open for writing text or " "binary data, as appropriate for the specific codec." msgstr "" -#: library/codecs.rst:675 +#: library/codecs.rst:722 msgid "" "The :class:`StreamWriter` may implement different error handling schemes by " "providing the *errors* keyword argument. See :ref:`error-handlers` for the " "standard error handlers the underlying stream codec may support." msgstr "" -#: library/codecs.rst:679 +#: library/codecs.rst:726 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -1044,70 +1109,70 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:685 +#: library/codecs.rst:732 msgid "Writes the object's contents encoded to the stream." msgstr "" -#: library/codecs.rst:690 +#: library/codecs.rst:737 msgid "" -"Writes the concatenated list of strings to the stream (possibly by reusing " -"the :meth:`write` method). The standard bytes-to-bytes codecs do not support " -"this method." +"Writes the concatenated iterable of strings to the stream (possibly by " +"reusing the :meth:`write` method). Infinite or very large iterables are not " +"supported. The standard bytes-to-bytes codecs do not support this method." msgstr "" -#: library/codecs.rst:792 +#: library/codecs.rst:840 msgid "Resets the codec buffers used for keeping internal state." msgstr "" -#: library/codecs.rst:699 +#: library/codecs.rst:747 msgid "" "Calling this method should ensure that the data on the output is put into a " "clean state that allows appending of new fresh data without having to rescan " "the whole stream to recover state." msgstr "" -#: library/codecs.rst:704 +#: library/codecs.rst:752 msgid "" "In addition to the above methods, the :class:`StreamWriter` must also " "inherit all other methods and attributes from the underlying stream." msgstr "" -#: library/codecs.rst:711 +#: library/codecs.rst:759 msgid "StreamReader Objects" msgstr "" -#: library/codecs.rst:713 +#: library/codecs.rst:761 msgid "" "The :class:`StreamReader` class is a subclass of :class:`Codec` and defines " "the following methods which every stream reader must define in order to be " "compatible with the Python codec registry." msgstr "" -#: library/codecs.rst:720 +#: library/codecs.rst:768 msgid "Constructor for a :class:`StreamReader` instance." msgstr "" -#: library/codecs.rst:722 +#: library/codecs.rst:770 msgid "" "All stream readers must provide this constructor interface. They are free to " "add additional keyword arguments, but only the ones defined here are used by " "the Python codec registry." msgstr "" -#: library/codecs.rst:726 +#: library/codecs.rst:774 msgid "" "The *stream* argument must be a file-like object open for reading text or " "binary data, as appropriate for the specific codec." msgstr "" -#: library/codecs.rst:729 +#: library/codecs.rst:777 msgid "" "The :class:`StreamReader` may implement different error handling schemes by " "providing the *errors* keyword argument. See :ref:`error-handlers` for the " "standard error handlers the underlying stream codec may support." msgstr "" -#: library/codecs.rst:733 +#: library/codecs.rst:781 msgid "" "The *errors* argument will be assigned to an attribute of the same name. " "Assigning to this attribute makes it possible to switch between different " @@ -1115,24 +1180,24 @@ msgid "" "object." msgstr "" -#: library/codecs.rst:737 +#: library/codecs.rst:785 msgid "" "The set of allowed values for the *errors* argument can be extended with :" "func:`register_error`." msgstr "" -#: library/codecs.rst:743 +#: library/codecs.rst:791 msgid "Decodes data from the stream and returns the resulting object." msgstr "" -#: library/codecs.rst:745 +#: library/codecs.rst:793 msgid "" "The *chars* argument indicates the number of decoded code points or bytes to " "return. The :func:`read` method will never return more data than requested, " "but it might return less, if there is not enough available." msgstr "" -#: library/codecs.rst:750 +#: library/codecs.rst:798 msgid "" "The *size* argument indicates the approximate maximum number of encoded " "bytes or code points to read for decoding. The decoder can modify this " @@ -1141,13 +1206,13 @@ msgid "" "huge files in one step." msgstr "" -#: library/codecs.rst:757 +#: library/codecs.rst:805 msgid "" "The *firstline* flag indicates that it would be sufficient to only return " "the first line, if there are decoding errors on later lines." msgstr "" -#: library/codecs.rst:761 +#: library/codecs.rst:809 msgid "" "The method should use a greedy read strategy meaning that it should read as " "much data as is allowed within the definition of the encoding and the given " @@ -1155,68 +1220,68 @@ msgid "" "the stream, these should be read too." msgstr "" -#: library/codecs.rst:769 +#: library/codecs.rst:817 msgid "Read one line from the input stream and return the decoded data." msgstr "" -#: library/codecs.rst:771 +#: library/codecs.rst:819 msgid "" "*size*, if given, is passed as size argument to the stream's :meth:`read` " "method." msgstr "" -#: library/codecs.rst:774 +#: library/codecs.rst:822 msgid "" "If *keepends* is false line-endings will be stripped from the lines returned." msgstr "" -#: library/codecs.rst:780 +#: library/codecs.rst:828 msgid "" "Read all lines available on the input stream and return them as a list of " "lines." msgstr "" -#: library/codecs.rst:783 +#: library/codecs.rst:831 msgid "" "Line-endings are implemented using the codec's :meth:`decode` method and are " "included in the list entries if *keepends* is true." msgstr "" -#: library/codecs.rst:786 +#: library/codecs.rst:834 msgid "" "*sizehint*, if given, is passed as the *size* argument to the stream's :meth:" "`read` method." msgstr "" -#: library/codecs.rst:794 +#: library/codecs.rst:842 msgid "" "Note that no stream repositioning should take place. This method is " "primarily intended to be able to recover from decoding errors." msgstr "" -#: library/codecs.rst:798 +#: library/codecs.rst:846 msgid "" "In addition to the above methods, the :class:`StreamReader` must also " "inherit all other methods and attributes from the underlying stream." msgstr "" -#: library/codecs.rst:804 +#: library/codecs.rst:852 msgid "StreamReaderWriter Objects" msgstr "" -#: library/codecs.rst:806 +#: library/codecs.rst:854 msgid "" "The :class:`StreamReaderWriter` is a convenience class that allows wrapping " "streams which work in both read and write modes." msgstr "" -#: library/codecs.rst:833 +#: library/codecs.rst:881 msgid "" "The design is such that one can use the factory functions returned by the :" "func:`lookup` function to construct the instance." msgstr "" -#: library/codecs.rst:815 +#: library/codecs.rst:863 msgid "" "Creates a :class:`StreamReaderWriter` instance. *stream* must be a file-like " "object. *Reader* and *Writer* must be factory functions or classes providing " @@ -1225,24 +1290,24 @@ msgid "" "writers." msgstr "" -#: library/codecs.rst:820 +#: library/codecs.rst:868 msgid "" ":class:`StreamReaderWriter` instances define the combined interfaces of :" "class:`StreamReader` and :class:`StreamWriter` classes. They inherit all " "other methods and attributes from the underlying stream." msgstr "" -#: library/codecs.rst:828 +#: library/codecs.rst:876 msgid "StreamRecoder Objects" msgstr "" -#: library/codecs.rst:830 +#: library/codecs.rst:878 msgid "" "The :class:`StreamRecoder` translates data from one encoding to another, " "which is sometimes useful when dealing with different encoding environments." msgstr "" -#: library/codecs.rst:839 +#: library/codecs.rst:887 msgid "" "Creates a :class:`StreamRecoder` instance which implements a two-way " "conversion: *encode* and *decode* work on the frontend — the data visible to " @@ -1250,17 +1315,17 @@ msgid "" "work on the backend — the data in *stream*." msgstr "" -#: library/codecs.rst:844 +#: library/codecs.rst:892 msgid "" "You can use these objects to do transparent transcodings, e.g., from Latin-1 " "to UTF-8 and back." msgstr "" -#: library/codecs.rst:847 +#: library/codecs.rst:895 msgid "The *stream* argument must be a file-like object." msgstr "" -#: library/codecs.rst:849 +#: library/codecs.rst:897 msgid "" "The *encode* and *decode* arguments must adhere to the :class:`Codec` " "interface. *Reader* and *Writer* must be factory functions or classes " @@ -1268,36 +1333,36 @@ msgid "" "interface respectively." msgstr "" -#: library/codecs.rst:854 +#: library/codecs.rst:902 msgid "" "Error handling is done in the same way as defined for the stream readers and " "writers." msgstr "" -#: library/codecs.rst:858 +#: library/codecs.rst:906 msgid "" ":class:`StreamRecoder` instances define the combined interfaces of :class:" "`StreamReader` and :class:`StreamWriter` classes. They inherit all other " "methods and attributes from the underlying stream." msgstr "" -#: library/codecs.rst:866 +#: library/codecs.rst:914 msgid "Encodings and Unicode" msgstr "" -#: library/codecs.rst:868 +#: library/codecs.rst:916 msgid "" -"Strings are stored internally as sequences of code points in range ``0x0``--" -"``0x10FFFF``. (See :pep:`393` for more details about the implementation.) " -"Once a string object is used outside of CPU and memory, endianness and how " -"these arrays are stored as bytes become an issue. As with other codecs, " -"serialising a string into a sequence of bytes is known as *encoding*, and " -"recreating the string from the sequence of bytes is known as *decoding*. " -"There are a variety of different text serialisation codecs, which are " -"collectivity referred to as :term:`text encodings `." +"Strings are stored internally as sequences of code points in range " +"``U+0000``--``U+10FFFF``. (See :pep:`393` for more details about the " +"implementation.) Once a string object is used outside of CPU and memory, " +"endianness and how these arrays are stored as bytes become an issue. As with " +"other codecs, serialising a string into a sequence of bytes is known as " +"*encoding*, and recreating the string from the sequence of bytes is known as " +"*decoding*. There are a variety of different text serialisation codecs, " +"which are collectivity referred to as :term:`text encodings `." msgstr "" -#: library/codecs.rst:878 +#: library/codecs.rst:926 msgid "" "The simplest text encoding (called ``'latin-1'`` or ``'iso-8859-1'``) maps " "the code points 0--255 to the bytes ``0x0``--``0xff``, which means that a " @@ -1308,7 +1373,7 @@ msgid "" "position 3: ordinal not in range(256)``." msgstr "" -#: library/codecs.rst:886 +#: library/codecs.rst:934 msgid "" "There's another group of encodings (the so called charmap encodings) that " "choose a different subset of all Unicode code points and how these code " @@ -1318,7 +1383,7 @@ msgid "" "that shows you which character is mapped to which byte value." msgstr "" -#: library/codecs.rst:893 +#: library/codecs.rst:941 msgid "" "All of these encodings can only encode 256 of the 1114112 code points " "defined in Unicode. A simple and straightforward way that can store each " @@ -1334,7 +1399,7 @@ msgid "" "Order Mark\"). This is the Unicode character ``U+FEFF``. This character can " "be prepended to every ``UTF-16`` or ``UTF-32`` byte sequence. The byte " "swapped version of this character (``0xFFFE``) is an illegal character that " -"may not appear in a Unicode text. So when the first character in an " +"may not appear in a Unicode text. So when the first character in a " "``UTF-16`` or ``UTF-32`` byte sequence appears to be a ``U+FFFE`` the bytes " "have to be swapped on decoding. Unfortunately the character ``U+FEFF`` had a " "second purpose as a ``ZERO WIDTH NO-BREAK SPACE``: a character that has no " @@ -1348,9 +1413,9 @@ msgid "" "normal character that will be decoded like any other." msgstr "" -#: library/codecs.rst:919 +#: library/codecs.rst:967 msgid "" -"There's another encoding that is able to encoding the full range of Unicode " +"There's another encoding that is able to encode the full range of Unicode " "characters: UTF-8. UTF-8 is an 8-bit encoding, which means there are no " "issues with byte order in UTF-8. Each byte in a UTF-8 byte sequence consists " "of two parts: marker bits (the most significant bits) and payload bits. The " @@ -1359,72 +1424,71 @@ msgid "" "which when concatenated give the Unicode character):" msgstr "" -#: library/codecs.rst:928 +#: library/codecs.rst:976 msgid "Range" msgstr "*Range*" -#: library/codecs.rst:928 +#: library/codecs.rst:976 #, fuzzy msgid "Encoding" msgstr "Encodages" -#: library/codecs.rst:930 +#: library/codecs.rst:978 msgid "``U-00000000`` ... ``U-0000007F``" msgstr "``U-00000000`` ... ``U-0000007F``" -#: library/codecs.rst:930 +#: library/codecs.rst:978 msgid "0xxxxxxx" msgstr "0xxxxxxx" -#: library/codecs.rst:932 +#: library/codecs.rst:980 msgid "``U-00000080`` ... ``U-000007FF``" msgstr "``U-00000080`` ... ``U-000007FF``" -#: library/codecs.rst:932 +#: library/codecs.rst:980 msgid "110xxxxx 10xxxxxx" msgstr "110xxxxx 10xxxxxx" -#: library/codecs.rst:934 +#: library/codecs.rst:982 msgid "``U-00000800`` ... ``U-0000FFFF``" msgstr "``U-00000800`` ... ``U-0000FFFF``" -#: library/codecs.rst:934 +#: library/codecs.rst:982 msgid "1110xxxx 10xxxxxx 10xxxxxx" msgstr "1110xxxx 10xxxxxx 10xxxxxx" -#: library/codecs.rst:936 +#: library/codecs.rst:984 msgid "``U-00010000`` ... ``U-0010FFFF``" msgstr "``U-00010000`` ... ``U-0010FFFF``" -#: library/codecs.rst:936 +#: library/codecs.rst:984 msgid "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" msgstr "11110xxx 10xxxxxx 10xxxxxx 10xxxxxx" -#: library/codecs.rst:939 +#: library/codecs.rst:987 msgid "" "The least significant bit of the Unicode character is the rightmost x bit." msgstr "" -#: library/codecs.rst:941 +#: library/codecs.rst:989 msgid "" "As UTF-8 is an 8-bit encoding no BOM is required and any ``U+FEFF`` " "character in the decoded string (even if it's the first character) is " "treated as a ``ZERO WIDTH NO-BREAK SPACE``." msgstr "" -#: library/codecs.rst:945 +#: library/codecs.rst:993 msgid "" "Without external information it's impossible to reliably determine which " "encoding was used for encoding a string. Each charmap encoding can decode " "any random byte sequence. However that's not possible with UTF-8, as UTF-8 " "byte sequences have a structure that doesn't allow arbitrary byte sequences. " "To increase the reliability with which a UTF-8 encoding can be detected, " -"Microsoft invented a variant of UTF-8 (that Python 2.5 calls ``\"utf-8-sig" -"\"``) for its Notepad program: Before any of the Unicode characters is " -"written to the file, a UTF-8 encoded BOM (which looks like this as a byte " -"sequence: ``0xef``, ``0xbb``, ``0xbf``) is written. As it's rather " -"improbable that any charmap encoded file starts with these byte values " -"(which would e.g. map to" +"Microsoft invented a variant of UTF-8 (that Python calls ``\"utf-8-sig\"``) " +"for its Notepad program: Before any of the Unicode characters is written to " +"the file, a UTF-8 encoded BOM (which looks like this as a byte sequence: " +"``0xef``, ``0xbb``, ``0xbf``) is written. As it's rather improbable that any " +"charmap encoded file starts with these byte values (which would e.g. map to" msgstr "" #: library/codecs.rst:0 @@ -1439,7 +1503,7 @@ msgstr "RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK" msgid "INVERTED QUESTION MARK" msgstr "INVERTED QUESTION MARK" -#: library/codecs.rst:961 +#: library/codecs.rst:1009 msgid "" "in iso-8859-1), this increases the probability that a ``utf-8-sig`` encoding " "can be correctly guessed from the byte sequence. So here the BOM is not used " @@ -1451,11 +1515,11 @@ msgid "" "the use of the BOM is discouraged and should generally be avoided." msgstr "" -#: library/codecs.rst:974 +#: library/codecs.rst:1022 msgid "Standard Encodings" msgstr "" -#: library/codecs.rst:976 +#: library/codecs.rst:1024 msgid "" "Python comes with a number of codecs built-in, either implemented as C " "functions or with dictionaries as mapping tables. The following table lists " @@ -1467,7 +1531,7 @@ msgid "" "alias for the ``'utf_8'`` codec." msgstr "" -#: library/codecs.rst:986 +#: library/codecs.rst:1034 msgid "" "Some common encodings can bypass the codecs lookup machinery to improve " "performance. These optimization opportunities are only recognized by CPython " @@ -1477,11 +1541,11 @@ msgid "" "Using alternative aliases for these encodings may result in slower execution." msgstr "" -#: library/codecs.rst:994 +#: library/codecs.rst:1042 msgid "Optimization opportunity recognized for us-ascii." msgstr "" -#: library/codecs.rst:997 +#: library/codecs.rst:1045 msgid "" "Many of the character sets support the same languages. They vary in " "individual characters (e.g. whether the EURO SIGN is supported or not), and " @@ -1489,485 +1553,485 @@ msgid "" "languages in particular, the following variants typically exist:" msgstr "" -#: library/codecs.rst:1002 +#: library/codecs.rst:1050 msgid "an ISO 8859 codeset" msgstr "" -#: library/codecs.rst:1004 +#: library/codecs.rst:1052 msgid "" "a Microsoft Windows code page, which is typically derived from an 8859 " "codeset, but replaces control characters with additional graphic characters" msgstr "" -#: library/codecs.rst:1007 +#: library/codecs.rst:1055 msgid "an IBM EBCDIC code page" msgstr "" -#: library/codecs.rst:1009 +#: library/codecs.rst:1057 msgid "an IBM PC code page, which is ASCII compatible" msgstr "" -#: library/codecs.rst:1269 library/codecs.rst:1391 +#: library/codecs.rst:1317 library/codecs.rst:1439 msgid "Codec" msgstr "" -#: library/codecs.rst:1269 library/codecs.rst:1391 +#: library/codecs.rst:1317 library/codecs.rst:1439 msgid "Aliases" msgstr "" -#: library/codecs.rst:1014 +#: library/codecs.rst:1062 msgid "Languages" msgstr "" -#: library/codecs.rst:1016 +#: library/codecs.rst:1064 msgid "ascii" msgstr "*ascii*" -#: library/codecs.rst:1016 +#: library/codecs.rst:1064 msgid "646, us-ascii" msgstr "*646*, *us-ascii*" -#: library/codecs.rst:1022 library/codecs.rst:1030 +#: library/codecs.rst:1070 library/codecs.rst:1078 msgid "English" msgstr "Anglais" -#: library/codecs.rst:1018 +#: library/codecs.rst:1066 msgid "big5" msgstr "*big5*" -#: library/codecs.rst:1018 +#: library/codecs.rst:1066 msgid "big5-tw, csbig5" msgstr "*big5-tw*, *csbig5*" -#: library/codecs.rst:1020 library/codecs.rst:1078 +#: library/codecs.rst:1068 library/codecs.rst:1126 msgid "Traditional Chinese" msgstr "Chinois Traditionnel" -#: library/codecs.rst:1020 +#: library/codecs.rst:1068 msgid "big5hkscs" msgstr "*big5hkscs*" -#: library/codecs.rst:1020 +#: library/codecs.rst:1068 msgid "big5-hkscs, hkscs" msgstr "*big5-hkscs*, *hkscs*" -#: library/codecs.rst:1022 +#: library/codecs.rst:1070 msgid "cp037" msgstr "*cp037*" -#: library/codecs.rst:1022 +#: library/codecs.rst:1070 msgid "IBM037, IBM039" msgstr "*IBM037*, *IBM039*" -#: library/codecs.rst:1024 +#: library/codecs.rst:1072 msgid "cp273" msgstr "*cp273*" -#: library/codecs.rst:1024 +#: library/codecs.rst:1072 msgid "273, IBM273, csIBM273" msgstr "*273*, *IBM273*, *csIBM273*" -#: library/codecs.rst:1024 +#: library/codecs.rst:1072 msgid "German" msgstr "Allemand" -#: library/codecs.rst:1028 +#: library/codecs.rst:1076 msgid "cp424" msgstr "*cp424*" -#: library/codecs.rst:1028 +#: library/codecs.rst:1076 msgid "EBCDIC-CP-HE, IBM424" msgstr "*EBCDIC-CP-HE*, *IBM424*" -#: library/codecs.rst:1048 library/codecs.rst:1101 library/codecs.rst:1164 +#: library/codecs.rst:1096 library/codecs.rst:1149 library/codecs.rst:1212 msgid "Hebrew" msgstr "Hébreux" -#: library/codecs.rst:1030 +#: library/codecs.rst:1078 msgid "cp437" msgstr "*cp437*" -#: library/codecs.rst:1030 +#: library/codecs.rst:1078 msgid "437, IBM437" msgstr "*437*, *IBM437*" -#: library/codecs.rst:1032 +#: library/codecs.rst:1080 msgid "cp500" msgstr "*cp500*" -#: library/codecs.rst:1032 +#: library/codecs.rst:1080 msgid "EBCDIC-CP-BE, EBCDIC-CP-CH, IBM500" msgstr "*EBCDIC-CP-BE*, *EBCDIC-CP-CH*, *IBM500*" -#: library/codecs.rst:1041 library/codecs.rst:1088 library/codecs.rst:1148 -#: library/codecs.rst:1204 +#: library/codecs.rst:1089 library/codecs.rst:1136 library/codecs.rst:1196 +#: library/codecs.rst:1252 msgid "Western Europe" msgstr "Europe de l'ouest" -#: library/codecs.rst:1035 +#: library/codecs.rst:1083 msgid "cp720" msgstr "*cp720*" -#: library/codecs.rst:1062 library/codecs.rst:1160 +#: library/codecs.rst:1110 library/codecs.rst:1208 msgid "Arabic" msgstr "Arabe" -#: library/codecs.rst:1037 +#: library/codecs.rst:1085 msgid "cp737" msgstr "*cp737*" -#: library/codecs.rst:1068 library/codecs.rst:1097 library/codecs.rst:1197 +#: library/codecs.rst:1116 library/codecs.rst:1145 library/codecs.rst:1245 msgid "Greek" msgstr "Grec" -#: library/codecs.rst:1039 +#: library/codecs.rst:1087 msgid "cp775" msgstr "*cp775*" -#: library/codecs.rst:1039 +#: library/codecs.rst:1087 msgid "IBM775" msgstr "*IBM775*" -#: library/codecs.rst:1105 library/codecs.rst:1172 +#: library/codecs.rst:1153 library/codecs.rst:1220 msgid "Baltic languages" msgstr "Langues Baltiques" -#: library/codecs.rst:1041 +#: library/codecs.rst:1089 msgid "cp850" msgstr "*cp850*" -#: library/codecs.rst:1041 +#: library/codecs.rst:1089 msgid "850, IBM850" msgstr "*850*, *IBM850*" -#: library/codecs.rst:1043 +#: library/codecs.rst:1091 msgid "cp852" msgstr "*cp852*" -#: library/codecs.rst:1043 +#: library/codecs.rst:1091 msgid "852, IBM852" msgstr "*852*, *IBM852*" -#: library/codecs.rst:1090 library/codecs.rst:1201 +#: library/codecs.rst:1138 library/codecs.rst:1249 msgid "Central and Eastern Europe" msgstr "Europe centrale et Europe de l'Est" -#: library/codecs.rst:1045 +#: library/codecs.rst:1093 msgid "cp855" msgstr "*cp855*" -#: library/codecs.rst:1045 +#: library/codecs.rst:1093 msgid "855, IBM855" msgstr "*855*, *IBM855*" -#: library/codecs.rst:1092 library/codecs.rst:1194 +#: library/codecs.rst:1140 library/codecs.rst:1242 msgid "Bulgarian, Byelorussian, Macedonian, Russian, Serbian" msgstr "Bulgare, Biélorusse, Macédonien, Russe, Serbe" -#: library/codecs.rst:1048 +#: library/codecs.rst:1096 msgid "cp856" msgstr "*cp856*" -#: library/codecs.rst:1050 +#: library/codecs.rst:1098 msgid "cp857" msgstr "*cp857*" -#: library/codecs.rst:1050 +#: library/codecs.rst:1098 msgid "857, IBM857" msgstr "*857*, *IBM857*" -#: library/codecs.rst:1082 library/codecs.rst:1166 library/codecs.rst:1206 +#: library/codecs.rst:1130 library/codecs.rst:1214 library/codecs.rst:1254 msgid "Turkish" msgstr "Turc" -#: library/codecs.rst:1052 +#: library/codecs.rst:1100 msgid "cp858" msgstr "*cp858*" -#: library/codecs.rst:1052 +#: library/codecs.rst:1100 msgid "858, IBM858" msgstr "*858*, *IBM858*" -#: library/codecs.rst:1054 +#: library/codecs.rst:1102 msgid "cp860" msgstr "*cp860*" -#: library/codecs.rst:1054 +#: library/codecs.rst:1102 msgid "860, IBM860" msgstr "*860*, *IBM860*" -#: library/codecs.rst:1054 +#: library/codecs.rst:1102 msgid "Portuguese" msgstr "Portugais" -#: library/codecs.rst:1056 +#: library/codecs.rst:1104 msgid "cp861" msgstr "*cp861*" -#: library/codecs.rst:1056 +#: library/codecs.rst:1104 msgid "861, CP-IS, IBM861" msgstr "*861*, *CP-IS*, *IBM861*" -#: library/codecs.rst:1199 +#: library/codecs.rst:1247 msgid "Icelandic" msgstr "Islandais" -#: library/codecs.rst:1058 +#: library/codecs.rst:1106 msgid "cp862" msgstr "*cp862*" -#: library/codecs.rst:1058 +#: library/codecs.rst:1106 msgid "862, IBM862" msgstr "*862*, *IBM862*" -#: library/codecs.rst:1060 +#: library/codecs.rst:1108 msgid "cp863" msgstr "*cp863*" -#: library/codecs.rst:1060 +#: library/codecs.rst:1108 msgid "863, IBM863" msgstr "*863*, *IBM863*" -#: library/codecs.rst:1060 +#: library/codecs.rst:1108 msgid "Canadian" msgstr "Canadien" -#: library/codecs.rst:1062 +#: library/codecs.rst:1110 msgid "cp864" msgstr "*cp864*" -#: library/codecs.rst:1062 +#: library/codecs.rst:1110 msgid "IBM864" msgstr "*IBM864*" -#: library/codecs.rst:1064 +#: library/codecs.rst:1112 msgid "cp865" msgstr "*cp865*" -#: library/codecs.rst:1064 +#: library/codecs.rst:1112 msgid "865, IBM865" msgstr "*865*, *IBM865*" -#: library/codecs.rst:1064 +#: library/codecs.rst:1112 msgid "Danish, Norwegian" msgstr "" -#: library/codecs.rst:1066 +#: library/codecs.rst:1114 msgid "cp866" msgstr "*cp866*" -#: library/codecs.rst:1066 +#: library/codecs.rst:1114 msgid "866, IBM866" msgstr "*866*, *IBM866*" -#: library/codecs.rst:1182 +#: library/codecs.rst:1230 msgid "Russian" msgstr "Russe" -#: library/codecs.rst:1068 +#: library/codecs.rst:1116 msgid "cp869" msgstr "*cp869*" -#: library/codecs.rst:1068 +#: library/codecs.rst:1116 msgid "869, CP-GR, IBM869" msgstr "*869*, *CP-GR*, *IBM869*" -#: library/codecs.rst:1070 +#: library/codecs.rst:1118 msgid "cp874" msgstr "*cp874*" -#: library/codecs.rst:1070 +#: library/codecs.rst:1118 msgid "Thai" msgstr "" -#: library/codecs.rst:1072 +#: library/codecs.rst:1120 msgid "cp875" msgstr "*cp875*" -#: library/codecs.rst:1074 +#: library/codecs.rst:1122 msgid "cp932" msgstr "*cp932*" -#: library/codecs.rst:1074 +#: library/codecs.rst:1122 msgid "932, ms932, mskanji, ms-kanji" msgstr "*932*, *ms932*, *mskanji*, *ms-kanji*" -#: library/codecs.rst:1109 library/codecs.rst:1113 library/codecs.rst:1133 -#: library/codecs.rst:1141 library/codecs.rst:1211 library/codecs.rst:1217 +#: library/codecs.rst:1157 library/codecs.rst:1161 library/codecs.rst:1181 +#: library/codecs.rst:1189 library/codecs.rst:1259 library/codecs.rst:1265 msgid "Japanese" msgstr "" -#: library/codecs.rst:1076 +#: library/codecs.rst:1124 msgid "cp949" msgstr "*cp949*" -#: library/codecs.rst:1076 +#: library/codecs.rst:1124 msgid "949, ms949, uhc" msgstr "*949*, *ms949*, *uhc*" -#: library/codecs.rst:1115 library/codecs.rst:1180 +#: library/codecs.rst:1163 library/codecs.rst:1228 msgid "Korean" msgstr "" -#: library/codecs.rst:1078 +#: library/codecs.rst:1126 msgid "cp950" msgstr "*cp950*" -#: library/codecs.rst:1078 +#: library/codecs.rst:1126 msgid "950, ms950" msgstr "*950*, *ms950*" -#: library/codecs.rst:1080 +#: library/codecs.rst:1128 msgid "cp1006" msgstr "*cp1006*" -#: library/codecs.rst:1080 +#: library/codecs.rst:1128 msgid "Urdu" msgstr "" -#: library/codecs.rst:1082 +#: library/codecs.rst:1130 msgid "cp1026" msgstr "*cp1026*" -#: library/codecs.rst:1082 +#: library/codecs.rst:1130 msgid "ibm1026" msgstr "*ibm1026*" -#: library/codecs.rst:1084 +#: library/codecs.rst:1132 msgid "cp1125" msgstr "*cp1125*" -#: library/codecs.rst:1084 +#: library/codecs.rst:1132 msgid "1125, ibm1125, cp866u, ruscii" msgstr "*1125*, *ibm1125*, *cp866u*, *ruscii*" -#: library/codecs.rst:1188 +#: library/codecs.rst:1236 msgid "Ukrainian" msgstr "" -#: library/codecs.rst:1088 +#: library/codecs.rst:1136 msgid "cp1140" msgstr "*cp1140*" -#: library/codecs.rst:1088 +#: library/codecs.rst:1136 msgid "ibm1140" msgstr "*ibm1140*" -#: library/codecs.rst:1090 +#: library/codecs.rst:1138 msgid "cp1250" msgstr "*cp1250*" -#: library/codecs.rst:1090 +#: library/codecs.rst:1138 msgid "windows-1250" msgstr "*windows-1250*" -#: library/codecs.rst:1092 +#: library/codecs.rst:1140 msgid "cp1251" msgstr "*cp1251*" -#: library/codecs.rst:1092 +#: library/codecs.rst:1140 msgid "windows-1251" msgstr "*windows-1251*" -#: library/codecs.rst:1095 +#: library/codecs.rst:1143 msgid "cp1252" msgstr "*cp1252*" -#: library/codecs.rst:1095 +#: library/codecs.rst:1143 msgid "windows-1252" msgstr "*windows-1252*" -#: library/codecs.rst:1097 +#: library/codecs.rst:1145 msgid "cp1253" msgstr "*cp1253*" -#: library/codecs.rst:1097 +#: library/codecs.rst:1145 msgid "windows-1253" msgstr "*windows-1253*" -#: library/codecs.rst:1099 +#: library/codecs.rst:1147 msgid "cp1254" msgstr "*cp1254*" -#: library/codecs.rst:1099 +#: library/codecs.rst:1147 msgid "windows-1254" msgstr "*windows-1254*" -#: library/codecs.rst:1101 +#: library/codecs.rst:1149 msgid "cp1255" msgstr "*cp1255*" -#: library/codecs.rst:1101 +#: library/codecs.rst:1149 msgid "windows-1255" msgstr "*windows-1255*" -#: library/codecs.rst:1103 +#: library/codecs.rst:1151 msgid "cp1256" msgstr "*cp1256*" -#: library/codecs.rst:1103 +#: library/codecs.rst:1151 msgid "windows-1256" msgstr "*windows-1256*" -#: library/codecs.rst:1105 +#: library/codecs.rst:1153 msgid "cp1257" msgstr "*cp1257*" -#: library/codecs.rst:1105 +#: library/codecs.rst:1153 msgid "windows-1257" msgstr "*windows-1257*" -#: library/codecs.rst:1107 +#: library/codecs.rst:1155 msgid "cp1258" msgstr "*cp1258*" -#: library/codecs.rst:1107 +#: library/codecs.rst:1155 msgid "windows-1258" msgstr "*windows-1258*" -#: library/codecs.rst:1107 +#: library/codecs.rst:1155 msgid "Vietnamese" msgstr "" -#: library/codecs.rst:1109 +#: library/codecs.rst:1157 msgid "euc_jp" msgstr "*euc_jp*" -#: library/codecs.rst:1109 +#: library/codecs.rst:1157 msgid "eucjp, ujis, u-jis" msgstr "*eucjp*, *ujis*, *u-jis*" -#: library/codecs.rst:1111 +#: library/codecs.rst:1159 msgid "euc_jis_2004" msgstr "*euc_jis_2004*" -#: library/codecs.rst:1111 +#: library/codecs.rst:1159 msgid "jisx0213, eucjis2004" msgstr "*jisx0213*, *eucjis2004*" -#: library/codecs.rst:1113 +#: library/codecs.rst:1161 msgid "euc_jisx0213" msgstr "*euc_jisx0213*" -#: library/codecs.rst:1113 +#: library/codecs.rst:1161 msgid "eucjisx0213" msgstr "*eucjisx0213*" -#: library/codecs.rst:1115 +#: library/codecs.rst:1163 msgid "euc_kr" msgstr "*euc_kr*" -#: library/codecs.rst:1115 +#: library/codecs.rst:1163 msgid "euckr, korean, ksc5601, ks_c-5601, ks_c-5601-1987, ksx1001, ks_x-1001" msgstr "" "*euckr*, *korean*, *ksc5601*, *ks_c-5601*, *ks_c-5601-1987*, *ksx1001*, " "*ks_x-1001*" -#: library/codecs.rst:1119 +#: library/codecs.rst:1167 msgid "gb2312" msgstr "*gb2312*" -#: library/codecs.rst:1119 +#: library/codecs.rst:1167 msgid "" "chinese, csiso58gb231280, euc-cn, euccn, eucgb2312-cn, gb2312-1980, " "gb2312-80, iso-ir-58" @@ -1975,445 +2039,445 @@ msgstr "" "*chinese*, *csiso58gb231280*, *euc-cn*, *euccn*, *eucgb2312-cn*, " "*gb2312-1980*, *gb2312-80*, *iso-ir-58*" -#: library/codecs.rst:1128 +#: library/codecs.rst:1176 msgid "Simplified Chinese" msgstr "" -#: library/codecs.rst:1124 +#: library/codecs.rst:1172 msgid "gbk" msgstr "*gbk*" -#: library/codecs.rst:1124 +#: library/codecs.rst:1172 msgid "936, cp936, ms936" msgstr "*936*, *cp936*, *ms936*" -#: library/codecs.rst:1126 +#: library/codecs.rst:1174 msgid "Unified Chinese" msgstr "" -#: library/codecs.rst:1126 +#: library/codecs.rst:1174 msgid "gb18030" msgstr "*gb18030*" -#: library/codecs.rst:1126 +#: library/codecs.rst:1174 msgid "gb18030-2000" msgstr "*gb18030-2000*" -#: library/codecs.rst:1128 +#: library/codecs.rst:1176 msgid "hz" msgstr "*hz*" -#: library/codecs.rst:1128 +#: library/codecs.rst:1176 msgid "hzgb, hz-gb, hz-gb-2312" msgstr "*hzgb*, *hz-gb*, *hz-gb-2312*" -#: library/codecs.rst:1130 +#: library/codecs.rst:1178 msgid "iso2022_jp" msgstr "*iso2022_jp*" -#: library/codecs.rst:1130 +#: library/codecs.rst:1178 msgid "csiso2022jp, iso2022jp, iso-2022-jp" msgstr "*csiso2022jp*, *iso2022jp*, *iso-2022-jp*" -#: library/codecs.rst:1133 +#: library/codecs.rst:1181 msgid "iso2022_jp_1" msgstr "*iso2022_jp_1*" -#: library/codecs.rst:1133 +#: library/codecs.rst:1181 msgid "iso2022jp-1, iso-2022-jp-1" msgstr "*iso2022jp-1*, *iso-2022-jp-1*" -#: library/codecs.rst:1135 +#: library/codecs.rst:1183 msgid "iso2022_jp_2" msgstr "*iso2022_jp_2*" -#: library/codecs.rst:1135 +#: library/codecs.rst:1183 msgid "iso2022jp-2, iso-2022-jp-2" msgstr "*iso2022jp-2*, *iso-2022-jp-2*" -#: library/codecs.rst:1135 +#: library/codecs.rst:1183 msgid "Japanese, Korean, Simplified Chinese, Western Europe, Greek" msgstr "" -#: library/codecs.rst:1138 +#: library/codecs.rst:1186 msgid "iso2022_jp_2004" msgstr "*iso2022_jp_2004*" -#: library/codecs.rst:1138 +#: library/codecs.rst:1186 msgid "iso2022jp-2004, iso-2022-jp-2004" msgstr "*iso2022jp-2004*, *iso-2022-jp-2004*" -#: library/codecs.rst:1141 +#: library/codecs.rst:1189 msgid "iso2022_jp_3" msgstr "*iso2022_jp_3*" -#: library/codecs.rst:1141 +#: library/codecs.rst:1189 msgid "iso2022jp-3, iso-2022-jp-3" msgstr "*iso2022jp-3*, *iso-2022-jp-3*" -#: library/codecs.rst:1143 +#: library/codecs.rst:1191 msgid "iso2022_jp_ext" msgstr "*iso2022_jp_ext*" -#: library/codecs.rst:1143 +#: library/codecs.rst:1191 msgid "iso2022jp-ext, iso-2022-jp-ext" msgstr "*iso2022jp-ext*, *iso-2022-jp-ext*" -#: library/codecs.rst:1145 +#: library/codecs.rst:1193 msgid "iso2022_kr" msgstr "*iso2022_kr*" -#: library/codecs.rst:1145 +#: library/codecs.rst:1193 msgid "csiso2022kr, iso2022kr, iso-2022-kr" msgstr "*csiso2022kr*, *iso2022kr*, *iso-2022-kr*" -#: library/codecs.rst:1148 +#: library/codecs.rst:1196 msgid "latin_1" msgstr "*latin_1*" -#: library/codecs.rst:1148 +#: library/codecs.rst:1196 msgid "iso-8859-1, iso8859-1, 8859, cp819, latin, latin1, L1" msgstr "*iso-8859-1*, *iso8859-1*, *8859*, *cp819*, *latin*, *latin1*, *L1*" -#: library/codecs.rst:1151 +#: library/codecs.rst:1199 msgid "iso8859_2" msgstr "*iso8859_2*" -#: library/codecs.rst:1151 +#: library/codecs.rst:1199 msgid "iso-8859-2, latin2, L2" msgstr "*iso-8859-2*, *latin2*, *L2*" -#: library/codecs.rst:1153 +#: library/codecs.rst:1201 msgid "iso8859_3" msgstr "*iso8859_3*" -#: library/codecs.rst:1153 +#: library/codecs.rst:1201 msgid "iso-8859-3, latin3, L3" msgstr "*iso-8859-3*, *latin3*, *L3*" -#: library/codecs.rst:1153 +#: library/codecs.rst:1201 msgid "Esperanto, Maltese" msgstr "" -#: library/codecs.rst:1155 +#: library/codecs.rst:1203 msgid "iso8859_4" msgstr "*iso8859_4*" -#: library/codecs.rst:1155 +#: library/codecs.rst:1203 msgid "iso-8859-4, latin4, L4" msgstr "*iso-8859-4*, *latin4*, *L4*" -#: library/codecs.rst:1157 +#: library/codecs.rst:1205 msgid "iso8859_5" msgstr "*iso8859_5*" -#: library/codecs.rst:1157 +#: library/codecs.rst:1205 msgid "iso-8859-5, cyrillic" msgstr "*iso-8859-5*, *cyrillic*" -#: library/codecs.rst:1160 +#: library/codecs.rst:1208 msgid "iso8859_6" msgstr "*iso8859_6*" -#: library/codecs.rst:1160 +#: library/codecs.rst:1208 msgid "iso-8859-6, arabic" msgstr "*iso-8859-6*, *arabic*" -#: library/codecs.rst:1162 +#: library/codecs.rst:1210 msgid "iso8859_7" msgstr "*iso8859_7*" -#: library/codecs.rst:1162 +#: library/codecs.rst:1210 msgid "iso-8859-7, greek, greek8" msgstr "*iso-8859-7*, *greek*, *greek8*" -#: library/codecs.rst:1164 +#: library/codecs.rst:1212 msgid "iso8859_8" msgstr "*iso8859_8*" -#: library/codecs.rst:1164 +#: library/codecs.rst:1212 msgid "iso-8859-8, hebrew" msgstr "*iso-8859-8*, *hebrew*" -#: library/codecs.rst:1166 +#: library/codecs.rst:1214 msgid "iso8859_9" msgstr "*iso8859_9*" -#: library/codecs.rst:1166 +#: library/codecs.rst:1214 msgid "iso-8859-9, latin5, L5" msgstr "*iso-8859-9*, *latin5*, *L5*" -#: library/codecs.rst:1168 +#: library/codecs.rst:1216 msgid "iso8859_10" msgstr "*iso8859_10*" -#: library/codecs.rst:1168 +#: library/codecs.rst:1216 msgid "iso-8859-10, latin6, L6" msgstr "*iso-8859-10*, *latin6*, *L6*" -#: library/codecs.rst:1168 +#: library/codecs.rst:1216 msgid "Nordic languages" msgstr "" -#: library/codecs.rst:1170 +#: library/codecs.rst:1218 msgid "iso8859_11" msgstr "*iso8859_11*" -#: library/codecs.rst:1170 +#: library/codecs.rst:1218 msgid "iso-8859-11, thai" msgstr "*iso-8859-11*, *thai*" -#: library/codecs.rst:1170 +#: library/codecs.rst:1218 msgid "Thai languages" msgstr "" -#: library/codecs.rst:1172 +#: library/codecs.rst:1220 msgid "iso8859_13" msgstr "*iso8859_13*" -#: library/codecs.rst:1172 +#: library/codecs.rst:1220 msgid "iso-8859-13, latin7, L7" msgstr "*iso-8859-13*, *latin7*, *L7*" -#: library/codecs.rst:1174 +#: library/codecs.rst:1222 msgid "iso8859_14" msgstr "*iso8859_14*" -#: library/codecs.rst:1174 +#: library/codecs.rst:1222 msgid "iso-8859-14, latin8, L8" msgstr "*iso-8859-14*, *latin8*, *L8*" -#: library/codecs.rst:1174 +#: library/codecs.rst:1222 msgid "Celtic languages" msgstr "" -#: library/codecs.rst:1176 +#: library/codecs.rst:1224 msgid "iso8859_15" msgstr "*iso8859_15*" -#: library/codecs.rst:1176 +#: library/codecs.rst:1224 msgid "iso-8859-15, latin9, L9" msgstr "*iso-8859-15*, *latin9*, *L9*" -#: library/codecs.rst:1178 +#: library/codecs.rst:1226 msgid "iso8859_16" msgstr "*iso8859_16*" -#: library/codecs.rst:1178 +#: library/codecs.rst:1226 msgid "iso-8859-16, latin10, L10" msgstr "*iso-8859-16*, *latin10*, *L10*" -#: library/codecs.rst:1178 +#: library/codecs.rst:1226 msgid "South-Eastern Europe" msgstr "" -#: library/codecs.rst:1180 +#: library/codecs.rst:1228 msgid "johab" msgstr "*johab*" -#: library/codecs.rst:1180 +#: library/codecs.rst:1228 msgid "cp1361, ms1361" msgstr "*cp1361*, *ms1361*" -#: library/codecs.rst:1182 +#: library/codecs.rst:1230 msgid "koi8_r" msgstr "*koi8_r*" -#: library/codecs.rst:1184 +#: library/codecs.rst:1232 msgid "koi8_t" msgstr "*koi8_t*" -#: library/codecs.rst:1184 +#: library/codecs.rst:1232 msgid "Tajik" msgstr "*Tajik*" -#: library/codecs.rst:1188 +#: library/codecs.rst:1236 msgid "koi8_u" msgstr "*koi8_u*" -#: library/codecs.rst:1190 +#: library/codecs.rst:1238 msgid "kz1048" msgstr "*kz1048*" -#: library/codecs.rst:1190 +#: library/codecs.rst:1238 msgid "kz_1048, strk1048_2002, rk1048" msgstr "*kz_1048*, *strk1048_2002*, *rk1048*" -#: library/codecs.rst:1208 +#: library/codecs.rst:1256 msgid "Kazakh" msgstr "" -#: library/codecs.rst:1194 +#: library/codecs.rst:1242 msgid "mac_cyrillic" msgstr "*mac_cyrillic*" -#: library/codecs.rst:1194 +#: library/codecs.rst:1242 msgid "maccyrillic" msgstr "*maccyrillic*" -#: library/codecs.rst:1197 +#: library/codecs.rst:1245 msgid "mac_greek" msgstr "*mac_greek*" -#: library/codecs.rst:1197 +#: library/codecs.rst:1245 msgid "macgreek" msgstr "*macgreek*" -#: library/codecs.rst:1199 +#: library/codecs.rst:1247 msgid "mac_iceland" msgstr "*mac_iceland*" -#: library/codecs.rst:1199 +#: library/codecs.rst:1247 msgid "maciceland" msgstr "*maciceland*" -#: library/codecs.rst:1201 +#: library/codecs.rst:1249 msgid "mac_latin2" msgstr "*mac_latin2*" -#: library/codecs.rst:1201 +#: library/codecs.rst:1249 #, fuzzy msgid "maclatin2, maccentraleurope, mac_centeuro" msgstr "*maclatin2*, *maccentraleurope*" -#: library/codecs.rst:1204 +#: library/codecs.rst:1252 msgid "mac_roman" msgstr "*mac_roman*" -#: library/codecs.rst:1204 +#: library/codecs.rst:1252 msgid "macroman, macintosh" msgstr "*macroman*, *macintosh*" -#: library/codecs.rst:1206 +#: library/codecs.rst:1254 msgid "mac_turkish" msgstr "*mac_turkish*" -#: library/codecs.rst:1206 +#: library/codecs.rst:1254 msgid "macturkish" msgstr "*macturkish*" -#: library/codecs.rst:1208 +#: library/codecs.rst:1256 msgid "ptcp154" msgstr "*ptcp154*" -#: library/codecs.rst:1208 +#: library/codecs.rst:1256 msgid "csptcp154, pt154, cp154, cyrillic-asian" msgstr "*csptcp154*, *pt154*, *cp154*, *cyrillic-asian*" -#: library/codecs.rst:1211 +#: library/codecs.rst:1259 msgid "shift_jis" msgstr "*shift_jis*" -#: library/codecs.rst:1211 +#: library/codecs.rst:1259 msgid "csshiftjis, shiftjis, sjis, s_jis" msgstr "*csshiftjis*, *shiftjis*, *sjis*, *s_jis*" -#: library/codecs.rst:1214 +#: library/codecs.rst:1262 msgid "shift_jis_2004" msgstr "*shift_jis_2004*" -#: library/codecs.rst:1214 +#: library/codecs.rst:1262 msgid "shiftjis2004, sjis_2004, sjis2004" msgstr "*shiftjis2004*, *sjis_2004*, *sjis2004*" -#: library/codecs.rst:1217 +#: library/codecs.rst:1265 msgid "shift_jisx0213" msgstr "*shift_jisx0213*" -#: library/codecs.rst:1217 +#: library/codecs.rst:1265 msgid "shiftjisx0213, sjisx0213, s_jisx0213" msgstr "*shiftjisx0213*, *sjisx0213*, *s_jisx0213*" -#: library/codecs.rst:1220 +#: library/codecs.rst:1268 msgid "utf_32" msgstr "*utf_32*" -#: library/codecs.rst:1220 +#: library/codecs.rst:1268 msgid "U32, utf32" msgstr "*U32*, *utf32*" -#: library/codecs.rst:1222 library/codecs.rst:1226 library/codecs.rst:1230 -#: library/codecs.rst:1234 library/codecs.rst:1236 +#: library/codecs.rst:1270 library/codecs.rst:1274 library/codecs.rst:1278 +#: library/codecs.rst:1282 library/codecs.rst:1284 msgid "all languages" msgstr "" -#: library/codecs.rst:1222 +#: library/codecs.rst:1270 msgid "utf_32_be" msgstr "*utf_32_be*" -#: library/codecs.rst:1222 +#: library/codecs.rst:1270 msgid "UTF-32BE" msgstr "*UTF-32BE*" -#: library/codecs.rst:1224 +#: library/codecs.rst:1272 msgid "utf_32_le" msgstr "*utf_32_le*" -#: library/codecs.rst:1224 +#: library/codecs.rst:1272 msgid "UTF-32LE" msgstr "*UTF-32LE*" -#: library/codecs.rst:1226 +#: library/codecs.rst:1274 msgid "utf_16" msgstr "*utf_16*" -#: library/codecs.rst:1226 +#: library/codecs.rst:1274 msgid "U16, utf16" msgstr "*U16*, *utf16*" -#: library/codecs.rst:1228 +#: library/codecs.rst:1276 msgid "utf_16_be" msgstr "*utf_16_be*" -#: library/codecs.rst:1228 +#: library/codecs.rst:1276 msgid "UTF-16BE" msgstr "*UTF-16BE*" -#: library/codecs.rst:1230 +#: library/codecs.rst:1278 msgid "utf_16_le" msgstr "*utf_16_le*" -#: library/codecs.rst:1230 +#: library/codecs.rst:1278 msgid "UTF-16LE" msgstr "*UTF-16LE*" -#: library/codecs.rst:1232 +#: library/codecs.rst:1280 msgid "utf_7" msgstr "*utf_7*" -#: library/codecs.rst:1232 +#: library/codecs.rst:1280 msgid "U7, unicode-1-1-utf-7" msgstr "*U7*, *unicode-1-1-utf-7*" -#: library/codecs.rst:1234 +#: library/codecs.rst:1282 msgid "utf_8" msgstr "*utf_8*" -#: library/codecs.rst:1234 +#: library/codecs.rst:1282 #, fuzzy msgid "U8, UTF, utf8, cp65001" msgstr "*U8*, *UTF*, *utf8*" -#: library/codecs.rst:1236 +#: library/codecs.rst:1284 msgid "utf_8_sig" msgstr "*utf_8_sig*" -#: library/codecs.rst:1239 +#: library/codecs.rst:1287 msgid "" "The utf-16\\* and utf-32\\* encoders no longer allow surrogate code points " "(``U+D800``--``U+DFFF``) to be encoded. The utf-32\\* decoders no longer " "decode byte sequences that correspond to surrogate code points." msgstr "" -#: library/codecs.rst:1245 +#: library/codecs.rst:1293 msgid "``cp65001`` is now an alias to ``utf_8``." msgstr "" -#: library/codecs.rst:1250 +#: library/codecs.rst:1298 msgid "Python Specific Encodings" msgstr "" -#: library/codecs.rst:1252 +#: library/codecs.rst:1300 msgid "" "A number of predefined codecs are specific to Python, so their codec names " "have no meaning outside Python. These are listed in the tables below based " @@ -2423,272 +2487,272 @@ msgid "" "asymmetric codecs, the stated meaning describes the encoding direction." msgstr "" -#: library/codecs.rst:1260 +#: library/codecs.rst:1308 msgid "Text Encodings" msgstr "" -#: library/codecs.rst:1262 +#: library/codecs.rst:1310 msgid "" "The following codecs provide :class:`str` to :class:`bytes` encoding and :" "term:`bytes-like object` to :class:`str` decoding, similar to the Unicode " "text encodings." msgstr "" -#: library/codecs.rst:1271 +#: library/codecs.rst:1319 msgid "idna" msgstr "idna" -#: library/codecs.rst:1271 +#: library/codecs.rst:1319 msgid "" "Implement :rfc:`3490`, see also :mod:`encodings.idna`. Only " "``errors='strict'`` is supported." msgstr "" -#: library/codecs.rst:1277 +#: library/codecs.rst:1325 msgid "mbcs" msgstr "mbcs" -#: library/codecs.rst:1277 +#: library/codecs.rst:1325 msgid "ansi, dbcs" msgstr "" -#: library/codecs.rst:1277 +#: library/codecs.rst:1325 msgid "" "Windows only: Encode the operand according to the ANSI codepage (CP_ACP)." msgstr "" -#: library/codecs.rst:1281 +#: library/codecs.rst:1329 msgid "oem" msgstr "" -#: library/codecs.rst:1281 +#: library/codecs.rst:1329 msgid "" "Windows only: Encode the operand according to the OEM codepage (CP_OEMCP)." msgstr "" -#: library/codecs.rst:1287 +#: library/codecs.rst:1335 msgid "palmos" msgstr "palmos" -#: library/codecs.rst:1287 +#: library/codecs.rst:1335 msgid "Encoding of PalmOS 3.5." msgstr "" -#: library/codecs.rst:1289 +#: library/codecs.rst:1337 msgid "punycode" msgstr "punycode" -#: library/codecs.rst:1289 +#: library/codecs.rst:1337 msgid "Implement :rfc:`3492`. Stateful codecs are not supported." msgstr "" -#: library/codecs.rst:1293 +#: library/codecs.rst:1341 msgid "raw_unicode_escape" msgstr "raw_unicode_escape" -#: library/codecs.rst:1293 +#: library/codecs.rst:1341 msgid "" "Latin-1 encoding with ``\\uXXXX`` and ``\\UXXXXXXXX`` for other code points. " "Existing backslashes are not escaped in any way. It is used in the Python " "pickle protocol." msgstr "" -#: library/codecs.rst:1302 +#: library/codecs.rst:1350 msgid "undefined" msgstr "undefined" -#: library/codecs.rst:1302 +#: library/codecs.rst:1350 msgid "" "Raise an exception for all conversions, even empty strings. The error " "handler is ignored." msgstr "" -#: library/codecs.rst:1307 +#: library/codecs.rst:1355 msgid "unicode_escape" msgstr "unicode_escape" -#: library/codecs.rst:1307 +#: library/codecs.rst:1355 msgid "" "Encoding suitable as the contents of a Unicode literal in ASCII-encoded " "Python source code, except that quotes are not escaped. Decode from Latin-1 " "source code. Beware that Python source code actually uses UTF-8 by default." msgstr "" -#: library/codecs.rst:1319 +#: library/codecs.rst:1367 msgid "\"unicode_internal\" codec is removed." msgstr "" -#: library/codecs.rst:1326 +#: library/codecs.rst:1374 msgid "Binary Transforms" msgstr "" -#: library/codecs.rst:1328 +#: library/codecs.rst:1376 msgid "" "The following codecs provide binary transforms: :term:`bytes-like object` " "to :class:`bytes` mappings. They are not supported by :meth:`bytes.decode` " "(which only produces :class:`str` output)." msgstr "" -#: library/codecs.rst:1336 +#: library/codecs.rst:1384 msgid "Encoder / decoder" msgstr "" -#: library/codecs.rst:1338 +#: library/codecs.rst:1386 msgid "base64_codec [#b64]_" msgstr "base64_codec [#b64]_" -#: library/codecs.rst:1338 +#: library/codecs.rst:1386 msgid "base64, base_64" msgstr "base64, base_64" -#: library/codecs.rst:1338 +#: library/codecs.rst:1386 msgid "" "Convert the operand to multiline MIME base64 (the result always includes a " "trailing ``'\\n'``)." msgstr "" -#: library/codecs.rst:1343 +#: library/codecs.rst:1391 msgid "" "accepts any :term:`bytes-like object` as input for encoding and decoding" msgstr "" -#: library/codecs.rst:1338 +#: library/codecs.rst:1386 msgid ":meth:`base64.encodebytes` / :meth:`base64.decodebytes`" msgstr "" -#: library/codecs.rst:1349 +#: library/codecs.rst:1397 msgid "bz2_codec" msgstr "bz2_codec" -#: library/codecs.rst:1349 +#: library/codecs.rst:1397 msgid "bz2" msgstr "bz2" -#: library/codecs.rst:1349 +#: library/codecs.rst:1397 msgid "Compress the operand using bz2." msgstr "" -#: library/codecs.rst:1349 +#: library/codecs.rst:1397 msgid ":meth:`bz2.compress` / :meth:`bz2.decompress`" msgstr "" -#: library/codecs.rst:1352 +#: library/codecs.rst:1400 msgid "hex_codec" msgstr "hex_codec" -#: library/codecs.rst:1352 +#: library/codecs.rst:1400 msgid "hex" msgstr "hex" -#: library/codecs.rst:1352 +#: library/codecs.rst:1400 msgid "" "Convert the operand to hexadecimal representation, with two digits per byte." msgstr "" -#: library/codecs.rst:1352 +#: library/codecs.rst:1400 msgid ":meth:`binascii.b2a_hex` / :meth:`binascii.a2b_hex`" msgstr "" -#: library/codecs.rst:1357 +#: library/codecs.rst:1405 msgid "quopri_codec" msgstr "quopri_codec" -#: library/codecs.rst:1357 +#: library/codecs.rst:1405 msgid "quopri, quotedprintable, quoted_printable" msgstr "" -#: library/codecs.rst:1357 +#: library/codecs.rst:1405 msgid "Convert the operand to MIME quoted printable." msgstr "" -#: library/codecs.rst:1357 +#: library/codecs.rst:1405 msgid ":meth:`quopri.encode` with ``quotetabs=True`` / :meth:`quopri.decode`" msgstr "" -#: library/codecs.rst:1361 +#: library/codecs.rst:1409 msgid "uu_codec" msgstr "uu_codec" -#: library/codecs.rst:1361 +#: library/codecs.rst:1409 msgid "uu" msgstr "uu" -#: library/codecs.rst:1361 +#: library/codecs.rst:1409 msgid "Convert the operand using uuencode." msgstr "" -#: library/codecs.rst:1361 +#: library/codecs.rst:1409 msgid ":meth:`uu.encode` / :meth:`uu.decode`" msgstr "" -#: library/codecs.rst:1364 +#: library/codecs.rst:1412 msgid "zlib_codec" msgstr "zlib_codec" -#: library/codecs.rst:1364 +#: library/codecs.rst:1412 msgid "zip, zlib" msgstr "zip, zlib" -#: library/codecs.rst:1364 +#: library/codecs.rst:1412 msgid "Compress the operand using gzip." msgstr "" -#: library/codecs.rst:1364 +#: library/codecs.rst:1412 msgid ":meth:`zlib.compress` / :meth:`zlib.decompress`" msgstr ":meth:`zlib.compress` / :meth:`zlib.decompress`" -#: library/codecs.rst:1368 +#: library/codecs.rst:1416 msgid "" "In addition to :term:`bytes-like objects `, " "``'base64_codec'`` also accepts ASCII-only instances of :class:`str` for " "decoding" msgstr "" -#: library/codecs.rst:1372 +#: library/codecs.rst:1420 msgid "Restoration of the binary transforms." msgstr "" -#: library/codecs.rst:1375 +#: library/codecs.rst:1423 msgid "Restoration of the aliases for the binary transforms." msgstr "" -#: library/codecs.rst:1382 +#: library/codecs.rst:1430 msgid "Text Transforms" msgstr "" -#: library/codecs.rst:1384 +#: library/codecs.rst:1432 msgid "" "The following codec provides a text transform: a :class:`str` to :class:" "`str` mapping. It is not supported by :meth:`str.encode` (which only " "produces :class:`bytes` output)." msgstr "" -#: library/codecs.rst:1393 +#: library/codecs.rst:1441 msgid "rot_13" msgstr "rot_13" -#: library/codecs.rst:1393 +#: library/codecs.rst:1441 msgid "rot13" msgstr "rot13" -#: library/codecs.rst:1393 +#: library/codecs.rst:1441 msgid "Return the Caesar-cypher encryption of the operand." msgstr "" -#: library/codecs.rst:1398 +#: library/codecs.rst:1446 msgid "Restoration of the ``rot_13`` text transform." msgstr "" -#: library/codecs.rst:1401 +#: library/codecs.rst:1449 msgid "Restoration of the ``rot13`` alias." msgstr "" -#: library/codecs.rst:1406 +#: library/codecs.rst:1454 msgid "" ":mod:`encodings.idna` --- Internationalized Domain Names in Applications" msgstr "" -#: library/codecs.rst:1412 +#: library/codecs.rst:1460 msgid "" "This module implements :rfc:`3490` (Internationalized Domain Names in " "Applications) and :rfc:`3492` (Nameprep: A Stringprep Profile for " @@ -2696,7 +2760,13 @@ msgid "" "encoding and :mod:`stringprep`." msgstr "" -#: library/codecs.rst:1417 +#: library/codecs.rst:1465 +msgid "" +"If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the " +"third-party `idna module `_." +msgstr "" + +#: library/codecs.rst:1468 msgid "" "These RFCs together define a protocol to support non-ASCII characters in " "domain names. A domain name containing non-ASCII characters (such as ``www." @@ -2710,7 +2780,7 @@ msgid "" "presenting them to the user." msgstr "" -#: library/codecs.rst:1428 +#: library/codecs.rst:1479 msgid "" "Python supports this conversion in several ways: the ``idna`` codec " "performs conversion between Unicode and ACE, separating an input string into " @@ -2727,14 +2797,14 @@ msgid "" "sends that field at all)." msgstr "" -#: library/codecs.rst:1441 +#: library/codecs.rst:1492 msgid "" "When receiving host names from the wire (such as in reverse name lookup), no " "automatic conversion to Unicode is performed: applications wishing to " "present such host names to the user should decode them to Unicode." msgstr "" -#: library/codecs.rst:1445 +#: library/codecs.rst:1496 msgid "" "The module :mod:`encodings.idna` also implements the nameprep procedure, " "which performs certain normalizations on host names, to achieve case-" @@ -2742,49 +2812,49 @@ msgid "" "characters. The nameprep functions can be used directly if desired." msgstr "" -#: library/codecs.rst:1453 +#: library/codecs.rst:1504 msgid "" "Return the nameprepped version of *label*. The implementation currently " "assumes query strings, so ``AllowUnassigned`` is true." msgstr "" -#: library/codecs.rst:1459 +#: library/codecs.rst:1510 msgid "" "Convert a label to ASCII, as specified in :rfc:`3490`. ``UseSTD3ASCIIRules`` " "is assumed to be false." msgstr "" -#: library/codecs.rst:1465 +#: library/codecs.rst:1516 msgid "Convert a label to Unicode, as specified in :rfc:`3490`." msgstr "" -#: library/codecs.rst:1469 +#: library/codecs.rst:1520 msgid ":mod:`encodings.mbcs` --- Windows ANSI codepage" msgstr "" -#: library/codecs.rst:1474 +#: library/codecs.rst:1525 msgid "This module implements the ANSI codepage (CP_ACP)." msgstr "" -#: library/codecs.rst:1477 +#: library/codecs.rst:1528 msgid ":ref:`Availability `: Windows only." msgstr ":ref:`Disponibilité ` : Windows uniquement." -#: library/codecs.rst:1478 +#: library/codecs.rst:1529 msgid "Support any error handler." msgstr "" -#: library/codecs.rst:1481 +#: library/codecs.rst:1532 msgid "" "Before 3.2, the *errors* argument was ignored; ``'replace'`` was always used " "to encode, and ``'ignore'`` to decode." msgstr "" -#: library/codecs.rst:1487 +#: library/codecs.rst:1538 msgid ":mod:`encodings.utf_8_sig` --- UTF-8 codec with BOM signature" msgstr "" -#: library/codecs.rst:1493 +#: library/codecs.rst:1544 msgid "" "This module implements a variant of the UTF-8 codec. On encoding, a UTF-8 " "encoded BOM will be prepended to the UTF-8 encoded bytes. For the stateful " @@ -2792,3 +2862,10 @@ msgid "" "decoding, an optional UTF-8 encoded BOM at the start of the data will be " "skipped." msgstr "" + +#~ msgid "" +#~ "Replace with backslashed escape sequences. Implemented in :func:" +#~ "`backslashreplace_errors`." +#~ msgstr "" +#~ "Remplace avec une séquence échappée par des antislashs. Implémenté dans :" +#~ "func:`backslashreplace_errors`." diff --git a/library/codeop.po b/library/codeop.po index 3b3d75d733..d9a55a8417 100644 --- a/library/codeop.po +++ b/library/codeop.po @@ -94,7 +94,6 @@ msgstr "" "ou :exc:`ValueError` si un littéral invalide est rencontré." #: library/codeop.rst:45 -#, fuzzy msgid "" "The *symbol* argument determines whether *source* is compiled as a statement " "(``'single'``, the default), as a sequence of statements (``'exec'``) or as " @@ -102,8 +101,9 @@ msgid "" "`ValueError` to be raised." msgstr "" "L'argument *symbol* détermine si *source* est compilée comme une instruction " -"(``'single'``, par défaut) ou comme une :term:`expression` (``'eval'``). " -"Toute autre valeur lèvera :exc:`ValueError`." +"(``'single'``, par défaut), comme une suite d'instructions (``'exec'``), ou " +"comme une :term:`expression` (``'eval'``). Toute autre valeur lèvera :exc:" +"`ValueError`." #: library/codeop.rst:52 msgid "" diff --git a/library/collections.abc.po b/library/collections.abc.po index 96fe40f206..ed40a00ef9 100644 --- a/library/collections.abc.po +++ b/library/collections.abc.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-03-21 16:06+0100\n" "Last-Translator: Loc Cosnier \n" "Language-Team: French \n" @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Gtranslator 3.38.0\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" +"X-Generator: Gtranslator 3.38.0\n" #: library/collections.abc.rst:2 msgid ":mod:`collections.abc` --- Abstract Base Classes for Containers" @@ -40,11 +40,17 @@ msgstr "" "interface particulière (par exemple, savoir s'il s'agit d'un hachable ou " "d'une table de correspondance)." -#: library/collections.abc.rst:31 +#: library/collections.abc.rst:27 +msgid "" +"These abstract classes now support ``[]``. See :ref:`types-genericalias` " +"and :pep:`585`." +msgstr "" + +#: library/collections.abc.rst:34 msgid "Collections Abstract Base Classes" msgstr "Classes de base abstraites de collections" -#: library/collections.abc.rst:33 +#: library/collections.abc.rst:36 msgid "" "The collections module offers the following :term:`ABCs `:" @@ -52,131 +58,131 @@ msgstr "" "Le module collections apporte les :term:`ABC ` " "suivantes :" -#: library/collections.abc.rst:38 +#: library/collections.abc.rst:41 msgid "ABC" msgstr "ABC" -#: library/collections.abc.rst:38 +#: library/collections.abc.rst:41 msgid "Inherits from" msgstr "Hérite de" -#: library/collections.abc.rst:38 +#: library/collections.abc.rst:41 msgid "Abstract Methods" msgstr "Méthodes abstraites" -#: library/collections.abc.rst:38 +#: library/collections.abc.rst:41 msgid "Mixin Methods" msgstr "Méthodes *mixin*" -#: library/collections.abc.rst:40 +#: library/collections.abc.rst:43 msgid ":class:`Container`" msgstr ":class:`Container`" -#: library/collections.abc.rst:40 +#: library/collections.abc.rst:43 msgid "``__contains__``" msgstr "``__contains__``" -#: library/collections.abc.rst:41 +#: library/collections.abc.rst:44 msgid ":class:`Hashable`" msgstr ":class:`Hashable`" -#: library/collections.abc.rst:41 +#: library/collections.abc.rst:44 msgid "``__hash__``" msgstr "``__hash__``" -#: library/collections.abc.rst:43 library/collections.abc.rst:44 +#: library/collections.abc.rst:46 library/collections.abc.rst:47 msgid ":class:`Iterable`" msgstr ":class:`Iterable`" -#: library/collections.abc.rst:43 +#: library/collections.abc.rst:46 msgid "``__iter__``" msgstr "``__iter__``" -#: library/collections.abc.rst:45 +#: library/collections.abc.rst:48 msgid ":class:`Iterator`" msgstr ":class:`Iterator`" -#: library/collections.abc.rst:43 +#: library/collections.abc.rst:46 msgid "``__next__``" msgstr "``__next__``" -#: library/collections.abc.rst:44 +#: library/collections.abc.rst:47 msgid ":class:`Reversible`" msgstr ":class:`Reversible`" -#: library/collections.abc.rst:44 +#: library/collections.abc.rst:47 msgid "``__reversed__``" msgstr "``__reversed__``" -#: library/collections.abc.rst:45 +#: library/collections.abc.rst:48 msgid ":class:`Generator`" msgstr ":class:`Generator`" -#: library/collections.abc.rst:93 +#: library/collections.abc.rst:96 msgid "``send``, ``throw``" msgstr "``send``, ``throw``" -#: library/collections.abc.rst:45 +#: library/collections.abc.rst:48 msgid "``close``, ``__iter__``, ``__next__``" msgstr "``close``, ``__iter__``, ``__next__``" -#: library/collections.abc.rst:85 +#: library/collections.abc.rst:88 msgid ":class:`Sized`" msgstr ":class:`Sized`" -#: library/collections.abc.rst:85 +#: library/collections.abc.rst:88 msgid "``__len__``" msgstr "``__len__``" -#: library/collections.abc.rst:47 +#: library/collections.abc.rst:50 msgid ":class:`Callable`" msgstr ":class:`Callable`" -#: library/collections.abc.rst:47 +#: library/collections.abc.rst:50 msgid "``__call__``" msgstr "``__call__``" -#: library/collections.abc.rst:64 library/collections.abc.rst:74 +#: library/collections.abc.rst:67 library/collections.abc.rst:77 msgid ":class:`Collection`" msgstr ":class:`Collection`" -#: library/collections.abc.rst:48 +#: library/collections.abc.rst:51 msgid ":class:`Sized`, :class:`Iterable`, :class:`Container`" msgstr ":class:`Sized`, :class:`Iterable`, :class:`Container`" -#: library/collections.abc.rst:64 +#: library/collections.abc.rst:67 msgid "``__contains__``, ``__iter__``, ``__len__``" msgstr "``__contains__``, ``__iter__``, ``__len__``" -#: library/collections.abc.rst:55 library/collections.abc.rst:61 +#: library/collections.abc.rst:58 library/collections.abc.rst:64 msgid ":class:`Sequence`" msgstr ":class:`Sequence`" -#: library/collections.abc.rst:52 +#: library/collections.abc.rst:55 msgid ":class:`Reversible`, :class:`Collection`" msgstr ":class:`Reversible`, :class:`Collection`" -#: library/collections.abc.rst:61 +#: library/collections.abc.rst:64 msgid "``__getitem__``, ``__len__``" msgstr "``__getitem__``, ``__len__``" -#: library/collections.abc.rst:52 +#: library/collections.abc.rst:55 msgid "" "``__contains__``, ``__iter__``, ``__reversed__``, ``index``, and ``count``" msgstr "" "``__contains__``, ``__iter__``, ``__reversed__``, ``index`` et ``count``" -#: library/collections.abc.rst:55 +#: library/collections.abc.rst:58 msgid ":class:`MutableSequence`" msgstr ":class:`MutableSequence`" -#: library/collections.abc.rst:55 +#: library/collections.abc.rst:58 msgid "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__len__``, ``insert``" msgstr "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__len__``, ``insert``" -#: library/collections.abc.rst:55 +#: library/collections.abc.rst:58 msgid "" "Inherited :class:`Sequence` methods and ``append``, ``reverse``, ``extend``, " "``pop``, ``remove``, and ``__iadd__``" @@ -184,19 +190,19 @@ msgstr "" "Méthodes héritées de :class:`Sequence`, et ``append``, ``reverse``, " "``extend``, ``pop``, ``remove`` et ``__iadd__``" -#: library/collections.abc.rst:61 +#: library/collections.abc.rst:64 msgid ":class:`ByteString`" msgstr ":class:`ByteString`" -#: library/collections.abc.rst:61 +#: library/collections.abc.rst:64 msgid "Inherited :class:`Sequence` methods" msgstr "Méthodes héritées de :class:`Sequence`" -#: library/collections.abc.rst:68 +#: library/collections.abc.rst:71 msgid ":class:`Set`" msgstr ":class:`Set`" -#: library/collections.abc.rst:64 +#: library/collections.abc.rst:67 msgid "" "``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__gt__``, ``__ge__``, " "``__and__``, ``__or__``, ``__sub__``, ``__xor__``, and ``isdisjoint``" @@ -204,15 +210,15 @@ msgstr "" "``__le__``, ``__lt__``, ``__eq__``, ``__ne__``, ``__gt__``, ``__ge__``, " "``__and__``, ``__or__``, ``__sub__``, ``__xor__`` et ``isdisjoint``" -#: library/collections.abc.rst:68 +#: library/collections.abc.rst:71 msgid ":class:`MutableSet`" msgstr ":class:`MutableSet`" -#: library/collections.abc.rst:68 +#: library/collections.abc.rst:71 msgid "``__contains__``, ``__iter__``, ``__len__``, ``add``, ``discard``" msgstr "``__contains__``, ``__iter__``, ``__len__``, ``add``, ``discard``" -#: library/collections.abc.rst:68 +#: library/collections.abc.rst:71 msgid "" "Inherited :class:`Set` methods and ``clear``, ``pop``, ``remove``, " "``__ior__``, ``__iand__``, ``__ixor__``, and ``__isub__``" @@ -220,15 +226,15 @@ msgstr "" "Méthodes héritées de :class:`Set`, et ``clear``, ``pop``, ``remove``, " "``__ior__``, ``__iand__``, ``__ixor__`` et ``__isub__``" -#: library/collections.abc.rst:78 +#: library/collections.abc.rst:81 msgid ":class:`Mapping`" msgstr ":class:`Mapping`" -#: library/collections.abc.rst:74 +#: library/collections.abc.rst:77 msgid "``__getitem__``, ``__iter__``, ``__len__``" msgstr "``__getitem__``, ``__iter__``, ``__len__``" -#: library/collections.abc.rst:74 +#: library/collections.abc.rst:77 msgid "" "``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__``, and " "``__ne__``" @@ -236,17 +242,17 @@ msgstr "" "``__contains__``, ``keys``, ``items``, ``values``, ``get``, ``__eq__`` et " "``__ne__``" -#: library/collections.abc.rst:78 +#: library/collections.abc.rst:81 msgid ":class:`MutableMapping`" msgstr ":class:`MutableMapping`" -#: library/collections.abc.rst:78 +#: library/collections.abc.rst:81 msgid "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__iter__``, ``__len__``" msgstr "" "``__getitem__``, ``__setitem__``, ``__delitem__``, ``__iter__``, ``__len__``" -#: library/collections.abc.rst:78 +#: library/collections.abc.rst:81 msgid "" "Inherited :class:`Mapping` methods and ``pop``, ``popitem``, ``clear``, " "``update``, and ``setdefault``" @@ -254,99 +260,99 @@ msgstr "" "Méthodes héritées de :class:`Mapping`, et ``pop``, ``popitem``, ``clear``, " "``update`` et ``setdefault``" -#: library/collections.abc.rst:85 +#: library/collections.abc.rst:88 msgid ":class:`MappingView`" msgstr ":class:`MappingView`" -#: library/collections.abc.rst:86 +#: library/collections.abc.rst:89 msgid ":class:`ItemsView`" msgstr ":class:`ItemsView`" -#: library/collections.abc.rst:88 +#: library/collections.abc.rst:91 msgid ":class:`MappingView`, :class:`Set`" msgstr ":class:`MappingView`, :class:`Set`" -#: library/collections.abc.rst:88 library/collections.abc.rst:90 +#: library/collections.abc.rst:91 library/collections.abc.rst:93 msgid "``__contains__``, ``__iter__``" msgstr "``__contains__``, ``__iter__``" -#: library/collections.abc.rst:88 +#: library/collections.abc.rst:91 msgid ":class:`KeysView`" msgstr ":class:`KeysView`" -#: library/collections.abc.rst:90 +#: library/collections.abc.rst:93 msgid ":class:`ValuesView`" msgstr ":class:`ValuesView`" -#: library/collections.abc.rst:90 +#: library/collections.abc.rst:93 msgid ":class:`MappingView`, :class:`Collection`" msgstr ":class:`MappingView`, :class:`Collection`" -#: library/collections.abc.rst:93 +#: library/collections.abc.rst:96 msgid ":class:`Awaitable`" msgstr ":class:`Awaitable`" -#: library/collections.abc.rst:92 +#: library/collections.abc.rst:95 msgid "``__await__``" msgstr "``__await__``" -#: library/collections.abc.rst:93 +#: library/collections.abc.rst:96 msgid ":class:`Coroutine`" msgstr ":class:`Coroutine`" -#: library/collections.abc.rst:93 +#: library/collections.abc.rst:96 msgid "``close``" msgstr "``close``" -#: library/collections.abc.rst:95 +#: library/collections.abc.rst:98 msgid ":class:`AsyncIterable`" msgstr ":class:`AsyncIterable`" -#: library/collections.abc.rst:95 +#: library/collections.abc.rst:98 msgid "``__aiter__``" msgstr "``__aiter__``" -#: library/collections.abc.rst:96 +#: library/collections.abc.rst:99 msgid ":class:`AsyncIterator`" msgstr ":class:`AsyncIterator`" -#: library/collections.abc.rst:95 +#: library/collections.abc.rst:98 msgid "``__anext__``" msgstr "``__anext__``" -#: library/collections.abc.rst:96 +#: library/collections.abc.rst:99 msgid ":class:`AsyncGenerator`" msgstr ":class:`AsyncGenerator`" -#: library/collections.abc.rst:96 +#: library/collections.abc.rst:99 msgid "``asend``, ``athrow``" msgstr "``asend``, ``athrow``" -#: library/collections.abc.rst:96 +#: library/collections.abc.rst:99 msgid "``aclose``, ``__aiter__``, ``__anext__``" msgstr "``aclose``, ``__aiter__``, ``__anext__``" -#: library/collections.abc.rst:102 +#: library/collections.abc.rst:105 msgid "ABC for classes that provide the :meth:`__contains__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__contains__`." -#: library/collections.abc.rst:106 +#: library/collections.abc.rst:109 msgid "ABC for classes that provide the :meth:`__hash__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__hash__`." -#: library/collections.abc.rst:110 +#: library/collections.abc.rst:113 msgid "ABC for classes that provide the :meth:`__len__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__len__`." -#: library/collections.abc.rst:114 +#: library/collections.abc.rst:117 msgid "ABC for classes that provide the :meth:`__call__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__call__`." -#: library/collections.abc.rst:118 +#: library/collections.abc.rst:121 msgid "ABC for classes that provide the :meth:`__iter__` method." msgstr "ABC pour les classes qui définissent la méthode :meth:`__iter__`." -#: library/collections.abc.rst:120 +#: library/collections.abc.rst:123 msgid "" "Checking ``isinstance(obj, Iterable)`` detects classes that are registered " "as :class:`Iterable` or that have an :meth:`__iter__` method, but it does " @@ -360,11 +366,11 @@ msgstr "" "meth:`__getitem__`. Le seul moyen fiable de déterminer si un objet est :term:" "`itérable ` est d'appeler ``iter(obj)``." -#: library/collections.abc.rst:128 +#: library/collections.abc.rst:131 msgid "ABC for sized iterable container classes." msgstr "ABC pour les classes de conteneurs itérables et *sized*." -#: library/collections.abc.rst:134 +#: library/collections.abc.rst:137 msgid "" "ABC for classes that provide the :meth:`~iterator.__iter__` and :meth:" "`~iterator.__next__` methods. See also the definition of :term:`iterator`." @@ -373,14 +379,14 @@ msgstr "" "et :meth:`~iterator.__next__`. Voir aussi la définition d':term:`itérateur " "`." -#: library/collections.abc.rst:140 +#: library/collections.abc.rst:143 msgid "" "ABC for iterable classes that also provide the :meth:`__reversed__` method." msgstr "" "ABC pour les classes d'itérables qui implémentent également la méthode :meth:" "`__reversed__`." -#: library/collections.abc.rst:147 +#: library/collections.abc.rst:150 msgid "" "ABC for generator classes that implement the protocol defined in :pep:`342` " "that extends iterators with the :meth:`~generator.send`, :meth:`~generator." @@ -392,11 +398,11 @@ msgstr "" "`~generator.send`, :meth:`~generator.throw` et :meth:`~generator.close`. " "Voir aussi la définition de :term:`générateur `." -#: library/collections.abc.rst:158 +#: library/collections.abc.rst:161 msgid "ABCs for read-only and mutable :term:`sequences `." msgstr "ABC pour les :term:`séquences ` immuables et muables." -#: library/collections.abc.rst:160 +#: library/collections.abc.rst:163 msgid "" "Implementation note: Some of the mixin methods, such as :meth:`__iter__`, :" "meth:`__reversed__` and :meth:`index`, make repeated calls to the " @@ -414,29 +420,29 @@ msgstr "" "*mixin* auront une performance quadratique, il serait alors judicieux de les " "surcharger." -#: library/collections.abc.rst:169 +#: library/collections.abc.rst:172 msgid "The index() method added support for *stop* and *start* arguments." msgstr "" "La méthode index() a ajouté le support des arguments *start* et *stop*." -#: library/collections.abc.rst:176 +#: library/collections.abc.rst:179 msgid "ABCs for read-only and mutable sets." msgstr "ABC pour les ensembles immuables et muables." -#: library/collections.abc.rst:181 +#: library/collections.abc.rst:184 msgid "ABCs for read-only and mutable :term:`mappings `." msgstr "" "ABC pour les :term:`tables de correspondances ` immuables et " "muables." -#: library/collections.abc.rst:188 +#: library/collections.abc.rst:191 msgid "" "ABCs for mapping, items, keys, and values :term:`views `." msgstr "" "ABC pour les :term:`vues` de *mappings* (tableaux de " "correspondances), d'éléments, de clés et de valeurs." -#: library/collections.abc.rst:192 +#: library/collections.abc.rst:195 msgid "" "ABC for :term:`awaitable` objects, which can be used in :keyword:`await` " "expressions. Custom implementations must provide the :meth:`__await__` " @@ -446,7 +452,7 @@ msgstr "" "utilisés dans les expressions :keyword:`await`. Les implémentations " "personnalisées doivent définir la méthode :meth:`__await__`." -#: library/collections.abc.rst:196 +#: library/collections.abc.rst:199 msgid "" ":term:`Coroutine ` objects and instances of the :class:" "`~collections.abc.Coroutine` ABC are all instances of this ABC." @@ -454,7 +460,7 @@ msgstr "" "Les objets :term:`coroutines ` et les instances de l'ABC :class:" "`~collections.abc.Coroutine` sont tous des instances de cette ABC." -#: library/collections.abc.rst:200 +#: library/collections.abc.rst:203 msgid "" "In CPython, generator-based coroutines (generators decorated with :func:" "`types.coroutine` or :func:`asyncio.coroutine`) are *awaitables*, even " @@ -469,7 +475,7 @@ msgstr "" "décoré va renvoyer ``False``. Utilisez :func:`inspect.isawaitable` pour les " "détecter." -#: library/collections.abc.rst:210 +#: library/collections.abc.rst:213 msgid "" "ABC for coroutine compatible classes. These implement the following " "methods, defined in :ref:`coroutine-objects`: :meth:`~coroutine.send`, :meth:" @@ -485,7 +491,7 @@ msgstr "" "Toutes les instances de :class:`Coroutine` sont également des instances de :" "class:`Awaitable`. Voir aussi la définition de :term:`coroutine`." -#: library/collections.abc.rst:218 +#: library/collections.abc.rst:221 msgid "" "In CPython, generator-based coroutines (generators decorated with :func:" "`types.coroutine` or :func:`asyncio.coroutine`) are *awaitables*, even " @@ -500,7 +506,7 @@ msgstr "" "décoré va renvoyer ``False``. Utilisez :func:`inspect.isawaitable` pour les " "détecter." -#: library/collections.abc.rst:228 +#: library/collections.abc.rst:231 msgid "" "ABC for classes that provide ``__aiter__`` method. See also the definition " "of :term:`asynchronous iterable`." @@ -508,7 +514,7 @@ msgstr "" "ABC pour les classes qui définissent la méthode ``__aiter__``. Voir aussi la " "définition d':term:`itérable asynchrone `." -#: library/collections.abc.rst:235 +#: library/collections.abc.rst:238 msgid "" "ABC for classes that provide ``__aiter__`` and ``__anext__`` methods. See " "also the definition of :term:`asynchronous iterator`." @@ -517,7 +523,7 @@ msgstr "" "``__anext__``. Voir aussi la définition d':term:`itérateur asynchrone " "`." -#: library/collections.abc.rst:242 +#: library/collections.abc.rst:245 msgid "" "ABC for asynchronous generator classes that implement the protocol defined " "in :pep:`525` and :pep:`492`." @@ -525,7 +531,7 @@ msgstr "" "ABC pour les classes de générateurs asynchrones qui implémentent le " "protocole défini dans la :pep:`525` et dans la :pep:`492`." -#: library/collections.abc.rst:248 +#: library/collections.abc.rst:251 msgid "" "These ABCs allow us to ask classes or instances if they provide particular " "functionality, for example::" @@ -533,7 +539,7 @@ msgstr "" "Ces ABC permettent de demander à des classes ou à des instances si elles " "fournissent des fonctionnalités particulières, par exemple ::" -#: library/collections.abc.rst:255 +#: library/collections.abc.rst:258 msgid "" "Several of the ABCs are also useful as mixins that make it easier to develop " "classes supporting container APIs. For example, to write a class supporting " @@ -550,13 +556,13 @@ msgstr "" "apporte les méthodes restantes, comme :meth:`__and__` et :meth:" "`isdisjoint` ::" -#: library/collections.abc.rst:284 +#: library/collections.abc.rst:287 msgid "Notes on using :class:`Set` and :class:`MutableSet` as a mixin:" msgstr "" "Notes à propos de l'utilisation de :class:`Set` et :class:`MutableSet` comme " "*mixin* :" -#: library/collections.abc.rst:287 +#: library/collections.abc.rst:290 msgid "" "Since some set operations create new sets, the default mixin methods need a " "way to create new instances from an iterable. The class constructor is " @@ -579,7 +585,7 @@ msgstr "" "`_from_iterable` avec une méthode de classe ou une méthode ordinaire qui " "peut construire de nouvelles instances à partir d'un argument itérable." -#: library/collections.abc.rst:298 +#: library/collections.abc.rst:301 msgid "" "To override the comparisons (presumably for speed, as the semantics are " "fixed), redefine :meth:`__le__` and :meth:`__ge__`, then the other " @@ -589,7 +595,7 @@ msgstr "" "sémantique est fixe), il faut redéfinir :meth:`__le__` et :meth:`__ge__`, " "puis les autres opérations seront automatiquement adaptées." -#: library/collections.abc.rst:303 +#: library/collections.abc.rst:306 msgid "" "The :class:`Set` mixin provides a :meth:`_hash` method to compute a hash " "value for the set; however, :meth:`__hash__` is not defined because not all " @@ -603,7 +609,7 @@ msgstr "" "Pour rendre un ensemble hachable en utilisant les *mixins*, héritez de :meth:" "`Set` et de :meth:`Hashable`, puis définissez ``__hash__ = Set._hash``." -#: library/collections.abc.rst:311 +#: library/collections.abc.rst:314 msgid "" "`OrderedSet recipe `_ for an " "example built on :class:`MutableSet`." @@ -611,7 +617,7 @@ msgstr "" "`OrderedSet recipe `_ pour un " "exemple construit sur :class:`MutableSet`." -#: library/collections.abc.rst:314 +#: library/collections.abc.rst:317 msgid "For more about ABCs, see the :mod:`abc` module and :pep:`3119`." msgstr "" "Pour plus d'informations à propos des ABC, voir le module :mod:`abc` et la :" diff --git a/library/collections.po b/library/collections.po index 2a88383e6d..013c151ac9 100644 --- a/library/collections.po +++ b/library/collections.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-03-20 19:28+0100\n" "Last-Translator: Loc Cosnier \n" "Language-Team: French \n" @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Gtranslator 3.38.0\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" +"X-Generator: Gtranslator 3.38.0\n" #: library/collections.rst:2 msgid ":mod:`collections` --- Container datatypes" @@ -435,8 +435,9 @@ msgstr "" "gauche, puis dans l'ordre d'apparition de l'opérande de droite." #: library/collections.rst:280 +#, fuzzy msgid "" -"Counter objects support three methods beyond those available for all " +"Counter objects support additional methods beyond those available for all " "dictionaries:" msgstr "" "En plus des méthodes disponibles pour tous les dictionnaires, les objets " @@ -941,8 +942,9 @@ msgid ":class:`defaultdict` objects" msgstr "Objets :class:`defaultdict`" #: library/collections.rst:690 +#, fuzzy msgid "" -"Returns a new dictionary-like object. :class:`defaultdict` is a subclass of " +"Return a new dictionary-like object. :class:`defaultdict` is a subclass of " "the built-in :class:`dict` class. It overrides one method and adds one " "writable instance variable. The remaining functionality is the same as for " "the :class:`dict` class and is not documented here." @@ -1589,16 +1591,16 @@ msgstr "" #: library/collections.rst:1151 msgid "" "An :class:`OrderedDict` would also be useful for implementing variants of :" -"func:`functools.lru_cache`::" +"func:`functools.lru_cache`:" msgstr "" "Un :class:`OrderedDict` peut aussi être utile pour implémenter des variantes " -"de :func:`functools.lru_cache` ::" +"de :func:`functools.lru_cache` :" -#: library/collections.rst:1176 +#: library/collections.rst:1192 msgid ":class:`UserDict` objects" msgstr "Objets :class:`UserDict`" -#: library/collections.rst:1178 +#: library/collections.rst:1194 msgid "" "The class, :class:`UserDict` acts as a wrapper around dictionary objects. " "The need for this class has been partially supplanted by the ability to " @@ -1611,13 +1613,14 @@ msgstr "" "travailler avec celle-ci, car le dictionnaire sous-jacent est accessible " "comme attribut." -#: library/collections.rst:1186 +#: library/collections.rst:1202 +#, fuzzy msgid "" "Class that simulates a dictionary. The instance's contents are kept in a " "regular dictionary, which is accessible via the :attr:`data` attribute of :" "class:`UserDict` instances. If *initialdata* is provided, :attr:`data` is " "initialized with its contents; note that a reference to *initialdata* will " -"not be kept, allowing it be used for other purposes." +"not be kept, allowing it to be used for other purposes." msgstr "" "Classe simulant un dictionnaire. Les instances de :class:`UserDict` " "possèdent un attribut :attr:`data` où est stocké leur contenu sous forme de " @@ -1625,7 +1628,7 @@ msgstr "" "initialisé avec son contenu. Remarquez qu'une référence vers *initialdata* " "n'est pas conservée, ce qui permet de l'utiliser pour d'autres tâches." -#: library/collections.rst:1192 +#: library/collections.rst:1208 msgid "" "In addition to supporting the methods and operations of mappings, :class:" "`UserDict` instances provide the following attribute:" @@ -1633,18 +1636,18 @@ msgstr "" "En plus de gérer les méthodes et opérations des dictionnaires, les instances " "de :class:`UserDict` fournissent l'attribut suivant :" -#: library/collections.rst:1197 +#: library/collections.rst:1213 msgid "" "A real dictionary used to store the contents of the :class:`UserDict` class." msgstr "" "Un dictionnaire natif où est stocké le contenu de la classe :class:" "`UserDict`." -#: library/collections.rst:1203 +#: library/collections.rst:1219 msgid ":class:`UserList` objects" msgstr "Objets :class:`UserList`" -#: library/collections.rst:1205 +#: library/collections.rst:1221 msgid "" "This class acts as a wrapper around list objects. It is a useful base class " "for your own list-like classes which can inherit from them and override " @@ -1656,7 +1659,7 @@ msgstr "" "et surcharger les méthodes existantes ou en ajouter de nouvelles. Ainsi, on " "peut ajouter de nouveaux comportements aux listes." -#: library/collections.rst:1210 +#: library/collections.rst:1226 msgid "" "The need for this class has been partially supplanted by the ability to " "subclass directly from :class:`list`; however, this class can be easier to " @@ -1667,7 +1670,7 @@ msgstr "" "de travailler avec cette classe, car la liste sous-jacente est accessible " "via un attribut." -#: library/collections.rst:1216 +#: library/collections.rst:1232 msgid "" "Class that simulates a list. The instance's contents are kept in a regular " "list, which is accessible via the :attr:`data` attribute of :class:" @@ -1681,7 +1684,7 @@ msgstr "" "*list* peut être un itérable, par exemple une liste native ou un objet :" "class:`UserList`." -#: library/collections.rst:1222 +#: library/collections.rst:1238 msgid "" "In addition to supporting the methods and operations of mutable sequences, :" "class:`UserList` instances provide the following attribute:" @@ -1689,7 +1692,7 @@ msgstr "" "En plus de gérer les méthodes et opérations des séquences muables, les " "instances de :class:`UserList` possèdent l'attribut suivant :" -#: library/collections.rst:1227 +#: library/collections.rst:1243 msgid "" "A real :class:`list` object used to store the contents of the :class:" "`UserList` class." @@ -1697,7 +1700,7 @@ msgstr "" "Un objet :class:`list` natif utilisé pour stocker le contenu de la classe :" "class:`UserList`." -#: library/collections.rst:1230 +#: library/collections.rst:1246 msgid "" "**Subclassing requirements:** Subclasses of :class:`UserList` are expected " "to offer a constructor which can be called with either no arguments or one " @@ -1713,7 +1716,7 @@ msgstr "" "constructeur doit pouvoir être appelé avec un unique paramètre, un objet " "séquence utilisé comme source de données." -#: library/collections.rst:1237 +#: library/collections.rst:1253 msgid "" "If a derived class does not wish to comply with this requirement, all of the " "special methods supported by this class will need to be overridden; please " @@ -1725,11 +1728,11 @@ msgstr "" "de consulter les sources pour obtenir des informations sur les méthodes qui " "doivent être fournies dans ce cas." -#: library/collections.rst:1243 +#: library/collections.rst:1259 msgid ":class:`UserString` objects" msgstr "Objets :class:`UserString`" -#: library/collections.rst:1245 +#: library/collections.rst:1261 msgid "" "The class, :class:`UserString` acts as a wrapper around string objects. The " "need for this class has been partially supplanted by the ability to subclass " @@ -1742,7 +1745,7 @@ msgstr "" "plus facile de travailler avec cette classe, car la chaîne de caractère sous-" "jacente est accessible via un attribut." -#: library/collections.rst:1253 +#: library/collections.rst:1269 msgid "" "Class that simulates a string object. The instance's content is kept in a " "regular string object, which is accessible via the :attr:`data` attribute " @@ -1756,7 +1759,7 @@ msgstr "" "initialement une copie de *seq*, qui peut être n'importe quel objet " "convertible en chaîne de caractère avec la fonction native :func:`str`." -#: library/collections.rst:1260 +#: library/collections.rst:1276 msgid "" "In addition to supporting the methods and operations of strings, :class:" "`UserString` instances provide the following attribute:" @@ -1764,7 +1767,7 @@ msgstr "" "En plus de gérer les méthodes et opérations sur les chaînes de caractères, " "les instances de :class:`UserString` possèdent l'attribut suivant :" -#: library/collections.rst:1265 +#: library/collections.rst:1281 msgid "" "A real :class:`str` object used to store the contents of the :class:" "`UserString` class." @@ -1772,7 +1775,7 @@ msgstr "" "Un objet :class:`str` natif utilisé pour stocker le contenu de la classe :" "class:`UserString`." -#: library/collections.rst:1268 +#: library/collections.rst:1284 msgid "" "New methods ``__getnewargs__``, ``__rmod__``, ``casefold``, ``format_map``, " "``isprintable``, and ``maketrans``." diff --git a/library/compileall.po b/library/compileall.po index 1b631de3de..3c8088a6b7 100644 --- a/library/compileall.po +++ b/library/compileall.po @@ -5,18 +5,20 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2021-05-19 22:36+0200\n" +"PO-Revision-Date: 2021-05-04 21:26+0200\n" +"Last-Translator: Jean Abou Samra \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.1\n" #: library/compileall.rst:2 msgid ":mod:`compileall` --- Byte-compile Python libraries" msgstr "" +":mod:`compileall` — Génération du code intermédiaire des bibliothèques Python" #: library/compileall.rst:7 msgid "**Source code:** :source:`Lib/compileall.py`" @@ -30,16 +32,25 @@ msgid "" "installation time, which makes them available for use even by users who " "don't have write permission to the library directories." msgstr "" +"Ce module contient des fonctions qui facilitent l'installation de " +"bibliothèques Python. Elles compilent, sous forme de code intermédiaire " +"(*bytecode*), les fichiers source situés dans un dossier de votre choix. Ce " +"module est particulièrement utile pour générer les fichiers de code " +"intermédiaire lors de l'installation d'une bibliothèque, les rendant " +"disponibles même pour les utilisateurs qui n'ont pas les privilèges " +"d'écriture dans l'emplacement d'installation." #: library/compileall.rst:19 msgid "Command-line use" -msgstr "" +msgstr "Utilisation en ligne de commande" #: library/compileall.rst:21 msgid "" "This module can work as a script (using :program:`python -m compileall`) to " "compile Python sources." msgstr "" +"On peut se servir de ce module comme d'un script (avec :program:`python -m " +"compileall`) pour compiler les fichiers source Python." #: library/compileall.rst:29 msgid "" @@ -47,22 +58,33 @@ msgid "" "files, traversed recursively. If no argument is given, behave as if the " "command line was ``-l ``." msgstr "" +"Les arguments positionnels sont les fichiers à compiler. Ils peuvent aussi " +"être des dossiers, qui sont alors parcourus récursivement pour compiler tous " +"les fichiers de code :file:`.py` qu'ils contiennent. Lorsque le script ne " +"reçoit aucun argument, il fait comme s'il avait été appelé avec `-l `." #: library/compileall.rst:35 msgid "" "Do not recurse into subdirectories, only compile source code files directly " "contained in the named or implied directories." msgstr "" +"Compiler uniquement les fichiers situés directement dans les dossiers passés " +"en argument ou implicites, sans descendre récursivement dans les sous-" +"dossiers." #: library/compileall.rst:40 msgid "Force rebuild even if timestamps are up-to-date." -msgstr "" +msgstr "Forcer la recompilation même si les horodatages sont à jour." #: library/compileall.rst:44 msgid "" "Do not print the list of files compiled. If passed once, error messages will " "still be printed. If passed twice (``-qq``), all output is suppressed." msgstr "" +"Supprimer l'affichage des noms des fichiers compilés.Si cette option est " +"donnée une seule fois, les erreurs sont affichées malgré tout. Vous pouvez " +"les supprimer en passant l'option deux fois (c'est-à-dire avec ``-qq``)." #: library/compileall.rst:49 msgid "" @@ -72,18 +94,27 @@ msgid "" "where the source file does not exist at the time the byte-code file is " "executed." msgstr "" +"Ce nom de dossier est ajouté en tête du chemin de chaque fichier compilé. Il " +"aura une influence sur les traces d'appels pour les erreurs levées lors de " +"la compilation, et sera reflété dans les fichiers de code intermédiaire, " +"pour utilisation dans les traces d'appels et autres messages si le fichier " +"source n'existe pas au moment de l'exécution." #: library/compileall.rst:58 msgid "" "Remove (``-s``) or append (``-p``) the given prefix of paths recorded in the " "``.pyc`` files. Cannot be combined with ``-d``." msgstr "" +"Retire (``-s``) ou ajoute (``-p``) le préfixe aux chemins stockés dans les " +"fichiers ``.pyc``. Cette option ne peut pas être combinée avec ``-d``." #: library/compileall.rst:64 msgid "" "regex is used to search the full path to each file considered for " "compilation, and if the regex produces a match, the file is skipped." msgstr "" +"Exclut tous les fichiers dont les noms correspondent à l'expression " +"régulière *regex*." #: library/compileall.rst:69 msgid "" @@ -91,6 +122,8 @@ msgid "" "files and directories to compile. If ``list`` is ``-``, read lines from " "``stdin``." msgstr "" +"Ajoute chaque ligne du fichier *list* aux fichiers et dossiers à compiler. " +"*list* peut être ``-``, auquel cas le script lit l'entrée standard." #: library/compileall.rst:75 msgid "" @@ -99,6 +132,11 @@ msgid "" "is to write files to their :pep:`3147` locations and names, which allows " "byte-code files from multiple versions of Python to coexist." msgstr "" +"Utilise l'ancienne manière de nommer et placer les fichiers de code " +"intermédiaire, en écrasant éventuellement ceux générés par une autre version " +"de Python. Par défaut, les règles décrites dans la :pep:`3147` s'appliquent. " +"Elles permettent à différentes versions de l'interpréteur Python de " +"coexister en conservant chacune ses propres fichiers ``.pyc``." #: library/compileall.rst:82 msgid "" @@ -107,12 +145,19 @@ msgid "" "compileall -r 0` is equivalent to :program:`python -m compileall " " -l`." msgstr "" +"Règle le niveau de récursion maximal pour le parcours des sous-dossiers. " +"Lorsque cette option est fournie, ``-l`` est ignorée. :program:`python -m " +"compileall -r 0` revient au même que :program:`python -m " +"compileall -l`." #: library/compileall.rst:89 msgid "" "Use *N* workers to compile the files within the given directory. If ``0`` is " "used, then the result of :func:`os.cpu_count()` will be used." msgstr "" +"Effectue la compilation avec *N* processus parallèles. Si *N* vaut 0, autant " +"de processus sont créés que la machine dispose de processeurs (résultat de :" +"func:`os.cpu_count()`)." #: library/compileall.rst:95 msgid "" @@ -126,6 +171,16 @@ msgid "" "`SOURCE_DATE_EPOCH` environment variable is not set, and ``checked-hash`` if " "the ``SOURCE_DATE_EPOCH`` environment variable is set." msgstr "" +"Définit la manière dont les fichiers de code intermédiaire seront invalidés " +"au moment de l'exécution. Avec ``timestamp``, les fichiers ``.pyc`` générés " +"comportent l'horodatage de la source et sa taille. Avec ``checked-hash`` ou " +"``unchecked-hash``, ce seront des pyc utilisant le hachage, qui contiennent " +"une empreinte du code source plutôt qu'un horodatage. Voir :ref:`pyc-" +"invalidation` pour plus d'informations sur la manière dont Python valide les " +"fichiers de code intermédiaire conservés en cache lors de l'exécution. La " +"valeur par défaut est ``timestamp``. Cependant, si la variable " +"d'environnement :envvar:`SOURCE_DATE_EPOCH` a été réglée, elle devient " +"``checked-hash``." #: library/compileall.rst:108 msgid "" @@ -133,20 +188,26 @@ msgid "" "compile for multiple levels at a time (for example, ``compileall -o 1 -o " "2``)." msgstr "" +"Compile avec un certain niveau d'optimisation. Cette option peut être passée " +"plusieurs fois afin de compiler pour plusieurs niveaux d'un seul coup (par " +"exemple, ``compileall -o 1 -o 2``)." #: library/compileall.rst:114 msgid "Ignore symlinks pointing outside the given directory." -msgstr "" +msgstr "Ignore les liens symboliques qui redirigent en dehors du dossier." #: library/compileall.rst:118 msgid "" "If two ``.pyc`` files with different optimization level have the same " "content, use hard links to consolidate duplicate files." msgstr "" +"Si deux fichiers ``.pyc`` compilés avec des niveaux d'optimisation " +"différents ont finalement le même contenu, emploie des liens physiques pour " +"les fusionner." #: library/compileall.rst:121 msgid "Added the ``-i``, ``-b`` and ``-h`` options." -msgstr "" +msgstr "ajout des options ``-i``, ``-b`` et ``-h``." #: library/compileall.rst:124 msgid "" @@ -154,10 +215,13 @@ msgid "" "to a multilevel value. ``-b`` will always produce a byte-code file ending " "in ``.pyc``, never ``.pyo``." msgstr "" +"ajout des options ``-j``, ``-r`` et ``-qq`` (l'option ``-q`` peut donc " +"prendre plusieurs niveaux). ``-b`` produit toujours un fichier de code " +"intermédiaire portant l'extension ``.pyc``, et jamais ``.pyo``." #: library/compileall.rst:129 msgid "Added the ``--invalidation-mode`` option." -msgstr "" +msgstr "ajout de l'option ``--invalidation-mode``." #: library/compileall.rst:132 msgid "" @@ -165,6 +229,10 @@ msgid "" "the default recursion limit from 10 to :py:func:`sys.getrecursionlimit()`. " "Added the possibility to specify the ``-o`` option multiple times." msgstr "" +"ajout des options ``-s``, ``-p``, ``-e`` et ``--hardlink-dupes``. " +"Rehaussement de la limite de récursion par défaut à :py:func:`sys." +"getrecursionlimit()` au lieu de 10 précédemment. L'option ``-o`` peut être " +"passée plusieurs fois." #: library/compileall.rst:139 msgid "" @@ -172,6 +240,10 @@ msgid "" "the :func:`compile` function, because the Python interpreter itself already " "provides the option: :program:`python -O -m compileall`." msgstr "" +"Il n'y a pas d'option en ligne de commande pour contrôler le niveau " +"d'optimisation utilisé par la fonction :func:`compile`. Il suffit en effet " +"d'utiliser l'option ``-O`` de l'interpréteur Python lui-même : :program:" +"`python -O -m compileall`." #: library/compileall.rst:143 msgid "" @@ -180,10 +252,15 @@ msgid "" "if :func:`compile` is run with the same :attr:`sys.pycache_prefix` (if any) " "that will be used at runtime." msgstr "" +"De même, la fonction :func:`compile` utilise le réglage :attr:`sys." +"pycache_prefix`. Le code intermédiaire généré ne pourra servir que dans la " +"mesure où :func:`compile` est exécutée avec la même valeur de :attr:`sys." +"pycache_prefix` (si tant est qu'elle soit définie) que celle en vigueur au " +"moment d'exécuter le programme." #: library/compileall.rst:149 msgid "Public functions" -msgstr "" +msgstr "Fonctions publiques" #: library/compileall.rst:153 msgid "" @@ -191,12 +268,17 @@ msgid "" "py` files along the way. Return a true value if all the files compiled " "successfully, and a false value otherwise." msgstr "" +"Parcourt récursivement le dossier *dir*, en compilant tous les fichiers :" +"file:`.py`. Renvoie une valeur vraie si tous les fichiers ont été compilés " +"sans erreur, et une valeur fausse dans le cas contraire." #: library/compileall.rst:157 msgid "" "The *maxlevels* parameter is used to limit the depth of the recursion; it " "defaults to ``sys.getrecursionlimit()``." msgstr "" +"Le paramètre *maxlevels* permet de limiter la profondeur de récursion. Sa " +"valeur par défaut est celle de ``sys.getrecursionlimit()``." #: library/compileall.rst:160 msgid "" @@ -206,28 +288,44 @@ msgid "" "where the source file does not exist at the time the byte-code file is " "executed." msgstr "" +"Si *ddir* est fourni, il est ajouté en tête du chemin de chaque fichier " +"compilé, ce qui modifie l'affichage des traces d'appels pour les erreurs qui " +"seraient levées lors de la compilation. De plus, il se retrouve dans les " +"fichiers de code intermédiaire, pour utilisation dans les traces et autres " +"messages si le fichier source n'existe pas au moment de l'exécution." #: library/compileall.rst:166 msgid "" "If *force* is true, modules are re-compiled even if the timestamps are up to " "date." msgstr "" +"Si *force* est vrai, les modules sont recompilés même si leurs horodatages " +"sont à jour." #: library/compileall.rst:169 msgid "" -"If *rx* is given, its search method is called on the complete path to each " -"file considered for compilation, and if it returns a true value, the file is " -"skipped." +"If *rx* is given, its ``search`` method is called on the complete path to " +"each file considered for compilation, and if it returns a true value, the " +"file is skipped. This can be used to exclude files matching a regular " +"expression, given as a :ref:`re.Pattern ` object." msgstr "" +"Si *rx* est donné, sa méthode ``search`` est appelée sur le chemin complet " +"de chaque fichier source, et si elle renvoie une valeur vraie, le fichier " +"est sauté. *rx* sera habituellement une expression régulière (objet :ref:`re." +"Pattern `)." -#: library/compileall.rst:249 +#: library/compileall.rst:251 msgid "" "If *quiet* is ``False`` or ``0`` (the default), the filenames and other " "information are printed to standard out. Set to ``1``, only errors are " "printed. Set to ``2``, all output is suppressed." msgstr "" +"Si *quiet* est ``False`` ou bien ``0`` (la valeur par défaut), les noms de " +"fichiers et d'autres informations sont affichés sur la sortie standard. Avec " +"``1``, seules les erreurs sont affichées. Avec ``2``, aucune sortie n'est " +"émise." -#: library/compileall.rst:253 +#: library/compileall.rst:255 msgid "" "If *legacy* is true, byte-code files are written to their legacy locations " "and names, which may overwrite byte-code files created by another version of " @@ -235,16 +333,27 @@ msgid "" "names, which allows byte-code files from multiple versions of Python to " "coexist." msgstr "" +"Si *legacy* est vrai, les fichiers de code intermédiaire sont nommés et " +"placés selon l'ancienne méthode, en écrasant éventuellement ceux générés par " +"une autre version de Python. Par défaut, les règles décrites dans la :pep:" +"`3147` s'appliquent. Elles permettent à différentes versions de " +"l'interpréteur Python de coexister en conservant chacune ses propres " +"fichiers ``.pyc``." -#: library/compileall.rst:259 +#: library/compileall.rst:261 msgid "" "*optimize* specifies the optimization level for the compiler. It is passed " "to the built-in :func:`compile` function. Accepts also a sequence of " "optimization levels which lead to multiple compilations of one :file:`.py` " "file in one call." msgstr "" +"*optimize* définit le niveau d'optimisation qu'applique le compilateur. Cet " +"argument est passé directement à la fonction native :func:`compile`. Il peut " +"également être fourni sous la forme d'une séquence de niveaux " +"d'optimisation, ce qui permet de compiler chaque fichier :file:`.py` " +"plusieurs fois en appliquant divers niveaux d'optimisation." -#: library/compileall.rst:187 +#: library/compileall.rst:188 msgid "" "The argument *workers* specifies how many workers are used to compile files " "in parallel. The default is to not use multiple workers. If the platform " @@ -253,76 +362,100 @@ msgid "" "cores in the system is used. If *workers* is lower than ``0``, a :exc:" "`ValueError` will be raised." msgstr "" +"*workers* est le nombre de tâches lancées en parallèle pour la compilation. " +"Par défaut, les fichiers sont compilés séquentiellement. Cette même " +"stratégie s'applique dans tous les cas lorsque le parallélisme n'est pas " +"possible sur la plateforme d'exécution. Si *workers* vaut 0, autant de " +"tâches sont lancées que le système comporte de cœurs. Si *workers* est " +"strictement négatif, une exception de type :exc:`ValueError` est levée." -#: library/compileall.rst:263 +#: library/compileall.rst:265 msgid "" "*invalidation_mode* should be a member of the :class:`py_compile." "PycInvalidationMode` enum and controls how the generated pycs are " "invalidated at runtime." msgstr "" +"*invalidation_mode* doit être un membre de l'énumération :class:`py_compile." +"PycInvalidationMode` et détermine la manière dont les fichiers :file:`.pyc` " +"sont invalidés lorsque l'interpréteur tente de les utiliser." -#: library/compileall.rst:267 +#: library/compileall.rst:269 msgid "" "The *stripdir*, *prependdir* and *limit_sl_dest* arguments correspond to the " "``-s``, ``-p`` and ``-e`` options described above. They may be specified as " "``str``, ``bytes`` or :py:class:`os.PathLike`." msgstr "" +"Les arguments *stripdir*, *prependdir* et *limit_sl_dest* correspondent aux " +"options ``-s``, ``-p`` et ``-e`` décrites plus haut. Ils peuvent être de " +"type ``str``, ``bytes`` ou :py:class:`os.PathLike`." -#: library/compileall.rst:271 +#: library/compileall.rst:273 msgid "" "If *hardlink_dupes* is true and two ``.pyc`` files with different " "optimization level have the same content, use hard links to consolidate " "duplicate files." msgstr "" +"Un argument *hardlink_dupes* vrai correspond à l'utilisation de l'option ``--" +"hardlink-dupes``." -#: library/compileall.rst:302 +#: library/compileall.rst:304 msgid "Added the *legacy* and *optimize* parameter." -msgstr "" +msgstr "ajout des paramètres *legacy* et *optimize*." -#: library/compileall.rst:208 +#: library/compileall.rst:209 msgid "Added the *workers* parameter." -msgstr "" +msgstr "ajout du paramètre *workers*." -#: library/compileall.rst:276 library/compileall.rst:305 +#: library/compileall.rst:278 library/compileall.rst:307 msgid "*quiet* parameter was changed to a multilevel value." -msgstr "" +msgstr "le paramètre *quiet* peut prendre plusieurs niveaux." -#: library/compileall.rst:279 library/compileall.rst:308 +#: library/compileall.rst:281 library/compileall.rst:310 msgid "" "The *legacy* parameter only writes out ``.pyc`` files, not ``.pyo`` files no " "matter what the value of *optimize* is." msgstr "" +"Lorsque le paramètre *legacy* est vrai, des fichiers ``.pyc``, et jamais ``." +"pyo``, sont générés, quel que soit le niveau d'optimisation." -#: library/compileall.rst:218 +#: library/compileall.rst:219 msgid "Accepts a :term:`path-like object`." -msgstr "Accepte un :term:`path-like object`." +msgstr "accepte un :term:`objet simili-chemin `." -#: library/compileall.rst:283 library/compileall.rst:312 +#: library/compileall.rst:285 library/compileall.rst:314 msgid "The *invalidation_mode* parameter was added." -msgstr "" +msgstr "ajout du paramètre *invalidation_mode*." -#: library/compileall.rst:286 library/compileall.rst:315 +#: library/compileall.rst:288 library/compileall.rst:317 msgid "The *invalidation_mode* parameter's default value is updated to None." msgstr "" +"La valeur par défaut du paramètre *invalidation_mode* est changée à ``None``." -#: library/compileall.rst:227 +#: library/compileall.rst:228 msgid "Setting *workers* to 0 now chooses the optimal number of cores." msgstr "" +"Un nombre de processus adapté à la machine est choisi lorsque *workers* vaut " +"0." -#: library/compileall.rst:230 +#: library/compileall.rst:231 msgid "" "Added *stripdir*, *prependdir*, *limit_sl_dest* and *hardlink_dupes* " "arguments. Default value of *maxlevels* was changed from ``10`` to ``sys." "getrecursionlimit()``" msgstr "" +"ajout des arguments *stripdir*, *prependdir*, *limit_sl_dest* et " +"*hardlink_dupes*. La valeur par défaut de *maxlevels* a été changée pour " +"``sys.getrecursionlimit()`` (elle était de 10 auparavant)." -#: library/compileall.rst:236 +#: library/compileall.rst:237 msgid "" "Compile the file with path *fullname*. Return a true value if the file " "compiled successfully, and a false value otherwise." msgstr "" +"Compile le fichier dont le chemin est donné par *fullname*. Renvoie une " +"valeur vraie si et seulement si le fichier est compilé sans erreur." -#: library/compileall.rst:239 +#: library/compileall.rst:240 msgid "" "If *ddir* is given, it is prepended to the path to the file being compiled " "for use in compilation time tracebacks, and is also compiled in to the byte-" @@ -330,45 +463,67 @@ msgid "" "where the source file does not exist at the time the byte-code file is " "executed." msgstr "" +"Si *ddir* est fourni, il est ajouté en tête du chemin de chaque fichier " +"compilé, ce qui modifie l'affichage des traces pour les erreurs qui seraient " +"levées lors de la compilation. De plus, il se retrouve dans les fichiers de " +"code intermédiaire, pour utilisation dans les traces et autres messages si " +"le fichier source n'existe pas au moment de l'exécution." -#: library/compileall.rst:245 +#: library/compileall.rst:246 msgid "" -"If *rx* is given, its search method is passed the full path name to the file " -"being compiled, and if it returns a true value, the file is not compiled and " -"``True`` is returned." +"If *rx* is given, its ``search`` method is passed the full path name to the " +"file being compiled, and if it returns a true value, the file is not " +"compiled and ``True`` is returned. This can be used to exclude files " +"matching a regular expression, given as a :ref:`re.Pattern ` " +"object." msgstr "" +"Si *rx* est donné, sa méthode ``search`` est appelée sur le chemin complet " +"de chaque fichier source, et si elle renvoie une valeur vraie, le fichier " +"est sauté. *rx* sera habituellement une expression régulière (objet :ref:`re." +"Pattern `)." -#: library/compileall.rst:289 +#: library/compileall.rst:291 msgid "" "Added *stripdir*, *prependdir*, *limit_sl_dest* and *hardlink_dupes* " "arguments." msgstr "" +"Ajout des arguments *stripdir*, *prependdir*, *limit_sl_dest* et " +"*hardlink_dupes*." -#: library/compileall.rst:294 +#: library/compileall.rst:296 msgid "" "Byte-compile all the :file:`.py` files found along ``sys.path``. Return a " "true value if all the files compiled successfully, and a false value " "otherwise." msgstr "" +"Compile tous les fichiers :file:`.py` contenus dans les dossiers de ``sys." +"path``. Renvoie une valeur vraie s'ils ont tous été compilés sans erreur, et " +"une valeur fausse dans le cas contraire." -#: library/compileall.rst:297 +#: library/compileall.rst:299 msgid "" "If *skip_curdir* is true (the default), the current directory is not " "included in the search. All other parameters are passed to the :func:" "`compile_dir` function. Note that unlike the other compile functions, " "``maxlevels`` defaults to ``0``." msgstr "" +"Si *skip_curdir* est vrai (c'est le cas par défaut), le dossier courant est " +"exclu de la recherche. Les autres paramètres sont passés à :func:" +"`compile_dir`. Notez que contrairement aux autres fonctions de ce module, la " +"valeur par défaut de ``maxlevels`` est ``0``." -#: library/compileall.rst:318 +#: library/compileall.rst:320 msgid "" "To force a recompile of all the :file:`.py` files in the :file:`Lib/` " "subdirectory and all its subdirectories::" msgstr "" +"Pour forcer la recompilation de tous les fichiers :file:`.py` dans le " +"dossier :file:`Lib/` et tous ses sous-dossiers ::" -#: library/compileall.rst:335 +#: library/compileall.rst:337 msgid "Module :mod:`py_compile`" -msgstr "" +msgstr "Module :mod:`py_compile`" -#: library/compileall.rst:336 +#: library/compileall.rst:338 msgid "Byte-compile a single source file." -msgstr "" +msgstr "Compiler un fichier source unique." diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po index 0103e62859..0d7dfeec95 100644 --- a/library/concurrent.futures.po +++ b/library/concurrent.futures.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-17 16:05+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -51,7 +51,7 @@ msgstr "" #: library/concurrent.futures.rst:33 msgid "" -"Schedules the callable, *fn*, to be executed as ``fn(*args **kwargs)`` and " +"Schedules the callable, *fn*, to be executed as ``fn(*args, **kwargs)`` and " "returns a :class:`Future` object representing the execution of the " "callable. ::" msgstr "" @@ -340,7 +340,8 @@ msgid "" msgstr "" #: library/concurrent.futures.rst:353 -msgid "If the call raised, this method will raise the same exception." +msgid "" +"If the call raised an exception, this method will raise the same exception." msgstr "" #: library/concurrent.futures.rst:357 @@ -442,21 +443,22 @@ msgstr "" #: library/concurrent.futures.rst:437 msgid "" "Wait for the :class:`Future` instances (possibly created by different :class:" -"`Executor` instances) given by *fs* to complete. Returns a named 2-tuple of " +"`Executor` instances) given by *fs* to complete. Duplicate futures given to " +"*fs* are removed and will be returned only once. Returns a named 2-tuple of " "sets. The first set, named ``done``, contains the futures that completed " "(finished or cancelled futures) before the wait completed. The second set, " "named ``not_done``, contains the futures that did not complete (pending or " "running futures)." msgstr "" -#: library/concurrent.futures.rst:444 +#: library/concurrent.futures.rst:445 msgid "" "*timeout* can be used to control the maximum number of seconds to wait " "before returning. *timeout* can be an int or float. If *timeout* is not " "specified or ``None``, there is no limit to the wait time." msgstr "" -#: library/concurrent.futures.rst:448 +#: library/concurrent.futures.rst:449 msgid "" "*return_when* indicates when this function should return. It must be one of " "the following constants:" @@ -464,28 +466,28 @@ msgstr "" "*return_when* indique quand la fonction doit se terminer. Il peut prendre " "les valeurs suivantes :" -#: library/concurrent.futures.rst:454 +#: library/concurrent.futures.rst:455 msgid "Constant" msgstr "Constante" -#: library/concurrent.futures.rst:454 +#: library/concurrent.futures.rst:455 msgid "Description" msgstr "Description" -#: library/concurrent.futures.rst:456 +#: library/concurrent.futures.rst:457 msgid ":const:`FIRST_COMPLETED`" msgstr ":const:`FIRST_COMPLETED`" -#: library/concurrent.futures.rst:456 +#: library/concurrent.futures.rst:457 msgid "The function will return when any future finishes or is cancelled." msgstr "" "La fonction se termine lorsque n'importe quel futur se termine ou est annulé." -#: library/concurrent.futures.rst:459 +#: library/concurrent.futures.rst:460 msgid ":const:`FIRST_EXCEPTION`" msgstr ":const:`FIRST_EXCEPTION`" -#: library/concurrent.futures.rst:459 +#: library/concurrent.futures.rst:460 msgid "" "The function will return when any future finishes by raising an exception. " "If no future raises an exception then it is equivalent to :const:" @@ -495,16 +497,16 @@ msgstr "" "exception. Si aucun *futur* ne lève d'exception, équivaut à :const:" "`ALL_COMPLETED`." -#: library/concurrent.futures.rst:465 +#: library/concurrent.futures.rst:466 msgid ":const:`ALL_COMPLETED`" msgstr ":const:`ALL_COMPLETED`" -#: library/concurrent.futures.rst:465 +#: library/concurrent.futures.rst:466 msgid "The function will return when all futures finish or are cancelled." msgstr "" "La fonction se termine lorsque les *futurs* sont tous finis ou annulés." -#: library/concurrent.futures.rst:471 +#: library/concurrent.futures.rst:472 msgid "" "Returns an iterator over the :class:`Future` instances (possibly created by " "different :class:`Executor` instances) given by *fs* that yields futures as " @@ -518,49 +520,49 @@ msgid "" "wait time." msgstr "" -#: library/concurrent.futures.rst:485 +#: library/concurrent.futures.rst:486 msgid ":pep:`3148` -- futures - execute computations asynchronously" msgstr "" -#: library/concurrent.futures.rst:485 +#: library/concurrent.futures.rst:486 msgid "" "The proposal which described this feature for inclusion in the Python " "standard library." msgstr "" -#: library/concurrent.futures.rst:490 +#: library/concurrent.futures.rst:491 msgid "Exception classes" msgstr "" -#: library/concurrent.futures.rst:496 +#: library/concurrent.futures.rst:497 msgid "Raised when a future is cancelled." msgstr "" -#: library/concurrent.futures.rst:500 +#: library/concurrent.futures.rst:501 msgid "Raised when a future operation exceeds the given timeout." msgstr "" -#: library/concurrent.futures.rst:504 +#: library/concurrent.futures.rst:505 msgid "" "Derived from :exc:`RuntimeError`, this exception class is raised when an " "executor is broken for some reason, and cannot be used to submit or execute " "new tasks." msgstr "" -#: library/concurrent.futures.rst:512 +#: library/concurrent.futures.rst:513 msgid "" "Raised when an operation is performed on a future that is not allowed in the " "current state." msgstr "" -#: library/concurrent.futures.rst:521 +#: library/concurrent.futures.rst:522 msgid "" "Derived from :exc:`~concurrent.futures.BrokenExecutor`, this exception class " "is raised when one of the workers of a :class:`ThreadPoolExecutor` has " "failed initializing." msgstr "" -#: library/concurrent.futures.rst:531 +#: library/concurrent.futures.rst:532 msgid "" "Derived from :exc:`~concurrent.futures.BrokenExecutor` (formerly :exc:" "`RuntimeError`), this exception class is raised when one of the workers of " diff --git a/library/configparser.po b/library/configparser.po index da0181168d..cf1cf3ab73 100644 --- a/library/configparser.po +++ b/library/configparser.po @@ -5,18 +5,19 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" +"PO-Revision-Date: 2021-05-17 13:06+0200\n" +"Last-Translator: Dimitri Merejkowsky \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.3\n" #: library/configparser.rst:2 msgid ":mod:`configparser` --- Configuration file parser" -msgstr "" +msgstr ":mod:`configparser` — Lecture et écriture de fichiers de configuration" #: library/configparser.rst:14 msgid "**Source code:** :source:`Lib/configparser.py`" @@ -29,42 +30,57 @@ msgid "" "found in Microsoft Windows INI files. You can use this to write Python " "programs which can be customized by end users easily." msgstr "" +"Ce module fournit la classe :class:`ConfigParser`. Cette classe implémente " +"un langage de configuration basique, proche de ce que l'on peut trouver dans " +"les fichiers *INI* de Microsoft Windows. Vous pouvez utiliser ce module pour " +"écrire des programmes Python qui sont facilement configurables par " +"l'utilisateur final." #: library/configparser.rst:31 msgid "" "This library does *not* interpret or write the value-type prefixes used in " "the Windows Registry extended version of INI syntax." msgstr "" +"Ce module *n'implémente pas* la version étendue de la syntaxe *INI* qui " +"permet de lire ou d'écrire des valeurs dans la base de registre Windows en " +"utilisant divers préfixes." #: library/configparser.rst:38 msgid "Module :mod:`shlex`" -msgstr "" +msgstr "Module :mod:`shlex`" #: library/configparser.rst:37 msgid "" "Support for creating Unix shell-like mini-languages which can be used as an " "alternate format for application configuration files." msgstr "" +"Ce module fournit les outils permettant de créer des mini-langages de " +"programmation ressemblant au shell Unix, qui peuvent être utilisés comme " +"alternative pour les fichiers de configuration d'une application." #: library/configparser.rst:41 msgid "Module :mod:`json`" -msgstr "" +msgstr "Module :mod:`json`" #: library/configparser.rst:41 msgid "" "The json module implements a subset of JavaScript syntax which can also be " "used for this purpose." msgstr "" +"Le module *json* implémente un sous-ensemble de la syntaxe JavaScript, qui " +"peut aussi être utilisée à cet effet." -#: library/configparser.rst:51 +#: library/configparser.rst:56 msgid "Quick Start" -msgstr "" +msgstr "Premiers pas" -#: library/configparser.rst:53 +#: library/configparser.rst:58 msgid "Let's take a very basic configuration file that looks like this:" msgstr "" +"Prenons pour exemple un fichier de configuration très simple ressemblant à " +"ceci :" -#: library/configparser.rst:70 +#: library/configparser.rst:75 msgid "" "The structure of INI files is described `in the following section " "<#supported-ini-file-structure>`_. Essentially, the file consists of " @@ -72,40 +88,62 @@ msgid "" "classes can read and write such files. Let's start by creating the above " "configuration file programmatically." msgstr "" +"La structure des fichiers *INI* est décrite dans la `section suivante " +"<#supported-ini-file-structure>`_. En bref, chaque fichier est constitué de " +"sections, chacune des sections comprenant des clés associées à des valeurs. " +"Les classes du module :mod:`configparser` peuvent écrire et lire de tels " +"fichiers. Commençons par le code qui permet de générer le fichier ci-dessus." -#: library/configparser.rst:94 +#: library/configparser.rst:99 msgid "" "As you can see, we can treat a config parser much like a dictionary. There " "are differences, `outlined later <#mapping-protocol-access>`_, but the " "behavior is very close to what you would expect from a dictionary." msgstr "" +"Comme vous pouvez le voir, nous pouvons manipuler l'instance renvoyée par " +"l'analyse du fichier de configuration comme s'il s'agissait d'un " +"dictionnaire. Il y a des différences, comme `explicité ci-dessous <#mapping-" +"protocol-access>`_, mais le comportement de l'instance est très proche de ce " +"que vous pourriez attendre d'un dictionnaire." -#: library/configparser.rst:98 +#: library/configparser.rst:103 msgid "" "Now that we have created and saved a configuration file, let's read it back " "and explore the data it holds." msgstr "" +"Nous venons de créer et sauvegarder un fichier de configuration. Voyons " +"maintenant comment nous pouvons le lire et accéder aux données qu'il " +"contient." -#: library/configparser.rst:133 +#: library/configparser.rst:138 msgid "" "As we can see above, the API is pretty straightforward. The only bit of " "magic involves the ``DEFAULT`` section which provides default values for all " "other sections [1]_. Note also that keys in sections are case-insensitive " "and stored in lowercase [1]_." msgstr "" +"Comme vous le voyez, l'API est assez simple à utiliser. La seule partie un " +"peu magique concerne la section ``DEFAULT``, qui fournit les valeurs par " +"défaut pour toutes les autres sections [1]_. Notez également que les clés à " +"l’intérieur des sections ne sont pas sensibles à la casse et qu'elles sont " +"stockées en minuscules. [1]_." -#: library/configparser.rst:140 +#: library/configparser.rst:145 msgid "Supported Datatypes" -msgstr "" +msgstr "Types de données prises en charge" -#: library/configparser.rst:142 +#: library/configparser.rst:147 msgid "" "Config parsers do not guess datatypes of values in configuration files, " "always storing them internally as strings. This means that if you need " "other datatypes, you should convert on your own:" msgstr "" +"Les lecteurs de configuration n'essayent jamais de deviner le type des " +"valeurs présentes dans les fichiers de configuration, et elles sont toujours " +"stockées en tant que chaînes de caractères. Ainsi, si vous avez besoin d'un " +"type différent, vous devez effectuer la conversion vous-même :" -#: library/configparser.rst:153 +#: library/configparser.rst:158 msgid "" "Since this task is so common, config parsers provide a range of handy getter " "methods to handle integers, floats and booleans. The last one is the most " @@ -115,26 +153,42 @@ msgid "" "and recognizes Boolean values from ``'yes'``/``'no'``, ``'on'``/``'off'``, " "``'true'``/``'false'`` and ``'1'``/``'0'`` [1]_. For example:" msgstr "" +"Puisque que cette tâche doit être fréquemment accomplie, les lecteurs de " +"configurations fournissent un ensemble d'accesseurs permettant de gérer les " +"entiers, les flottants et les booléens plus facilement. Le cas des booléens " +"est le plus pertinent. En effet, vous ne pouvez pas vous contenter " +"d'utiliser la fonction ``bool()`` directement puisque ``bool('False')`` " +"renvoie ``True``. C'est pourquoi les lecteurs fournissent également la " +"méthode :meth:`~ConfigParser.getboolean`. Cette méthode n'est pas sensible à " +"la casse et interprète correctement les valeurs booléennes associées aux " +"chaînes de caractères comme ``'yes'``-``'no'``, ``'on'``-``'off'``, " +"``'true'``-``'false'`` et ``'1'``-``'0'`` [1]_. Par exemple :" -#: library/configparser.rst:170 +#: library/configparser.rst:175 msgid "" "Apart from :meth:`~ConfigParser.getboolean`, config parsers also provide " "equivalent :meth:`~ConfigParser.getint` and :meth:`~ConfigParser.getfloat` " "methods. You can register your own converters and customize the provided " "ones. [1]_" msgstr "" +"En plus de :meth:`~ConfigParser.getboolean`, les lecteurs de configurations " +"fournissent également des méthodes similaires comme :meth:`~ConfigParser." +"getint` et :meth:`~ConfigParser.getfloat`. Vous pouvez enregistrer vos " +"propres convertisseurs et personnaliser ceux déjà fournis. [1]_" -#: library/configparser.rst:176 +#: library/configparser.rst:181 msgid "Fallback Values" -msgstr "" +msgstr "Valeurs de substitution" -#: library/configparser.rst:178 +#: library/configparser.rst:183 msgid "" "As with a dictionary, you can use a section's :meth:`get` method to provide " "fallback values:" msgstr "" +"Comme pour un dictionnaire, vous pouvez utiliser la méthode :meth:`get` " +"d'une section en spécifiant une valeur de substitution :" -#: library/configparser.rst:191 +#: library/configparser.rst:196 msgid "" "Please note that default values have precedence over fallback values. For " "instance, in our example the ``'CompressionLevel'`` key was specified only " @@ -142,69 +196,112 @@ msgid "" "``'topsecret.server.com'``, we will always get the default, even if we " "specify a fallback:" msgstr "" +"Notez que les valeurs par défaut sont prioritaires par rapport aux valeurs " +"de substitution. Dans note exemple, la valeur de la clé ``CompressionLevel`` " +"était spécifiée uniquement dans la section ``DEFAULT``. Si nous essayons de " +"la récupérer depuis la section ``'topsecret.server.com'``, nous obtenons la " +"valeur par défaut, même en ayant spécifié une valeur de substitution :" -#: library/configparser.rst:202 +#: library/configparser.rst:207 msgid "" "One more thing to be aware of is that the parser-level :meth:`get` method " "provides a custom, more complex interface, maintained for backwards " "compatibility. When using this method, a fallback value can be provided via " "the ``fallback`` keyword-only argument:" msgstr "" +"Il est important de savoir que la méthode :meth:`get` appelée au niveau de " +"l'analyseur fournit une interface particulière et plus complexe, qui est " +"maintenue pour des raisons de rétrocompatibilité. Vous pouvez fournir une " +"valeur de substitution via l'argument obligatoirement nommé ``fallback`` :" -#: library/configparser.rst:213 +#: library/configparser.rst:218 msgid "" "The same ``fallback`` argument can be used with the :meth:`~ConfigParser." "getint`, :meth:`~ConfigParser.getfloat` and :meth:`~ConfigParser.getboolean` " "methods, for example:" msgstr "" +"L'argument ``fallback`` peut être utilisé de la même façon avec les " +"méthodes :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat` et :" +"meth:`~ConfigParser.getboolean`. Par exemple :" -#: library/configparser.rst:229 +#: library/configparser.rst:234 msgid "Supported INI File Structure" -msgstr "" +msgstr "Structure des fichiers *INI* prise en change" -#: library/configparser.rst:231 +#: library/configparser.rst:236 +#, fuzzy msgid "" "A configuration file consists of sections, each led by a ``[section]`` " "header, followed by key/value entries separated by a specific string (``=`` " "or ``:`` by default [1]_). By default, section names are case sensitive but " "keys are not [1]_. Leading and trailing whitespace is removed from keys and " -"values. Values can be omitted, in which case the key/value delimiter may " -"also be left out. Values can also span multiple lines, as long as they are " -"indented deeper than the first line of the value. Depending on the parser's " -"mode, blank lines may be treated as parts of multiline values or ignored." +"values. Values can be omitted if the parser is configured to allow it [1]_, " +"in which case the key/value delimiter may also be left out. Values can also " +"span multiple lines, as long as they are indented deeper than the first line " +"of the value. Depending on the parser's mode, blank lines may be treated as " +"parts of multiline values or ignored." +msgstr "" +"Un fichier de configuration est constitué de sections. Chacune des sections " +"commence par un en-tête ``[section]``, suivi d'une liste de définitions clés-" +"valeurs séparées par une chaîne de caractères spécifique (``=`` ou ``:`` par " +"défaut [1]_). Par défaut, les noms des sections sont sensibles à la casse " +"mais pas les clés [1]_. Les caractères d'espacement en début et en fin des " +"clés et des valeurs sont supprimés. Les valeurs peuvent être absentes, " +"auquel cas il est possible d'omettre le délimiteur entre clé et valeur. Les " +"valeurs peuvent s'étendre sur plusieurs lignes, à partir du moment où les " +"lignes supplémentaires sont plus indentées que la première ligne. Les lignes " +"vides peuvent être considérées comme faisant partie des valeurs multi " +"lignes, en fonction de la configuration de l'analyseur." + +#: library/configparser.rst:246 +msgid "" +"By default, a valid section name can be any string that does not contain '\\" +"\\n' or ']'. To change this, see :attr:`ConfigParser.SECTCRE`." msgstr "" -#: library/configparser.rst:240 +#: library/configparser.rst:249 msgid "" "Configuration files may include comments, prefixed by specific characters " "(``#`` and ``;`` by default [1]_). Comments may appear on their own on an " "otherwise empty line, possibly indented. [1]_" msgstr "" +"Les fichiers de configuration peuvent contenir des commentaires, préfixés " +"par des caractères spécifiques (``#`` et ``;`` par défaut [1]_). Les " +"commentaires peuvent apparaître à l'emplacement d'une ligne vide, et peuvent " +"aussi être indentés. [1]_" -#: library/configparser.rst:307 +#: library/configparser.rst:316 msgid "For example:" msgstr "Par exemple :" -#: library/configparser.rst:292 +#: library/configparser.rst:301 msgid "Interpolation of values" -msgstr "" +msgstr "Interpolation des valeurs" -#: library/configparser.rst:294 +#: library/configparser.rst:303 msgid "" "On top of the core functionality, :class:`ConfigParser` supports " "interpolation. This means values can be preprocessed before returning them " "from ``get()`` calls." msgstr "" +"La classe :class:`ConfigParser` prend en charge l’interpolation, en plus des " +"fonctionnalités de base. Cela signifie que les valeurs peuvent être traitées " +"avant d'être renvoyées par les appels aux méthodes ``get()``." -#: library/configparser.rst:302 +#: library/configparser.rst:311 msgid "" "The default implementation used by :class:`ConfigParser`. It enables values " "to contain format strings which refer to other values in the same section, " "or values in the special default section [1]_. Additional default values " "can be provided on initialization." msgstr "" +"Implémentation par défaut utilisée par la classe :class:`ConfigParser`. " +"Celle-ci permet aux valeurs de contenir des chaînes de formatage se référant " +"à d'autres valeurs dans la même section, ou bien à des valeurs dans la " +"section spéciale par défaut [1]_. D'autres valeurs par défaut peuvent être " +"fournies au moment de l'initialisation de cette classe." -#: library/configparser.rst:319 +#: library/configparser.rst:329 msgid "" "In the example above, :class:`ConfigParser` with *interpolation* set to " "``BasicInterpolation()`` would resolve ``%(home_dir)s`` to the value of " @@ -213,15 +310,25 @@ msgid "" "keys used in the chain of references do not have to be specified in any " "specific order in the configuration file." msgstr "" +"Dans l'exemple ci-dessus, une classe :class:`Configparser` dont l'attribut " +"*interpolation* vaut ``BasicInterpolation()`` interprète la chaîne de " +"caractères ``%(home_dir)s`` en utilisant la valeur de la clé ``home_dir`` " +"(``/Users`` dans ce cas). ``%(my_dir)s`` est interprétée comme ``/Users/" +"lumberjack``. Les interpolations sont effectuées à la volée. Ainsi, les clés " +"utilisées comme référence à l’intérieur des chaînes de formatage peuvent " +"être définies dans le fichier de configuration dans n'importe quel ordre." -#: library/configparser.rst:326 +#: library/configparser.rst:336 msgid "" -"With ``interpolation`` set to ``None``, the parser would simply return ``" -"%(my_dir)s/Pictures`` as the value of ``my_pictures`` and ``%(home_dir)s/" +"With ``interpolation`` set to ``None``, the parser would simply return " +"``%(my_dir)s/Pictures`` as the value of ``my_pictures`` and ``%(home_dir)s/" "lumberjack`` as the value of ``my_dir``." msgstr "" +"Si l'attribut ``interpolation`` vaut ``None``, le lecteur renvoie " +"``%(my_dir)s/Pictures`` comme valeur pour ``my_pictures`` et ``%(home_dir)s/" +"lumberjack`` comme valeur pour ``my_dir``." -#: library/configparser.rst:334 +#: library/configparser.rst:344 msgid "" "An alternative handler for interpolation which implements a more advanced " "syntax, used for instance in ``zc.buildout``. Extended interpolation is " @@ -230,30 +337,45 @@ msgid "" "`` part is omitted, interpolation defaults to the current section (and " "possibly the default values from the special section)." msgstr "" +"Autre façon de gérer l'interpolation en utilisant une syntaxe plus avancée, " +"utilisée par exemple par ``zc.buildout``. Cette syntaxe étendue utilise la " +"chaîne de formatage ``{section:option}}`` pour désigner une valeur " +"appartenant à une autre section. L'interpolation peut s'étendre sur " +"plusieurs niveaux. Par commodité, si la partie ``{section}`` est absente, " +"l'interpolation utilise la section courante par défaut (et, le cas échéant, " +"les valeurs de la section par défaut spéciale)." -#: library/configparser.rst:341 +#: library/configparser.rst:351 msgid "" "For example, the configuration specified above with basic interpolation, " "would look like this with extended interpolation:" msgstr "" +"Voici comment transformer la configuration ci-dessus avec la syntaxe " +"d'interpolation étendue :" -#: library/configparser.rst:354 +#: library/configparser.rst:365 msgid "Values from other sections can be fetched as well:" msgstr "" +"Vous pouvez également récupérer des valeurs appartenant aux autres sections :" -#: library/configparser.rst:376 +#: library/configparser.rst:387 msgid "Mapping Protocol Access" -msgstr "" +msgstr "Protocole d'accès associatif" -#: library/configparser.rst:380 +#: library/configparser.rst:391 msgid "" "Mapping protocol access is a generic name for functionality that enables " "using custom objects as if they were dictionaries. In case of :mod:" "`configparser`, the mapping interface implementation is using the " "``parser['section']['option']`` notation." msgstr "" +"Le terme « protocole d'accès associatif » est utilisé pour décrire la " +"fonctionnalité qui permet d'utiliser des objets personnalisés comme s'il " +"s'agissait de dictionnaires. Dans le cas du module :mod:`configparser`, " +"l’implémentation du protocole utilise la notation ``parser['section']" +"['option']``." -#: library/configparser.rst:385 +#: library/configparser.rst:396 msgid "" "``parser['section']`` in particular returns a proxy for the section's data " "in the parser. This means that the values are not copied but they are taken " @@ -261,16 +383,27 @@ msgid "" "values are changed on a section proxy, they are actually mutated in the " "original parser." msgstr "" +"En particulier, ``parser['section']`` renvoie un mandataire vers les données " +"de la section correspondantes dans l'analyseur. Cela signifie que les " +"valeurs ne sont pas copiées, mais prélevées depuis l'analyseur initial à la " +"demande. Plus important encore, lorsque les valeurs sont changées dans un " +"mandataire pour une section, elles sont en réalité changées dans l'analyseur " +"initial." -#: library/configparser.rst:391 +#: library/configparser.rst:402 msgid "" ":mod:`configparser` objects behave as close to actual dictionaries as " "possible. The mapping interface is complete and adheres to the :class:" "`~collections.abc.MutableMapping` ABC. However, there are a few differences " "that should be taken into account:" msgstr "" +"Les objets du module :mod:`configparser` se comportent le plus possible " +"comme des vrais dictionnaires. L'interface est complète et suit les " +"définitions fournies par la classe abstraite :class:`~collections.abc." +"MutableMapping`. Cependant, il faut prendre en compte un certain nombre de " +"différences :" -#: library/configparser.rst:396 +#: library/configparser.rst:407 msgid "" "By default, all keys in sections are accessible in a case-insensitive manner " "[1]_. E.g. ``for option in parser[\"section\"]`` yields only " @@ -278,8 +411,13 @@ msgid "" "default. At the same time, for a section that holds the key ``'a'``, both " "expressions return ``True``::" msgstr "" +"Par défaut, toutes les clés des sections sont accessibles sans respect de la " +"casse [1]_. Par exemple, ``for option in parser[\"section\"]`` renvoie " +"uniquement les clés telles que transformées par la méthode ``optionxform``, " +"c'est-à-dire des clés transformées en minuscules. De même, pour une section " +"contenant la clé ``a``, les deux expressions suivantes renvoient ``True`` ::" -#: library/configparser.rst:404 +#: library/configparser.rst:415 msgid "" "All sections include ``DEFAULTSECT`` values as well which means that ``." "clear()`` on a section may not leave the section visibly empty. This is " @@ -288,31 +426,45 @@ msgid "" "deleting causes the default value to be visible again. Trying to delete a " "default value causes a :exc:`KeyError`." msgstr "" +"Toutes les sections incluent en plus les valeurs de la section " +"``DEFAULTSECT``. Cela signifie qu'appeler ``clear()`` sur une section ne la " +"fera pas forcément apparaître vide. En effet, les valeurs par défaut ne " +"peuvent pas être supprimées de la section (car, techniquement, elles n'y " +"sont pas présentes). Si vous détruisez une valeur par défaut qui a été " +"écrasée dans une section, alors la valeur par défaut sera de nouveau " +"visible. Essayer de détruire une valeur par défaut lève l'exception :exc:" +"`KeyError`." -#: library/configparser.rst:411 +#: library/configparser.rst:422 msgid "``DEFAULTSECT`` cannot be removed from the parser:" -msgstr "" +msgstr "La section ``DEFAULTSECT`` ne peut pas être supprimée ::" -#: library/configparser.rst:413 +# fausse alerte dans poedit - garder le point-virgule +#: library/configparser.rst:424 msgid "trying to delete it raises :exc:`ValueError`," -msgstr "" +msgstr "l'exception :exc:`ValueError` est levée si on essaye de la supprimer ;" -#: library/configparser.rst:415 +# fausse alerte dans poedit - garder le point-virgule +#: library/configparser.rst:426 msgid "``parser.clear()`` leaves it intact," -msgstr "" +msgstr "appeler ``parser.clear()`` la laisse intacte ;" -#: library/configparser.rst:417 +#: library/configparser.rst:428 msgid "``parser.popitem()`` never returns it." -msgstr "" +msgstr "appeler ```parser.popitem()`` ne la renvoie jamais." -#: library/configparser.rst:419 +#: library/configparser.rst:430 msgid "" "``parser.get(section, option, **kwargs)`` - the second argument is **not** a " "fallback value. Note however that the section-level ``get()`` methods are " "compatible both with the mapping protocol and the classic configparser API." msgstr "" +"Le deuxième argument de ``parser.get(section, option, **kwargs)`` n'est " +"**pas** une valeur de substitution. Notez cependant que les méthodes " +"``get()`` fournies par les sections sont compatibles à la fois avec le " +"protocole associatif et avec l'API classique de *configparser*." -#: library/configparser.rst:423 +#: library/configparser.rst:434 msgid "" "``parser.items()`` is compatible with the mapping protocol (returns a list " "of *section_name*, *section_proxy* pairs including the DEFAULTSECT). " @@ -321,19 +473,29 @@ msgid "" "*value* pairs for a specified ``section``, with all interpolations expanded " "(unless ``raw=True`` is provided)." msgstr "" +"La méthode ``parser.items()`` est compatible avec le protocole d'accès " +"associatif et renvoie une liste de paires *section_name*, *section_proxy*, " +"en incluant la section *DEFAULTSECT*. Cependant, cette méthode peut aussi " +"être appelée avec des arguments : ``parser.items(section, raw, vars)``. Dans " +"ce cas, la méthode renvoie une liste de paires *option*, *value* pour la " +"section spécifiée, en interprétant les interpolations (à moins d'utiliser " +"``raw=True``)." -#: library/configparser.rst:430 +#: library/configparser.rst:441 msgid "" "The mapping protocol is implemented on top of the existing legacy API so " "that subclasses overriding the original interface still should have mappings " "working as expected." msgstr "" +"Le protocole d'accès est implémenté au-dessus de l'ancienne API. Ainsi, les " +"sous-classes qui écrasent des méthodes de l'interface originale se " +"comportent correctement du point de vue du protocole d'accès." -#: library/configparser.rst:436 +#: library/configparser.rst:447 msgid "Customizing Parser Behaviour" -msgstr "" +msgstr "Personnalisation du comportement de l'analyseur" -#: library/configparser.rst:438 +#: library/configparser.rst:449 msgid "" "There are nearly as many INI format variants as there are applications using " "it. :mod:`configparser` goes a long way to provide support for the largest " @@ -341,94 +503,136 @@ msgid "" "dictated by historical background and it's very likely that you will want to " "customize some of the features." msgstr "" +"Il existe pratiquement autant de variations du format *INI* que " +"d'applications qui l'utilisent. Le module :mod:`configparser` fait son " +"possible pour gérer le plus grand nombre de variantes raisonnables du style " +"*INI*. Le comportement par défaut est principalement contraint par des " +"raisons historiques. De ce fait, il est très probable qu'il soit nécessaire " +"de personnaliser certaines des fonctionnalités de ce module." -#: library/configparser.rst:444 +#: library/configparser.rst:455 msgid "" "The most common way to change the way a specific config parser works is to " "use the :meth:`__init__` options:" msgstr "" +"La méthode la plus fréquemment utilisée pour changer la façon dont se " +"comporte un analyseur est d’utiliser les options de la méthode :meth:" +"`__init__` :" -#: library/configparser.rst:447 +#: library/configparser.rst:458 msgid "*defaults*, default value: ``None``" -msgstr "" +msgstr "*defaults*, valeur par défaut : ``None``" -#: library/configparser.rst:449 +#: library/configparser.rst:460 msgid "" "This option accepts a dictionary of key-value pairs which will be initially " "put in the ``DEFAULT`` section. This makes for an elegant way to support " "concise configuration files that don't specify values which are the same as " "the documented default." msgstr "" +"Cette option accepte un dictionnaire de paires clé—valeurs qui seront " +"placées dans la section ``DEFAULT`` initialement. Ceci est une façon " +"élégante de prendre en charge des fichiers de configuration qui n'ont pas " +"besoin de spécifier de valeurs lorsque celles-ci sont identiques aux valeurs " +"par défaut documentées." -#: library/configparser.rst:454 +#: library/configparser.rst:465 msgid "" "Hint: if you want to specify default values for a specific section, use :" "meth:`read_dict` before you read the actual file." msgstr "" +"Conseil : utilisez la méthode :meth:`read_dict` avant de lire le ficher de " +"configuration si vous voulez spécifier des valeurs par défaut pour une " +"section spécifique." -#: library/configparser.rst:457 +#: library/configparser.rst:468 msgid "*dict_type*, default value: :class:`dict`" -msgstr "" +msgstr "*dict_type*, valeur par défaut : :class:`dict`" -#: library/configparser.rst:459 +#: library/configparser.rst:470 msgid "" "This option has a major impact on how the mapping protocol will behave and " "how the written configuration files look. With the standard dictionary, " "every section is stored in the order they were added to the parser. Same " "goes for options within sections." msgstr "" +"Cette option influe de manière importante sur la façon dont le protocole " +"d'accès associatif se comporte et ce à quoi ressemblent les fichiers de " +"configuration une fois écrits. Avec un dictionnaire standard, les sections " +"sont stockées dans l'ordre où elles ont été ajoutées à l'analyseur. Ceci est " +"également vrai pour les options à l'intérieur des sections." -#: library/configparser.rst:464 +#: library/configparser.rst:475 msgid "" "An alternative dictionary type can be used for example to sort sections and " "options on write-back." msgstr "" +"Si vous souhaitez classer les sections et les options lors de l'écriture par " +"exemple, vous pouvez utiliser un type de dictionnaire différent." -#: library/configparser.rst:467 +#: library/configparser.rst:478 msgid "" "Please note: there are ways to add a set of key-value pairs in a single " "operation. When you use a regular dictionary in those operations, the order " "of the keys will be ordered. For example:" msgstr "" +"À noter : il est possible d'ajouter un ensemble de paires clés—valeurs en " +"une seule opération. L'ordre des clés est préservé si vous utilisez un " +"dictionnaire standard pour cela. Par exemple :" -#: library/configparser.rst:489 +#: library/configparser.rst:500 msgid "*allow_no_value*, default value: ``False``" -msgstr "" +msgstr "*allow_no_value*, valeur par défaut : ``False``" -#: library/configparser.rst:491 +#: library/configparser.rst:502 msgid "" "Some configuration files are known to include settings without values, but " "which otherwise conform to the syntax supported by :mod:`configparser`. The " "*allow_no_value* parameter to the constructor can be used to indicate that " "such values should be accepted:" msgstr "" +"Certains fichiers de configurations sont connus pour contenir des options " +"sans valeur associée, tout en se conformant à la syntaxe prise en charge par " +"le module :mod:`configparser` par ailleurs. Pour indiquer que de telles " +"valeurs sont acceptables, utilisez le paramètre *allow_no_value* lors de la " +"construction de l'instance :" -#: library/configparser.rst:526 +#: library/configparser.rst:537 msgid "*delimiters*, default value: ``('=', ':')``" -msgstr "" +msgstr "*delimiters*, valeur par défaut : ``('=', ':')``" -#: library/configparser.rst:528 +#: library/configparser.rst:539 msgid "" "Delimiters are substrings that delimit keys from values within a section. " "The first occurrence of a delimiting substring on a line is considered a " "delimiter. This means values (but not keys) can contain the delimiters." msgstr "" +"Chaînes de caractères qui séparent les clés des valeurs à l'intérieur d'une " +"section. La première occurrence d'une telle chaîne à l'intérieur d'une ligne " +"est considérée comme un délimiteur. Cela signifie que les valeurs peuvent " +"contenir certains des délimiteurs (mais pas les clés)." -#: library/configparser.rst:532 +#: library/configparser.rst:543 msgid "" "See also the *space_around_delimiters* argument to :meth:`ConfigParser." "write`." msgstr "" +"Voir aussi l'argument *space_around_delimiters* de la méthode :meth:" +"`ConfigParser.write`." -#: library/configparser.rst:535 +#: library/configparser.rst:546 msgid "*comment_prefixes*, default value: ``('#', ';')``" msgstr "" +"*comment_prefixes* (préfixes de commentaire) — valeur par défaut : ``('#', " +"';')``" -#: library/configparser.rst:537 +#: library/configparser.rst:548 msgid "*inline_comment_prefixes*, default value: ``None``" msgstr "" +"*inline_comment_prefixes* (préfixes de commentaire en ligne) — valeur par " +"défaut : ``('#', ';')``" -#: library/configparser.rst:539 +#: library/configparser.rst:550 msgid "" "Comment prefixes are strings that indicate the start of a valid comment " "within a config file. *comment_prefixes* are used only on otherwise empty " @@ -437,14 +641,25 @@ msgid "" "well). By default inline comments are disabled and ``'#'`` and ``';'`` are " "used as prefixes for whole line comments." msgstr "" +"Les préfixes de commentaire indiquent le début d'un commentaire valide au " +"sein d'un fichier de configuration. Ils ne peuvent être utilisés qu'à " +"l'emplacement d'une ligne vide (potentiellement indentée). En revanche, les " +"préfixes de commentaires en ligne peuvent être utilisés après n'importe " +"quelle valeur valide (comme les noms des sections, les options et les lignes " +"vides). Par défaut, les commentaires en ligne sont désactivés et les " +"préfixes utilisés pour les commentaires à l'emplacement d'une ligne vide " +"sont `'#'`` et ``';'``." -#: library/configparser.rst:546 +#: library/configparser.rst:557 msgid "" "In previous versions of :mod:`configparser` behaviour matched " "``comment_prefixes=('#',';')`` and ``inline_comment_prefixes=(';',)``." msgstr "" +"Les précédentes versions du module :mod:`configparser` se comportent comme " +"en utilisant ``comment_prefixes=('#',';')`` et " +"``inline_comment_prefixes=(';',)``." -#: library/configparser.rst:550 +#: library/configparser.rst:561 msgid "" "Please note that config parsers don't support escaping of comment prefixes " "so using *inline_comment_prefixes* may prevent users from specifying option " @@ -453,30 +668,44 @@ msgid "" "storing comment prefix characters at the beginning of a line in multiline " "values is to interpolate the prefix, for example::" msgstr "" +"Notez que les analyseurs ne prennent pas en charge l'échappement des " +"préfixes de commentaires. Ainsi, l'utilisation de *inline_comment_prefixes* " +"peut empêcher les utilisateurs de spécifier des valeurs qui contiennent des " +"caractères utilisés comme préfixe de commentaire. Dans le doute, il est " +"recommandé de ne pas utiliser *inline_comment_prefixes*. Dans tous les cas, " +"la seule façon de stocker des préfixes de commentaires au début d'une valeur " +"multi lignes est d'interpoler ceux-ci, par exemple ::" -#: library/configparser.rst:596 +#: library/configparser.rst:607 msgid "*strict*, default value: ``True``" -msgstr "" +msgstr "*scrict*, valeur par défaut : ``True``" -#: library/configparser.rst:598 +#: library/configparser.rst:609 msgid "" "When set to ``True``, the parser will not allow for any section or option " "duplicates while reading from a single source (using :meth:`read_file`, :" "meth:`read_string` or :meth:`read_dict`). It is recommended to use strict " "parsers in new applications." msgstr "" +"Quand la valeur ``True`` est spécifiée, le parseur refuse toute section ou " +"option dupliquée lors de la lecture d'une source unique (lorsque :meth:" +"`read_file`, :meth:`read_string` ou :meth:`read_dict` sont utilisées). Il " +"est recommandé d'utiliser un mode de fonctionnement strict pour les " +"analyseurs employés par de nouvelles applications." -#: library/configparser.rst:603 +#: library/configparser.rst:614 msgid "" "In previous versions of :mod:`configparser` behaviour matched " "``strict=False``." msgstr "" +"Les versions précédentes du module :mod:`configparser` se comportent comme " +"en utilisant ``strict=False``." -#: library/configparser.rst:607 +#: library/configparser.rst:618 msgid "*empty_lines_in_values*, default value: ``True``" -msgstr "" +msgstr "*empty_lines_in_values*, valeur par défaut : ``True``" -#: library/configparser.rst:609 +#: library/configparser.rst:620 msgid "" "In config parsers, values can span multiple lines as long as they are " "indented more than the key that holds them. By default parsers also let " @@ -485,8 +714,15 @@ msgid "" "when configuration files get big and complex, it is easy for the user to " "lose track of the file structure. Take for instance:" msgstr "" +"Du point de vue des analyseurs, les valeurs peuvent s'étendre sur plusieurs " +"lignes à partir du moment où elles sont plus indentées que la clé qui les " +"contient. Par défaut les analyseurs autorisent les lignes vides à faire " +"partie de telles valeurs. Dans le même temps, les clés elles-mêmes peuvent " +"être indentées de façon à rendre le fichier plus lisible. En conséquence, il " +"est probable que l'utilisateur perde de vue la structure du fichier lorsque " +"celui-ci devient long et complexe. Prenez par exemple :" -#: library/configparser.rst:624 +#: library/configparser.rst:635 msgid "" "This can be especially problematic for the user to see if she's using a " "proportional font to edit the file. That is why when your application does " @@ -494,32 +730,40 @@ msgid "" "This will make empty lines split keys every time. In the example above, it " "would produce two keys, ``key`` and ``this``." msgstr "" +"Ceci est particulièrement problématique si l'utilisateur a configuré son " +"éditeur pour utiliser une police à chasse variable. C'est pourquoi il est " +"conseillé de ne pas prendre en charge les valeurs avec des lignes vides, à " +"moins que votre application en ait besoin. Dans ce cas, les lignes vides " +"sont toujours interprétées comme séparant des clés. Dans l'exemple ci-" +"dessus, cela produit deux clés : ``key`` et ``this``." -#: library/configparser.rst:630 +#: library/configparser.rst:641 msgid "" -"*default_section*, default value: ``configparser.DEFAULTSECT`` (that is: ``" -"\"DEFAULT\"``)" +"*default_section*, default value: ``configparser.DEFAULTSECT`` (that is: " +"``\"DEFAULT\"``)" msgstr "" +"*default_section*, valeur par défaut : ``configparser.DEFAULTSECT`` " +"(autrement dit : ``\"DEFAULT\"``)" -#: library/configparser.rst:633 +#: library/configparser.rst:644 msgid "" "The convention of allowing a special section of default values for other " "sections or interpolation purposes is a powerful concept of this library, " "letting users create complex declarative configurations. This section is " "normally called ``\"DEFAULT\"`` but this can be customized to point to any " -"other valid section name. Some typical values include: ``\"general\"`` or ``" -"\"common\"``. The name provided is used for recognizing default sections " +"other valid section name. Some typical values include: ``\"general\"`` or " +"``\"common\"``. The name provided is used for recognizing default sections " "when reading from any source and is used when writing configuration back to " "a file. Its current value can be retrieved using the ``parser_instance." "default_section`` attribute and may be modified at runtime (i.e. to convert " "files from one format to another)." msgstr "" -#: library/configparser.rst:644 +#: library/configparser.rst:655 msgid "*interpolation*, default value: ``configparser.BasicInterpolation``" msgstr "" -#: library/configparser.rst:646 +#: library/configparser.rst:657 msgid "" "Interpolation behaviour may be customized by providing a custom handler " "through the *interpolation* argument. ``None`` can be used to turn off " @@ -529,11 +773,11 @@ msgid "" "`RawConfigParser` has a default value of ``None``." msgstr "" -#: library/configparser.rst:653 +#: library/configparser.rst:664 msgid "*converters*, default value: not set" msgstr "" -#: library/configparser.rst:655 +#: library/configparser.rst:666 msgid "" "Config parsers provide option value getters that perform type conversion. " "By default :meth:`~ConfigParser.getint`, :meth:`~ConfigParser.getfloat`, " @@ -547,7 +791,7 @@ msgid "" "``parser_instance['section'].getdecimal('key', 0)``." msgstr "" -#: library/configparser.rst:666 +#: library/configparser.rst:677 msgid "" "If the converter needs to access the state of the parser, it can be " "implemented as a method on a config parser subclass. If the name of this " @@ -555,14 +799,14 @@ msgid "" "the dict-compatible form (see the ``getdecimal()`` example above)." msgstr "" -#: library/configparser.rst:671 +#: library/configparser.rst:682 msgid "" "More advanced customization may be achieved by overriding default values of " "these parser attributes. The defaults are defined on the classes, so they " "may be overridden by subclasses or by attribute assignment." msgstr "" -#: library/configparser.rst:677 +#: library/configparser.rst:688 msgid "" "By default when using :meth:`~ConfigParser.getboolean`, config parsers " "consider the following values ``True``: ``'1'``, ``'yes'``, ``'true'``, " @@ -570,14 +814,20 @@ msgid "" "``'off'``. You can override this by specifying a custom dictionary of " "strings and their Boolean outcomes. For example:" msgstr "" +"Par défaut, la méthode :meth:`~ConfigParser.getboolean` considère les " +"valeurs suivantes comme vraies : `'1'``, ``'yes'``, ``'true'``, ``'on'``, et " +"les valeurs suivantes comme fausses : ``'0'``, ``'no'``, ``'false'``, " +"``'off'``. Vous pouvez changer ce comportement en spécifiant votre propre " +"dictionnaire associant des chaînes de caractères à des valeurs booléennes. " +"Par exemple :" -#: library/configparser.rst:695 +#: library/configparser.rst:706 msgid "" "Other typical Boolean pairs include ``accept``/``reject`` or ``enabled``/" "``disabled``." msgstr "" -#: library/configparser.rst:701 +#: library/configparser.rst:712 msgid "" "This method transforms option names on every read, get, or set operation. " "The default converts the name to lowercase. This also means that when a " @@ -585,14 +835,14 @@ msgid "" "method if that's unsuitable. For example:" msgstr "" -#: library/configparser.rst:731 +#: library/configparser.rst:742 msgid "" "The optionxform function transforms option names to a canonical form. This " "should be an idempotent function: if the name is already in canonical form, " "it should be returned unchanged." msgstr "" -#: library/configparser.rst:738 +#: library/configparser.rst:749 msgid "" "A compiled regular expression used to parse section headers. The default " "matches ``[section]`` to the name ``\"section\"``. Whitespace is considered " @@ -601,18 +851,18 @@ msgid "" "example:" msgstr "" -#: library/configparser.rst:766 +#: library/configparser.rst:777 msgid "" "While ConfigParser objects also use an ``OPTCRE`` attribute for recognizing " "option lines, it's not recommended to override it because that would " "interfere with constructor options *allow_no_value* and *delimiters*." msgstr "" -#: library/configparser.rst:772 +#: library/configparser.rst:783 msgid "Legacy API Examples" msgstr "" -#: library/configparser.rst:774 +#: library/configparser.rst:785 msgid "" "Mainly because of backwards compatibility concerns, :mod:`configparser` " "provides also a legacy API with explicit ``get``/``set`` methods. While " @@ -621,29 +871,29 @@ msgid "" "advanced, low-level and downright counterintuitive." msgstr "" -#: library/configparser.rst:780 +#: library/configparser.rst:791 msgid "An example of writing to a configuration file::" msgstr "" -#: library/configparser.rst:803 +#: library/configparser.rst:814 msgid "An example of reading the configuration file again::" msgstr "" -#: library/configparser.rst:821 +#: library/configparser.rst:832 msgid "To get interpolation, use :class:`ConfigParser`::" msgstr "" -#: library/configparser.rst:854 +#: library/configparser.rst:865 msgid "" "Default values are available in both types of ConfigParsers. They are used " "in interpolation if an option used is not defined elsewhere. ::" msgstr "" -#: library/configparser.rst:872 +#: library/configparser.rst:883 msgid "ConfigParser Objects" msgstr "" -#: library/configparser.rst:876 +#: library/configparser.rst:887 msgid "" "The main configuration parser. When *defaults* is given, it is initialized " "into the dictionary of intrinsic defaults. When *dict_type* is given, it " @@ -651,7 +901,7 @@ msgid "" "the options within a section, and for the default values." msgstr "" -#: library/configparser.rst:881 +#: library/configparser.rst:892 msgid "" "When *delimiters* is given, it is used as the set of substrings that divide " "keys from values. When *comment_prefixes* is given, it will be used as the " @@ -660,7 +910,7 @@ msgid "" "as the set of substrings that prefix comments in non-empty lines." msgstr "" -#: library/configparser.rst:887 +#: library/configparser.rst:898 msgid "" "When *strict* is ``True`` (the default), the parser won't allow for any " "section or option duplicates while reading from a single source (file, " @@ -673,7 +923,7 @@ msgid "" "without the trailing delimiter." msgstr "" -#: library/configparser.rst:897 +#: library/configparser.rst:908 msgid "" "When *default_section* is given, it specifies the name for the special " "section holding default values for other sections and interpolation purposes " @@ -681,7 +931,7 @@ msgid "" "on runtime using the ``default_section`` instance attribute." msgstr "" -#: library/configparser.rst:902 +#: library/configparser.rst:913 msgid "" "Interpolation behaviour may be customized by providing a custom handler " "through the *interpolation* argument. ``None`` can be used to turn off " @@ -690,7 +940,7 @@ msgid "" "`dedicated documentation section <#interpolation-of-values>`_." msgstr "" -#: library/configparser.rst:908 +#: library/configparser.rst:919 msgid "" "All option names used in interpolation will be passed through the :meth:" "`optionxform` method just like any other option name reference. For " @@ -699,7 +949,7 @@ msgid "" "%(BAR)s`` are equivalent." msgstr "" -#: library/configparser.rst:914 +#: library/configparser.rst:925 msgid "" "When *converters* is given, it should be a dictionary where each key " "represents the name of a type converter and each value is a callable " @@ -708,44 +958,44 @@ msgid "" "object and section proxies." msgstr "" -#: library/configparser.rst:920 +#: library/configparser.rst:931 msgid "The default *dict_type* is :class:`collections.OrderedDict`." msgstr "" -#: library/configparser.rst:923 +#: library/configparser.rst:934 msgid "" "*allow_no_value*, *delimiters*, *comment_prefixes*, *strict*, " "*empty_lines_in_values*, *default_section* and *interpolation* were added." msgstr "" -#: library/configparser.rst:928 +#: library/configparser.rst:939 msgid "The *converters* argument was added." msgstr "" -#: library/configparser.rst:931 +#: library/configparser.rst:942 msgid "" "The *defaults* argument is read with :meth:`read_dict()`, providing " "consistent behavior across the parser: non-string keys and values are " "implicitly converted to strings." msgstr "" -#: library/configparser.rst:1214 +#: library/configparser.rst:1232 msgid "" "The default *dict_type* is :class:`dict`, since it now preserves insertion " "order." msgstr "" -#: library/configparser.rst:942 +#: library/configparser.rst:953 msgid "Return a dictionary containing the instance-wide defaults." msgstr "" -#: library/configparser.rst:947 +#: library/configparser.rst:958 msgid "" "Return a list of the sections available; the *default section* is not " "included in the list." msgstr "" -#: library/configparser.rst:953 +#: library/configparser.rst:964 msgid "" "Add a section named *section* to the instance. If a section by the given " "name already exists, :exc:`DuplicateSectionError` is raised. If the " @@ -753,34 +1003,34 @@ msgid "" "the section must be a string; if not, :exc:`TypeError` is raised." msgstr "" -#: library/configparser.rst:958 +#: library/configparser.rst:969 msgid "Non-string section names raise :exc:`TypeError`." msgstr "" -#: library/configparser.rst:964 +#: library/configparser.rst:975 msgid "" "Indicates whether the named *section* is present in the configuration. The " "*default section* is not acknowledged." msgstr "" -#: library/configparser.rst:970 +#: library/configparser.rst:981 msgid "Return a list of options available in the specified *section*." msgstr "" -#: library/configparser.rst:975 +#: library/configparser.rst:986 msgid "" "If the given *section* exists, and contains the given *option*, return :" "const:`True`; otherwise return :const:`False`. If the specified *section* " "is :const:`None` or an empty string, DEFAULT is assumed." msgstr "" -#: library/configparser.rst:982 +#: library/configparser.rst:993 msgid "" "Attempt to read and parse an iterable of filenames, returning a list of " "filenames which were successfully parsed." msgstr "" -#: library/configparser.rst:985 +#: library/configparser.rst:996 msgid "" "If *filenames* is a string, a :class:`bytes` object or a :term:`path-like " "object`, it is treated as a single filename. If a file named in *filenames* " @@ -791,7 +1041,7 @@ msgid "" "be read." msgstr "" -#: library/configparser.rst:994 +#: library/configparser.rst:1005 msgid "" "If none of the named files exist, the :class:`ConfigParser` instance will " "contain an empty dataset. An application which requires initial values to " @@ -799,52 +1049,52 @@ msgid "" "`read_file` before calling :meth:`read` for any optional files::" msgstr "" -#: library/configparser.rst:1007 +#: library/configparser.rst:1018 msgid "" "The *encoding* parameter. Previously, all files were read using the default " "encoding for :func:`open`." msgstr "" -#: library/configparser.rst:1011 +#: library/configparser.rst:1022 #, fuzzy msgid "The *filenames* parameter accepts a :term:`path-like object`." msgstr "" "Le paramètre *filename* accepte un objet chemin-compatible :term:`path-like " "object`." -#: library/configparser.rst:1014 +#: library/configparser.rst:1025 msgid "The *filenames* parameter accepts a :class:`bytes` object." msgstr "" -#: library/configparser.rst:1020 +#: library/configparser.rst:1031 msgid "" "Read and parse configuration data from *f* which must be an iterable " "yielding Unicode strings (for example files opened in text mode)." msgstr "" -#: library/configparser.rst:1023 +#: library/configparser.rst:1034 msgid "" "Optional argument *source* specifies the name of the file being read. If " "not given and *f* has a :attr:`name` attribute, that is used for *source*; " "the default is ``''``." msgstr "" -#: library/configparser.rst:1027 +#: library/configparser.rst:1038 msgid "Replaces :meth:`readfp`." msgstr "" -#: library/configparser.rst:1032 +#: library/configparser.rst:1043 msgid "Parse configuration data from a string." msgstr "" -#: library/configparser.rst:1034 +#: library/configparser.rst:1045 msgid "" "Optional argument *source* specifies a context-specific name of the string " "passed. If not given, ``''`` is used. This should commonly be a " "filesystem path or a URL." msgstr "" -#: library/configparser.rst:1043 +#: library/configparser.rst:1054 msgid "" "Load configuration from any object that provides a dict-like ``items()`` " "method. Keys are section names, values are dictionaries with keys and " @@ -853,17 +1103,17 @@ msgid "" "automatically converted to strings." msgstr "" -#: library/configparser.rst:1049 +#: library/configparser.rst:1060 msgid "" "Optional argument *source* specifies a context-specific name of the " "dictionary passed. If not given, ```` is used." msgstr "" -#: library/configparser.rst:1052 +#: library/configparser.rst:1063 msgid "This method can be used to copy state between parsers." msgstr "" -#: library/configparser.rst:1059 +#: library/configparser.rst:1070 msgid "" "Get an *option* value for the named *section*. If *vars* is provided, it " "must be a dictionary. The *option* is looked up in *vars* (if provided), " @@ -872,35 +1122,35 @@ msgid "" "provided as a *fallback* value." msgstr "" -#: library/configparser.rst:1065 +#: library/configparser.rst:1076 msgid "" "All the ``'%'`` interpolations are expanded in the return values, unless the " "*raw* argument is true. Values for interpolation keys are looked up in the " "same manner as the option." msgstr "" -#: library/configparser.rst:1069 +#: library/configparser.rst:1080 msgid "" "Arguments *raw*, *vars* and *fallback* are keyword only to protect users " "from trying to use the third argument as the *fallback* fallback (especially " "when using the mapping protocol)." msgstr "" -#: library/configparser.rst:1077 +#: library/configparser.rst:1088 msgid "" "A convenience method which coerces the *option* in the specified *section* " "to an integer. See :meth:`get` for explanation of *raw*, *vars* and " "*fallback*." msgstr "" -#: library/configparser.rst:1084 +#: library/configparser.rst:1095 msgid "" "A convenience method which coerces the *option* in the specified *section* " "to a floating point number. See :meth:`get` for explanation of *raw*, " "*vars* and *fallback*." msgstr "" -#: library/configparser.rst:1091 +#: library/configparser.rst:1102 msgid "" "A convenience method which coerces the *option* in the specified *section* " "to a Boolean value. Note that the accepted values for the option are " @@ -912,34 +1162,34 @@ msgid "" "*fallback*." msgstr "" -#: library/configparser.rst:1104 +#: library/configparser.rst:1115 msgid "" "When *section* is not given, return a list of *section_name*, " "*section_proxy* pairs, including DEFAULTSECT." msgstr "" -#: library/configparser.rst:1107 +#: library/configparser.rst:1118 msgid "" "Otherwise, return a list of *name*, *value* pairs for the options in the " "given *section*. Optional arguments have the same meaning as for the :meth:" "`get` method." msgstr "" -#: library/configparser.rst:1111 +#: library/configparser.rst:1122 msgid "" "Items present in *vars* no longer appear in the result. The previous " "behaviour mixed actual parser options with variables provided for " "interpolation." msgstr "" -#: library/configparser.rst:1119 +#: library/configparser.rst:1130 msgid "" "If the given section exists, set the given option to the specified value; " "otherwise raise :exc:`NoSectionError`. *option* and *value* must be " "strings; if not, :exc:`TypeError` is raised." msgstr "" -#: library/configparser.rst:1126 +#: library/configparser.rst:1137 msgid "" "Write a representation of the configuration to the specified :term:`file " "object`, which must be opened in text mode (accepting strings). This " @@ -948,20 +1198,27 @@ msgid "" "surrounded by spaces." msgstr "" -#: library/configparser.rst:1135 +#: library/configparser.rst:1145 +msgid "" +"Comments in the original configuration file are not preserved when writing " +"the configuration back. What is considered a comment, depends on the given " +"values for *comment_prefix* and *inline_comment_prefix*." +msgstr "" + +#: library/configparser.rst:1153 msgid "" "Remove the specified *option* from the specified *section*. If the section " "does not exist, raise :exc:`NoSectionError`. If the option existed to be " "removed, return :const:`True`; otherwise return :const:`False`." msgstr "" -#: library/configparser.rst:1143 +#: library/configparser.rst:1161 msgid "" "Remove the specified *section* from the configuration. If the section in " "fact existed, return ``True``. Otherwise return ``False``." msgstr "" -#: library/configparser.rst:1149 +#: library/configparser.rst:1167 msgid "" "Transforms the option name *option* as found in an input file or as passed " "in by client code to the form that should be used in the internal " @@ -970,7 +1227,7 @@ msgid "" "of this name on instances to affect this behavior." msgstr "" -#: library/configparser.rst:1155 +#: library/configparser.rst:1173 msgid "" "You don't need to subclass the parser to use this method, you can also set " "it on an instance, to a function that takes a string argument and returns a " @@ -978,46 +1235,46 @@ msgid "" "sensitive::" msgstr "" -#: library/configparser.rst:1163 +#: library/configparser.rst:1181 msgid "" "Note that when reading configuration files, whitespace around the option " "names is stripped before :meth:`optionxform` is called." msgstr "" -#: library/configparser.rst:1169 +#: library/configparser.rst:1187 msgid "Use :meth:`read_file` instead." msgstr "" -#: library/configparser.rst:1172 +#: library/configparser.rst:1190 msgid "" ":meth:`readfp` now iterates on *fp* instead of calling ``fp.readline()``." msgstr "" -#: library/configparser.rst:1175 +#: library/configparser.rst:1193 msgid "" "For existing code calling :meth:`readfp` with arguments which don't support " "iteration, the following generator may be used as a wrapper around the file-" "like object::" msgstr "" -#: library/configparser.rst:1185 +#: library/configparser.rst:1203 msgid "" "Instead of ``parser.readfp(fp)`` use ``parser." "read_file(readline_generator(fp))``." msgstr "" -#: library/configparser.rst:1191 +#: library/configparser.rst:1209 msgid "" "The maximum depth for recursive interpolation for :meth:`get` when the *raw* " "parameter is false. This is relevant only when the default *interpolation* " "is used." msgstr "" -#: library/configparser.rst:1199 +#: library/configparser.rst:1217 msgid "RawConfigParser Objects" msgstr "" -#: library/configparser.rst:1209 +#: library/configparser.rst:1227 msgid "" "Legacy variant of the :class:`ConfigParser`. It has interpolation disabled " "by default and allows for non-string section names, option names, and values " @@ -1025,27 +1282,27 @@ msgid "" "``defaults=`` keyword argument handling." msgstr "" -#: library/configparser.rst:1219 +#: library/configparser.rst:1237 msgid "" "Consider using :class:`ConfigParser` instead which checks types of the " "values to be stored internally. If you don't want interpolation, you can " "use ``ConfigParser(interpolation=None)``." msgstr "" -#: library/configparser.rst:1226 +#: library/configparser.rst:1244 msgid "" "Add a section named *section* to the instance. If a section by the given " "name already exists, :exc:`DuplicateSectionError` is raised. If the " "*default section* name is passed, :exc:`ValueError` is raised." msgstr "" -#: library/configparser.rst:1230 +#: library/configparser.rst:1248 msgid "" "Type of *section* is not checked which lets users create non-string named " "sections. This behaviour is unsupported and may cause internal errors." msgstr "" -#: library/configparser.rst:1236 +#: library/configparser.rst:1254 msgid "" "If the given section exists, set the given option to the specified value; " "otherwise raise :exc:`NoSectionError`. While it is possible to use :class:" @@ -1055,7 +1312,7 @@ msgid "" "string values." msgstr "" -#: library/configparser.rst:1243 +#: library/configparser.rst:1261 msgid "" "This method lets users assign non-string values to keys internally. This " "behaviour is unsupported and will cause errors when attempting to write to a " @@ -1063,32 +1320,32 @@ msgid "" "not allow such assignments to take place." msgstr "" -#: library/configparser.rst:1250 +#: library/configparser.rst:1268 msgid "Exceptions" msgstr "Exceptions" -#: library/configparser.rst:1254 +#: library/configparser.rst:1272 msgid "Base class for all other :mod:`configparser` exceptions." msgstr "" -#: library/configparser.rst:1259 +#: library/configparser.rst:1277 msgid "Exception raised when a specified section is not found." msgstr "" -#: library/configparser.rst:1264 +#: library/configparser.rst:1282 msgid "" "Exception raised if :meth:`add_section` is called with the name of a section " "that is already present or in strict parsers when a section if found more " "than once in a single input file, string or dictionary." msgstr "" -#: library/configparser.rst:1268 +#: library/configparser.rst:1286 msgid "" "Optional ``source`` and ``lineno`` attributes and arguments to :meth:" "`__init__` were added." msgstr "" -#: library/configparser.rst:1275 +#: library/configparser.rst:1293 msgid "" "Exception raised by strict parsers if a single option appears twice during " "reading from a single file, string or dictionary. This catches misspellings " @@ -1096,58 +1353,58 @@ msgid "" "representing the same case-insensitive configuration key." msgstr "" -#: library/configparser.rst:1283 +#: library/configparser.rst:1301 msgid "" "Exception raised when a specified option is not found in the specified " "section." msgstr "" -#: library/configparser.rst:1289 +#: library/configparser.rst:1307 msgid "" "Base class for exceptions raised when problems occur performing string " "interpolation." msgstr "" -#: library/configparser.rst:1295 +#: library/configparser.rst:1313 msgid "" "Exception raised when string interpolation cannot be completed because the " "number of iterations exceeds :const:`MAX_INTERPOLATION_DEPTH`. Subclass of :" "exc:`InterpolationError`." msgstr "" -#: library/configparser.rst:1302 +#: library/configparser.rst:1320 msgid "" "Exception raised when an option referenced from a value does not exist. " "Subclass of :exc:`InterpolationError`." msgstr "" -#: library/configparser.rst:1308 +#: library/configparser.rst:1326 msgid "" "Exception raised when the source text into which substitutions are made does " "not conform to the required syntax. Subclass of :exc:`InterpolationError`." msgstr "" -#: library/configparser.rst:1314 +#: library/configparser.rst:1332 msgid "" "Exception raised when attempting to parse a file which has no section " "headers." msgstr "" -#: library/configparser.rst:1320 +#: library/configparser.rst:1338 msgid "Exception raised when errors occur attempting to parse a file." msgstr "" -#: library/configparser.rst:1322 +#: library/configparser.rst:1340 msgid "" "The ``filename`` attribute and :meth:`__init__` argument were renamed to " "``source`` for consistency." msgstr "" -#: library/configparser.rst:1328 +#: library/configparser.rst:1346 msgid "Footnotes" msgstr "Notes" -#: library/configparser.rst:1329 +#: library/configparser.rst:1347 msgid "" "Config parsers allow for heavy customization. If you are interested in " "changing the behaviour outlined by the footnote reference, consult the " diff --git a/library/constants.po b/library/constants.po index d8d06ce4f2..f78760ceae 100644 --- a/library/constants.po +++ b/library/constants.po @@ -107,6 +107,9 @@ msgid "" "currently evaluates as true, it will emit a :exc:`DeprecationWarning`. It " "will raise a :exc:`TypeError` in a future version of Python." msgstr "" +"évaluer ``NotImplemented`` dans un contexte booléen est obsolète. Python " +"l'évalue aujourd'hui à ``True`` mais émet un :exc:`DeprecationWarning`. Il " +"lèvera une :exc:`TypeError` dans une version ultérieure de Python." #: library/constants.rst:62 msgid "" diff --git a/library/contextlib.po b/library/contextlib.po index 58f3814593..930669f5d7 100644 --- a/library/contextlib.po +++ b/library/contextlib.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2019-12-01 23:39+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" +"PO-Revision-Date: 2021-05-23 14:41-0400\n" "Last-Translator: \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.1\n" +"X-Generator: Poedit 2.4.3\n" #: library/contextlib.rst:2 msgid "" @@ -106,16 +106,15 @@ msgstr "" "ressources ::" #: library/contextlib.rst:73 -#, fuzzy msgid "" "The function being decorated must return a :term:`generator`-iterator when " "called. This iterator must yield exactly one value, which will be bound to " "the targets in the :keyword:`with` statement's :keyword:`!as` clause, if any." msgstr "" -"La fonction à décorer doit renvoyer un :term:`générateur-itérateur " -"` quand elle est appelée. Ce générateur ne doit produire " -"qu'une seule valeur, qui est récupérée dans le bloc :keyword:`with` à l'aide " -"de la clause :keyword:`!as` si précisée." +"La fonction à décorer doit renvoyer un :term:`générateur `-" +"itérateur quand elle est appelée. Ce générateur ne doit produire qu'une " +"seule valeur, qui est récupérée dans le bloc :keyword:`with` à l'aide de la " +"clause :keyword:`!as` si précisée." #: library/contextlib.rst:77 msgid "" @@ -230,16 +229,18 @@ msgid "An example using *enter_result*::" msgstr "Un exemple utilisant *enter_result* ::" #: library/contextlib.rst:193 +#, fuzzy msgid "" "Return a context manager that suppresses any of the specified exceptions if " -"they occur in the body of a with statement and then resumes execution with " -"the first statement following the end of the with statement." +"they occur in the body of a :keyword:`!with` statement and then resumes " +"execution with the first statement following the end of the :keyword:`!with` " +"statement." msgstr "" "Renvoie un gestionnaire de contexte qui supprime toutes les exceptions " "spécifiées si elles surviennent dans le corps du bloc *with*, et reprend " "l'exécution sur la première instruction qui suit la fin du bloc *with*." -#: library/contextlib.rst:197 +#: library/contextlib.rst:198 msgid "" "As with any other mechanism that completely suppresses exceptions, this " "context manager should be used only to cover very specific errors where " @@ -251,19 +252,19 @@ msgstr "" "très spécifiques d'erreurs où il est certain que continuer silencieusement " "l'exécution du programme est la bonne chose à faire." -#: library/contextlib.rst:202 +#: library/contextlib.rst:203 msgid "For example::" msgstr "Par exemple ::" -#: library/contextlib.rst:212 +#: library/contextlib.rst:213 msgid "This code is equivalent to::" msgstr "Ce code est équivalent à ::" -#: library/contextlib.rst:263 library/contextlib.rst:273 +#: library/contextlib.rst:265 library/contextlib.rst:275 msgid "This context manager is :ref:`reentrant `." msgstr "Ce gestionnaire de contexte est :ref:`réentrant `." -#: library/contextlib.rst:231 +#: library/contextlib.rst:232 msgid "" "Context manager for temporarily redirecting :data:`sys.stdout` to another " "file or file-like object." @@ -271,7 +272,7 @@ msgstr "" "Gestionnaire de contexte servant à rediriger temporairement :data:`sys." "stdout` vers un autre fichier ou objet fichier-compatible." -#: library/contextlib.rst:234 +#: library/contextlib.rst:235 msgid "" "This tool adds flexibility to existing functions or classes whose output is " "hardwired to stdout." @@ -279,17 +280,20 @@ msgstr "" "Cet outil ajoute une certaine flexibilité aux fonctions ou classes " "existantes dont la sortie est envoyée vers la sortie standard." -#: library/contextlib.rst:237 +#: library/contextlib.rst:238 +#, fuzzy msgid "" "For example, the output of :func:`help` normally is sent to *sys.stdout*. " "You can capture that output in a string by redirecting the output to an :" -"class:`io.StringIO` object::" +"class:`io.StringIO` object. The replacement stream is returned from the " +"``__enter__`` method and so is available as the target of the :keyword:" +"`with` statement::" msgstr "" "Par exemple, la sortie de :func:`help` est normalement envoyée vers *sys." "stdout*. Vous pouvez capturer cette sortie dans une chaîne de caractères en " "la redirigeant vers un objet :class:`io.StringIO` ::" -#: library/contextlib.rst:246 +#: library/contextlib.rst:248 msgid "" "To send the output of :func:`help` to a file on disk, redirect the output to " "a regular file::" @@ -297,11 +301,11 @@ msgstr "" "Pour envoyer la sortie de :func:`help` vers un fichier sur le disque, " "redirigez-la sur un fichier normal ::" -#: library/contextlib.rst:253 +#: library/contextlib.rst:255 msgid "To send the output of :func:`help` to *sys.stderr*::" msgstr "Pour envoyer la sortie de :func:`help` sur *sys.stderr* ::" -#: library/contextlib.rst:258 +#: library/contextlib.rst:260 msgid "" "Note that the global side effect on :data:`sys.stdout` means that this " "context manager is not suitable for use in library code and most threaded " @@ -315,7 +319,7 @@ msgstr "" "Cependant, cela reste une approche utile pour beaucoup de scripts " "utilitaires." -#: library/contextlib.rst:270 +#: library/contextlib.rst:272 msgid "" "Similar to :func:`~contextlib.redirect_stdout` but redirecting :data:`sys." "stderr` to another file or file-like object." @@ -323,14 +327,14 @@ msgstr "" "Similaire à :func:`~contextlib.redirect_stdout` mais redirige :data:`sys." "stderr` vers un autre fichier ou objet fichier-compatible." -#: library/contextlib.rst:280 +#: library/contextlib.rst:282 msgid "" "A base class that enables a context manager to also be used as a decorator." msgstr "" "Une classe mère qui permet à un gestionnaire de contexte d'être aussi " "utilisé comme décorateur." -#: library/contextlib.rst:282 +#: library/contextlib.rst:284 msgid "" "Context managers inheriting from ``ContextDecorator`` have to implement " "``__enter__`` and ``__exit__`` as normal. ``__exit__`` retains its optional " @@ -341,7 +345,7 @@ msgstr "" "conserve sa gestion optionnelle des exceptions même lors de l'utilisation en " "décorateur." -#: library/contextlib.rst:286 +#: library/contextlib.rst:288 msgid "" "``ContextDecorator`` is used by :func:`contextmanager`, so you get this " "functionality automatically." @@ -349,22 +353,22 @@ msgstr "" "``ContextDecorator`` est utilisé par :func:`contextmanager`, donc vous " "bénéficiez automatiquement de cette fonctionnalité." -#: library/contextlib.rst:289 +#: library/contextlib.rst:291 msgid "Example of ``ContextDecorator``::" msgstr "Exemple de ``ContextDecorator`` ::" -#: library/contextlib.rst:318 +#: library/contextlib.rst:320 msgid "" "This change is just syntactic sugar for any construct of the following form::" msgstr "" "Ce changement est simplement un sucre syntaxique pour les constructions de " "la forme suivante ::" -#: library/contextlib.rst:324 +#: library/contextlib.rst:326 msgid "``ContextDecorator`` lets you instead write::" msgstr "``ContextDecorator`` vous permet d'écrire à la place ::" -#: library/contextlib.rst:330 +#: library/contextlib.rst:332 msgid "" "It makes it clear that the ``cm`` applies to the whole function, rather than " "just a piece of it (and saving an indentation level is nice, too)." @@ -373,7 +377,7 @@ msgstr "" "seulement à un morceau en particulier (et gagner un niveau d'indentation est " "toujours appréciable)." -#: library/contextlib.rst:333 +#: library/contextlib.rst:335 msgid "" "Existing context managers that already have a base class can be extended by " "using ``ContextDecorator`` as a mixin class::" @@ -381,7 +385,7 @@ msgstr "" "Les gestionnaires de contexte existants qui ont déjà une classe mère peuvent " "être étendus en utilisant ``ContextDecorator`` comme une *mixin* ::" -#: library/contextlib.rst:346 +#: library/contextlib.rst:348 msgid "" "As the decorated function must be able to be called multiple times, the " "underlying context manager must support use in multiple :keyword:`with` " @@ -394,7 +398,7 @@ msgstr "" "construction d'origine avec de multiples instructions :keyword:`!with` au " "sein de la fonction doit être utilisée." -#: library/contextlib.rst:356 +#: library/contextlib.rst:358 msgid "" "A context manager that is designed to make it easy to programmatically " "combine other context managers and cleanup functions, especially those that " @@ -405,7 +409,7 @@ msgstr "" "nettoyage, spécifiquement ceux qui sont optionnels ou pilotés par des " "données d'entrée." -#: library/contextlib.rst:360 +#: library/contextlib.rst:362 msgid "" "For example, a set of files may easily be handled in a single with statement " "as follows::" @@ -413,7 +417,13 @@ msgstr "" "Par exemple, un ensemble de fichiers peut facilement être géré dans une " "unique instruction *with* comme suit ::" -#: library/contextlib.rst:369 +#: library/contextlib.rst:371 +msgid "" +"The :meth:`__enter__` method returns the :class:`ExitStack` instance, and " +"performs no additional operations." +msgstr "" + +#: library/contextlib.rst:374 msgid "" "Each instance maintains a stack of registered callbacks that are called in " "reverse order when the instance is closed (either explicitly or implicitly " @@ -426,7 +436,7 @@ msgstr "" "que ces fonctions ne sont *pas* invoquées implicitement quand l'instance de " "la pile de contextes est collectée par le ramasse-miettes." -#: library/contextlib.rst:374 +#: library/contextlib.rst:379 msgid "" "This stack model is used so that context managers that acquire their " "resources in their ``__init__`` method (such as file objects) can be handled " @@ -436,7 +446,7 @@ msgstr "" "acquièrent leurs ressources dans leur méthode ``__init__`` (tels que les " "objets-fichiers) puissent être gérés correctement." -#: library/contextlib.rst:378 +#: library/contextlib.rst:383 msgid "" "Since registered callbacks are invoked in the reverse order of registration, " "this ends up behaving as if multiple nested :keyword:`with` statements had " @@ -452,7 +462,7 @@ msgstr "" "de rappel intérieure supprime ou remplace une exception, alors les fonctions " "extérieures reçoivent des arguments basés sur ce nouvel état." -#: library/contextlib.rst:385 +#: library/contextlib.rst:390 msgid "" "This is a relatively low level API that takes care of the details of " "correctly unwinding the stack of exit callbacks. It provides a suitable " @@ -464,7 +474,7 @@ msgstr "" "pour des gestionnaires de contexte de plus haut niveau qui manipulent la " "pile de sortie de manière spécifique à l'application." -#: library/contextlib.rst:394 +#: library/contextlib.rst:399 msgid "" "Enters a new context manager and adds its :meth:`__exit__` method to the " "callback stack. The return value is the result of the context manager's own :" @@ -474,7 +484,7 @@ msgstr "" "`__exit__` à la pile d'appels. La valeur de retour est le résultat de la " "méthode :meth:`__enter__` du gestionnaire de contexte donné." -#: library/contextlib.rst:398 +#: library/contextlib.rst:403 msgid "" "These context managers may suppress exceptions just as they normally would " "if used directly as part of a :keyword:`with` statement." @@ -483,13 +493,13 @@ msgstr "" "feraient normalement s'ils étaient utilisés directement derrière une " "instruction :keyword:`with`." -#: library/contextlib.rst:403 +#: library/contextlib.rst:408 msgid "Adds a context manager's :meth:`__exit__` method to the callback stack." msgstr "" "Ajoute la méthode :meth:`__exit__` d'un gestionnaire de contexte à la pile " "d'appels." -#: library/contextlib.rst:405 +#: library/contextlib.rst:410 msgid "" "As ``__enter__`` is *not* invoked, this method can be used to cover part of " "an :meth:`__enter__` implementation with a context manager's own :meth:" @@ -499,7 +509,7 @@ msgstr "" "pour couvrir une partie de l'implémentation de :meth:`__enter__` avec la " "propre méthode :meth:`__exit__` d'un gestionnaire de contexte." -#: library/contextlib.rst:409 +#: library/contextlib.rst:414 msgid "" "If passed an object that is not a context manager, this method assumes it is " "a callback with the same signature as a context manager's :meth:`__exit__` " @@ -510,7 +520,7 @@ msgstr "" "meth:`__exit__` des gestionnaires de contexte pour l'ajouter directement à " "la pile d'appels." -#: library/contextlib.rst:413 +#: library/contextlib.rst:418 msgid "" "By returning true values, these callbacks can suppress exceptions the same " "way context manager :meth:`__exit__` methods can." @@ -519,7 +529,7 @@ msgstr "" "exceptions de la même manière que le peuvent les méthodes :meth:`__exit__` " "des gestionnaires de contexte." -#: library/contextlib.rst:416 +#: library/contextlib.rst:421 msgid "" "The passed in object is returned from the function, allowing this method to " "be used as a function decorator." @@ -527,7 +537,7 @@ msgstr "" "L'objet passé en paramètre est renvoyé par la fonction, ce qui permet à la " "méthode d'être utilisée comme décorateur de fonction." -#: library/contextlib.rst:421 +#: library/contextlib.rst:426 msgid "" "Accepts an arbitrary callback function and arguments and adds it to the " "callback stack." @@ -535,7 +545,7 @@ msgstr "" "Accepte une fonction arbitraire et ses arguments et les ajoute à la pile des " "fonctions de rappel." -#: library/contextlib.rst:424 +#: library/contextlib.rst:429 msgid "" "Unlike the other methods, callbacks added this way cannot suppress " "exceptions (as they are never passed the exception details)." @@ -544,7 +554,7 @@ msgstr "" "cette manière ne peuvent pas supprimer les exceptions (puisqu'elles ne " "reçoivent jamais les détails de l'exception)." -#: library/contextlib.rst:427 +#: library/contextlib.rst:432 msgid "" "The passed in callback is returned from the function, allowing this method " "to be used as a function decorator." @@ -552,7 +562,7 @@ msgstr "" "La fonction passée en paramètre est renvoyée par la méthode, ce qui permet à " "la méthode d'être utilisée comme décorateur de fonction." -#: library/contextlib.rst:432 +#: library/contextlib.rst:437 msgid "" "Transfers the callback stack to a fresh :class:`ExitStack` instance and " "returns it. No callbacks are invoked by this operation - instead, they will " @@ -564,7 +574,7 @@ msgstr "" "la place, elles sont dorénavant invoquées quand la nouvelle pile sera close " "(soit explicitement soit implicitement à la fin d'un bloc :keyword:`with`)." -#: library/contextlib.rst:437 +#: library/contextlib.rst:442 msgid "" "For example, a group of files can be opened as an \"all or nothing\" " "operation as follows::" @@ -572,7 +582,7 @@ msgstr "" "Par exemple, un groupe de fichiers peut être ouvert comme une opération " "« tout ou rien » comme suit ::" -#: library/contextlib.rst:451 +#: library/contextlib.rst:456 msgid "" "Immediately unwinds the callback stack, invoking callbacks in the reverse " "order of registration. For any context managers and exit callbacks " @@ -583,7 +593,7 @@ msgstr "" "et fonction de sortie enregistré, les arguments passés indiqueront qu'aucune " "exception n'est survenue." -#: library/contextlib.rst:458 +#: library/contextlib.rst:463 msgid "" "An :ref:`asynchronous context manager `, similar to :" "class:`ExitStack`, that supports combining both synchronous and asynchronous " @@ -594,7 +604,7 @@ msgstr "" "de contexte synchrones et asynchrones, ainsi que la gestion de coroutines " "pour la logique de nettoyage." -#: library/contextlib.rst:463 +#: library/contextlib.rst:468 msgid "" "The :meth:`close` method is not implemented, :meth:`aclose` must be used " "instead." @@ -602,14 +612,14 @@ msgstr "" "La méthode :meth:`close` n'est pas implémentée, :meth:`aclose` doit plutôt " "être utilisée." -#: library/contextlib.rst:468 +#: library/contextlib.rst:473 msgid "" "Similar to :meth:`enter_context` but expects an asynchronous context manager." msgstr "" "Similaire à :meth:`enter_context` mais attend un gestionnaire de contexte " "asynchrone." -#: library/contextlib.rst:473 +#: library/contextlib.rst:478 msgid "" "Similar to :meth:`push` but expects either an asynchronous context manager " "or a coroutine function." @@ -617,24 +627,24 @@ msgstr "" "Similaire à :meth:`push` mais attend soit un gestionnaire de contexte " "asynchrone soit une fonction coroutine." -#: library/contextlib.rst:478 +#: library/contextlib.rst:483 msgid "Similar to :meth:`callback` but expects a coroutine function." msgstr "Similaire à :meth:`callback` mais attend une fonction coroutine." -#: library/contextlib.rst:482 +#: library/contextlib.rst:487 msgid "Similar to :meth:`close` but properly handles awaitables." msgstr "" "Similaire à :meth:`close` mais gère correctement les tâches asynchrones." -#: library/contextlib.rst:484 +#: library/contextlib.rst:489 msgid "Continuing the example for :func:`asynccontextmanager`::" msgstr "En continuité de l'exemple de :func:`asynccontextmanager` ::" -#: library/contextlib.rst:496 +#: library/contextlib.rst:501 msgid "Examples and Recipes" msgstr "Exemples et Recettes" -#: library/contextlib.rst:498 +#: library/contextlib.rst:503 msgid "" "This section describes some examples and recipes for making effective use of " "the tools provided by :mod:`contextlib`." @@ -642,11 +652,11 @@ msgstr "" "Cette section décrit quelques exemples et recettes pour décrire une " "utilisation réelle des outils fournis par :mod:`contextlib`." -#: library/contextlib.rst:503 +#: library/contextlib.rst:508 msgid "Supporting a variable number of context managers" msgstr "Gérer un nombre variable de gestionnaires de contexte" -#: library/contextlib.rst:505 +#: library/contextlib.rst:510 msgid "" "The primary use case for :class:`ExitStack` is the one given in the class " "documentation: supporting a variable number of context managers and other " @@ -663,7 +673,7 @@ msgstr "" "collection spécifique de fichiers de l'utilisateur), ou de certains " "gestionnaires de contexte qui peuvent être optionnels ::" -#: library/contextlib.rst:520 +#: library/contextlib.rst:525 msgid "" "As shown, :class:`ExitStack` also makes it quite easy to use :keyword:`with` " "statements to manage arbitrary resources that don't natively support the " @@ -673,11 +683,11 @@ msgstr "" "instructions :keyword:`with` pour gérer des ressources arbitraires qui ne " "gèrent pas nativement le protocole des gestionnaires de contexte." -#: library/contextlib.rst:526 +#: library/contextlib.rst:531 msgid "Catching exceptions from ``__enter__`` methods" msgstr "Attraper des exceptions depuis les méthodes ``__enter__``" -#: library/contextlib.rst:528 +#: library/contextlib.rst:533 msgid "" "It is occasionally desirable to catch exceptions from an ``__enter__`` " "method implementation, *without* inadvertently catching exceptions from the :" @@ -692,7 +702,7 @@ msgstr "" "`ExitStack`, les étapes du protocole des gestionnaires de contexte peuvent " "être légèrement séparées pour permettre le code suivant ::" -#: library/contextlib.rst:543 +#: library/contextlib.rst:548 msgid "" "Actually needing to do this is likely to indicate that the underlying API " "should be providing a direct resource management interface for use with :" @@ -711,11 +721,11 @@ msgstr "" "gestion de plusieurs situations qui ne peuvent pas être traitées directement " "dans une instruction :keyword:`with`." -#: library/contextlib.rst:553 +#: library/contextlib.rst:558 msgid "Cleaning up in an ``__enter__`` implementation" msgstr "Nettoyer dans une méthode ``__enter__``" -#: library/contextlib.rst:555 +#: library/contextlib.rst:560 msgid "" "As noted in the documentation of :meth:`ExitStack.push`, this method can be " "useful in cleaning up an already allocated resource if later steps in the :" @@ -725,7 +735,7 @@ msgstr "" "peut être utile pour nettoyer une ressource déjà allouée si les dernières " "étapes de l'implémentation de :meth:`__enter__` échouent." -#: library/contextlib.rst:559 +#: library/contextlib.rst:564 msgid "" "Here's an example of doing this for a context manager that accepts resource " "acquisition and release functions, along with an optional validation " @@ -735,11 +745,11 @@ msgstr "" "d'acquisition de ressources et de libération, avec une méthode de validation " "optionnelle, et qui les adapte au protocole des gestionnaires de contexte ::" -#: library/contextlib.rst:599 +#: library/contextlib.rst:604 msgid "Replacing any use of ``try-finally`` and flag variables" msgstr "Remplacer un ``try-finally`` avec une option variable" -#: library/contextlib.rst:601 +#: library/contextlib.rst:606 msgid "" "A pattern you will sometimes see is a ``try-finally`` statement with a flag " "variable to indicate whether or not the body of the ``finally`` clause " @@ -751,7 +761,7 @@ msgstr "" "ou non. Dans sa forme la plus simple (qui ne peut pas déjà être gérée avec " "juste une clause ``except``), cela ressemble à ::" -#: library/contextlib.rst:615 +#: library/contextlib.rst:620 msgid "" "As with any ``try`` statement based code, this can cause problems for " "development and review, because the setup code and the cleanup code can end " @@ -762,7 +772,7 @@ msgstr "" "codes d'installation et de nettoyage peuvent finir par être séparés par des " "sections de code arbitrairement longues." -#: library/contextlib.rst:619 +#: library/contextlib.rst:624 msgid "" ":class:`ExitStack` makes it possible to instead register a callback for " "execution at the end of a ``with`` statement, and then later decide to skip " @@ -772,7 +782,7 @@ msgstr "" "rappel pour être exécutée à la fin d'une instruction ``with``, et décider " "ensuite de passer l'exécution de cet appel ::" -#: library/contextlib.rst:631 +#: library/contextlib.rst:636 msgid "" "This allows the intended cleanup up behaviour to be made explicit up front, " "rather than requiring a separate flag variable." @@ -780,7 +790,7 @@ msgstr "" "Cela permet de rendre explicite dès le départ le comportement de nettoyage " "attendu, plutôt que de nécessiter une option séparée." -#: library/contextlib.rst:634 +#: library/contextlib.rst:639 msgid "" "If a particular application uses this pattern a lot, it can be simplified " "even further by means of a small helper class::" @@ -788,7 +798,7 @@ msgstr "" "Si une application particulière utilise beaucoup ce modèle, cela peut-être " "simplifié encore plus au moyen d'une petite classe d'aide ::" -#: library/contextlib.rst:652 +#: library/contextlib.rst:657 msgid "" "If the resource cleanup isn't already neatly bundled into a standalone " "function, then it is still possible to use the decorator form of :meth:" @@ -799,7 +809,7 @@ msgstr "" "`ExitStack.callback` pour déclarer la fonction de nettoyage de ressource en " "avance ::" -#: library/contextlib.rst:667 +#: library/contextlib.rst:672 msgid "" "Due to the way the decorator protocol works, a callback function declared " "this way cannot take any parameters. Instead, any resources to be released " @@ -810,12 +820,12 @@ msgstr "" "doivent être récupérées depuis l'extérieur comme des variables de fermeture " "(*closure*)." -#: library/contextlib.rst:673 +#: library/contextlib.rst:678 msgid "Using a context manager as a function decorator" msgstr "" "Utiliser un gestionnaire de contexte en tant que décorateur de fonction" -#: library/contextlib.rst:675 +#: library/contextlib.rst:680 msgid "" ":class:`ContextDecorator` makes it possible to use a context manager in both " "an ordinary ``with`` statement and also as a function decorator." @@ -824,7 +834,7 @@ msgstr "" "contexte à la fois ordinairement avec une instruction ``with`` ou comme un " "décorateur de fonction." -#: library/contextlib.rst:678 +#: library/contextlib.rst:683 msgid "" "For example, it is sometimes useful to wrap functions or groups of " "statements with a logger that can track the time of entry and time of exit. " @@ -839,17 +849,17 @@ msgstr "" "`ContextDecorator` fournit les deux fonctionnalités en une seule " "définition ::" -#: library/contextlib.rst:699 +#: library/contextlib.rst:704 msgid "Instances of this class can be used as both a context manager::" msgstr "" "Les instances de cette classe peuvent être utilisées comme gestionnaires de " "contexte ::" -#: library/contextlib.rst:705 +#: library/contextlib.rst:710 msgid "And also as a function decorator::" msgstr "Et comme décorateurs de fonctions ::" -#: library/contextlib.rst:712 +#: library/contextlib.rst:717 msgid "" "Note that there is one additional limitation when using context managers as " "function decorators: there's no way to access the return value of :meth:" @@ -861,11 +871,11 @@ msgstr "" "de retour de :meth:`__enter__`. Si cette valeur est nécessaire, il faut " "utiliser explicitement une instruction ``with``." -#: library/contextlib.rst:720 +#: library/contextlib.rst:725 msgid ":pep:`343` - The \"with\" statement" msgstr ":pep:`343` - The \"with\" statement" -#: library/contextlib.rst:720 +#: library/contextlib.rst:725 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." @@ -873,11 +883,11 @@ msgstr "" "La spécification, les motivations et des exemples de l'instruction :keyword:" "`with` en Python." -#: library/contextlib.rst:726 +#: library/contextlib.rst:731 msgid "Single use, reusable and reentrant context managers" msgstr "Gestionnaires de contexte à usage unique, réutilisables et réentrants" -#: library/contextlib.rst:728 +#: library/contextlib.rst:733 msgid "" "Most context managers are written in a way that means they can only be used " "effectively in a :keyword:`with` statement once. These single use context " @@ -890,7 +900,7 @@ msgstr "" "chaque fois qu'ils sont utilisés — tenter de les utiliser une seconde fois " "lève une exception ou ne fonctionne pas correctement." -#: library/contextlib.rst:734 +#: library/contextlib.rst:739 msgid "" "This common limitation means that it is generally advisable to create " "context managers directly in the header of the :keyword:`with` statement " @@ -901,7 +911,7 @@ msgstr "" "`with` où ils sont utilisés (comme montré dans tous les exemples " "d'utilisation au-dessus)." -#: library/contextlib.rst:738 +#: library/contextlib.rst:743 msgid "" "Files are an example of effectively single use context managers, since the " "first :keyword:`with` statement will close the file, preventing any further " @@ -912,7 +922,7 @@ msgstr "" "`with` ferme le fichier, empêchant d'autres opérations d'entrée/sortie " "d'être exécutées sur ce fichier." -#: library/contextlib.rst:742 +#: library/contextlib.rst:747 msgid "" "Context managers created using :func:`contextmanager` are also single use " "context managers, and will complain about the underlying generator failing " @@ -922,11 +932,11 @@ msgstr "" "usage unique, et se plaindront du fait que le générateur sous-jacent ne " "produise plus de valeur si vous essayez de les utiliser une seconde fois ::" -#: library/contextlib.rst:770 +#: library/contextlib.rst:775 msgid "Reentrant context managers" msgstr "Gestionnaires de contexte réentrants" -#: library/contextlib.rst:772 +#: library/contextlib.rst:777 msgid "" "More sophisticated context managers may be \"reentrant\". These context " "managers can not only be used in multiple :keyword:`with` statements, but " @@ -939,7 +949,7 @@ msgstr "" "l'intérieur* d'une instruction :keyword:`!with` qui utilise déjà ce même " "gestionnaire de contexte." -#: library/contextlib.rst:777 +#: library/contextlib.rst:782 msgid "" ":class:`threading.RLock` is an example of a reentrant context manager, as " "are :func:`suppress` and :func:`redirect_stdout`. Here's a very simple " @@ -949,7 +959,7 @@ msgstr "" "réentrant, comme le sont aussi :func:`suppress` et :func:`redirect_stdout`. " "Voici un très simple exemple d'utilisation réentrante ::" -#: library/contextlib.rst:796 +#: library/contextlib.rst:801 msgid "" "Real world examples of reentrancy are more likely to involve multiple " "functions calling each other and hence be far more complicated than this " @@ -959,7 +969,7 @@ msgstr "" "fonctions s'entre-appelant, et donc être bien plus compliqués que cet " "exemple." -#: library/contextlib.rst:800 +#: library/contextlib.rst:805 msgid "" "Note also that being reentrant is *not* the same thing as being thread " "safe. :func:`redirect_stdout`, for example, is definitely not thread safe, " @@ -971,18 +981,18 @@ msgstr "" "puisqu'il effectue des changements globaux sur l'état du système en " "branchant :data:`sys.stdout` sur différents flux." -#: library/contextlib.rst:809 +#: library/contextlib.rst:814 msgid "Reusable context managers" msgstr "Gestionnaires de contexte réutilisables" -#: library/contextlib.rst:811 +#: library/contextlib.rst:816 msgid "" -"Distinct from both single use and reentrant context managers are \"reusable" -"\" context managers (or, to be completely explicit, \"reusable, but not " -"reentrant\" context managers, since reentrant context managers are also " -"reusable). These context managers support being used multiple times, but " -"will fail (or otherwise not work correctly) if the specific context manager " -"instance has already been used in a containing with statement." +"Distinct from both single use and reentrant context managers are " +"\"reusable\" context managers (or, to be completely explicit, \"reusable, " +"but not reentrant\" context managers, since reentrant context managers are " +"also reusable). These context managers support being used multiple times, " +"but will fail (or otherwise not work correctly) if the specific context " +"manager instance has already been used in a containing with statement." msgstr "" "D'autres gestionnaires de contexte que ceux à usage unique et les réentrants " "sont les gestionnaires de contexte « réutilisables » (ou, pour être plus " @@ -993,7 +1003,7 @@ msgstr "" "contexte référencée a déjà été utilisée dans une instruction *with* " "englobante." -#: library/contextlib.rst:818 +#: library/contextlib.rst:823 msgid "" ":class:`threading.Lock` is an example of a reusable, but not reentrant, " "context manager (for a reentrant lock, it is necessary to use :class:" @@ -1003,7 +1013,7 @@ msgstr "" "réutilisable mais pas réentrant (pour un verrou réentrant, il faut à la " "place utiliser :class:`threading.RLock`)." -#: library/contextlib.rst:822 +#: library/contextlib.rst:827 msgid "" "Another example of a reusable, but not reentrant, context manager is :class:" "`ExitStack`, as it invokes *all* currently registered callbacks when leaving " @@ -1014,7 +1024,7 @@ msgstr "" "actuellement enregistrées en quittant l'instruction *with*, sans regarder où " "ces fonctions ont été ajoutées ::" -#: library/contextlib.rst:853 +#: library/contextlib.rst:858 msgid "" "As the output from the example shows, reusing a single stack object across " "multiple with statements works correctly, but attempting to nest them will " @@ -1026,7 +1036,7 @@ msgstr "" "imbriquer fait que la pile est vidée à la fin du *with* le plus imbriqué, ce " "qui n'est probablement pas le comportement voulu." -#: library/contextlib.rst:858 +#: library/contextlib.rst:863 msgid "" "Using separate :class:`ExitStack` instances instead of reusing a single " "instance avoids that problem::" diff --git a/library/contextvars.po b/library/contextvars.po index 2e975e1dc7..601f3a1602 100644 --- a/library/contextvars.po +++ b/library/contextvars.po @@ -5,18 +5,19 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2018-08-03 23:47+0200\n" -"Last-Translator: Julien Palard \n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" +"PO-Revision-Date: 2021-05-26 21:26-0400\n" +"Last-Translator: Martin Chlumsky \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.3\n" #: library/contextvars.rst:2 msgid ":mod:`contextvars` --- Context Variables" -msgstr "" +msgstr ":mod:`contextvars` — Variables de contexte" #: library/contextvars.rst:11 msgid "" @@ -26,6 +27,12 @@ msgid "" "the :class:`~contextvars.Context` class should be used to manage the current " "context in asynchronous frameworks." msgstr "" +"Ce module fournit des API pour gérer, stocker et accéder à l'état local de " +"contexte. La classe :class:`~contextvars.ContextVar` est utilisée pour " +"déclarer et travailler avec les *Variables de contexte*. La fonction :func:" +"`~contextvars.copy_context` et la classe :class:`~contextvars.Context` " +"doivent être utilisées pour la gestion du contexte actuel dans les " +"cadriciels asynchrones." #: library/contextvars.rst:17 msgid "" @@ -33,23 +40,31 @@ msgid "" "func:`threading.local()` to prevent their state from bleeding to other code " "unexpectedly, when used in concurrent code." msgstr "" +"Les gestionnaires de contexte, quand ils ont un état et quand ils sont " +"utilisés dans du code s'exécutant de manière concurrente, doivent utiliser " +"les variables de contexte au lieu de :func:`threading.local()` pour empêcher " +"que leur état ne perturbe un autre fil de manière inattendue." #: library/contextvars.rst:21 msgid "See also :pep:`567` for additional details." -msgstr "" +msgstr "Voir aussi :pep:`567` pour plus de détails." #: library/contextvars.rst:27 msgid "Context Variables" -msgstr "" +msgstr "Variables de contexte" #: library/contextvars.rst:31 msgid "This class is used to declare a new Context Variable, e.g.::" msgstr "" +"Cette classe est utilisée pour déclarer une nouvelle variable de contexte, " +"p. ex. ::" #: library/contextvars.rst:35 msgid "" "The required *name* parameter is used for introspection and debug purposes." msgstr "" +"Le paramètre requis *name* est utilisé à des fins d'introspection et de " +"débogage." #: library/contextvars.rst:38 msgid "" @@ -57,6 +72,8 @@ msgid "" "`ContextVar.get` when no value for the variable is found in the current " "context." msgstr "" +"Le paramètre nommé *default* est renvoyé par :meth:`ContextVar.get` quand " +"aucune valeur n'est trouvée dans le contexte actuel pour la variable." #: library/contextvars.rst:42 msgid "" @@ -65,57 +82,80 @@ msgid "" "context variables which prevents context variables from being properly " "garbage collected." msgstr "" +"**Important :** les variables de contexte doivent être créées au plus haut " +"niveau du module et jamais dans des fermetures (*closures*). Les objets :" +"class:`Context` maintiennent des références fortes aux variables de contexte " +"ce qui empêche que les variables de contexte soient correctement nettoyées " +"par le ramasse-miette." #: library/contextvars.rst:49 msgid "The name of the variable. This is a read-only property." -msgstr "" +msgstr "Nom de la variable. Cette propriété est en lecture seule." #: library/contextvars.rst:55 msgid "Return a value for the context variable for the current context." -msgstr "" +msgstr "Renvoie la valeur de la variable de contexte pour le contexte actuel." #: library/contextvars.rst:57 msgid "" "If there is no value for the variable in the current context, the method " "will:" msgstr "" +"S'il n'y a pas de valeur pour la variable dans le contexte actuel, la " +"méthode :" #: library/contextvars.rst:60 msgid "" "return the value of the *default* argument of the method, if provided; or" msgstr "" +"renvoie la valeur de l'argument *default* passé à la méthode, s'il a été " +"fourni ;" #: library/contextvars.rst:63 msgid "" "return the default value for the context variable, if it was created with " "one; or" msgstr "" +"ou renvoie la valeur par défaut de la variable de contexte, si elle a été " +"créée avec une valeur par défaut ;" +# padpo se plaint ici pour le verbe lever mais on peut l'ignorer pour +# préserver le présent de l'indicatif en accord avec les "renvoie" dans les +# autres items de la liste. #: library/contextvars.rst:66 msgid "raise a :exc:`LookupError`." -msgstr "" +msgstr "ou lève une erreur :exc:`LookupError`." #: library/contextvars.rst:70 msgid "" "Call to set a new value for the context variable in the current context." msgstr "" +"Assigne une nouvelle valeur à la variable de contexte dans le contexte " +"actuel." #: library/contextvars.rst:73 msgid "" "The required *value* argument is the new value for the context variable." msgstr "" +"L'argument requis *value* est la nouvelle valeur pour la variable de " +"contexte." #: library/contextvars.rst:76 msgid "" "Returns a :class:`~contextvars.Token` object that can be used to restore the " "variable to its previous value via the :meth:`ContextVar.reset` method." msgstr "" +"Renvoie un objet :class:`~contextvars.Token` qui peut être utilisé pour " +"rétablir la variable à sa valeur précédente par la méthode :meth:`ContextVar." +"reset`." #: library/contextvars.rst:82 msgid "" "Reset the context variable to the value it had before the :meth:`ContextVar." "set` that created the *token* was used." msgstr "" +"Réinitialise la variable de contexte à la valeur qu'elle avait avant l'appel " +"de :meth:`ContextVar.set` qui a créé le *token*." #: library/contextvars.rst:85 msgid "For example::" @@ -127,12 +167,17 @@ msgid "" "be passed to the :meth:`ContextVar.reset` method to revert the value of the " "variable to what it was before the corresponding *set*." msgstr "" +"Les objets *Token* sont renvoyés par la méthode :meth:`ContextVar.set`. Ils " +"peuvent être passés à la méthode :meth:`ContextVar.reset` pour réaffecter la " +"valeur de la variable à ce qu'elle était avant le *set* correspondant." #: library/contextvars.rst:106 msgid "" "A read-only property. Points to the :class:`ContextVar` object that created " "the token." msgstr "" +"Propriété en lecture seule. Pointe vers l'objet :class:`ContextVar` qui a " +"créé le token." #: library/contextvars.rst:111 msgid "" @@ -140,116 +185,170 @@ msgid "" "`ContextVar.set` method call that created the token. It points to :attr:" "`Token.MISSING` is the variable was not set before the call." msgstr "" +"Propriété en lecture seule. Sa valeur est celle que la variable avait avant " +"l'appel à la méthode :meth:`ContextVar.set` qui a créé le jeton. Elle pointe " +"à :attr:`Token.MISSING` si la variable n'est pas définie avant l'appel." #: library/contextvars.rst:118 msgid "A marker object used by :attr:`Token.old_value`." -msgstr "" +msgstr "Objet marqueur utilisé par :attr:`Token.old_value`." #: library/contextvars.rst:122 msgid "Manual Context Management" -msgstr "" +msgstr "Gestion de contexte manuelle" #: library/contextvars.rst:126 msgid "Returns a copy of the current :class:`~contextvars.Context` object." -msgstr "" +msgstr "Renvoie une copie de l'objet :class:`~contextvars.Context` actuel." #: library/contextvars.rst:128 msgid "" "The following snippet gets a copy of the current context and prints all " "variables and their values that are set in it::" msgstr "" +"Le fragment de code qui suit obtient une copie du contexte actuel et affiche " +"toutes les variables avec leurs valeurs définies dans ce contexte." #: library/contextvars.rst:134 msgid "" "The function has an O(1) complexity, i.e. works equally fast for contexts " "with a few context variables and for contexts that have a lot of them." msgstr "" +"La fonction a une complexité O(1), c.-à-d. qu'elle fonctionne aussi " +"rapidement pour des contextes avec peu de variables de contexte que pour des " +"contextes qui en ont beaucoup." #: library/contextvars.rst:141 msgid "A mapping of :class:`ContextVars ` to their values." msgstr "" +"Tableau associatif entre :class:`ContextVars ` et leurs valeurs." #: library/contextvars.rst:143 msgid "" "``Context()`` creates an empty context with no values in it. To get a copy " "of the current context use the :func:`~contextvars.copy_context` function." msgstr "" +"``Context()`` crée un contexte vide ne contenant aucune valeur. Pour obtenir " +"une copie du contexte actuel, utilisez la fonction :func:`~contextvars." +"copy_context`." #: library/contextvars.rst:147 -msgid "Context implements the :class:`collections.abc.Mapping` interface." +msgid "" +"Every thread will have a different top-level :class:`~contextvars.Context` " +"object. This means that a :class:`ContextVar` object behaves in a similar " +"fashion to :func:`threading.local()` when values are assigned in different " +"threads." msgstr "" -#: library/contextvars.rst:151 +#: library/contextvars.rst:152 +msgid "Context implements the :class:`collections.abc.Mapping` interface." +msgstr "*Context* implémente l'interface :class:`collections.abc.Mapping`." + +# padpo lance 3 warnings ici, mais en fait tout semble correct. Si on enlève +# les * de args/kwargs, il n'y a plus de warnings. Je suspecte un bug dans +# padpo. +# library/contextvars.po:238: warning: Incohérence : l’espace insécable à côté +# de l’espace sécable n’a pas d’effet. => ###ntexte sur lequel est appelée la +# méthode  »run*. Ren### +# library/contextvars.po:238: warning: Il manque un espace. => ###xte sur +# lequel est appelée la méthode  »run*. Renvoie### +# library/contextvars.po:238: warning: Mot inconnu : run => ###xte sur lequel +# est appelée la méthode  »run*. Renvoie### +#: library/contextvars.rst:156 msgid "" "Execute ``callable(*args, **kwargs)`` code in the context object the *run* " "method is called on. Return the result of the execution or propagate an " "exception if one occurred." msgstr "" +"Exécute le code ``callable(*args, **kwargs)`` dans le contexte défini par " +"l'objet. Renvoie le résultat de l'exécution ou propage une exception s'il y " +"en a une qui s'est produite." -#: library/contextvars.rst:155 +#: library/contextvars.rst:160 msgid "" "Any changes to any context variables that *callable* makes will be contained " "in the context object::" msgstr "" +"Tout changement apporté aux variables de contexte effectué par *callable* " +"sera contenu dans l'objet de contexte ::" -#: library/contextvars.rst:184 +#: library/contextvars.rst:189 msgid "" "The method raises a :exc:`RuntimeError` when called on the same context " "object from more than one OS thread, or when called recursively." msgstr "" +"La méthode lève une :exc:`RuntimeError` quand elle est appelée sur le même " +"objet de contexte depuis plus qu'un fil d'exécution ou quand elle est " +"appelée récursivement." -#: library/contextvars.rst:190 +#: library/contextvars.rst:195 msgid "Return a shallow copy of the context object." -msgstr "" +msgstr "Renvoie une copie de surface de l'objet de contexte." -#: library/contextvars.rst:194 +#: library/contextvars.rst:199 msgid "" "Return ``True`` if the *context* has a value for *var* set; return ``False`` " "otherwise." msgstr "" +"Renvoie ``True`` si le *context* a une valeur pour *var* ; sinon renvoie " +"``False``." -#: library/contextvars.rst:199 +#: library/contextvars.rst:204 msgid "" "Return the value of the *var* :class:`ContextVar` variable. If the variable " "is not set in the context object, a :exc:`KeyError` is raised." msgstr "" +"Renvoie la valeur de la variable :class:`ContextVar` *var*. Si la variable " +"n'est pas définie dans l'objet de contexte, une :exc:`KeyError` est levée." -#: library/contextvars.rst:205 +#: library/contextvars.rst:210 msgid "" "Return the value for *var* if *var* has the value in the context object. " "Return *default* otherwise. If *default* is not given, return ``None``." msgstr "" +"Renvoie la valeur de *var* si *var* possède une valeur dans l'objet de " +"contexte. Renvoie *default* sinon (ou ``None`` si *default* n'est pas donné)." -#: library/contextvars.rst:211 +#: library/contextvars.rst:216 msgid "Return an iterator over the variables stored in the context object." msgstr "" +"Renvoie un itérateur sur les variables stockées dans l'objet de contexte." -#: library/contextvars.rst:216 +#: library/contextvars.rst:221 msgid "Return the number of variables set in the context object." -msgstr "" +msgstr "Renvoie le nombre de variables définies dans l'objet de contexte." -#: library/contextvars.rst:220 +#: library/contextvars.rst:225 msgid "Return a list of all variables in the context object." -msgstr "" +msgstr "Renvoie une liste de toutes les variables dans l'objet de contexte." -#: library/contextvars.rst:224 +#: library/contextvars.rst:229 msgid "Return a list of all variables' values in the context object." msgstr "" +"Renvoie une liste de toutes les valeurs des variables dans l'objet de " +"contexte." -#: library/contextvars.rst:229 +#: library/contextvars.rst:234 msgid "" "Return a list of 2-tuples containing all variables and their values in the " "context object." msgstr "" +"Renvoie une liste de paires contenant toutes les variables et leurs valeurs " +"dans l'objet de contexte." -#: library/contextvars.rst:234 +#: library/contextvars.rst:239 msgid "asyncio support" -msgstr "" +msgstr "Gestion avec *asyncio*" -#: library/contextvars.rst:236 +#: library/contextvars.rst:241 msgid "" "Context variables are natively supported in :mod:`asyncio` and are ready to " "be used without any extra configuration. For example, here is a simple echo " "server, that uses a context variable to make the address of a remote client " "available in the Task that handles that client::" msgstr "" +":mod:`asyncio` gère nativement les variables de contexte et elles sont " +"prêtes à être utilisées sans configuration supplémentaire. Par exemple, " +"voici un serveur *echo* simple qui utilise une variable de contexte pour que " +"l’adresse d'un client distant soit disponible dans le *Task* qui gère ce " +"client ::" diff --git a/library/copy.po b/library/copy.po index e5dfb381ff..3d622ebd8a 100644 --- a/library/copy.po +++ b/library/copy.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-02-21 17:18+0100\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -127,9 +127,10 @@ msgstr "" "ou l'ensemble de composants copiés." #: library/copy.rst:62 +#, fuzzy msgid "" "This module does not copy types like module, method, stack trace, stack " -"frame, file, socket, window, array, or any similar types. It does \"copy\" " +"frame, file, socket, window, or any similar types. It does \"copy\" " "functions and classes (shallow and deeply), by returning the original object " "unchanged; this is compatible with the way these are treated by the :mod:" "`pickle` module." diff --git a/library/copyreg.po b/library/copyreg.po index cd5968bde1..58abbd12bf 100644 --- a/library/copyreg.po +++ b/library/copyreg.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-11-23 15:14+0100\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -60,11 +60,12 @@ msgstr "" "éléments." #: library/copyreg.rst:34 +#, fuzzy msgid "" "The optional *constructor* parameter, if provided, is a callable object " "which can be used to reconstruct the object when called with the tuple of " -"arguments returned by *function* at pickling time. :exc:`TypeError` will be " -"raised if *object* is a class or *constructor* is not callable." +"arguments returned by *function* at pickling time. A :exc:`TypeError` is " +"raised if the *constructor* is not callable." msgstr "" "Le paramètre optionnel *contructor*, s'il est donné, est un objet appelable " "qui peux être utilisé pour reconstruire l’objet lorsqu'il est appelé avec un " diff --git a/library/crypt.po b/library/crypt.po index 1afd6f7e19..fe23e78f7e 100644 --- a/library/crypt.po +++ b/library/crypt.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -18,12 +18,19 @@ msgstr "" msgid ":mod:`crypt` --- Function to check Unix passwords" msgstr "" -#: library/crypt.rst:12 +#: library/crypt.rst:13 #, fuzzy msgid "**Source code:** :source:`Lib/crypt.py`" msgstr "**Code source :** :source:`Lib/pty.py`" -#: library/crypt.rst:20 +#: library/crypt.rst:19 +msgid "" +"The :mod:`crypt` module is deprecated (see :pep:`PEP 594 <594#crypt>` for " +"details and alternatives). The :mod:`hashlib` module is a potential " +"replacement for certain use cases." +msgstr "" + +#: library/crypt.rst:26 msgid "" "This module implements an interface to the :manpage:`crypt(3)` routine, " "which is a one-way hash function based upon a modified DES algorithm; see " @@ -32,7 +39,7 @@ msgid "" "attempting to crack Unix passwords with a dictionary." msgstr "" -#: library/crypt.rst:28 +#: library/crypt.rst:34 msgid "" "Notice that the behavior of this module depends on the actual " "implementation of the :manpage:`crypt(3)` routine in the running system. " @@ -40,125 +47,125 @@ msgid "" "be available on this module." msgstr "" -#: library/crypt.rst:34 +#: library/crypt.rst:40 msgid ":ref:`Availability `: Unix. Not available on VxWorks." msgstr "" -#: library/crypt.rst:36 +#: library/crypt.rst:42 msgid "Hashing Methods" msgstr "" -#: library/crypt.rst:40 +#: library/crypt.rst:46 msgid "" "The :mod:`crypt` module defines the list of hashing methods (not all methods " "are available on all platforms):" msgstr "" -#: library/crypt.rst:45 +#: library/crypt.rst:51 msgid "" "A Modular Crypt Format method with 16 character salt and 86 character hash " "based on the SHA-512 hash function. This is the strongest method." msgstr "" -#: library/crypt.rst:50 +#: library/crypt.rst:56 msgid "" "Another Modular Crypt Format method with 16 character salt and 43 character " "hash based on the SHA-256 hash function." msgstr "" -#: library/crypt.rst:55 +#: library/crypt.rst:61 msgid "" "Another Modular Crypt Format method with 22 character salt and 31 character " "hash based on the Blowfish cipher." msgstr "" -#: library/crypt.rst:62 +#: library/crypt.rst:68 msgid "" "Another Modular Crypt Format method with 8 character salt and 22 character " "hash based on the MD5 hash function." msgstr "" -#: library/crypt.rst:67 +#: library/crypt.rst:73 msgid "" "The traditional method with a 2 character salt and 13 characters of hash. " "This is the weakest method." msgstr "" -#: library/crypt.rst:72 +#: library/crypt.rst:78 msgid "Module Attributes" msgstr "" -#: library/crypt.rst:78 +#: library/crypt.rst:84 msgid "" "A list of available password hashing algorithms, as ``crypt.METHOD_*`` " "objects. This list is sorted from strongest to weakest." msgstr "" -#: library/crypt.rst:84 +#: library/crypt.rst:90 msgid "Module Functions" msgstr "" -#: library/crypt.rst:86 +#: library/crypt.rst:92 #, fuzzy msgid "The :mod:`crypt` module defines the following functions:" msgstr "Le module :mod:`pty` expose les fonctions suivantes :" -#: library/crypt.rst:90 +#: library/crypt.rst:96 msgid "" "*word* will usually be a user's password as typed at a prompt or in a " "graphical interface. The optional *salt* is either a string as returned " "from :func:`mksalt`, one of the ``crypt.METHOD_*`` values (though not all " "may be available on all platforms), or a full encrypted password including " "salt, as returned by this function. If *salt* is not provided, the " -"strongest method will be used (as returned by :func:`methods`)." +"strongest method available in :attr:`methods` will be used." msgstr "" -#: library/crypt.rst:98 +#: library/crypt.rst:103 msgid "" "Checking a password is usually done by passing the plain-text password as " "*word* and the full results of a previous :func:`crypt` call, which should " "be the same as the results of this call." msgstr "" -#: library/crypt.rst:102 +#: library/crypt.rst:107 msgid "" -"*salt* (either a random 2 or 16 character string, possibly prefixed with ``" -"$digit$`` to indicate the method) which will be used to perturb the " +"*salt* (either a random 2 or 16 character string, possibly prefixed with " +"``$digit$`` to indicate the method) which will be used to perturb the " "encryption algorithm. The characters in *salt* must be in the set ``[./a-zA-" -"Z0-9]``, with the exception of Modular Crypt Format which prefixes a ``$digit" -"$``." +"Z0-9]``, with the exception of Modular Crypt Format which prefixes a " +"``$digit$``." msgstr "" -#: library/crypt.rst:108 +#: library/crypt.rst:113 msgid "" "Returns the hashed password as a string, which will be composed of " "characters from the same alphabet as the salt." msgstr "" -#: library/crypt.rst:113 +#: library/crypt.rst:118 msgid "" "Since a few :manpage:`crypt(3)` extensions allow different values, with " "different sizes in the *salt*, it is recommended to use the full crypted " "password as salt when checking for a password." msgstr "" -#: library/crypt.rst:117 +#: library/crypt.rst:122 msgid "Accept ``crypt.METHOD_*`` values in addition to strings for *salt*." msgstr "" -#: library/crypt.rst:123 +#: library/crypt.rst:128 msgid "" "Return a randomly generated salt of the specified method. If no *method* is " -"given, the strongest method available as returned by :func:`methods` is used." +"given, the strongest method available in :attr:`methods` is used." msgstr "" -#: library/crypt.rst:127 +#: library/crypt.rst:132 msgid "" "The return value is a string suitable for passing as the *salt* argument to :" "func:`crypt`." msgstr "" -#: library/crypt.rst:130 +#: library/crypt.rst:135 msgid "" "*rounds* specifies the number of rounds for ``METHOD_SHA256``, " "``METHOD_SHA512`` and ``METHOD_BLOWFISH``. For ``METHOD_SHA256`` and " @@ -168,22 +175,22 @@ msgid "" "sup:`31`), the default is ``4096`` (2\\ :sup:`12`)." msgstr "" -#: library/crypt.rst:140 +#: library/crypt.rst:145 msgid "Added the *rounds* parameter." msgstr "" -#: library/crypt.rst:145 +#: library/crypt.rst:150 msgid "Examples" msgstr "Exemples" -#: library/crypt.rst:147 +#: library/crypt.rst:152 msgid "" "A simple example illustrating typical use (a constant-time comparison " "operation is needed to limit exposure to timing attacks. :func:`hmac." "compare_digest` is suitable for this purpose)::" msgstr "" -#: library/crypt.rst:167 +#: library/crypt.rst:172 msgid "" "To generate a hash of a password using the strongest available method and " "check it against the original::" diff --git a/library/csv.po b/library/csv.po index 9124f52f32..25a1cb695c 100644 --- a/library/csv.po +++ b/library/csv.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-01-27 19:45+0100\n" "Last-Translator: Mathieu Dupuy \n" "Language-Team: FRENCH \n" @@ -151,47 +151,47 @@ msgid "" "`Dialect` class or one of the strings returned by the :func:`list_dialects` " "function. The other optional *fmtparams* keyword arguments can be given to " "override individual formatting parameters in the current dialect. For full " -"details about the dialect and formatting parameters, see section :ref:`csv-" -"fmt-params`. To make it as easy as possible to interface with modules which " -"implement the DB API, the value :const:`None` is written as the empty " +"details about dialects and formatting parameters, see the :ref:`csv-fmt-" +"params` section. To make it as easy as possible to interface with modules " +"which implement the DB API, the value :const:`None` is written as the empty " "string. While this isn't a reversible transformation, it makes it easier to " "dump SQL NULL data values to CSV files without preprocessing the data " "returned from a ``cursor.fetch*`` call. All other non-string data are " "stringified with :func:`str` before being written." msgstr "" -"Renvoie un objet transcripteur responsable de convertir les données de " -"l'utilisateur en chaînes délimitées sur l'objet fichier-compatible donné. " -"*csvfile* peut être n'importe quel objet avec une méthode :func:`write`. Si " -"*csvfile* est un fichier, il doit être ouvert avec ``newline=''``. [1]_ Un " -"paramètre *dialect* optionnel peut être fourni pour définir un ensemble de " -"paramètres spécifiques à un dialecte CSV particulier. Il peut s'agir d'une " -"instance de sous-classe de :class:`Dialect` ou de l'une des chaînes " -"renvoyées par la fonction :func:`list_dialects`. Les autres arguments " -"nommés optionnels (*fmtparams*) peuvent être spécifiés pour redéfinir des " -"paramètres de formatage particuliers dans le dialecte courant. Pour des " -"détails complets sur les dialectes et paramètres de formatage, voir la " -"section :ref:`csv-fmt-params`. Pour faciliter au mieux l'interfaçage avec " -"d'autres modules implémentant l'interface *DB*, la valeur :const:`None` est " -"écrite comme une chaîne vide. Bien que ce ne soit pas une transformation " -"réversible, cela simplifie l'exportation de données SQL *NULL* vers des " -"fichiers CSV sans pré-traiter les données renvoyées par un appel à ``cursor." -"fetch*``. Toutes les autres données qui ne sont pas des chaînes de " -"caractères sont transformées en chaînes par un appel à :func:`str` avant " -"d'être écrites." +"Renvoie un transcripteur (objet *writer*) responsable de convertir les " +"données de l'utilisateur en chaînes délimitées sur l'objet fichier-" +"compatible donné. *csvfile* peut être n'importe quel objet avec une " +"méthode :func:`write`. Si *csvfile* est un objet fichier, il doit être " +"ouvert avec ``newline=''``. [1]_ Un paramètre *dialect* optionnel peut être " +"fourni pour définir un ensemble de paramètres spécifiques à un dialecte CSV " +"particulier. Il peut s'agir d'une instance d’une sous-classe de :class:" +"`Dialect` ou de l'une des chaînes renvoyées par la fonction :func:" +"`list_dialects`. Les autres arguments nommés optionnels (*fmtparams*) " +"peuvent être spécifiés pour redéfinir des paramètres de formatage " +"particuliers dans le dialecte utilisé. Pour tous les détails sur les " +"dialectes et paramètres de formatage, voir la section :ref:`csv-fmt-params`. " +"Pour faciliter au mieux l'interfaçage avec d'autres modules implémentant " +"l'interface *DB*, la valeur :const:`None` est convertie en une chaîne vide. " +"Bien que ce ne soit pas une transformation réversible, cela simplifie " +"l'exportation de données SQL *NULL* vers des fichiers CSV sans pré-traiter " +"les données renvoyées par un appel à ``cursor.fetch*``. Toutes les autres " +"données qui ne sont pas des chaînes de caractères sont transformées en " +"chaînes par un appel à :func:`str` avant d'être écrites." #: library/csv.rst:117 msgid "" "Associate *dialect* with *name*. *name* must be a string. The dialect can " "be specified either by passing a sub-class of :class:`Dialect`, or by " "*fmtparams* keyword arguments, or both, with keyword arguments overriding " -"parameters of the dialect. For full details about the dialect and formatting " +"parameters of the dialect. For full details about dialects and formatting " "parameters, see section :ref:`csv-fmt-params`." msgstr "" "Associe *dialect* avec *name*. *name* doit être une chaîne de caractères. " "Le dialecte peut être spécifié en passant une instance d'une sous-classe de :" "class:`Dialect`, des arguments nommés *fmtparams*, ou les deux, avec les " -"arguments nommés redéfinissant les paramètres du dialecte. Pour des détails " -"complets sur les dialectes et paramètres de formatage, voir la section :ref:" +"arguments nommés redéfinissant les paramètres du dialecte. Pour tous les " +"détails sur les dialectes et paramètres de formatage, voir la section :ref:" "`csv-fmt-params`." #: library/csv.rst:126 @@ -318,15 +318,31 @@ msgstr "" #: library/csv.rst:228 msgid "" -"The :class:`Dialect` class is a container class relied on primarily for its " -"attributes, which are used to define the parameters for a specific :class:" -"`reader` or :class:`writer` instance." +"The :class:`Dialect` class is a container class whose attributes contain " +"information for how to handle doublequotes, whitespace, delimiters, etc. Due " +"to the lack of a strict CSV specification, different applications produce " +"subtly different CSV data. :class:`Dialect` instances define how :class:" +"`reader` and :class:`writer` instances behave." msgstr "" -"La classe :class:`Dialect` est une classe de conteneurs utilisée " -"principalement pour ses attributs, qui servent à définir des paramètres pour " -"des instances spécifiques de :class:`reader` ou :class:`writer`." +"La classe :class:`Dialect` est une classe dont les attributs contiennent des " +"informations sur la façon de gérer les guillemets, les espaces, les " +"délimiteurs, etc. En raison de l’absence d’une spécification CSV stricte, " +"différentes applications produisent des données CSV subtilement différentes. " +"Les instances :class:`Dialect` définissent le comportement des instances :" +"class:`reader` et :class:`writer`." -#: library/csv.rst:235 +#: library/csv.rst:234 +msgid "" +"All available :class:`Dialect` names are returned by :func:`list_dialects`, " +"and they can be registered with specific :class:`reader` and :class:`writer` " +"classes through their initializer (``__init__``) functions like this::" +msgstr "" +"Tous les noms disponibles de :class:`Dialect` sont renvoyés par :func:" +"`list_dialects`, et ils peuvent être enregistrés avec des classes :class:" +"`reader` et :class:`writer` spécifiques en passant par leur fonction " +"d’initialisation (``__init__``) comme ici :" + +#: library/csv.rst:247 msgid "" "The :class:`excel` class defines the usual properties of an Excel-generated " "CSV file. It is registered with the dialect name ``'excel'``." @@ -334,7 +350,7 @@ msgstr "" "La classe :class:`excel` définit les propriétés usuelles d'un fichier CSV " "généré par Excel. Elle est enregistrée avec le nom de dialecte ``'excel'``." -#: library/csv.rst:241 +#: library/csv.rst:253 msgid "" "The :class:`excel_tab` class defines the usual properties of an Excel-" "generated TAB-delimited file. It is registered with the dialect name " @@ -344,7 +360,7 @@ msgstr "" "CSV généré par Excel avec des tabulations comme séparateurs. Elle est " "enregistrée avec le nom de dialecte ``'excel-tab'``." -#: library/csv.rst:247 +#: library/csv.rst:259 msgid "" "The :class:`unix_dialect` class defines the usual properties of a CSV file " "generated on UNIX systems, i.e. using ``'\\n'`` as line terminator and " @@ -355,17 +371,17 @@ msgstr "" "marqueur de fin de ligne et délimitant tous les champs par des guillemets. " "Elle est enregistrée avec le nom de dialecte ``'unix'``." -#: library/csv.rst:256 +#: library/csv.rst:268 msgid "The :class:`Sniffer` class is used to deduce the format of a CSV file." msgstr "" "La classe :class:`Sniffer` est utilisée pour déduire le format d'un fichier " "CSV." -#: library/csv.rst:258 +#: library/csv.rst:270 msgid "The :class:`Sniffer` class provides two methods:" msgstr "La classe :class:`Sniffer` fournit deux méthodes :" -#: library/csv.rst:262 +#: library/csv.rst:274 msgid "" "Analyze the given *sample* and return a :class:`Dialect` subclass reflecting " "the parameters found. If the optional *delimiters* parameter is given, it " @@ -376,7 +392,7 @@ msgstr "" "*delimiters* est donné, il est interprété comme une chaîne contenant tous " "les caractères valides de séparation possibles." -#: library/csv.rst:270 +#: library/csv.rst:282 msgid "" "Analyze the sample text (presumed to be in CSV format) and return :const:" "`True` if the first row appears to be a series of column headers." @@ -384,21 +400,21 @@ msgstr "" "Analyse l'extrait de texte (présumé être au format CSV) et renvoie :const:" "`True` si la première ligne semble être une série d'en-têtes de colonnes." -#: library/csv.rst:273 +#: library/csv.rst:285 msgid "An example for :class:`Sniffer` use::" msgstr "Un exemple d'utilisation de :class:`Sniffer` ::" -#: library/csv.rst:282 +#: library/csv.rst:294 msgid "The :mod:`csv` module defines the following constants:" msgstr "Le module :mod:`csv` définit les constantes suivantes :" -#: library/csv.rst:286 +#: library/csv.rst:298 msgid "Instructs :class:`writer` objects to quote all fields." msgstr "" "Indique aux objets :class:`writer` de délimiter tous les champs par des " "guillemets." -#: library/csv.rst:291 +#: library/csv.rst:303 msgid "" "Instructs :class:`writer` objects to only quote those fields which contain " "special characters such as *delimiter*, *quotechar* or any of the characters " @@ -408,19 +424,19 @@ msgstr "" "contenant un caractère spécial comme *delimiter*, *quotechar* ou n'importe " "quel caractère de *lineterminator*." -#: library/csv.rst:298 +#: library/csv.rst:310 msgid "Instructs :class:`writer` objects to quote all non-numeric fields." msgstr "" "Indique aux objets :class:`writer` de délimiter ainsi tous les champs non-" "numériques." -#: library/csv.rst:300 +#: library/csv.rst:312 msgid "Instructs the reader to convert all non-quoted fields to type *float*." msgstr "" "Indique au lecteur de convertir tous les champs non délimités par des " "guillemets vers des *float*." -#: library/csv.rst:305 +#: library/csv.rst:317 msgid "" "Instructs :class:`writer` objects to never quote fields. When the current " "*delimiter* occurs in output data it is preceded by the current *escapechar* " @@ -433,7 +449,7 @@ msgstr "" "pas précisé, le transcripteur lèvera une :exc:`Error` si un caractère " "nécessitant un échappement est rencontré." -#: library/csv.rst:310 +#: library/csv.rst:322 msgid "" "Instructs :class:`reader` to perform no special processing of quote " "characters." @@ -441,19 +457,19 @@ msgstr "" "Indique au :class:`reader` de ne pas opérer de traitement spécial sur les " "guillemets." -#: library/csv.rst:312 +#: library/csv.rst:324 msgid "The :mod:`csv` module defines the following exception:" msgstr "Le module :mod:`csv` définit les exceptions suivantes :" -#: library/csv.rst:317 +#: library/csv.rst:329 msgid "Raised by any of the functions when an error is detected." msgstr "Levée par les fonctions du module quand une erreur détectée." -#: library/csv.rst:322 +#: library/csv.rst:334 msgid "Dialects and Formatting Parameters" msgstr "Dialectes et paramètres de formatage" -#: library/csv.rst:324 +#: library/csv.rst:336 msgid "" "To make it easier to specify the format of input and output records, " "specific formatting parameters are grouped together into dialects. A " @@ -475,18 +491,18 @@ msgstr "" "paramètres de formatage individuels, qui ont les mêmes noms que les " "attributs de :class:`Dialect` définis ci-dessous." -#: library/csv.rst:334 +#: library/csv.rst:346 msgid "Dialects support the following attributes:" msgstr "Les dialectes supportent les attributs suivants :" -#: library/csv.rst:339 +#: library/csv.rst:351 msgid "" "A one-character string used to separate fields. It defaults to ``','``." msgstr "" "Une chaîne d'un seul caractère utilisée pour séparer les champs. Elle vaut " "``','`` par défaut." -#: library/csv.rst:344 +#: library/csv.rst:356 msgid "" "Controls how instances of *quotechar* appearing inside a field should " "themselves be quoted. When :const:`True`, the character is doubled. When :" @@ -498,7 +514,7 @@ msgstr "" "doublé. Quand il vaut :const:`False`, le caractère *escapechar* est utilisé " "comme préfixe à *quotechar*. Il vaut :const:`True` par défaut." -#: library/csv.rst:349 +#: library/csv.rst:361 msgid "" "On output, if *doublequote* is :const:`False` and no *escapechar* is set, :" "exc:`Error` is raised if a *quotechar* is found in a field." @@ -507,7 +523,7 @@ msgstr "" "n'est précisé, une :exc:`Error` est levée si un *quotechar* est trouvé dans " "le champ." -#: library/csv.rst:355 +#: library/csv.rst:367 msgid "" "A one-character string used by the writer to escape the *delimiter* if " "*quoting* is set to :const:`QUOTE_NONE` and the *quotechar* if *doublequote* " @@ -521,7 +537,7 @@ msgstr "" "retire toute signification spéciale au caractère qui le suit. Elle vaut par " "défaut :const:`None`, ce qui désactive l'échappement." -#: library/csv.rst:363 +#: library/csv.rst:375 msgid "" "The string used to terminate lines produced by the :class:`writer`. It " "defaults to ``'\\r\\n'``." @@ -529,7 +545,7 @@ msgstr "" "La chaîne utilisée pour terminer les lignes produites par un :class:" "`writer`. Elle vaut par défaut ``'\\r\\n'``." -#: library/csv.rst:368 +#: library/csv.rst:380 msgid "" "The :class:`reader` is hard-coded to recognise either ``'\\r'`` or ``'\\n'`` " "as end-of-line, and ignores *lineterminator*. This behavior may change in " @@ -539,7 +555,7 @@ msgstr "" "``'\\n'`` comme marqueurs de fin de ligne, et ignorer *lineterminator*. Ce " "comportement pourrait changer dans le futur." -#: library/csv.rst:375 +#: library/csv.rst:387 msgid "" "A one-character string used to quote fields containing special characters, " "such as the *delimiter* or *quotechar*, or which contain new-line " @@ -549,7 +565,7 @@ msgstr "" "des caractères spéciaux, comme *delimiter* ou *quotechar*, ou contenant un " "caractère de fin de ligne. Elle vaut ``'\"'`` par défaut." -#: library/csv.rst:382 +#: library/csv.rst:394 msgid "" "Controls when quotes should be generated by the writer and recognised by the " "reader. It can take on any of the :const:`QUOTE_\\*` constants (see " @@ -560,7 +576,7 @@ msgstr "" "const:`QUOTE_\\*` (voir la section :ref:`csv-contents`) et vaut par défaut :" "const:`QUOTE_MINIMAL`." -#: library/csv.rst:389 +#: library/csv.rst:401 msgid "" "When :const:`True`, whitespace immediately following the *delimiter* is " "ignored. The default is :const:`False`." @@ -568,7 +584,7 @@ msgstr "" "Quand il vaut :const:`True`, les espaces suivant directement *delimiter* " "sont ignorés. Il vaut :const:`False` par défaut." -#: library/csv.rst:395 +#: library/csv.rst:407 msgid "" "When ``True``, raise exception :exc:`Error` on bad CSV input. The default is " "``False``." @@ -576,11 +592,11 @@ msgstr "" "Quand il vaut ``True``, une exception :exc:`Error` est levée lors de " "mauvaises entrées CSV. Il vaut ``False`` par défaut." -#: library/csv.rst:399 +#: library/csv.rst:411 msgid "Reader Objects" msgstr "Objets lecteurs" -#: library/csv.rst:401 +#: library/csv.rst:413 msgid "" "Reader objects (:class:`DictReader` instances and objects returned by the :" "func:`reader` function) have the following public methods:" @@ -588,27 +604,28 @@ msgstr "" "Les objets lecteurs (instances de :class:`DictReader` ou objets renvoyés par " "la fonction :func:`reader`) ont les méthodes publiques suivantes :" -#: library/csv.rst:406 +#: library/csv.rst:418 msgid "" "Return the next row of the reader's iterable object as a list (if the object " "was returned from :func:`reader`) or a dict (if it is a :class:`DictReader` " -"instance), parsed according to the current dialect. Usually you should call " -"this as ``next(reader)``." +"instance), parsed according to the current :class:`Dialect`. Usually you " +"should call this as ``next(reader)``." msgstr "" "Renvoie la ligne suivante de l'objet itérable du lecteur en tant que liste " "(si l'objet est renvoyé depuis :func:`reader`) ou dictionnaire (si l'objet " -"est un :class:`DictReader`), analysé suivant le dialecte courant. " -"Généralement, vous devez appeler la méthode à l'aide de ``next(reader)``." +"est un :class:`DictReader`), analysé suivant la classe :class:`Dialect` " +"utilisée. Généralement, vous devez appeler la méthode à l'aide de " +"``next(reader)``." -#: library/csv.rst:412 +#: library/csv.rst:424 msgid "Reader objects have the following public attributes:" msgstr "Les objets lecteurs ont les attributs publics suivants :" -#: library/csv.rst:416 +#: library/csv.rst:428 msgid "A read-only description of the dialect in use by the parser." msgstr "Une description en lecture seule du dialecte utilisé par l'analyseur." -#: library/csv.rst:421 +#: library/csv.rst:433 msgid "" "The number of lines read from the source iterator. This is not the same as " "the number of records returned, as records can span multiple lines." @@ -617,11 +634,11 @@ msgstr "" "au nombre d'enregistrements renvoyés, puisque certains enregistrements " "peuvent s'étendre sur plusieurs lignes." -#: library/csv.rst:425 +#: library/csv.rst:437 msgid "DictReader objects have the following public attribute:" msgstr "Les objets *DictReader* ont les attributs publics suivants :" -#: library/csv.rst:429 +#: library/csv.rst:441 msgid "" "If not passed as a parameter when creating the object, this attribute is " "initialized upon first access or when the first record is read from the file." @@ -630,11 +647,11 @@ msgstr "" "est initialisé lors du premier accès ou quand le premier enregistrement est " "lu depuis le fichier." -#: library/csv.rst:436 +#: library/csv.rst:448 msgid "Writer Objects" msgstr "Objets transcripteurs" -#: library/csv.rst:438 +#: library/csv.rst:450 msgid "" ":class:`Writer` objects (:class:`DictWriter` instances and objects returned " "by the :func:`writer` function) have the following public methods. A *row* " @@ -655,21 +672,21 @@ msgstr "" "quelques problèmes pour d'autres programmes qui liraient ces fichiers CSV " "(en supposant qu'ils supportent les nombres complexes)." -#: library/csv.rst:449 +#: library/csv.rst:461 msgid "" "Write the *row* parameter to the writer's file object, formatted according " -"to the current dialect. Return the return value of the call to the *write* " -"method of the underlying file object." +"to the current :class:`Dialect`. Return the return value of the call to the " +"*write* method of the underlying file object." msgstr "" -"Écrit le paramètre *row* vers le fichier associé au transcripteur, formaté " -"selon le dialecte courant. Renvoie la valeur de retour de l'appel à la " -"méthode *write* de l'objet fichier sous-jacent." +"Écrit le paramètre *row* vers l’objet fichier du transcripteur, formaté " +"selon la classe :class:`Dialect` utilisée. Renvoie la valeur de retour de " +"l'appel à la méthode *write* de l'objet fichier sous-jacent." -#: library/csv.rst:453 +#: library/csv.rst:465 msgid "Added support of arbitrary iterables." msgstr "Ajout du support d'itérables arbitraires." -#: library/csv.rst:458 +#: library/csv.rst:470 msgid "" "Write all elements in *rows* (an iterable of *row* objects as described " "above) to the writer's file object, formatted according to the current " @@ -679,20 +696,20 @@ msgstr "" "précédemment) vers le fichier associé au transcripteur, formatés selon le " "dialecte courant." -#: library/csv.rst:462 +#: library/csv.rst:474 msgid "Writer objects have the following public attribute:" msgstr "Les objets transcripteurs ont les attributs publics suivants :" -#: library/csv.rst:467 +#: library/csv.rst:479 msgid "A read-only description of the dialect in use by the writer." msgstr "" "Une description en lecture seule du dialecte utilisé par le transcripteur." -#: library/csv.rst:470 +#: library/csv.rst:482 msgid "DictWriter objects have the following public method:" msgstr "Les objets *DictWriter* ont les attributs publics suivants :" -#: library/csv.rst:475 +#: library/csv.rst:487 msgid "" "Write a row with the field names (as specified in the constructor) to the " "writer's file object, formatted according to the current dialect. Return the " @@ -703,7 +720,7 @@ msgstr "" "le dialecte courant. Renvoie la valeur de retour de l'appel :meth:`csvwriter." "writerow` utilisé en interne." -#: library/csv.rst:480 +#: library/csv.rst:492 msgid "" ":meth:`writeheader` now also returns the value returned by the :meth:" "`csvwriter.writerow` method it uses internally." @@ -711,23 +728,23 @@ msgstr "" ":meth:`writeheader` renvoie maintenant aussi la valeur renvoyée par la " "méthode :meth:`csvwriter.writerow` qu'il utilise en interne." -#: library/csv.rst:488 +#: library/csv.rst:500 msgid "Examples" msgstr "Exemples" -#: library/csv.rst:490 +#: library/csv.rst:502 msgid "The simplest example of reading a CSV file::" msgstr "Le plus simple exemple de lecture d'un fichier CSV ::" -#: library/csv.rst:498 +#: library/csv.rst:510 msgid "Reading a file with an alternate format::" msgstr "Lire un fichier avec un format alternatif ::" -#: library/csv.rst:506 +#: library/csv.rst:518 msgid "The corresponding simplest possible writing example is::" msgstr "Le plus simple exemple d'écriture correspondant est ::" -#: library/csv.rst:513 +#: library/csv.rst:525 msgid "" "Since :func:`open` is used to open a CSV file for reading, the file will by " "default be decoded into unicode using the system default encoding (see :func:" @@ -740,7 +757,7 @@ msgstr "" "utilisant un encodage différent, utilisez l'argument ``encoding`` de " "*open* ::" -#: library/csv.rst:524 +#: library/csv.rst:536 msgid "" "The same applies to writing in something other than the system default " "encoding: specify the encoding argument when opening the output file." @@ -749,11 +766,11 @@ msgstr "" "par défaut du système : spécifiez l'encodage en argument lors de l'ouverture " "du fichier de sortie." -#: library/csv.rst:527 +#: library/csv.rst:539 msgid "Registering a new dialect::" msgstr "Enregistrer un nouveau dialecte ::" -#: library/csv.rst:534 +#: library/csv.rst:546 msgid "" "A slightly more advanced use of the reader --- catching and reporting " "errors::" @@ -761,7 +778,7 @@ msgstr "" "Un exemple d'utilisation un peu plus avancé du lecteur --- attrapant et " "notifiant les erreurs ::" -#: library/csv.rst:546 +#: library/csv.rst:558 msgid "" "And while the module doesn't directly support parsing strings, it can easily " "be done::" @@ -769,11 +786,11 @@ msgstr "" "Et bien que le module ne permette pas d'analyser directement des chaînes, " "cela peut être fait facilement ::" -#: library/csv.rst:555 +#: library/csv.rst:567 msgid "Footnotes" msgstr "Notes" -#: library/csv.rst:556 +#: library/csv.rst:568 msgid "" "If ``newline=''`` is not specified, newlines embedded inside quoted fields " "will not be interpreted correctly, and on platforms that use ``\\r\\n`` " @@ -787,3 +804,12 @@ msgstr "" "comme marqueur de fin de ligne, un ``\\r`` sera ajouté. Vous devriez " "toujours spécifier sans crainte ``newline=''``, puisque le module *csv* gère " "lui-même les fins de lignes (:term:`universelles `)." + +#~ msgid "" +#~ "The :class:`Dialect` class is a container class relied on primarily for " +#~ "its attributes, which are used to define the parameters for a specific :" +#~ "class:`reader` or :class:`writer` instance." +#~ msgstr "" +#~ "La classe :class:`Dialect` est une classe de conteneurs utilisée " +#~ "principalement pour ses attributs, qui servent à définir des paramètres " +#~ "pour des instances spécifiques de :class:`reader` ou :class:`writer`." diff --git a/library/ctypes.po b/library/ctypes.po index 374a340155..7b29ddb2f7 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-08-17 23:01+0200\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" @@ -39,11 +39,11 @@ msgstr "Didacticiel de *ctypes*" msgid "" "Note: The code samples in this tutorial use :mod:`doctest` to make sure that " "they actually work. Since some code samples behave differently under Linux, " -"Windows, or Mac OS X, they contain doctest directives in comments." +"Windows, or macOS, they contain doctest directives in comments." msgstr "" -"Remarque : Les exemples de code de ce didacticiel utilisent :mod:`doctest` " +"Remarque : les exemples de code de ce didacticiel utilisent :mod:`doctest` " "pour s'assurer de leur propre bon fonctionnement. Vu que certains de ces " -"exemples ont un comportement différent en Linux, Windows ou Mac OS X, ils " +"exemples ont un comportement différent en Linux, Windows ou macOS, ils " "contiennent des directives *doctest* dans les commentaires." #: library/ctypes.rst:25 @@ -289,7 +289,7 @@ msgstr "" "paramètres, apprenons-en un peu plus sur les types de données de :mod:" "`ctypes`." -#: library/ctypes.rst:2143 +#: library/ctypes.rst:2138 msgid "Fundamental data types" msgstr "Types de données de base" @@ -1584,7 +1584,7 @@ msgstr "" "de l'éditeur de lien :option:`!-l`). Si la fonction ne parvient pas à " "trouver de bibliothèque, elle renvoie ``None``." -#: library/ctypes.rst:1918 +#: library/ctypes.rst:1913 msgid "The exact functionality is system dependent." msgstr "Le mode opératoire exact dépend du système." @@ -1613,10 +1613,10 @@ msgstr "Voici quelques exemples :" #: library/ctypes.rst:1291 msgid "" -"On OS X, :func:`find_library` tries several predefined naming schemes and " +"On macOS, :func:`find_library` tries several predefined naming schemes and " "paths to locate the library, and returns a full pathname if successful::" msgstr "" -"Sous OS X, :func:`find_library` regarde dans des chemins et conventions de " +"Sous macOS, :func:`find_library` regarde dans des chemins et conventions de " "chemins prédéfinies pour trouver la bibliothèque et en renvoie le chemin " "complet si elle la trouve :" @@ -1678,12 +1678,22 @@ msgid "" "which DLL is not found, you need to find the list of dependent DLLs and " "determine which one is not found using Windows debugging and tracing tools." msgstr "" +"En Windows, créer une instance de :class:`CDLL` peut échouer, même si une " +"DLL du bon nom existe. Quand une des dépendances de la DLL à charger ne peut " +"pas être trouvée, une :exc:`OSError` est levée avec le message *\"[WinError " +"126] The specified module could not be found\".* Ce message d'erreur ne " +"contient pas le nom de la DLL manquante car l'API Windows ne fournit pas " +"cette information. Cela rend l'erreur délicate à analyser ; pour la " +"résoudre, il faut lister toutes les dépendances de la DLL et trouver celle " +"qui manque en utilisant des outils de débogage et de traçage Windows." #: library/ctypes.rst:1341 msgid "" "`Microsoft DUMPBIN tool `_ -- A tool to find DLL dependents." msgstr "" +"`DUMPBIN `_ — un " +"utilitaire Microsoft pour lister les dépendances d'une DLL." #: library/ctypes.rst:1347 msgid "" @@ -1719,16 +1729,6 @@ msgstr "" #: library/ctypes.rst:1364 msgid "" -"On Windows CE only the standard calling convention is used, for convenience " -"the :class:`WinDLL` and :class:`OleDLL` use the standard calling convention " -"on this platform." -msgstr "" -"Sous Windows CE, seule la convention d'appel standard est utilisée. Pour des " -"raisons pratiques, :class:`WinDLL` et :class:`OleDLL` utilisent la " -"convention d'appel standard sur cette plate-forme." - -#: library/ctypes.rst:1368 -msgid "" "The Python :term:`global interpreter lock` is released before calling any " "function exported by these libraries, and reacquired afterwards." msgstr "" @@ -1736,7 +1736,7 @@ msgstr "" "est relâché avant chaque appel d'une fonction exposée par ces bibliothèques " "et ré-activé après." -#: library/ctypes.rst:1374 +#: library/ctypes.rst:1370 msgid "" "Instances of this class behave like :class:`CDLL` instances, except that the " "Python GIL is *not* released during the function call, and after the " @@ -1748,12 +1748,12 @@ msgstr "" "drapeau d'erreur Python est vérifié. Si celui-ci est activé, une exception " "Python est levée." -#: library/ctypes.rst:1379 +#: library/ctypes.rst:1375 msgid "Thus, this is only useful to call Python C api functions directly." msgstr "" "Donc, cette classe ne sert qu'à appeler les fonctions de l'API C de Python." -#: library/ctypes.rst:1381 +#: library/ctypes.rst:1377 msgid "" "All these classes can be instantiated by calling them with at least one " "argument, the pathname of the shared library. If you have an existing " @@ -1769,7 +1769,7 @@ msgstr "" "forme sous-jacente permettent de charger la bibliothèque dans le processus, " "et d'en obtenir un lien." -#: library/ctypes.rst:1388 +#: library/ctypes.rst:1384 msgid "" "The *mode* parameter can be used to specify how the library is loaded. For " "details, consult the :manpage:`dlopen(3)` manpage. On Windows, *mode* is " @@ -1781,7 +1781,7 @@ msgstr "" "manuel. En Windows, *mode* est ignoré. Sur les systèmes POSIX, RTLD_NOW y " "est toujours ajouté. Ceci n'est pas configurable." -#: library/ctypes.rst:1393 +#: library/ctypes.rst:1389 msgid "" "The *use_errno* parameter, when set to true, enables a ctypes mechanism that " "allows accessing the system :data:`errno` error number in a safe way. :mod:" @@ -1798,7 +1798,7 @@ msgstr "" "la fonction est échangée avec la copie privée de *ctypes*. La même chose se " "produit juste après l'appel de la fonction." -#: library/ctypes.rst:1400 +#: library/ctypes.rst:1396 msgid "" "The function :func:`ctypes.get_errno` returns the value of the ctypes " "private copy, and the function :func:`ctypes.set_errno` changes the ctypes " @@ -1808,7 +1808,7 @@ msgstr "" "*ctypes*. La fonction :func:`ctypes.set_errno` affecte une nouvelle valeur à " "la copie privée et renvoie l'ancienne valeur." -#: library/ctypes.rst:1404 +#: library/ctypes.rst:1400 msgid "" "The *use_last_error* parameter, when set to true, enables the same mechanism " "for the Windows error code which is managed by the :func:`GetLastError` and :" @@ -1822,7 +1822,7 @@ msgstr "" "get_last_error` et :func:`ctypes.set_last_error` servent à obtenir et " "modifier la copie privée *ctypes* de ce code d'erreur." -#: library/ctypes.rst:1410 +#: library/ctypes.rst:1406 msgid "" "The *winmode* parameter is used on Windows to specify how the library is " "loaded (since *mode* is ignored). It takes any value that is valid for the " @@ -1839,11 +1839,11 @@ msgstr "" "le chemin complet à la DLL reste le moyen le plus sûr de s'assurer que la " "bonne bibliothèque et les bonnes dépendances sont chargées." -#: library/ctypes.rst:1417 +#: library/ctypes.rst:1413 msgid "Added *winmode* parameter." msgstr "Ajout du paramètre *winmode*." -#: library/ctypes.rst:1424 +#: library/ctypes.rst:1420 msgid "" "Flag to use as *mode* parameter. On platforms where this flag is not " "available, it is defined as the integer zero." @@ -1851,7 +1851,7 @@ msgstr "" "Valeur possible pour le paramètre *mode*. Vaut zéro sur les plates-formes où " "ce drapeau n'est pas disponible." -#: library/ctypes.rst:1431 +#: library/ctypes.rst:1427 msgid "" "Flag to use as *mode* parameter. On platforms where this is not available, " "it is the same as *RTLD_GLOBAL*." @@ -1859,7 +1859,7 @@ msgstr "" "Valeur possible pour le paramètre *mode*. Vaut *RTLD_GLOBAL* sur les plates-" "formes où ce drapeau n'est pas disponible." -#: library/ctypes.rst:1438 +#: library/ctypes.rst:1434 msgid "" "The default mode which is used to load shared libraries. On OSX 10.3, this " "is *RTLD_GLOBAL*, otherwise it is the same as *RTLD_LOCAL*." @@ -1868,7 +1868,7 @@ msgstr "" "*RTLD_GLOBAL* sur OSX 10.3 et *RTLD_LOCAL* sur les autres systèmes " "d'exploitation." -#: library/ctypes.rst:1441 +#: library/ctypes.rst:1437 msgid "" "Instances of these classes have no public methods. Functions exported by " "the shared library can be accessed as attributes or by index. Please note " @@ -1882,7 +1882,7 @@ msgstr "" "accès consécutifs renvoient à chaque fois le même objet. Accéder à une " "fonction par indice renvoie cependant chaque fois un nouvel objet :" -#: library/ctypes.rst:1454 +#: library/ctypes.rst:1450 msgid "" "The following public attributes are available, their name starts with an " "underscore to not clash with exported function names:" @@ -1890,15 +1890,15 @@ msgstr "" "Les attributs publics suivants sont disponibles, leur nom commence par un " "tiret bas pour éviter les conflits avec les noms des fonctions exportées :" -#: library/ctypes.rst:1460 +#: library/ctypes.rst:1456 msgid "The system handle used to access the library." -msgstr "" +msgstr "Le lien système d'accès à la bibliothèque." -#: library/ctypes.rst:1465 +#: library/ctypes.rst:1461 msgid "The name of the library passed in the constructor." msgstr "Nom de la bibliothèque donné au constructeur." -#: library/ctypes.rst:1467 +#: library/ctypes.rst:1463 msgid "" "Shared libraries can also be loaded by using one of the prefabricated " "objects, which are instances of the :class:`LibraryLoader` class, either by " @@ -1910,7 +1910,7 @@ msgstr "" "meth:`LoadLibrary`, soit en récupérant la bibliothèque comme attribut de " "l'instance du chargeur." -#: library/ctypes.rst:1475 +#: library/ctypes.rst:1471 msgid "" "Class which loads shared libraries. *dlltype* should be one of the :class:" "`CDLL`, :class:`PyDLL`, :class:`WinDLL`, or :class:`OleDLL` types." @@ -1918,7 +1918,7 @@ msgstr "" "Classe pour charger une bibliothèque partagée. *dlltype* doit être de type :" "class:`CDLL`, :class:`PyDLL`, :class:`WinDLL` ou :class:`OleDLL`." -#: library/ctypes.rst:1478 +#: library/ctypes.rst:1474 msgid "" ":meth:`__getattr__` has special behavior: It allows loading a shared library " "by accessing it as attribute of a library loader instance. The result is " @@ -1929,7 +1929,7 @@ msgstr "" "en cache, donc des accès consécutifs renvoient la même bibliothèque à chaque " "fois." -#: library/ctypes.rst:1484 +#: library/ctypes.rst:1480 msgid "" "Load a shared library into the process and return it. This method always " "returns a new instance of the library." @@ -1937,33 +1937,33 @@ msgstr "" "Charge une bibliothèque partagée dans le processus et la renvoie. Cette " "méthode renvoie toujours une nouvelle instance de la bibliothèque." -#: library/ctypes.rst:1488 +#: library/ctypes.rst:1484 msgid "These prefabricated library loaders are available:" msgstr "Plusieurs chargeurs sont fournis :" -#: library/ctypes.rst:1493 +#: library/ctypes.rst:1489 msgid "Creates :class:`CDLL` instances." msgstr "Pour créer des instances de :class:`CDLL`." -#: library/ctypes.rst:1499 +#: library/ctypes.rst:1495 msgid "Windows only: Creates :class:`WinDLL` instances." msgstr "Pour créer des instances de :class:`WinDLL` (uniquement en Windows)." -#: library/ctypes.rst:1505 +#: library/ctypes.rst:1501 msgid "Windows only: Creates :class:`OleDLL` instances." msgstr "Pour créer des instances de :class:`OleDLL` (uniquement en Windows)." -#: library/ctypes.rst:1511 +#: library/ctypes.rst:1507 msgid "Creates :class:`PyDLL` instances." msgstr "Pour créer des instances de :class:`PyDLL`." -#: library/ctypes.rst:1514 +#: library/ctypes.rst:1510 msgid "" "For accessing the C Python api directly, a ready-to-use Python shared " "library object is available:" msgstr "Il existe un moyen rapide d'accéder directement à l'API C Python :" -#: library/ctypes.rst:1520 +#: library/ctypes.rst:1516 msgid "" "An instance of :class:`PyDLL` that exposes Python C API functions as " "attributes. Note that all these functions are assumed to return C :c:type:" @@ -1976,17 +1976,15 @@ msgstr "" "donc définir vous-même le bon attribut :attr:`restype` pour pouvoir les " "utiliser." -#: library/ctypes.rst:1525 -#, fuzzy +#: library/ctypes.rst:1521 msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlopen`` with argument " "``name``." msgstr "" -"Charger une bibliothèque à l'aide d'un de ces objets avec en argument " -"``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" -"`évènement d'audit ` ``ctypes.dlopen``." +"Lève un :ref:`évènement d'audit ` ``ctypes.dlopen``, avec en " +"argument ``name``." -#: library/ctypes.rst:1527 +#: library/ctypes.rst:1523 msgid "" "Loading a library through any of these objects raises an :ref:`auditing " "event ` ``ctypes.dlopen`` with string argument ``name``, the name " @@ -1996,7 +1994,7 @@ msgstr "" "``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" "`évènement d'audit ` ``ctypes.dlopen``." -#: library/ctypes.rst:1531 +#: library/ctypes.rst:1527 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym`` with arguments " @@ -2006,7 +2004,7 @@ msgstr "" "``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" "`évènement d'audit ` ``ctypes.dlopen``." -#: library/ctypes.rst:1533 +#: library/ctypes.rst:1529 msgid "" "Accessing a function on a loaded library raises an auditing event ``ctypes." "dlsym`` with arguments ``library`` (the library object) and ``name`` (the " @@ -2016,7 +2014,7 @@ msgstr "" "dlsym`` avec ``library`` (l'objet bibliothèque) et ``name`` (le nom du " "symbole — une chaîne de caractères ou un entier) comme arguments." -#: library/ctypes.rst:1537 +#: library/ctypes.rst:1533 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym/handle`` with " @@ -2026,7 +2024,7 @@ msgstr "" "``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" "`évènement d'audit ` ``ctypes.dlopen``." -#: library/ctypes.rst:1539 +#: library/ctypes.rst:1535 msgid "" "In cases when only the library handle is available rather than the object, " "accessing a function raises an auditing event ``ctypes.dlsym/handle`` with " @@ -2036,11 +2034,11 @@ msgstr "" "à une fonction lève l'évènement d'audit ``ctypes.dlsym/handle`` avec " "``handle`` (le lien vers la bibliothèque) et ``name`` comme arguments." -#: library/ctypes.rst:1546 +#: library/ctypes.rst:1542 msgid "Foreign functions" msgstr "Fonctions externes" -#: library/ctypes.rst:1548 +#: library/ctypes.rst:1544 msgid "" "As explained in the previous section, foreign functions can be accessed as " "attributes of loaded shared libraries. The function objects created in this " @@ -2055,11 +2053,11 @@ msgstr "" "renvoie le type par défaut du chargeur de la bibliothèque. Ce sont des " "instances de la classe privée :" -#: library/ctypes.rst:1557 +#: library/ctypes.rst:1553 msgid "Base class for C callable foreign functions." msgstr "Classe de base pour les fonctions externes C." -#: library/ctypes.rst:1559 +#: library/ctypes.rst:1555 msgid "" "Instances of foreign functions are also C compatible data types; they " "represent C function pointers." @@ -2067,7 +2065,7 @@ msgstr "" "Une instance de fonction externe est également un type de donnée compatible " "avec le C ; elle représente un pointeur vers une fonction." -#: library/ctypes.rst:1562 +#: library/ctypes.rst:1558 msgid "" "This behavior can be customized by assigning to special attributes of the " "foreign function object." @@ -2075,7 +2073,7 @@ msgstr "" "Son comportement peut-être personnalisé en réaffectant les attributs " "spécifiques de l'objet représentant la fonction externe." -#: library/ctypes.rst:1567 +#: library/ctypes.rst:1563 msgid "" "Assign a ctypes type to specify the result type of the foreign function. Use " "``None`` for :c:type:`void`, a function not returning anything." @@ -2084,7 +2082,7 @@ msgstr "" "*ctypes*. Dans le cas où la fonction ne renvoie rien (:c:type:`void`), " "utilisez ``None``." -#: library/ctypes.rst:1570 +#: library/ctypes.rst:1566 msgid "" "It is possible to assign a callable Python object that is not a ctypes type, " "in this case the function is assumed to return a C :c:type:`int`, and the " @@ -2102,7 +2100,7 @@ msgstr "" "affecter un type *ctypes* à :attr:`restype` et à affecter un appelable à " "l'attribut :attr:`errcheck`." -#: library/ctypes.rst:1579 +#: library/ctypes.rst:1575 msgid "" "Assign a tuple of ctypes types to specify the argument types that the " "function accepts. Functions using the ``stdcall`` calling convention can " @@ -2116,7 +2114,7 @@ msgstr "" "la taille du *n*-uplet mais les fonctions qui utilisent la convention " "d'appel C acceptent aussi des arguments additionnels non-définis." -#: library/ctypes.rst:1585 +#: library/ctypes.rst:1581 msgid "" "When a foreign function is called, each actual argument is passed to the :" "meth:`from_param` class method of the items in the :attr:`argtypes` tuple, " @@ -2133,7 +2131,7 @@ msgstr "" "passée en argument en un objet chaîne d'octets selon les règles de " "conversion *ctypes*." -#: library/ctypes.rst:1592 +#: library/ctypes.rst:1588 msgid "" "New: It is now possible to put items in argtypes which are not ctypes types, " "but each item must have a :meth:`from_param` method which returns a value " @@ -2147,7 +2145,7 @@ msgstr "" "de créer des adaptateurs qui convertissent des objets arbitraires en des " "paramètres de fonction." -#: library/ctypes.rst:1599 +#: library/ctypes.rst:1595 msgid "" "Assign a Python function or another callable to this attribute. The callable " "will be called with three or more arguments:" @@ -2155,7 +2153,7 @@ msgstr "" "Définit une fonction Python ou tout autre appelable qui sera appelé avec " "trois arguments ou plus :" -#: library/ctypes.rst:1606 +#: library/ctypes.rst:1602 msgid "" "*result* is what the foreign function returns, as specified by the :attr:" "`restype` attribute." @@ -2163,7 +2161,7 @@ msgstr "" "*result* est la valeur de retour de la fonction externe, comme défini par " "l'attribut :attr:`restype`." -#: library/ctypes.rst:1609 +#: library/ctypes.rst:1605 msgid "" "*func* is the foreign function object itself, this allows reusing the same " "callable object to check or post process the results of several functions." @@ -2173,7 +2171,7 @@ msgstr "" "plusieurs fonctions ou de faire des actions supplémentaires après leur " "exécution." -#: library/ctypes.rst:1613 +#: library/ctypes.rst:1609 msgid "" "*arguments* is a tuple containing the parameters originally passed to the " "function call, this allows specializing the behavior on the arguments used." @@ -2182,7 +2180,7 @@ msgstr "" "la fonction, ceci permet de spécialiser le comportement des arguments " "utilisés." -#: library/ctypes.rst:1617 +#: library/ctypes.rst:1613 msgid "" "The object that this function returns will be returned from the foreign " "function call, but it can also check the result value and raise an exception " @@ -2192,7 +2190,7 @@ msgstr "" "fonction externe, mais il peut aussi vérifier la valeur du résultat et lever " "une exception si l'appel a échoué." -#: library/ctypes.rst:1624 +#: library/ctypes.rst:1620 msgid "" "This exception is raised when a foreign function call cannot convert one of " "the passed arguments." @@ -2200,13 +2198,13 @@ msgstr "" "Exception levée quand un appel à la fonction externe ne peut pas convertir " "un des arguments qu'elle a reçus." -#: library/ctypes.rst:1628 +#: library/ctypes.rst:1624 msgid "" "Raises an :ref:`auditing event ` ``ctypes.seh_exception`` with " "argument ``code``." msgstr "" -#: library/ctypes.rst:1630 +#: library/ctypes.rst:1626 msgid "" "On Windows, when a foreign function call raises a system exception (for " "example, due to an access violation), it will be captured and replaced with " @@ -2221,7 +2219,7 @@ msgstr "" "permet à un point d'entrée (*hook* en anglais) d'audit de remplacer " "l'exception par une des siennes." -#: library/ctypes.rst:1636 +#: library/ctypes.rst:1632 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.call_function`` with " @@ -2231,7 +2229,7 @@ msgstr "" "évènements d'audit ``ctypes.call_function`` avec ``function pointer`` et " "``arguments`` comme arguments." -#: library/ctypes.rst:1638 +#: library/ctypes.rst:1634 msgid "" "Some ways to invoke foreign function calls may raise an auditing event " "``ctypes.call_function`` with arguments ``function pointer`` and " @@ -2241,11 +2239,11 @@ msgstr "" "évènements d'audit ``ctypes.call_function`` avec ``function pointer`` et " "``arguments`` comme arguments." -#: library/ctypes.rst:1644 +#: library/ctypes.rst:1640 msgid "Function prototypes" msgstr "Prototypes de fonction" -#: library/ctypes.rst:1646 +#: library/ctypes.rst:1642 msgid "" "Foreign functions can also be created by instantiating function prototypes. " "Function prototypes are similar to function prototypes in C; they describe a " @@ -2255,8 +2253,17 @@ msgid "" "decorator factories, and as such, be applied to functions through the " "``@wrapper`` syntax. See :ref:`ctypes-callback-functions` for examples." msgstr "" +"Il est aussi possible de créer des fonctions externes en instanciant des " +"prototypes de fonction. Les prototypes de fonction ressemblent beaucoup aux " +"prototypes de fonctions en C ; ils décrivent une fonction (type de retour, " +"type des arguments, convention d'appel) sans préciser son implémentation. " +"Les fabriques de fonctions prennent en entrée le type de retour et le type " +"des arguments de la fonction, et peuvent être utilisées comme des " +"décorateurs-fabrique et ainsi s'appliquer à des fonctions avec la syntaxe " +"``@décorateur``. Ceci est illustré dans la section :ref:`ctypes-callback-" +"functions`." -#: library/ctypes.rst:1657 +#: library/ctypes.rst:1653 msgid "" "The returned function prototype creates functions that use the standard C " "calling convention. The function will release the GIL during the call. If " @@ -2264,150 +2271,200 @@ msgid "" "`errno` variable is exchanged with the real :data:`errno` value before and " "after the call; *use_last_error* does the same for the Windows error code." msgstr "" +"Renvoie un prototype de fonction qui crée des fonctions qui suivent la " +"convention d'appel standard C. Les fonctions libèreront le GIL lors de leur " +"exécution. Si *use_errno* est vrai, la copie privée *ctypes* de la variable " +"système :data:`errno` est échangée avec la vraie valeur de :data:`errno` " +"avant et après l'appel ; *use_last_error* a le même effet sous Windows." -#: library/ctypes.rst:1667 +#: library/ctypes.rst:1663 msgid "" "Windows only: The returned function prototype creates functions that use the " -"``stdcall`` calling convention, except on Windows CE where :func:" -"`WINFUNCTYPE` is the same as :func:`CFUNCTYPE`. The function will release " -"the GIL during the call. *use_errno* and *use_last_error* have the same " -"meaning as above." +"``stdcall`` calling convention. The function will release the GIL during " +"the call. *use_errno* and *use_last_error* have the same meaning as above." msgstr "" -#: library/ctypes.rst:1676 +#: library/ctypes.rst:1671 msgid "" "The returned function prototype creates functions that use the Python " "calling convention. The function will *not* release the GIL during the call." msgstr "" +"Renvoie un prototype de fonction qui crée des fonctions qui suivent la " +"convention d'appel Python. Les fonctions ne libèreront *pas* le GIL lors de " +"leur exécution." -#: library/ctypes.rst:1679 +#: library/ctypes.rst:1674 msgid "" "Function prototypes created by these factory functions can be instantiated " "in different ways, depending on the type and number of the parameters in the " "call:" msgstr "" +"Il y a plusieurs façons d'instancier les prototypes de fonction créés par " +"ces fabriques, selon le type et le nombre de paramètres de l'appel :" -#: library/ctypes.rst:1687 +#: library/ctypes.rst:1682 msgid "" "Returns a foreign function at the specified address which must be an integer." msgstr "" +"Renvoie une fonction externe sur l'adresse donnée sous la forme d'un entier." -#: library/ctypes.rst:1694 +#: library/ctypes.rst:1689 msgid "" "Create a C callable function (a callback function) from a Python *callable*." msgstr "" +"Crée une fonction appelable depuis du code C (une fonction de rappel) d'un " +"appelable Python donné en paramètre." -#: library/ctypes.rst:1701 +#: library/ctypes.rst:1696 msgid "" "Returns a foreign function exported by a shared library. *func_spec* must be " "a 2-tuple ``(name_or_ordinal, library)``. The first item is the name of the " "exported function as string, or the ordinal of the exported function as " "small integer. The second item is the shared library instance." msgstr "" +"Renvoie une fonction externe exposée par une bibliothèque partagée. " +"*func_spec* est un couple ``(nom_ou_indice, bibliothèque)``. Le premier " +"élément est le nom de la fonction à passer comme une chaîne ou bien son " +"indice (dans la table des symboles) à passer comme un entier. Le second " +"élément est l'instance de la bibliothèque partagée." -#: library/ctypes.rst:1711 +#: library/ctypes.rst:1706 msgid "" "Returns a foreign function that will call a COM method. *vtbl_index* is the " "index into the virtual function table, a small non-negative integer. *name* " "is name of the COM method. *iid* is an optional pointer to the interface " "identifier which is used in extended error reporting." msgstr "" +"Renvoie une fonction qui appelle une méthode COM. *vtbl_index* est l'indice " +"de la fonction dans la table virtuelle, un petit entier positif. *name* est " +"le nom de la méthode COM. *iid* est un pointeur optionnel vers " +"l'identificateur de plateforme, qui est utilisé dans la remontée d'erreurs " +"étendue." -#: library/ctypes.rst:1716 +#: library/ctypes.rst:1711 msgid "" "COM methods use a special calling convention: They require a pointer to the " "COM interface as first argument, in addition to those parameters that are " "specified in the :attr:`argtypes` tuple." msgstr "" +"Les méthodes COM ont une convention d'appel particulière : elles requièrent " +"de passer un pointeur vers l'interface COM en premier argument, en sus des " +"arguments passés dans le *n*-uplet :attr:`argtypes`." -#: library/ctypes.rst:1720 +#: library/ctypes.rst:1715 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." msgstr "" +"Le paramètre optionnel *paramflags* crée une fabrique de fonction externes " +"avec des fonctionnalités supplémentaires par rapport à celles décrites ci-" +"dessus." -#: library/ctypes.rst:1723 +#: library/ctypes.rst:1718 msgid "*paramflags* must be a tuple of the same length as :attr:`argtypes`." -msgstr "" +msgstr "*paramflags* est un *n*-uplet de la même taille que :attr:`argtypes`." -#: library/ctypes.rst:1725 +#: library/ctypes.rst:1720 msgid "" "Each item in this tuple contains further information about a parameter, it " "must be a tuple containing one, two, or three items." msgstr "" +"Chaque élément de ce *n*-uplet contient des informations supplémentaires sur " +"le paramètre correspondant. Ce doit être aussi un *n*-uplet, avec un, deux " +"ou trois éléments." -#: library/ctypes.rst:1728 +#: library/ctypes.rst:1723 msgid "" "The first item is an integer containing a combination of direction flags for " "the parameter:" msgstr "" +"Le premier élément est un entier qui contient une combinaison de drapeaux " +"qui précisent le sens des paramètres (entrée ou sortie) :" -#: library/ctypes.rst:1732 +#: library/ctypes.rst:1727 msgid "1" msgstr "1" -#: library/ctypes.rst:1732 +#: library/ctypes.rst:1727 msgid "Specifies an input parameter to the function." -msgstr "" +msgstr "Paramètre d'entrée." -#: library/ctypes.rst:1735 +#: library/ctypes.rst:1730 msgid "2" msgstr "2" -#: library/ctypes.rst:1735 +#: library/ctypes.rst:1730 msgid "Output parameter. The foreign function fills in a value." -msgstr "" +msgstr "Paramètre de sortie. La fonction externe va modifier cette valeur." -#: library/ctypes.rst:1738 +#: library/ctypes.rst:1733 msgid "4" msgstr "4" -#: library/ctypes.rst:1738 +#: library/ctypes.rst:1733 msgid "Input parameter which defaults to the integer zero." -msgstr "" +msgstr "Paramètre d'entrée, valant 0 par défaut." -#: library/ctypes.rst:1740 +#: library/ctypes.rst:1735 msgid "" "The optional second item is the parameter name as string. If this is " "specified, the foreign function can be called with named parameters." msgstr "" +"Le deuxième élément (optionnel) est une chaîne de caractères représentant le " +"nom du paramètre. Si cet élément est donné, la fonction externe pourra être " +"appelée avec des paramètres nommés." -#: library/ctypes.rst:1743 +#: library/ctypes.rst:1738 msgid "The optional third item is the default value for this parameter." msgstr "" +"Le troisième élément (optionnel) est la valeur par défaut du paramètre." -#: library/ctypes.rst:1745 +#: library/ctypes.rst:1740 msgid "" "This example demonstrates how to wrap the Windows ``MessageBoxW`` function " "so that it supports default parameters and named arguments. The C " "declaration from the windows header file is this::" msgstr "" +"L'exemple suivant montre comment encapsuler la fonction Windows " +"``MessageBoxW`` afin que celle-ci prenne en charge des paramètres par défaut " +"et des arguments nommés. Sa déclaration C dans le fichier d'en-tête des " +"fenêtres est ::" -#: library/ctypes.rst:1779 +#: library/ctypes.rst:1774 msgid "Here is the wrapping with :mod:`ctypes`::" -msgstr "" +msgstr "L'encapsulation :mod:`ctypes` correspondante est alors ::" -#: library/ctypes.rst:1764 +#: library/ctypes.rst:1759 msgid "The ``MessageBox`` foreign function can now be called in these ways::" msgstr "" +"La fonction ``MessageBox`` peut désormais être appelée des manières " +"suivantes ::" -#: library/ctypes.rst:1770 +#: library/ctypes.rst:1765 msgid "" "A second example demonstrates output parameters. The win32 " "``GetWindowRect`` function retrieves the dimensions of a specified window by " "copying them into ``RECT`` structure that the caller has to supply. Here is " "the C declaration::" msgstr "" +"L'exemple qui suit traite des paramètres en sortie. La fonction win32 " +"``GetWindowRect`` donne les dimensions d'une fenêtre en les copiant dans une " +"structure ``RECT`` que l'appelant doit fournir. Sa déclaration en C est ::" -#: library/ctypes.rst:1788 +#: library/ctypes.rst:1783 msgid "" "Functions with output parameters will automatically return the output " "parameter value if there is a single one, or a tuple containing the output " "parameter values when there are more than one, so the GetWindowRect function " "now returns a RECT instance, when called." msgstr "" +"Les fonctions avec des paramètres en sortie renvoient automatiquement la " +"valeur du paramètre de sortie s'il n'y en a qu'un seul, ou un *n*-uplet avec " +"les valeurs de sortie de chaque paramètre s'il y en a plusieurs. Ici, la " +"fonction *GetWindowRect* renvoie donc une instance de *RECT* quand elle est " +"appelée." -#: library/ctypes.rst:1793 +#: library/ctypes.rst:1788 msgid "" "Output parameters can be combined with the :attr:`errcheck` protocol to do " "further output processing and error checking. The win32 ``GetWindowRect`` " @@ -2415,8 +2472,13 @@ msgid "" "function could do the error checking, and raises an exception when the api " "call failed::" msgstr "" +"Il est possible de combiner des paramètres en sortie avec le protocole :attr:" +"`errcheck` pour post-traiter les sorties et faire de la vérification " +"d'erreur. La fonction de l'API win32 ``GetWindowRect`` renvoie un ``BOOL`` " +"pour indiquer le succès ou l'échec de l'exécution, donc cette fonction peut " +"vérifier le résultat et lever une exception quand l'appel à l'API a échoué ::" -#: library/ctypes.rst:1806 +#: library/ctypes.rst:1801 msgid "" "If the :attr:`errcheck` function returns the argument tuple it receives " "unchanged, :mod:`ctypes` continues the normal processing it does on the " @@ -2424,47 +2486,53 @@ msgid "" "instead of a ``RECT`` instance, you can retrieve the fields in the function " "and return them instead, the normal processing will no longer take place::" msgstr "" +"Si la fonction :attr:`errcheck` renvoie le *n*-uplet passé en paramètre sans " +"rien y changer, :mod:`ctypes` continue l'exécution habituelle des paramètres " +"en sortie. Si on préfère renvoyer un *n*-uplet de coordonnées au lieu de " +"renvoyer une instance de ``RECT``, il faut récupérer les champs " +"correspondants et les renvoyer en retour. Dans ce cas, l'exécution " +"habituelle n'a plus lieu ::" -#: library/ctypes.rst:1825 +#: library/ctypes.rst:1820 msgid "Utility functions" msgstr "Fonctions utilitaires" -#: library/ctypes.rst:1829 +#: library/ctypes.rst:1824 msgid "" "Returns the address of the memory buffer as integer. *obj* must be an " "instance of a ctypes type." msgstr "" -#: library/ctypes.rst:1832 +#: library/ctypes.rst:1827 msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." msgstr "" -#: library/ctypes.rst:1837 +#: library/ctypes.rst:1832 msgid "" "Returns the alignment requirements of a ctypes type. *obj_or_type* must be a " "ctypes type or instance." msgstr "" -#: library/ctypes.rst:1843 +#: library/ctypes.rst:1838 msgid "" "Returns a light-weight pointer to *obj*, which must be an instance of a " "ctypes type. *offset* defaults to zero, and must be an integer that will be " "added to the internal pointer value." msgstr "" -#: library/ctypes.rst:1847 +#: library/ctypes.rst:1842 msgid "``byref(obj, offset)`` corresponds to this C code::" msgstr "" -#: library/ctypes.rst:1851 +#: library/ctypes.rst:1846 msgid "" "The returned object can only be used as a foreign function call parameter. " "It behaves similar to ``pointer(obj)``, but the construction is a lot faster." msgstr "" -#: library/ctypes.rst:1857 +#: library/ctypes.rst:1852 msgid "" "This function is similar to the cast operator in C. It returns a new " "instance of *type* which points to the same memory block as *obj*. *type* " @@ -2472,19 +2540,19 @@ msgid "" "as a pointer." msgstr "" -#: library/ctypes.rst:1865 +#: library/ctypes.rst:1860 msgid "" "This function creates a mutable character buffer. The returned object is a " "ctypes array of :class:`c_char`." msgstr "" -#: library/ctypes.rst:1868 +#: library/ctypes.rst:1863 msgid "" "*init_or_size* must be an integer which specifies the size of the array, or " "a bytes object which will be used to initialize the array items." msgstr "" -#: library/ctypes.rst:1871 +#: library/ctypes.rst:1866 msgid "" "If a bytes object is specified as first argument, the buffer is made one " "item larger than its length so that the last element in the array is a NUL " @@ -2493,25 +2561,25 @@ msgid "" "not be used." msgstr "" -#: library/ctypes.rst:1876 +#: library/ctypes.rst:1871 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: library/ctypes.rst:1881 +#: library/ctypes.rst:1876 msgid "" "This function creates a mutable unicode character buffer. The returned " "object is a ctypes array of :class:`c_wchar`." msgstr "" -#: library/ctypes.rst:1884 +#: library/ctypes.rst:1879 msgid "" "*init_or_size* must be an integer which specifies the size of the array, or " "a string which will be used to initialize the array items." msgstr "" -#: library/ctypes.rst:1887 +#: library/ctypes.rst:1882 msgid "" "If a string is specified as first argument, the buffer is made one item " "larger than the length of the string so that the last element in the array " @@ -2520,27 +2588,27 @@ msgid "" "should not be used." msgstr "" -#: library/ctypes.rst:1893 +#: library/ctypes.rst:1888 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " "with arguments ``init``, ``size``." msgstr "" -#: library/ctypes.rst:1898 +#: library/ctypes.rst:1893 msgid "" "Windows only: This function is a hook which allows implementing in-process " "COM servers with ctypes. It is called from the DllCanUnloadNow function " "that the _ctypes extension dll exports." msgstr "" -#: library/ctypes.rst:1905 +#: library/ctypes.rst:1900 msgid "" "Windows only: This function is a hook which allows implementing in-process " "COM servers with ctypes. It is called from the DllGetClassObject function " "that the ``_ctypes`` extension dll exports." msgstr "" -#: library/ctypes.rst:1913 +#: library/ctypes.rst:1908 msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like ``lib``, suffix like ``.so``, ``.dylib`` or version " @@ -2548,92 +2616,92 @@ msgid "" "If no library can be found, returns ``None``." msgstr "" -#: library/ctypes.rst:1924 +#: library/ctypes.rst:1919 msgid "" "Windows only: return the filename of the VC runtime library used by Python, " "and by the extension modules. If the name of the library cannot be " "determined, ``None`` is returned." msgstr "" -#: library/ctypes.rst:1928 +#: library/ctypes.rst:1923 msgid "" "If you need to free memory, for example, allocated by an extension module " "with a call to the ``free(void *)``, it is important that you use the " "function in the same library that allocated the memory." msgstr "" -#: library/ctypes.rst:1935 +#: library/ctypes.rst:1930 msgid "" "Windows only: Returns a textual description of the error code *code*. If no " "error code is specified, the last error code is used by calling the Windows " "api function GetLastError." msgstr "" -#: library/ctypes.rst:1942 +#: library/ctypes.rst:1937 msgid "" "Windows only: Returns the last error code set by Windows in the calling " "thread. This function calls the Windows `GetLastError()` function directly, " "it does not return the ctypes-private copy of the error code." msgstr "" -#: library/ctypes.rst:1948 +#: library/ctypes.rst:1943 msgid "" "Returns the current value of the ctypes-private copy of the system :data:" "`errno` variable in the calling thread." msgstr "" -#: library/ctypes.rst:1951 +#: library/ctypes.rst:1946 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " "arguments." msgstr "" -#: library/ctypes.rst:1955 +#: library/ctypes.rst:1950 msgid "" "Windows only: returns the current value of the ctypes-private copy of the " "system :data:`LastError` variable in the calling thread." msgstr "" -#: library/ctypes.rst:1958 +#: library/ctypes.rst:1953 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " "arguments." msgstr "" -#: library/ctypes.rst:1962 +#: library/ctypes.rst:1957 msgid "" "Same as the standard C memmove library function: copies *count* bytes from " "*src* to *dst*. *dst* and *src* must be integers or ctypes instances that " "can be converted to pointers." msgstr "" -#: library/ctypes.rst:1969 +#: library/ctypes.rst:1964 msgid "" "Same as the standard C memset library function: fills the memory block at " "address *dst* with *count* bytes of value *c*. *dst* must be an integer " "specifying an address, or a ctypes instance." msgstr "" -#: library/ctypes.rst:1976 +#: library/ctypes.rst:1971 msgid "" "This factory function creates and returns a new ctypes pointer type. Pointer " "types are cached and reused internally, so calling this function repeatedly " "is cheap. *type* must be a ctypes type." msgstr "" -#: library/ctypes.rst:1983 +#: library/ctypes.rst:1978 msgid "" "This function creates a new pointer instance, pointing to *obj*. The " "returned object is of the type ``POINTER(type(obj))``." msgstr "" -#: library/ctypes.rst:1986 +#: library/ctypes.rst:1981 msgid "" "Note: If you just want to pass a pointer to an object to a foreign function " "call, you should use ``byref(obj)`` which is much faster." msgstr "" -#: library/ctypes.rst:1992 +#: library/ctypes.rst:1987 msgid "" "This function resizes the internal memory buffer of *obj*, which must be an " "instance of a ctypes type. It is not possible to make the buffer smaller " @@ -2641,51 +2709,51 @@ msgid "" "but it is possible to enlarge the buffer." msgstr "" -#: library/ctypes.rst:2000 +#: library/ctypes.rst:1995 msgid "" "Set the current value of the ctypes-private copy of the system :data:`errno` " "variable in the calling thread to *value* and return the previous value." msgstr "" -#: library/ctypes.rst:2003 +#: library/ctypes.rst:1998 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." msgstr "" -#: library/ctypes.rst:2008 +#: library/ctypes.rst:2003 msgid "" "Windows only: set the current value of the ctypes-private copy of the " "system :data:`LastError` variable in the calling thread to *value* and " "return the previous value." msgstr "" -#: library/ctypes.rst:2012 +#: library/ctypes.rst:2007 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " "argument ``error``." msgstr "" -#: library/ctypes.rst:2017 +#: library/ctypes.rst:2012 msgid "" "Returns the size in bytes of a ctypes type or instance memory buffer. Does " "the same as the C ``sizeof`` operator." msgstr "" -#: library/ctypes.rst:2023 +#: library/ctypes.rst:2018 msgid "" "This function returns the C string starting at memory address *address* as a " "bytes object. If size is specified, it is used as size, otherwise the string " "is assumed to be zero-terminated." msgstr "" -#: library/ctypes.rst:2027 +#: library/ctypes.rst:2022 msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " "arguments ``address``, ``size``." msgstr "" -#: library/ctypes.rst:2032 +#: library/ctypes.rst:2027 msgid "" "Windows only: this function is probably the worst-named thing in ctypes. It " "creates an instance of OSError. If *code* is not specified, " @@ -2694,11 +2762,11 @@ msgid "" "error." msgstr "" -#: library/ctypes.rst:2038 +#: library/ctypes.rst:2033 msgid "An instance of :exc:`WindowsError` used to be created." msgstr "" -#: library/ctypes.rst:2044 +#: library/ctypes.rst:2039 msgid "" "This function returns the wide character string starting at memory address " "*address* as a string. If *size* is specified, it is used as the number of " @@ -2706,17 +2774,17 @@ msgid "" "terminated." msgstr "" -#: library/ctypes.rst:2049 +#: library/ctypes.rst:2044 msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " "arguments ``address``, ``size``." msgstr "" -#: library/ctypes.rst:2055 +#: library/ctypes.rst:2050 msgid "Data types" msgstr "Types de données" -#: library/ctypes.rst:2060 +#: library/ctypes.rst:2055 msgid "" "This non-public class is the common base class of all ctypes data types. " "Among other things, all ctypes type instances contain a memory block that " @@ -2726,13 +2794,13 @@ msgid "" "alive in case the memory block contains pointers." msgstr "" -#: library/ctypes.rst:2067 +#: library/ctypes.rst:2062 msgid "" "Common methods of ctypes data types, these are all class methods (to be " "exact, they are methods of the :term:`metaclass`):" msgstr "" -#: library/ctypes.rst:2072 +#: library/ctypes.rst:2067 msgid "" "This method returns a ctypes instance that shares the buffer of the *source* " "object. The *source* object must support the writeable buffer interface. " @@ -2741,13 +2809,13 @@ msgid "" "exc:`ValueError` is raised." msgstr "" -#: library/ctypes.rst:2088 +#: library/ctypes.rst:2083 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " "arguments ``pointer``, ``size``, ``offset``." msgstr "" -#: library/ctypes.rst:2082 +#: library/ctypes.rst:2077 msgid "" "This method creates a ctypes instance, copying the buffer from the *source* " "object buffer which must be readable. The optional *offset* parameter " @@ -2755,25 +2823,25 @@ msgid "" "If the source buffer is not large enough a :exc:`ValueError` is raised." msgstr "" -#: library/ctypes.rst:2092 +#: library/ctypes.rst:2087 msgid "" "This method returns a ctypes type instance using the memory specified by " "*address* which must be an integer." msgstr "" -#: library/ctypes.rst:2095 +#: library/ctypes.rst:2090 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata`` with argument " "``address``." msgstr "" -#: library/ctypes.rst:2097 +#: library/ctypes.rst:2092 msgid "" "This method, and others that indirectly call this method, raises an :ref:" "`auditing event ` ``ctypes.cdata`` with argument ``address``." msgstr "" -#: library/ctypes.rst:2103 +#: library/ctypes.rst:2098 msgid "" "This method adapts *obj* to a ctypes type. It is called with the actual " "object used in a foreign function call when the type is present in the " @@ -2781,25 +2849,25 @@ msgid "" "be used as a function call parameter." msgstr "" -#: library/ctypes.rst:2108 +#: library/ctypes.rst:2103 msgid "" "All ctypes data types have a default implementation of this classmethod that " "normally returns *obj* if that is an instance of the type. Some types " "accept other objects as well." msgstr "" -#: library/ctypes.rst:2114 +#: library/ctypes.rst:2109 msgid "" "This method returns a ctypes type instance exported by a shared library. " "*name* is the name of the symbol that exports the data, *library* is the " "loaded shared library." msgstr "" -#: library/ctypes.rst:2118 +#: library/ctypes.rst:2113 msgid "Common instance variables of ctypes data types:" msgstr "" -#: library/ctypes.rst:2122 +#: library/ctypes.rst:2117 msgid "" "Sometimes ctypes data instances do not own the memory block they contain, " "instead they share part of the memory block of a base object. The :attr:" @@ -2807,13 +2875,13 @@ msgid "" "block." msgstr "" -#: library/ctypes.rst:2129 +#: library/ctypes.rst:2124 msgid "" "This read-only variable is true when the ctypes data instance has allocated " "the memory block itself, false otherwise." msgstr "" -#: library/ctypes.rst:2134 +#: library/ctypes.rst:2129 msgid "" "This member is either ``None`` or a dictionary containing Python objects " "that need to be kept alive so that the memory block contents is kept valid. " @@ -2821,7 +2889,7 @@ msgid "" "dictionary." msgstr "" -#: library/ctypes.rst:2147 +#: library/ctypes.rst:2142 msgid "" "This non-public class is the base class of all fundamental ctypes data " "types. It is mentioned here because it contains the common attributes of the " @@ -2830,11 +2898,11 @@ msgid "" "types that are not and do not contain pointers can now be pickled." msgstr "" -#: library/ctypes.rst:2153 +#: library/ctypes.rst:2148 msgid "Instances have a single attribute:" msgstr "" -#: library/ctypes.rst:2157 +#: library/ctypes.rst:2152 msgid "" "This attribute contains the actual value of the instance. For integer and " "pointer types, it is an integer, for character types, it is a single " @@ -2842,7 +2910,7 @@ msgid "" "bytes object or string." msgstr "" -#: library/ctypes.rst:2162 +#: library/ctypes.rst:2157 msgid "" "When the ``value`` attribute is retrieved from a ctypes instance, usually a " "new object is returned each time. :mod:`ctypes` does *not* implement " @@ -2850,7 +2918,7 @@ msgid "" "true for all other ctypes object instances." msgstr "" -#: library/ctypes.rst:2168 +#: library/ctypes.rst:2163 msgid "" "Fundamental data types, when returned as foreign function call results, or, " "for example, by retrieving structure field members or array items, are " @@ -2859,7 +2927,7 @@ msgid "" "receive a Python bytes object, *not* a :class:`c_char_p` instance." msgstr "" -#: library/ctypes.rst:2176 +#: library/ctypes.rst:2171 msgid "" "Subclasses of fundamental data types do *not* inherit this behavior. So, if " "a foreign functions :attr:`restype` is a subclass of :class:`c_void_p`, you " @@ -2867,25 +2935,25 @@ msgid "" "you can get the value of the pointer by accessing the ``value`` attribute." msgstr "" -#: library/ctypes.rst:2181 +#: library/ctypes.rst:2176 msgid "These are the fundamental ctypes data types:" msgstr "" -#: library/ctypes.rst:2185 +#: library/ctypes.rst:2180 msgid "" "Represents the C :c:type:`signed char` datatype, and interprets the value as " "small integer. The constructor accepts an optional integer initializer; no " "overflow checking is done." msgstr "" -#: library/ctypes.rst:2192 +#: library/ctypes.rst:2187 msgid "" "Represents the C :c:type:`char` datatype, and interprets the value as a " "single character. The constructor accepts an optional string initializer, " "the length of the string must be exactly one character." msgstr "" -#: library/ctypes.rst:2199 +#: library/ctypes.rst:2194 msgid "" "Represents the C :c:type:`char *` datatype when it points to a zero-" "terminated string. For a general character pointer that may also point to " @@ -2893,178 +2961,178 @@ msgid "" "integer address, or a bytes object." msgstr "" -#: library/ctypes.rst:2207 +#: library/ctypes.rst:2202 msgid "" "Represents the C :c:type:`double` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: library/ctypes.rst:2213 +#: library/ctypes.rst:2208 msgid "" "Represents the C :c:type:`long double` datatype. The constructor accepts an " "optional float initializer. On platforms where ``sizeof(long double) == " "sizeof(double)`` it is an alias to :class:`c_double`." msgstr "" -#: library/ctypes.rst:2219 +#: library/ctypes.rst:2214 msgid "" "Represents the C :c:type:`float` datatype. The constructor accepts an " "optional float initializer." msgstr "" -#: library/ctypes.rst:2225 +#: library/ctypes.rst:2220 msgid "" "Represents the C :c:type:`signed int` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias to :class:`c_long`." msgstr "" -#: library/ctypes.rst:2232 +#: library/ctypes.rst:2227 msgid "" "Represents the C 8-bit :c:type:`signed int` datatype. Usually an alias for :" "class:`c_byte`." msgstr "" -#: library/ctypes.rst:2238 +#: library/ctypes.rst:2233 msgid "" "Represents the C 16-bit :c:type:`signed int` datatype. Usually an alias " "for :class:`c_short`." msgstr "" -#: library/ctypes.rst:2244 +#: library/ctypes.rst:2239 msgid "" "Represents the C 32-bit :c:type:`signed int` datatype. Usually an alias " "for :class:`c_int`." msgstr "" -#: library/ctypes.rst:2250 +#: library/ctypes.rst:2245 msgid "" "Represents the C 64-bit :c:type:`signed int` datatype. Usually an alias " "for :class:`c_longlong`." msgstr "" -#: library/ctypes.rst:2256 +#: library/ctypes.rst:2251 msgid "" "Represents the C :c:type:`signed long` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2262 +#: library/ctypes.rst:2257 msgid "" "Represents the C :c:type:`signed long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2268 +#: library/ctypes.rst:2263 msgid "" "Represents the C :c:type:`signed short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2274 +#: library/ctypes.rst:2269 msgid "Represents the C :c:type:`size_t` datatype." msgstr "" -#: library/ctypes.rst:2279 +#: library/ctypes.rst:2274 msgid "Represents the C :c:type:`ssize_t` datatype." msgstr "" -#: library/ctypes.rst:2286 +#: library/ctypes.rst:2281 msgid "" "Represents the C :c:type:`unsigned char` datatype, it interprets the value " "as small integer. The constructor accepts an optional integer initializer; " "no overflow checking is done." msgstr "" -#: library/ctypes.rst:2293 +#: library/ctypes.rst:2288 msgid "" "Represents the C :c:type:`unsigned int` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias for :class:`c_ulong`." msgstr "" -#: library/ctypes.rst:2300 +#: library/ctypes.rst:2295 msgid "" "Represents the C 8-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ubyte`." msgstr "" -#: library/ctypes.rst:2306 +#: library/ctypes.rst:2301 msgid "" "Represents the C 16-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ushort`." msgstr "" -#: library/ctypes.rst:2312 +#: library/ctypes.rst:2307 msgid "" "Represents the C 32-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_uint`." msgstr "" -#: library/ctypes.rst:2318 +#: library/ctypes.rst:2313 msgid "" "Represents the C 64-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ulonglong`." msgstr "" -#: library/ctypes.rst:2324 +#: library/ctypes.rst:2319 msgid "" "Represents the C :c:type:`unsigned long` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2330 +#: library/ctypes.rst:2325 msgid "" "Represents the C :c:type:`unsigned long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2336 +#: library/ctypes.rst:2331 msgid "" "Represents the C :c:type:`unsigned short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -#: library/ctypes.rst:2342 +#: library/ctypes.rst:2337 msgid "" "Represents the C :c:type:`void *` type. The value is represented as " "integer. The constructor accepts an optional integer initializer." msgstr "" -#: library/ctypes.rst:2348 +#: library/ctypes.rst:2343 msgid "" "Represents the C :c:type:`wchar_t` datatype, and interprets the value as a " "single character unicode string. The constructor accepts an optional string " "initializer, the length of the string must be exactly one character." msgstr "" -#: library/ctypes.rst:2355 +#: library/ctypes.rst:2350 msgid "" "Represents the C :c:type:`wchar_t *` datatype, which must be a pointer to a " "zero-terminated wide character string. The constructor accepts an integer " "address, or a string." msgstr "" -#: library/ctypes.rst:2362 +#: library/ctypes.rst:2357 msgid "" "Represent the C :c:type:`bool` datatype (more accurately, :c:type:`_Bool` " "from C99). Its value can be ``True`` or ``False``, and the constructor " "accepts any object that has a truth value." msgstr "" -#: library/ctypes.rst:2369 +#: library/ctypes.rst:2364 msgid "" "Windows only: Represents a :c:type:`HRESULT` value, which contains success " "or error information for a function or method call." msgstr "" -#: library/ctypes.rst:2375 +#: library/ctypes.rst:2370 msgid "" "Represents the C :c:type:`PyObject *` datatype. Calling this without an " "argument creates a ``NULL`` :c:type:`PyObject *` pointer." msgstr "" -#: library/ctypes.rst:2378 +#: library/ctypes.rst:2373 msgid "" "The :mod:`ctypes.wintypes` module provides quite some other Windows specific " "data types, for example :c:type:`HWND`, :c:type:`WPARAM`, or :c:type:" @@ -3072,33 +3140,33 @@ msgid "" "also defined." msgstr "" -#: library/ctypes.rst:2386 +#: library/ctypes.rst:2381 msgid "Structured data types" msgstr "Types de données dérivés de Structure" -#: library/ctypes.rst:2391 +#: library/ctypes.rst:2386 msgid "Abstract base class for unions in native byte order." msgstr "" -#: library/ctypes.rst:2396 +#: library/ctypes.rst:2391 msgid "Abstract base class for structures in *big endian* byte order." msgstr "" -#: library/ctypes.rst:2401 +#: library/ctypes.rst:2396 msgid "Abstract base class for structures in *little endian* byte order." msgstr "" -#: library/ctypes.rst:2403 +#: library/ctypes.rst:2398 msgid "" "Structures with non-native byte order cannot contain pointer type fields, or " "any other data types containing pointer type fields." msgstr "" -#: library/ctypes.rst:2409 +#: library/ctypes.rst:2404 msgid "Abstract base class for structures in *native* byte order." msgstr "" -#: library/ctypes.rst:2411 +#: library/ctypes.rst:2406 msgid "" "Concrete structure and union types must be created by subclassing one of " "these types, and at least define a :attr:`_fields_` class variable. :mod:" @@ -3106,34 +3174,34 @@ msgid "" "the fields by direct attribute accesses. These are the" msgstr "" -#: library/ctypes.rst:2419 +#: library/ctypes.rst:2414 msgid "" "A sequence defining the structure fields. The items must be 2-tuples or 3-" "tuples. The first item is the name of the field, the second item specifies " "the type of the field; it can be any ctypes data type." msgstr "" -#: library/ctypes.rst:2423 +#: library/ctypes.rst:2418 msgid "" "For integer type fields like :class:`c_int`, a third optional item can be " "given. It must be a small positive integer defining the bit width of the " "field." msgstr "" -#: library/ctypes.rst:2427 +#: library/ctypes.rst:2422 msgid "" "Field names must be unique within one structure or union. This is not " "checked, only one field can be accessed when names are repeated." msgstr "" -#: library/ctypes.rst:2430 +#: library/ctypes.rst:2425 msgid "" "It is possible to define the :attr:`_fields_` class variable *after* the " "class statement that defines the Structure subclass, this allows creating " "data types that directly or indirectly reference themselves::" msgstr "" -#: library/ctypes.rst:2440 +#: library/ctypes.rst:2435 msgid "" "The :attr:`_fields_` class variable must, however, be defined before the " "type is first used (an instance is created, :func:`sizeof` is called on it, " @@ -3141,28 +3209,28 @@ msgid "" "raise an AttributeError." msgstr "" -#: library/ctypes.rst:2445 +#: library/ctypes.rst:2440 msgid "" "It is possible to define sub-subclasses of structure types, they inherit the " "fields of the base class plus the :attr:`_fields_` defined in the sub-" "subclass, if any." msgstr "" -#: library/ctypes.rst:2452 +#: library/ctypes.rst:2447 msgid "" "An optional small integer that allows overriding the alignment of structure " "fields in the instance. :attr:`_pack_` must already be defined when :attr:" "`_fields_` is assigned, otherwise it will have no effect." msgstr "" -#: library/ctypes.rst:2459 +#: library/ctypes.rst:2454 msgid "" "An optional sequence that lists the names of unnamed (anonymous) fields. :" "attr:`_anonymous_` must be already defined when :attr:`_fields_` is " "assigned, otherwise it will have no effect." msgstr "" -#: library/ctypes.rst:2463 +#: library/ctypes.rst:2458 msgid "" "The fields listed in this variable must be structure or union type fields. :" "mod:`ctypes` will create descriptors in the structure type that allows " @@ -3170,11 +3238,11 @@ msgid "" "structure or union field." msgstr "" -#: library/ctypes.rst:2468 +#: library/ctypes.rst:2463 msgid "Here is an example type (Windows)::" msgstr "" -#: library/ctypes.rst:2481 +#: library/ctypes.rst:2476 msgid "" "The ``TYPEDESC`` structure describes a COM data type, the ``vt`` field " "specifies which one of the union fields is valid. Since the ``u`` field is " @@ -3184,7 +3252,7 @@ msgid "" "temporary union instance::" msgstr "" -#: library/ctypes.rst:2493 +#: library/ctypes.rst:2488 msgid "" "It is possible to define sub-subclasses of structures, they inherit the " "fields of the base class. If the subclass definition has a separate :attr:" @@ -3192,7 +3260,7 @@ msgid "" "of the base class." msgstr "" -#: library/ctypes.rst:2498 +#: library/ctypes.rst:2493 msgid "" "Structure and union constructors accept both positional and keyword " "arguments. Positional arguments are used to initialize member fields in the " @@ -3202,52 +3270,52 @@ msgid "" "names not present in :attr:`_fields_`." msgstr "" -#: library/ctypes.rst:2509 +#: library/ctypes.rst:2504 msgid "Arrays and pointers" msgstr "Tableaux et pointeurs" -#: library/ctypes.rst:2513 +#: library/ctypes.rst:2508 msgid "Abstract base class for arrays." msgstr "Classe de base abstraite pour les *arrays*." -#: library/ctypes.rst:2515 +#: library/ctypes.rst:2510 msgid "" "The recommended way to create concrete array types is by multiplying any :" -"mod:`ctypes` data type with a positive integer. Alternatively, you can " +"mod:`ctypes` data type with a non-negative integer. Alternatively, you can " "subclass this type and define :attr:`_length_` and :attr:`_type_` class " "variables. Array elements can be read and written using standard subscript " "and slice accesses; for slice reads, the resulting object is *not* itself " "an :class:`Array`." msgstr "" -#: library/ctypes.rst:2525 +#: library/ctypes.rst:2520 msgid "" "A positive integer specifying the number of elements in the array. Out-of-" "range subscripts result in an :exc:`IndexError`. Will be returned by :func:" "`len`." msgstr "" -#: library/ctypes.rst:2532 +#: library/ctypes.rst:2527 msgid "Specifies the type of each element in the array." msgstr "Spécifie le type de chaque élément de l'*array*." -#: library/ctypes.rst:2535 +#: library/ctypes.rst:2530 msgid "" "Array subclass constructors accept positional arguments, used to initialize " "the elements in order." msgstr "" -#: library/ctypes.rst:2541 +#: library/ctypes.rst:2536 msgid "Private, abstract base class for pointers." msgstr "" -#: library/ctypes.rst:2543 +#: library/ctypes.rst:2538 msgid "" "Concrete pointer types are created by calling :func:`POINTER` with the type " "that will be pointed to; this is done automatically by :func:`pointer`." msgstr "" -#: library/ctypes.rst:2547 +#: library/ctypes.rst:2542 msgid "" "If a pointer points to an array, its elements can be read and written using " "standard subscript and slice accesses. Pointer objects have no size, so :" @@ -3256,12 +3324,21 @@ msgid "" "probably crash with an access violation (if you're lucky)." msgstr "" -#: library/ctypes.rst:2557 +#: library/ctypes.rst:2552 msgid "Specifies the type pointed to." msgstr "" -#: library/ctypes.rst:2561 +#: library/ctypes.rst:2556 msgid "" "Returns the object to which to pointer points. Assigning to this attribute " "changes the pointer to point to the assigned object." msgstr "" + +#~ msgid "" +#~ "On Windows CE only the standard calling convention is used, for " +#~ "convenience the :class:`WinDLL` and :class:`OleDLL` use the standard " +#~ "calling convention on this platform." +#~ msgstr "" +#~ "Sous Windows CE, seule la convention d'appel standard est utilisée. Pour " +#~ "des raisons pratiques, :class:`WinDLL` et :class:`OleDLL` utilisent la " +#~ "convention d'appel standard sur cette plate-forme." diff --git a/library/curses.po b/library/curses.po index bf1080b48f..bc3605e1fb 100644 --- a/library/curses.po +++ b/library/curses.po @@ -1679,7 +1679,7 @@ msgstr "" #: library/curses.rst:1412 msgid "Key" -msgstr "" +msgstr "Clé" #: library/curses.rst:1414 msgid "``KEY_MIN``" @@ -3008,7 +3008,7 @@ msgstr "" #: library/curses.rst:1816 msgid "Action" -msgstr "" +msgstr "Action" #: library/curses.rst:1818 msgid ":kbd:`Control-A`" diff --git a/library/dataclasses.po b/library/dataclasses.po index 8af15d198e..296a83d77a 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-12-24 14:53+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -38,15 +38,16 @@ msgstr "" #: library/dataclasses.rst:19 msgid "" "The member variables to use in these generated methods are defined using :" -"pep:`526` type annotations. For example this code::" +"pep:`526` type annotations. For example, this code::" msgstr "" "Les variables membres à utiliser dans ces méthodes générées sont définies en " -"utilisant les annotations de type :pep:`526`. Par exemple, ce code ::" +"utilisant les annotations de type :pep:`526`. Par exemple ::" #: library/dataclasses.rst:34 -msgid "Will add, among other things, a :meth:`__init__` that looks like::" +msgid "will add, among other things, a :meth:`__init__` that looks like::" msgstr "" -"Ajoute, entre autres choses, une méthode :meth:`__init__` qui ressemble à ::" +"ce code ajoute à la classe, entre autres choses, une méthode :meth:" +"`__init__` qui ressemble à ::" #: library/dataclasses.rst:41 msgid "" @@ -73,15 +74,15 @@ msgstr "" #: library/dataclasses.rst:54 msgid "" "The :func:`dataclass` decorator examines the class to find ``field``\\s. A " -"``field`` is defined as class variable that has a :term:`type annotation " +"``field`` is defined as a class variable that has a :term:`type annotation " "`. With two exceptions described below, nothing in :" "func:`dataclass` examines the type specified in the variable annotation." msgstr "" -"Le décorateur :func:`dataclass` examine la classe pour trouver des ``champs``" -"\\s. Un ``champ`` est défini comme une variable de classe qui possède une :" -"term:`annotation de type `. À deux exceptions près " -"décrites plus bas, il n’y a rien dans :func:`dataclass` qui examine le type " -"spécifié dans l’annotation de variable." +"Le décorateur :func:`dataclass` examine la classe pour trouver des champs. " +"Un champ est défini comme une variable de classe qui possède une :term:" +"`annotation de type `. À deux exceptions près décrites " +"plus bas, :func:`dataclass` ne prend pas en considération le type donné dans " +"l'annotation." #: library/dataclasses.rst:60 msgid "" @@ -92,18 +93,17 @@ msgstr "" "champs dans la définition de la classe." #: library/dataclasses.rst:63 -#, fuzzy msgid "" "The :func:`dataclass` decorator will add various \"dunder\" methods to the " -"class, described below. If any of the added methods already exist on the " +"class, described below. If any of the added methods already exist in the " "class, the behavior depends on the parameter, as documented below. The " -"decorator returns the same class that is called on; no new class is created." +"decorator returns the same class that it is called on; no new class is " +"created." msgstr "" -"Le décorateur :func:`dataclass` ajoute diverses méthodes « spéciales » à la " +"Le décorateur :func:`dataclass` ajoute diverses méthodes spéciales à la " "classe, décrites ci-après. Si l’une des méthodes ajoutées existe déjà dans " -"la classe, le comportement dépend des paramètres, comme documenté ci-" -"dessous. Le décorateur renvoie la classe sur laquelle il est appelé ; il n’y " -"a pas de nouvelle classe créée." +"la classe, le comportement dépend des paramètres. Le décorateur renvoie la " +"classe sur laquelle il est appelé ; aucune nouvelle classe n'est créée." #: library/dataclasses.rst:69 msgid "" @@ -239,7 +239,6 @@ msgstr "" "de :meth:`__hash__`." #: library/dataclasses.rst:139 -#, fuzzy msgid "" "If :meth:`__hash__` is not explicitly defined, or if it is set to ``None``, " "then :func:`dataclass` *may* add an implicit :meth:`__hash__` method. " @@ -250,11 +249,12 @@ msgid "" msgstr "" "Si :meth:`__hash__` n’est pas défini explicitement, ou s’il a pour valeur " "``None``, alors :func:`dataclass` *peut* ajouter une méthode :meth:" -"`__hash__` implicite. Bien que ce ne soit pas recommandé,, vous pouvez " +"`__hash__` implicite. Bien que ce ne soit pas recommandé, vous pouvez " "forcer :func:`dataclass` à créer une méthode :meth:`__hash__` en utilisant " "``unsafe_hash=True``. Cela pourrait être nécessaire si votre classe est " -"logiquement immuable mais qu’une mutation est tout de même possible. C’est " -"un cas très particulier qui doit être considéré avec la plus grande prudence." +"logiquement immuable mais qu’une mutation est tout de même possible. Il " +"s'agit là d'un cas particulier qui doit être considéré avec la plus grande " +"prudence." #: library/dataclasses.rst:146 msgid "" @@ -288,14 +288,13 @@ msgstr "" "basé sur les id)." #: library/dataclasses.rst:159 -#, fuzzy msgid "" "``frozen``: If true (the default is ``False``), assigning to fields will " "generate an exception. This emulates read-only frozen instances. If :meth:" "`__setattr__` or :meth:`__delattr__` is defined in the class, then :exc:" "`TypeError` is raised. See the discussion below." msgstr "" -"``frozen``: Si vrai (faux par défaut), assigner une valeur à un champ lèvera " +"*frozen* : si vrai (faux par défaut), assigner une valeur à un champ lève " "une exception. Cela simule le comportement des instances figées en lecture " "seule. Si la méthode :meth:`__setattr__` ou :meth:`__delattr__` est définie " "sur la classe, alors une :exc:`TypeError` est levée. Voir la discussion ci-" @@ -320,13 +319,12 @@ msgstr "" #: library/dataclasses.rst:177 msgid "" ":exc:`TypeError` will be raised if a field without a default value follows a " -"field with a default value. This is true either when this occurs in a " -"single class, or as a result of class inheritance." +"field with a default value. This is true whether this occurs in a single " +"class, or as a result of class inheritance." msgstr "" "Une :exc:`TypeError` est levée si un champ sans valeur par défaut est défini " "après un champ avec une valeur par défaut. C’est le cas que ce soit dans " -"une seule classe, mais également si c’est le résultat d’un héritage de " -"classes." +"une seule classe ou si c’est le résultat d’un héritage de classes." #: library/dataclasses.rst:183 msgid "" @@ -336,6 +334,11 @@ msgid "" "replace the default field value with a call to the provided :func:`field` " "function. For example::" msgstr "" +"Dans les cas les plus simples et courants, ce qui a été décrit jusqu'ici " +"suffit. Cependant, les classes de données possèdent des fonctionnalités " +"supplémentaires fondées sur des métadonnées propres à chaque champ. Pour " +"remplir ces métadonnées, il suffit de mettre un appel à la fonction :func:" +"`field` à la place de la valeur par défaut, comme dans cet exemple :" #: library/dataclasses.rst:196 msgid "" @@ -347,7 +350,7 @@ msgstr "" #: library/dataclasses.rst:202 msgid "The parameters to :func:`field` are:" -msgstr "" +msgstr "Les paramètres de :func:`field` sont :" #: library/dataclasses.rst:204 msgid "" @@ -355,6 +358,9 @@ msgid "" "This is needed because the :meth:`field` call itself replaces the normal " "position of the default value." msgstr "" +"*default* : s'il est fourni, il devient la valeur par défaut du champ. " +"L'appel à :meth:`field` est mis à la place normale de la valeur par défaut, " +"d'où la nécessité de ce paramètre." #: library/dataclasses.rst:208 msgid "" @@ -364,24 +370,36 @@ msgid "" "discussed below. It is an error to specify both ``default`` and " "``default_factory``." msgstr "" +"*default_factory* : s'il est fourni, ce doit être un objet appelable sans " +"argument. Il est alors appelé à chaque fois qu'il faut une valeur par défaut " +"pour le champ. Ceci permet, entre autres choses, de définir des champs dont " +"les valeurs par défaut sont muables. Une erreur se produit si *default* et " +"*default_factory* sont donnés tous les deux." #: library/dataclasses.rst:214 msgid "" "``init``: If true (the default), this field is included as a parameter to " "the generated :meth:`__init__` method." msgstr "" +"*init* : si vrai (par défaut), la méthode :meth:`__init__` générée possède " +"un paramètre correspondant à ce champ." #: library/dataclasses.rst:217 msgid "" "``repr``: If true (the default), this field is included in the string " "returned by the generated :meth:`__repr__` method." msgstr "" +"*repr* : si vrai (par défaut), le champ est inclus dans les chaînes " +"construites par la méthode :meth:`__repr__` générée." #: library/dataclasses.rst:220 msgid "" "``compare``: If true (the default), this field is included in the generated " "equality and comparison methods (:meth:`__eq__`, :meth:`__gt__`, et al.)." msgstr "" +"*compare* : si vrai (par défaut), le champ est considéré dans les " +"comparaisons d'égalité et d'inégalité dans les méthodes générées :meth:" +"`__eq__`, :meth:`__gt__`, etc." #: library/dataclasses.rst:224 msgid "" @@ -391,6 +409,12 @@ msgid "" "field should be considered in the hash if it's used for comparisons. " "Setting this value to anything other than ``None`` is discouraged." msgstr "" +"*hash* : ce paramètre est un booléen ou ``None``. La valeur ``False`` force " +"la prise en compte du champ dans la méthode :meth:`__hash__` générée, alors " +"que ``False`` force son exclusion. ``None`` revient à mettre la même valeur " +"que *compare*, ce qui est en général correct : il faut inclure dans le " +"hachage les champs employés pour les comparaisons. Il est déconseillé de " +"mettre ce paramètre à autre chose que ``None``." #: library/dataclasses.rst:231 msgid "" @@ -400,6 +424,12 @@ msgid "" "hash value. Even if a field is excluded from the hash, it will still be " "used for comparisons." msgstr "" +"Cependant, une raison légitime de mettre *hash* à ``False`` alors que " +"*compare* est à ``True`` est la concourance de trois facteurs : le champ est " +"coûteux à hacher ; il est nécessaire pour les comparaisons d'égalité ; et il " +"y a déjà d'autres champs qui participent au hachage des instances. À ce " +"moment, on peut alors se passer du champ dans le hachage tout en le faisant " +"participer aux comparaisons." #: library/dataclasses.rst:237 msgid "" @@ -410,6 +440,10 @@ msgid "" "Multiple third-parties can each have their own key, to use as a namespace in " "the metadata." msgstr "" +"*metadata* : ce paramètre est un tableau associatif (*mapping* en anglais). " +"La valeur par défaut de ``None`` est prise comme un dictionnaire vide. Le " +"tableau associatif devient accessible sur l'objet :class:`Field`, sous la " +"forme d'un :func:`~types.MappingProxyType` afin qu'il soit en lecture seule." #: library/dataclasses.rst:245 msgid "" @@ -421,12 +455,22 @@ msgid "" "fields, just as if the default value itself were specified. For example, " "after::" msgstr "" +"Si la valeur par défaut d'un champ est donnée dans un appel à :func:`field` " +"(et pas directement), l'attribut correspondant de la classe est remplacé par " +"cette valeur. Si le paramètre *default* n'est pas passé, l'attribut est " +"simplement supprimé. De cette manière, après le passage du décorateur :func:" +"`dataclass`, les attributs de la classe contiennent les valeurs par défaut " +"des champs exactement comme si elles avaient été définies directement. Par " +"exemple :" #: library/dataclasses.rst:261 msgid "" "The class attribute ``C.z`` will be ``10``, the class attribute ``C.t`` will " "be ``20``, and the class attributes ``C.x`` and ``C.y`` will not be set." msgstr "" +"Après l'exécution de ce code, l'attribut de classe ``C.z`` vaut ``10`` et " +"l'attribut ``C.t`` vaut ``20``, alors que les attributs ``C.x`` et ``C.y`` " +"n'existent pas." #: library/dataclasses.rst:267 msgid "" @@ -435,14 +479,19 @@ msgid "" "method (see below). Users should never instantiate a :class:`Field` object " "directly. Its documented attributes are:" msgstr "" +"Les objets :class:`Field` contiennent des informations sur les champs. Ils " +"sont créés en interne, et on y accède à l'aide de la méthode au niveau du " +"module :func:`fields` (voir plus bas). Les utilisateurs ne doivent jamais " +"instancier un objet :class:`Field` eux-mêmes. Les attributs documentés sont " +"les suivants :" #: library/dataclasses.rst:272 msgid "``name``: The name of the field." -msgstr "" +msgstr "*name* : le nom du champ ;" #: library/dataclasses.rst:274 msgid "``type``: The type of the field." -msgstr "" +msgstr "*type* : le type associé au champ par l'annotation ;" #: library/dataclasses.rst:276 msgid "" @@ -456,6 +505,8 @@ msgid "" "Other attributes may exist, but they are private and must not be inspected " "or relied on." msgstr "" +"D'autres attributs peuvent exister, mais ils sont privés et ne sont pas " +"censés être inspectés. Le code ne doit jamais reposer sur eux." #: library/dataclasses.rst:285 msgid "" @@ -464,31 +515,71 @@ msgid "" "Raises :exc:`TypeError` if not passed a dataclass or instance of one. Does " "not return pseudo-fields which are ``ClassVar`` or ``InitVar``." msgstr "" +"Renvoie un *n*-uplet d'objets :class:`Field` correspondant aux champs de " +"l'argument, à l'exclusion des pseudo-champs ``ClassVar`` ou ``InitVar``. " +"L'argument peut être soit une classe de données, soit une instance d'une " +"telle classe ; si ce n'est pas le cas, une exception :exc:`TypeError` est " +"levée." #: library/dataclasses.rst:292 msgid "" -"Converts the dataclass ``instance`` to a dict (by using the factory function " +"Converts the dataclass ``obj`` to a dict (by using the factory function " "``dict_factory``). Each dataclass is converted to a dict of its fields, as " "``name: value`` pairs. dataclasses, dicts, lists, and tuples are recursed " -"into. For example::" +"into. Other objects are copied with :func:`copy.deepcopy`." +msgstr "" +"Convertit la classe de données ``obj`` en un dictionnaire (en utilisant la " +"fonction ``dict_factory``). Les clés et valeurs proviennent directement des " +"champs. Les dictionnaires, listes, *n*-uplets et instances de classes de " +"données sont parcourus récursivement. Les autres objets sont copiés avec :" +"func:`copy.deepcopy`." + +#: library/dataclasses.rst:298 +msgid "Example of using :func:`asdict` on nested dataclasses::" msgstr "" +"Exemple d'utilisation de :func:`asdict` sur des classes de données " +"imbriquées ::" -#: library/dataclasses.rst:326 -msgid "Raises :exc:`TypeError` if ``instance`` is not a dataclass instance." +#: library/dataclasses.rst:335 +msgid "To create a shallow copy, the following workaround may be used::" msgstr "" +"Pour créer une copie superficielle, la solution de contournement suivante " +"peut être utilisée ::" -#: library/dataclasses.rst:316 +#: library/dataclasses.rst:319 msgid "" -"Converts the dataclass ``instance`` to a tuple (by using the factory " -"function ``tuple_factory``). Each dataclass is converted to a tuple of its " -"field values. dataclasses, dicts, lists, and tuples are recursed into." +":func:`asdict` raises :exc:`TypeError` if ``obj`` is not a dataclass " +"instance." msgstr "" +":func:`asdict` lève :exc:`TypeError` si ``obj`` n'est pas une instance d'une " +"classe de données." -#: library/dataclasses.rst:321 -msgid "Continuing from the previous example::" +#: library/dataclasses.rst:324 +msgid "" +"Converts the dataclass ``obj`` to a tuple (by using the factory function " +"``tuple_factory``). Each dataclass is converted to a tuple of its field " +"values. dataclasses, dicts, lists, and tuples are recursed into. Other " +"objects are copied with :func:`copy.deepcopy`." msgstr "" +"Convertit l'instance d'une classe de données ``obj`` en un *n*-uplet (en " +"utilisant la fonction ``tuple_factory``). Chaque classe de données est " +"convertie vers un *n*-uplet des valeurs de ses champs. Cette fonction agit " +"récursivement sur les dictionnaires, listes et *n*-uplets. Les autres objets " +"sont copiés avec :func:`copy.deepcopy`." #: library/dataclasses.rst:330 +msgid "Continuing from the previous example::" +msgstr "Pour continuer l'exemple précédent :" + +#: library/dataclasses.rst:339 +msgid "" +":func:`astuple` raises :exc:`TypeError` if ``obj`` is not a dataclass " +"instance." +msgstr "" +":func:`astuple` lève :exc:`TypeError` si ``obj`` n'est pas une instance " +"d'une classe de données." + +#: library/dataclasses.rst:344 msgid "" "Creates a new dataclass with name ``cls_name``, fields as defined in " "``fields``, base classes as given in ``bases``, and initialized with a " @@ -500,47 +591,63 @@ msgid "" "`dataclass`." msgstr "" -#: library/dataclasses.rst:339 +#: library/dataclasses.rst:353 msgid "" "This function is not strictly required, because any Python mechanism for " "creating a new class with ``__annotations__`` can then apply the :func:" "`dataclass` function to convert that class to a dataclass. This function is " "provided as a convenience. For example::" msgstr "" +"Cette fonction est pratique mais pas absolument nécessaire, puisqu'il suffit " +"de créer par un moyen quelconque une classe avec l'attribut " +"``__annotation__`` et de lui appliquer la fonction :func:`dataclass`, qui la " +"convertit en une classe de données. Par exemple, ceci :" -#: library/dataclasses.rst:351 +#: library/dataclasses.rst:365 msgid "Is equivalent to::" -msgstr "" +msgstr "est équivalent à ::" -#: library/dataclasses.rst:364 +#: library/dataclasses.rst:378 msgid "" -"Creates a new object of the same type of ``instance``, replacing fields with " -"values from ``changes``. If ``instance`` is not a Data Class, raises :exc:" +"Creates a new object of the same type as ``obj``, replacing fields with " +"values from ``changes``. If ``obj`` is not a Data Class, raises :exc:" "`TypeError`. If values in ``changes`` do not specify fields, raises :exc:" "`TypeError`." msgstr "" +"Crée un nouvel objet du même type que ``obj`` en affectant aux champs les " +"valeurs données par ``changes``. Si ``obj`` n'est pas une classe de " +"données, :exc:`TypeError` est levée. Si une clé dans ``changes`` ne " +"correspond à aucun champ de l'instance, :exc:`TypeError` est levée." -#: library/dataclasses.rst:369 +#: library/dataclasses.rst:383 msgid "" "The newly returned object is created by calling the :meth:`__init__` method " "of the dataclass. This ensures that :meth:`__post_init__`, if present, is " "also called." msgstr "" +"L'objet renvoyé est créé à l'aide de la méthode :meth:`__init__` de la " +"classe de données, ce qui garantit que :meth:`__post_init__` est appelée (si " +"elle existe)." -#: library/dataclasses.rst:373 +#: library/dataclasses.rst:387 msgid "" "Init-only variables without default values, if any exist, must be specified " "on the call to :func:`replace` so that they can be passed to :meth:" "`__init__` and :meth:`__post_init__`." msgstr "" +"Si un champ d'initialisation (voir plus bas) n'a pas de valeur par défaut, " +"il faut l'inclure dans l'appel à :func:`replace` afin qu'il soit passé à :" +"meth:`__init__` et :meth:`__post_init__`." -#: library/dataclasses.rst:377 +#: library/dataclasses.rst:391 msgid "" "It is an error for ``changes`` to contain any fields that are defined as " "having ``init=False``. A :exc:`ValueError` will be raised in this case." msgstr "" +"Si une clé de *changes* correspond à un champ défini avec ``init=False``, :" +"exc:`ValueError` est levée." -#: library/dataclasses.rst:381 +#: library/dataclasses.rst:395 msgid "" "Be forewarned about how ``init=False`` fields work during a call to :func:" "`replace`. They are not copied from the source object, but rather are " @@ -550,25 +657,37 @@ msgid "" "perhaps a custom ``replace()`` (or similarly named) method which handles " "instance copying." msgstr "" +"Prenez garde aux champs définis avec ``init=False`` dans un appel à :func:" +"`replace`. Ils ne sont pas copiés automatiquement de l'instance source. " +"C'est le rôle de :meth:`__post_init__` de les initialiser — ou pas. Les " +"champs avec ``init=False`` doivent rarement être utilisés et seulement à bon " +"escient. Si vous en avez, il peut être sage de traiter la copie des " +"instances par des constructeurs de classe alternatifs, ou bien une méthode " +"personnalisée ``replace()`` (ou un nom similaire)." -#: library/dataclasses.rst:392 +#: library/dataclasses.rst:406 msgid "" "Return ``True`` if its parameter is a dataclass or an instance of one, " "otherwise return ``False``." msgstr "" +"Renvoie ``True`` si l'argument est soit une classe de données, soit une " +"instance d'une telle classe. Sinon, renvoie ``False``." -#: library/dataclasses.rst:395 +#: library/dataclasses.rst:409 msgid "" "If you need to know if a class is an instance of a dataclass (and not a " "dataclass itself), then add a further check for ``not isinstance(obj, " "type)``::" msgstr "" +"Pour vérifier qu'un objet *obj* est une instance d'une classe de données, et " +"non pas lui-même une classe de données, ajoutez le test ``not " +"isinstance(obj, type)`` ::" -#: library/dataclasses.rst:403 +#: library/dataclasses.rst:417 msgid "Post-init processing" -msgstr "" +msgstr "Post-initialisation" -#: library/dataclasses.rst:405 +#: library/dataclasses.rst:419 msgid "" "The generated :meth:`__init__` code will call a method named :meth:" "`__post_init__`, if :meth:`__post_init__` is defined on the class. It will " @@ -577,25 +696,61 @@ msgid "" "order they were defined in the class. If no :meth:`__init__` method is " "generated, then :meth:`__post_init__` will not automatically be called." msgstr "" +"Après avoir initialisé l'objet, la méthode :meth:`__init__` générée appelle " +"la méthode :meth:`__post_init__`, si elle est définie. :meth:`__post_init__` " +"est habituellement appelée avec un simple ``self.__post_init__()``. " +"Cependant, si la classe comporte des champs d'initialisation (voir plus " +"bas), leurs valeurs sont aussi passées à :meth:`__post_init__` telles " +"qu'elles ont été fournies à :meth:`__init__`. Si la classe est créée avec " +"``init=False``, :meth:`__post_init__` n'est jamais appelée automatiquement." -#: library/dataclasses.rst:413 +#: library/dataclasses.rst:427 msgid "" "Among other uses, this allows for initializing field values that depend on " "one or more other fields. For example::" msgstr "" +"Cette méthode permet, entre autres, d'initialiser des champs qui dépendent " +"d'autres champs. Par exemple :" + +#: library/dataclasses.rst:439 +msgid "" +"The :meth:`__init__` method generated by :func:`dataclass` does not call " +"base class :meth:`__init__` methods. If the base class has an :meth:" +"`__init__` method that has to be called, it is common to call this method in " +"a :meth:`__post_init__` method::" +msgstr "" +"Les méthodes :meth:`__init__` des classes mères ne sont pas appelées " +"automatiquement par la méthode :meth:`__init__` que génère :func:" +"`dataclass`. S'il faut appeler ces méthodes :meth:`__init__`, il est courant " +"de le faire dans :meth:`__post_init__` :" + +#: library/dataclasses.rst:456 +msgid "" +"Note, however, that in general the dataclass-generated :meth:`__init__` " +"methods don't need to be called, since the derived dataclass will take care " +"of initializing all fields of any base class that is a dataclass itself." +msgstr "" +"Notez toutefois qu'il n'est généralement pas nécessaire d'appeler une " +"méthode :meth:`__init__` si elle a été générée automatiquement dans une " +"classe de données, car la classe fille initialise elle-même les champs " +"apportés par toute classe mère qui est aussi une classe de données." -#: library/dataclasses.rst:425 +#: library/dataclasses.rst:460 msgid "" "See the section below on init-only variables for ways to pass parameters to :" "meth:`__post_init__`. Also see the warning about how :func:`replace` " "handles ``init=False`` fields." msgstr "" +"Voir la section plus bas à propos des variables d'initialisation pour les " +"moyens de passer des paramètres à :meth:`__post_init__`. Voir également " +"l'avertissement sur le traitement par :func:`replace` des champs définis " +"avec ``init=False``." -#: library/dataclasses.rst:430 +#: library/dataclasses.rst:465 msgid "Class variables" -msgstr "" +msgstr "Variables de classe" -#: library/dataclasses.rst:432 +#: library/dataclasses.rst:467 msgid "" "One of two places where :func:`dataclass` actually inspects the type of a " "field is to determine if a field is a class variable as defined in :pep:" @@ -605,11 +760,11 @@ msgid "" "pseudo-fields are not returned by the module-level :func:`fields` function." msgstr "" -#: library/dataclasses.rst:441 +#: library/dataclasses.rst:476 msgid "Init-only variables" -msgstr "" +msgstr "Variables d'initialisation" -#: library/dataclasses.rst:443 +#: library/dataclasses.rst:478 msgid "" "The other place where :func:`dataclass` inspects a type annotation is to " "determine if a field is an init-only variable. It does this by seeing if " @@ -621,23 +776,27 @@ msgid "" "`__post_init__` method. They are not otherwise used by dataclasses." msgstr "" -#: library/dataclasses.rst:453 +#: library/dataclasses.rst:488 msgid "" "For example, suppose a field will be initialized from a database, if a value " "is not provided when creating the class::" msgstr "" +"On peut par exemple imaginer un champ initialisé à partir d'une base de " +"données s'il n'a pas reçu de valeur explicite :" -#: library/dataclasses.rst:468 +#: library/dataclasses.rst:503 msgid "" "In this case, :func:`fields` will return :class:`Field` objects for ``i`` " "and ``j``, but not for ``database``." msgstr "" +"Ici, :func:`fields` renvoie des objets :class:`Field` correspondant à ``i`` " +"et à ``j``, mais pas à ``database``." -#: library/dataclasses.rst:472 +#: library/dataclasses.rst:507 msgid "Frozen instances" -msgstr "" +msgstr "Instances figées" -#: library/dataclasses.rst:474 +#: library/dataclasses.rst:509 msgid "" "It is not possible to create truly immutable Python objects. However, by " "passing ``frozen=True`` to the :meth:`dataclass` decorator you can emulate " @@ -645,19 +804,27 @@ msgid "" "meth:`__delattr__` methods to the class. These methods will raise a :exc:" "`FrozenInstanceError` when invoked." msgstr "" +"Bien qu'il ne soit pas possible de créer des objets Python strictement " +"immuables, on peut rendre les instances d'une classe de données quasi " +"immuables en passant ``frozen=True`` au décorateur :meth:`dataclass`, ce qui " +"lui fait générer des méthodes :meth:`__setattr__` et :meth:`__delattr__`. " +"Celles-ci lèvent systématiquement l'exception :exc:`FrozenInstanceError`." -#: library/dataclasses.rst:480 +#: library/dataclasses.rst:515 msgid "" "There is a tiny performance penalty when using ``frozen=True``: :meth:" "`__init__` cannot use simple assignment to initialize fields, and must use :" "meth:`object.__setattr__`." msgstr "" +"Les performances sont légèrement moins bonnes avec ``frozen=True`` car :meth:" +"`__init__` doit passer par :meth:`object.__setattr__` au lieu de simples " +"affectations pour initialiser les champs." -#: library/dataclasses.rst:485 +#: library/dataclasses.rst:520 msgid "Inheritance" msgstr "Héritage" -#: library/dataclasses.rst:487 +#: library/dataclasses.rst:522 msgid "" "When the dataclass is being created by the :meth:`dataclass` decorator, it " "looks through all of the class's base classes in reverse MRO (that is, " @@ -668,61 +835,82 @@ msgid "" "ordered mapping of fields. Because the fields are in insertion order, " "derived classes override base classes. An example::" msgstr "" +"Au moment de la création d'une classe de données, le décorateur :meth:" +"`dataclass` parcourt toutes les classes mères dans l'ordre inverse de " +"résolution des méthodes (donc en commençant par :class:`object`). À chaque " +"fois qu'une classe de données est rencontrée, ses champs sont insérés dans " +"un tableau associatif ordonné. Pour finir, les champs de la classe elle-même " +"sont rajoutés. Toutes les méthodes générées utilisent en interne ce même " +"tableau associatif. Puisqu'il est ordonné, les champs des classes filles " +"écrasent ceux des classes mères. Voici un exemple :" -#: library/dataclasses.rst:507 +#: library/dataclasses.rst:542 msgid "" "The final list of fields is, in order, ``x``, ``y``, ``z``. The final type " "of ``x`` is ``int``, as specified in class ``C``." msgstr "" +"La liste finale des champs contient, dans l'ordre, ``x``, ``y``, ``z``. Le " +"type de ``x`` est ``int``, comme déclaré dans ``C``." -#: library/dataclasses.rst:510 +#: library/dataclasses.rst:545 msgid "The generated :meth:`__init__` method for ``C`` will look like::" -msgstr "" +msgstr "La méthode :meth:`__init__` générée pour ``C`` ressemble à :" -#: library/dataclasses.rst:515 +#: library/dataclasses.rst:550 msgid "Default factory functions" -msgstr "" +msgstr "Fabriques de valeurs par défaut" -#: library/dataclasses.rst:517 +#: library/dataclasses.rst:552 msgid "" "If a :func:`field` specifies a ``default_factory``, it is called with zero " "arguments when a default value for the field is needed. For example, to " "create a new instance of a list, use::" msgstr "" +"Le paramètre facultatif *default_factory* de :func:`field` est une fonction " +"qui est appelée sans argument pour fournir des valeurs par défaut. Par " +"exemple, voici comment donner la valeur par défaut d'une liste vide :" -#: library/dataclasses.rst:523 +#: library/dataclasses.rst:558 msgid "" "If a field is excluded from :meth:`__init__` (using ``init=False``) and the " "field also specifies ``default_factory``, then the default factory function " "will always be called from the generated :meth:`__init__` function. This " "happens because there is no other way to give the field an initial value." msgstr "" +"Si un champ avec fabrique est exclu de :meth:`__init__` (par " +"``init=False``), alors la fabrique est appelée par :meth:`__init__` pour " +"chaque nouvelle instance, puisque c'est le seul moyen d'obtenir une valeur à " +"laquelle initialiser le champ." -#: library/dataclasses.rst:530 +#: library/dataclasses.rst:565 msgid "Mutable default values" -msgstr "" +msgstr "Valeurs par défaut muables" -#: library/dataclasses.rst:532 +#: library/dataclasses.rst:567 msgid "" "Python stores default member variable values in class attributes. Consider " "this example, not using dataclasses::" msgstr "" +"En Python, les valeurs par défaut des attributs sont stockées dans des " +"attributs de la classe. Observez cet exemple, sans classe de données :" -#: library/dataclasses.rst:547 +#: library/dataclasses.rst:582 msgid "" "Note that the two instances of class ``C`` share the same class variable " "``x``, as expected." msgstr "" +"Comme attendu, les deux instances de ``C`` partagent le même objet pour " +"l'attribut ``x``." -#: library/dataclasses.rst:550 +#: library/dataclasses.rst:585 msgid "Using dataclasses, *if* this code was valid::" -msgstr "" +msgstr "Avec les classes de données, si ce code était valide :" -#: library/dataclasses.rst:558 +#: library/dataclasses.rst:593 msgid "it would generate code similar to::" -msgstr "" +msgstr "il générerait un code équivalent à :" -#: library/dataclasses.rst:569 +#: library/dataclasses.rst:604 msgid "" "This has the same issue as the original example using class ``C``. That is, " "two instances of class ``D`` that do not specify a value for ``x`` when " @@ -734,18 +922,24 @@ msgid "" "partial solution, but it does protect against many common errors." msgstr "" -#: library/dataclasses.rst:579 +#: library/dataclasses.rst:614 msgid "" "Using default factory functions is a way to create new instances of mutable " "types as default values for fields::" msgstr "" +"Pour qu'un champ d'un type muable soit par défaut initialisé à un nouvel " +"objet pour chaque instance, utilisez une fonction de fabrique :" -#: library/dataclasses.rst:589 +#: library/dataclasses.rst:624 msgid "Exceptions" msgstr "Exceptions" -#: library/dataclasses.rst:593 +#: library/dataclasses.rst:628 msgid "" "Raised when an implicitly defined :meth:`__setattr__` or :meth:`__delattr__` " -"is called on a dataclass which was defined with ``frozen=True``." +"is called on a dataclass which was defined with ``frozen=True``. It is a " +"subclass of :exc:`AttributeError`." msgstr "" +"Sous-classe de :exc:`AttributeError`, levée lorsqu'une méthode :meth:" +"`__setattr__` ou :meth:`__delattr__` définie implicitement est appelée dans " +"une classe de données définie avec ``frozen=True``." diff --git a/library/datetime.po b/library/datetime.po index ba06422636..951951a5c2 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-03-20 17:48+0100\n" "Last-Translator: Loc Cosnier \n" "Language-Team: French \n" @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Gtranslator 3.38.0\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" +"X-Generator: Gtranslator 3.38.0\n" #: library/datetime.rst:2 msgid ":mod:`datetime` --- Basic date and time types" @@ -57,21 +57,30 @@ msgstr "Module :mod:`time`" msgid "Time access and conversions." msgstr "Accès aux données d'horaires et aux conversions associées." -#: library/datetime.rst:30 +#: library/datetime.rst:31 +#, fuzzy +msgid "Module :mod:`zoneinfo`" +msgstr "Module :mod:`time`" + +#: library/datetime.rst:31 +msgid "Concrete time zones representing the IANA time zone database." +msgstr "" + +#: library/datetime.rst:33 msgid "Package `dateutil `_" msgstr "Paquet `dateutil `_" -#: library/datetime.rst:31 +#: library/datetime.rst:34 msgid "Third-party library with expanded time zone and parsing support." msgstr "" "Bibliothèque tierce avec prise en charge complète du fuseau horaire et de " "l'analyse de dates sous forme textuelle." -#: library/datetime.rst:36 +#: library/datetime.rst:39 msgid "Aware and Naive Objects" msgstr "Objets avisés et naïfs" -#: library/datetime.rst:38 +#: library/datetime.rst:41 msgid "" "Date and time objects may be categorized as \"aware\" or \"naive\" depending " "on whether or not they include timezone information." @@ -80,7 +89,7 @@ msgstr "" "« naïfs » selon qu'ils contiennent ou non des informations sur le fuseau " "horaire." -#: library/datetime.rst:41 +#: library/datetime.rst:44 msgid "" "With sufficient knowledge of applicable algorithmic and political time " "adjustments, such as time zone and daylight saving time information, an " @@ -94,7 +103,7 @@ msgstr "" "par rapport à d'autres objets avisés. Un objet avisé est utilisé pour " "représenter un instant précis qui n'est pas ouvert à l'interprétation [#]_." -#: library/datetime.rst:47 +#: library/datetime.rst:50 msgid "" "A **naive** object does not contain enough information to unambiguously " "locate itself relative to other date/time objects. Whether a naive object " @@ -112,7 +121,7 @@ msgstr "" "le programme. Les objets naïfs sont simples à comprendre et il est aisé de " "travailler avec, au prix de négliger certains aspects de la réalité." -#: library/datetime.rst:54 +#: library/datetime.rst:57 msgid "" "For applications requiring aware objects, :class:`.datetime` and :class:`." "time` objects have an optional time zone information attribute, :attr:`!" @@ -128,7 +137,7 @@ msgstr "" "informations sur le décalage par rapport à l'heure UTC, le nom du fuseau " "horaire, et si l'heure d'été est en vigueur." -#: library/datetime.rst:60 +#: library/datetime.rst:63 msgid "" "Only one concrete :class:`tzinfo` class, the :class:`timezone` class, is " "supplied by the :mod:`datetime` module. The :class:`timezone` class can " @@ -147,15 +156,15 @@ msgstr "" "sont plus politiques que rationnelles, changent fréquemment, et il n'y a pas " "de standard qui vaille pour toute application, en dehors d'UTC." -#: library/datetime.rst:69 +#: library/datetime.rst:72 msgid "Constants" msgstr "Constantes" -#: library/datetime.rst:71 +#: library/datetime.rst:74 msgid "The :mod:`datetime` module exports the following constants:" msgstr "Le module :mod:`datetime` exporte les constantes suivantes :" -#: library/datetime.rst:75 +#: library/datetime.rst:78 msgid "" "The smallest year number allowed in a :class:`date` or :class:`.datetime` " "object. :const:`MINYEAR` is ``1``." @@ -163,7 +172,7 @@ msgstr "" "Le numéro d'année le plus petit autorisé dans un objet :class:`date` ou :" "class:`datetime`. :const:`MINYEAR` vaut ``1``." -#: library/datetime.rst:81 +#: library/datetime.rst:84 msgid "" "The largest year number allowed in a :class:`date` or :class:`.datetime` " "object. :const:`MAXYEAR` is ``9999``." @@ -171,11 +180,11 @@ msgstr "" "Le numéro d'année le plus grand autorisé dans un objet :class:`date` ou :" "class:`datetime`. :const:`MAXYEAR` vaut ``9999``." -#: library/datetime.rst:85 +#: library/datetime.rst:88 msgid "Available Types" msgstr "Types disponibles" -#: library/datetime.rst:90 +#: library/datetime.rst:93 msgid "" "An idealized naive date, assuming the current Gregorian calendar always was, " "and always will be, in effect. Attributes: :attr:`year`, :attr:`month`, and :" @@ -185,19 +194,19 @@ msgstr "" "toujours existé et qu'il existera toujours. Attributs : :attr:`year`, :attr:" "`month` et :attr:`day`." -#: library/datetime.rst:98 +#: library/datetime.rst:101 msgid "" "An idealized time, independent of any particular day, assuming that every " -"day has exactly 24\\*60\\*60 seconds. (There is no notion of \"leap seconds" -"\" here.) Attributes: :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:" -"`microsecond`, and :attr:`.tzinfo`." +"day has exactly 24\\*60\\*60 seconds. (There is no notion of \"leap " +"seconds\" here.) Attributes: :attr:`hour`, :attr:`minute`, :attr:`second`, :" +"attr:`microsecond`, and :attr:`.tzinfo`." msgstr "" "Un temps idéalisé, indépendant d'une date particulière, en supposant qu'une " "journée est composée d'exactement 24\\*60\\*60 secondes (il n'y a pas ici de " "notion de « seconde intercalaire »). Attributs : :attr:`hour`, :attr:" "`minute`, :attr:`second`, :attr:`microsecond` et :attr:`tzinfo`." -#: library/datetime.rst:107 +#: library/datetime.rst:110 msgid "" "A combination of a date and a time. Attributes: :attr:`year`, :attr:" "`month`, :attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:" @@ -207,7 +216,7 @@ msgstr "" "`month`, :attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:" "`microsecond`, et :attr:`tzinfo`." -#: library/datetime.rst:115 +#: library/datetime.rst:118 msgid "" "A duration expressing the difference between two :class:`date`, :class:`." "time`, or :class:`.datetime` instances to microsecond resolution." @@ -215,7 +224,7 @@ msgstr "" "Une durée qui exprime la différence entre deux instances de :class:`date`, :" "class:`time` ou :class:`datetime` en microsecondes." -#: library/datetime.rst:122 +#: library/datetime.rst:125 msgid "" "An abstract base class for time zone information objects. These are used by " "the :class:`.datetime` and :class:`.time` classes to provide a customizable " @@ -228,7 +237,7 @@ msgstr "" "d'ajustement d'horaire (par exemple la prise en compte d'un fuseau horaire " "et/ou de l'heure d'été)." -#: library/datetime.rst:130 +#: library/datetime.rst:133 msgid "" "A class that implements the :class:`tzinfo` abstract base class as a fixed " "offset from the UTC." @@ -236,19 +245,19 @@ msgstr "" "Une classe qui implémente la classe de base abstraite :class:`tzinfo` en " "tant qu'offset fixe par rapport au temps UTC." -#: library/datetime.rst:153 +#: library/datetime.rst:156 msgid "Objects of these types are immutable." msgstr "Les objets issus de ces types sont immuables." -#: library/datetime.rst:137 +#: library/datetime.rst:140 msgid "Subclass relationships::" msgstr "Relations entre les sous-classes ::" -#: library/datetime.rst:148 +#: library/datetime.rst:151 msgid "Common Properties" msgstr "Propriétés communes" -#: library/datetime.rst:150 +#: library/datetime.rst:153 msgid "" "The :class:`date`, :class:`.datetime`, :class:`.time`, and :class:`timezone` " "types share these common features:" @@ -256,7 +265,7 @@ msgstr "" "Les types :class:`date`, :class:`.datetime`, :class:`.time`, et :class:" "`timezone` partagent les caractéristiques suivantes :" -#: library/datetime.rst:154 +#: library/datetime.rst:157 msgid "" "Objects of these types are hashable, meaning that they can be used as " "dictionary keys." @@ -264,7 +273,7 @@ msgstr "" "Les objets de ces types sont hachables, ce qui signifie qu'ils peuvent être " "utilisés comme clés de dictionnaire." -#: library/datetime.rst:156 +#: library/datetime.rst:159 msgid "" "Objects of these types support efficient pickling via the :mod:`pickle` " "module." @@ -272,58 +281,58 @@ msgstr "" "Les objets de ces types peuvent être sérialisés efficacement par le module :" "mod:`pickle`." -#: library/datetime.rst:159 +#: library/datetime.rst:162 msgid "Determining if an Object is Aware or Naive" msgstr "Catégorisation d'un objet en « avisé » ou « naïf »" -#: library/datetime.rst:161 +#: library/datetime.rst:164 msgid "Objects of the :class:`date` type are always naive." msgstr "Les objets de type :class:`date` sont toujours naïfs." -#: library/datetime.rst:163 +#: library/datetime.rst:166 msgid "" "An object of type :class:`.time` or :class:`.datetime` may be aware or naive." msgstr "" "Un objet du type :class:`.time` ou :class:`.datetime` peut être avisé ou " "naïf." -#: library/datetime.rst:165 +#: library/datetime.rst:168 msgid "A :class:`.datetime` object *d* is aware if both of the following hold:" msgstr "" "Un objet :class:`.datetime` *d* est avisé si les deux conditions suivantes " "vérifient :" -#: library/datetime.rst:167 +#: library/datetime.rst:170 msgid "``d.tzinfo`` is not ``None``" msgstr "``d.tzinfo`` ne vaut pas ``None``" -#: library/datetime.rst:168 +#: library/datetime.rst:171 msgid "``d.tzinfo.utcoffset(d)`` does not return ``None``" msgstr "``d.tzinfo.utcoffset(d)`` ne renvoie pas ``None``" -#: library/datetime.rst:170 +#: library/datetime.rst:173 msgid "Otherwise, *d* is naive." msgstr "Autrement, *d* est naïf." -#: library/datetime.rst:172 +#: library/datetime.rst:175 msgid "A :class:`.time` object *t* is aware if both of the following hold:" msgstr "" "Un objet :class:`.time` *t* est avisé si les deux conditions suivantes " "vérifient :" -#: library/datetime.rst:174 +#: library/datetime.rst:177 msgid "``t.tzinfo`` is not ``None``" msgstr "``t.tzinfo`` ne vaut pas ``None``" -#: library/datetime.rst:175 +#: library/datetime.rst:178 msgid "``t.tzinfo.utcoffset(None)`` does not return ``None``." msgstr "``t.tzinfo.utcoffset(None)`` ne renvoie pas ``None``." -#: library/datetime.rst:177 +#: library/datetime.rst:180 msgid "Otherwise, *t* is naive." msgstr "Autrement, *t* est naïf." -#: library/datetime.rst:179 +#: library/datetime.rst:182 msgid "" "The distinction between aware and naive doesn't apply to :class:`timedelta` " "objects." @@ -331,11 +340,11 @@ msgstr "" "La distinction entre avisé et naïf ne s'applique pas aux objets de type :" "class:`timedelta`." -#: library/datetime.rst:185 +#: library/datetime.rst:188 msgid ":class:`timedelta` Objects" msgstr "Objets :class:`timedelta`" -#: library/datetime.rst:187 +#: library/datetime.rst:190 msgid "" "A :class:`timedelta` object represents a duration, the difference between " "two dates or times." @@ -343,7 +352,7 @@ msgstr "" "Un objet :class:`timedelta` représente une durée, c'est-à-dire la différence " "entre deux dates ou heures." -#: library/datetime.rst:192 +#: library/datetime.rst:195 msgid "" "All arguments are optional and default to ``0``. Arguments may be integers " "or floats, and may be positive or negative." @@ -352,7 +361,7 @@ msgstr "" "Les paramètres peuvent être des entiers ou des flottants et ils peuvent être " "positifs ou négatifs." -#: library/datetime.rst:195 +#: library/datetime.rst:198 msgid "" "Only *days*, *seconds* and *microseconds* are stored internally. Arguments " "are converted to those units:" @@ -360,23 +369,23 @@ msgstr "" "Seuls les *jours*, les *secondes* et les *microsecondes* sont stockés en " "interne. Tous les paramètres sont convertis dans ces unités :" -#: library/datetime.rst:198 +#: library/datetime.rst:201 msgid "A millisecond is converted to 1000 microseconds." msgstr "Une milliseconde est convertie en 1000 microsecondes." -#: library/datetime.rst:199 +#: library/datetime.rst:202 msgid "A minute is converted to 60 seconds." msgstr "Une minute est convertie en 60 secondes." -#: library/datetime.rst:200 +#: library/datetime.rst:203 msgid "An hour is converted to 3600 seconds." msgstr "Une heure est convertie en 3600 secondes." -#: library/datetime.rst:201 +#: library/datetime.rst:204 msgid "A week is converted to 7 days." msgstr "Une semaine est convertie en 7 jours." -#: library/datetime.rst:203 +#: library/datetime.rst:206 msgid "" "and days, seconds and microseconds are then normalized so that the " "representation is unique, with" @@ -384,19 +393,19 @@ msgstr "" "et ensuite les jours, secondes et microsecondes sont normalisés pour que la " "représentation soit unique avec" -#: library/datetime.rst:206 +#: library/datetime.rst:209 msgid "``0 <= microseconds < 1000000``" msgstr "``0 <= microseconds < 1000000``" -#: library/datetime.rst:207 +#: library/datetime.rst:210 msgid "``0 <= seconds < 3600*24`` (the number of seconds in one day)" msgstr "``0 <= secondes < 3600*24`` (le nombre de secondes dans une journée)" -#: library/datetime.rst:208 +#: library/datetime.rst:211 msgid "``-999999999 <= days <= 999999999``" msgstr "``-999999999 <= days <= 999999999``" -#: library/datetime.rst:210 +#: library/datetime.rst:213 msgid "" "The following example illustrates how any arguments besides *days*, " "*seconds* and *microseconds* are \"merged\" and normalized into those three " @@ -406,7 +415,7 @@ msgstr "" "*seconds* et *microseconds* sont « fusionnés » et normalisés dans ces trois " "attributs résultants ::" -#: library/datetime.rst:228 +#: library/datetime.rst:231 msgid "" "If any argument is a float and there are fractional microseconds, the " "fractional microseconds left over from all arguments are combined and their " @@ -421,7 +430,7 @@ msgstr "" "flottant, les processus de conversion et de normalisation seront exacts (pas " "d'informations perdues)." -#: library/datetime.rst:235 +#: library/datetime.rst:238 msgid "" "If the normalized value of days lies outside the indicated range, :exc:" "`OverflowError` is raised." @@ -429,7 +438,7 @@ msgstr "" "Si la valeur normalisée des jours déborde de l'intervalle indiqué, une :exc:" "`OverflowError` est levée." -#: library/datetime.rst:238 +#: library/datetime.rst:241 msgid "" "Note that normalization of negative values may be surprising at first. For " "example::" @@ -437,15 +446,15 @@ msgstr "" "Notez que la normalisation de valeurs négatives peut être surprenante au " "premier abord. Par exemple ::" -#: library/datetime.rst:541 library/datetime.rst:1666 library/datetime.rst:2260 +#: library/datetime.rst:544 library/datetime.rst:1669 library/datetime.rst:2262 msgid "Class attributes:" msgstr "Attributs de la classe :" -#: library/datetime.rst:251 +#: library/datetime.rst:254 msgid "The most negative :class:`timedelta` object, ``timedelta(-999999999)``." msgstr "L'objet :class:`timedelta` le plus négatif, ``timedelta(-999999999)``." -#: library/datetime.rst:256 +#: library/datetime.rst:259 msgid "" "The most positive :class:`timedelta` object, ``timedelta(days=999999999, " "hours=23, minutes=59, seconds=59, microseconds=999999)``." @@ -453,7 +462,7 @@ msgstr "" "L'objet :class:`timedelta` le plus positif, ``timedelta(days=999999999, " "hours=23, minutes=59, seconds=59, microseconds=999999)``." -#: library/datetime.rst:262 +#: library/datetime.rst:265 msgid "" "The smallest possible difference between non-equal :class:`timedelta` " "objects, ``timedelta(microseconds=1)``." @@ -461,7 +470,7 @@ msgstr "" "La plus petite différence entre des objets :class:`timedelta` non égaux, " "``timedelta(microseconds=1)``." -#: library/datetime.rst:265 +#: library/datetime.rst:268 msgid "" "Note that, because of normalization, ``timedelta.max`` > ``-timedelta.min``. " "``-timedelta.max`` is not representable as a :class:`timedelta` object." @@ -470,59 +479,59 @@ msgstr "" "timedelta.min``. ``-timedelta.max`` n'est pas représentable sous la forme " "d'un objet :class:`timedelta`." -#: library/datetime.rst:559 library/datetime.rst:1686 +#: library/datetime.rst:562 library/datetime.rst:1689 msgid "Instance attributes (read-only):" msgstr "Attributs de l'instance (en lecture seule) :" -#: library/datetime.rst:271 +#: library/datetime.rst:274 msgid "Attribute" msgstr "Attribut" -#: library/datetime.rst:271 +#: library/datetime.rst:274 msgid "Value" msgstr "Valeur" -#: library/datetime.rst:273 +#: library/datetime.rst:276 msgid "``days``" msgstr "``days``" -#: library/datetime.rst:273 +#: library/datetime.rst:276 msgid "Between -999999999 and 999999999 inclusive" msgstr "Entre ``-999999999`` et ``999999999`` inclus" -#: library/datetime.rst:275 +#: library/datetime.rst:278 msgid "``seconds``" msgstr "``seconds``" -#: library/datetime.rst:275 +#: library/datetime.rst:278 msgid "Between 0 and 86399 inclusive" msgstr "Entre 0 et 86399 inclus" -#: library/datetime.rst:277 +#: library/datetime.rst:280 msgid "``microseconds``" msgstr "``microseconds``" -#: library/datetime.rst:277 +#: library/datetime.rst:280 msgid "Between 0 and 999999 inclusive" msgstr "Entre 0 et 999999 inclus" -#: library/datetime.rst:576 library/datetime.rst:1121 +#: library/datetime.rst:579 library/datetime.rst:1124 msgid "Supported operations:" msgstr "Opérations gérées :" -#: library/datetime.rst:579 library/datetime.rst:1124 +#: library/datetime.rst:582 library/datetime.rst:1127 msgid "Operation" msgstr "Opération" -#: library/datetime.rst:579 library/datetime.rst:1124 +#: library/datetime.rst:582 library/datetime.rst:1127 msgid "Result" msgstr "Résultat" -#: library/datetime.rst:287 +#: library/datetime.rst:290 msgid "``t1 = t2 + t3``" msgstr "``t1 = t2 + t3``" -#: library/datetime.rst:287 +#: library/datetime.rst:290 msgid "" "Sum of *t2* and *t3*. Afterwards *t1*-*t2* == *t3* and *t1*-*t3* == *t2* are " "true. (1)" @@ -530,11 +539,11 @@ msgstr "" "Somme de *t2* et *t3*. Ensuite ``t1 - t2 == t3`` et ``t1 - t3 == t2`` sont " "des expressions vraies. (1)" -#: library/datetime.rst:290 +#: library/datetime.rst:293 msgid "``t1 = t2 - t3``" msgstr "``t1 = t2 - t3``" -#: library/datetime.rst:290 +#: library/datetime.rst:293 msgid "" "Difference of *t2* and *t3*. Afterwards *t1* == *t2* - *t3* and *t2* == *t1* " "+ *t3* are true. (1)(6)" @@ -542,11 +551,11 @@ msgstr "" "Différence entre *t2* et *t3*. Ensuite ``t1 == t2 - t3`` et ``t2 == t1 + " "t3`` sont des expressions vraies. (1)(6)" -#: library/datetime.rst:294 +#: library/datetime.rst:297 msgid "``t1 = t2 * i or t1 = i * t2``" msgstr "``t1 = t2 * i or t1 = i * t2``" -#: library/datetime.rst:294 +#: library/datetime.rst:297 msgid "" "Delta multiplied by an integer. Afterwards *t1* // i == *t2* is true, " "provided ``i != 0``." @@ -554,15 +563,15 @@ msgstr "" "Delta multiplié par un entier. Ensuite *t1* // i == *t2* est vrai, en " "admettant que ``i != 0``." -#: library/datetime.rst:298 +#: library/datetime.rst:301 msgid "In general, *t1* \\* i == *t1* \\* (i-1) + *t1* is true. (1)" msgstr "De manière générale, *t1* \\* i == *t1* \\* (i-1) + *t1* est vrai. (1)" -#: library/datetime.rst:301 +#: library/datetime.rst:304 msgid "``t1 = t2 * f or t1 = f * t2``" msgstr "``t1 = t2 * f or t1 = f * t2``" -#: library/datetime.rst:301 +#: library/datetime.rst:304 msgid "" "Delta multiplied by a float. The result is rounded to the nearest multiple " "of timedelta.resolution using round-half-to-even." @@ -571,11 +580,11 @@ msgstr "" "proche de ``timedelta.resolution`` en utilisant la règle de l'arrondi au " "pair le plus proche." -#: library/datetime.rst:305 +#: library/datetime.rst:308 msgid "``f = t2 / t3``" msgstr "``f = t2 / t3``" -#: library/datetime.rst:305 +#: library/datetime.rst:308 msgid "" "Division (3) of overall duration *t2* by interval unit *t3*. Returns a :" "class:`float` object." @@ -583,11 +592,11 @@ msgstr "" "Division (3) de la durée totale *t2* par l'unité d'intervalle *t3*. Renvoie " "un objet :class:`float`." -#: library/datetime.rst:309 +#: library/datetime.rst:312 msgid "``t1 = t2 / f or t1 = t2 / i``" msgstr "``t1 = t2 / f or t1 = t2 / i``" -#: library/datetime.rst:309 +#: library/datetime.rst:312 msgid "" "Delta divided by a float or an int. The result is rounded to the nearest " "multiple of timedelta.resolution using round-half-to-even." @@ -596,11 +605,11 @@ msgstr "" "multiple le plus proche de ``timedelta.resolution`` en utilisant la règle de " "l'arrondi au pair le plus proche." -#: library/datetime.rst:313 +#: library/datetime.rst:316 msgid "``t1 = t2 // i`` or ``t1 = t2 // t3``" msgstr "``t1 = t2 // i`` or ``t1 = t2 // t3``" -#: library/datetime.rst:313 +#: library/datetime.rst:316 msgid "" "The floor is computed and the remainder (if any) is thrown away. In the " "second case, an integer is returned. (3)" @@ -608,19 +617,19 @@ msgstr "" "Le quotient est calculé et le reste (s'il y en a un) est ignoré. Dans le " "second cas, un entier est renvoyé. (3)" -#: library/datetime.rst:317 +#: library/datetime.rst:320 msgid "``t1 = t2 % t3``" msgstr "``t1 = t2 % t3``" -#: library/datetime.rst:317 +#: library/datetime.rst:320 msgid "The remainder is computed as a :class:`timedelta` object. (3)" msgstr "Le reste est calculé comme un objet de type :class:`timedelta`. (3)" -#: library/datetime.rst:320 +#: library/datetime.rst:323 msgid "``q, r = divmod(t1, t2)``" msgstr "``q, r = divmod(t1, t2)``" -#: library/datetime.rst:320 +#: library/datetime.rst:323 msgid "" "Computes the quotient and the remainder: ``q = t1 // t2`` (3) and ``r = t1 % " "t2``. q is an integer and r is a :class:`timedelta` object." @@ -628,19 +637,19 @@ msgstr "" "Calcule le quotient et le reste : ``q = t1 // t2`` (3) et ``r = t1 % t2``. q " "est un entier et r est un objet :class:`timedelta`." -#: library/datetime.rst:325 +#: library/datetime.rst:328 msgid "``+t1``" msgstr "``+t1``" -#: library/datetime.rst:325 +#: library/datetime.rst:328 msgid "Returns a :class:`timedelta` object with the same value. (2)" msgstr "Renvoie un objet :class:`timedelta` avec la même valeur. (2)" -#: library/datetime.rst:328 +#: library/datetime.rst:331 msgid "``-t1``" msgstr "``-t1``" -#: library/datetime.rst:328 +#: library/datetime.rst:331 msgid "" "equivalent to :class:`timedelta`\\ (-*t1.days*, -*t1.seconds*, -*t1." "microseconds*), and to *t1*\\* -1. (1)(4)" @@ -648,11 +657,11 @@ msgstr "" "équivalent à :class:`timedelta`\\ (*-t1.days*, *-t1.seconds*, *-t1." "microseconds*), et à ``t1 * -1``. (1)(4)" -#: library/datetime.rst:333 +#: library/datetime.rst:336 msgid "``abs(t)``" msgstr "``abs(t)``" -#: library/datetime.rst:333 +#: library/datetime.rst:336 msgid "" "equivalent to +\\ *t* when ``t.days >= 0``, and to -*t* when ``t.days < 0``. " "(2)" @@ -660,11 +669,11 @@ msgstr "" "équivalent à ``+t`` quand ``t.days >= 0``, et à ``-t`` quand ``t.days < 0``. " "(2)" -#: library/datetime.rst:336 +#: library/datetime.rst:339 msgid "``str(t)``" msgstr "``str(t)``" -#: library/datetime.rst:336 +#: library/datetime.rst:339 msgid "" "Returns a string in the form ``[D day[s], ][H]H:MM:SS[.UUUUUU]``, where D is " "negative for negative ``t``. (5)" @@ -672,11 +681,11 @@ msgstr "" "Renvoie une chaîne de la forme ``[D day[s], ][H]H:MM:SS[.UUUUUU]``, où D est " "négatif pour ``t`` négatif. (5)" -#: library/datetime.rst:340 +#: library/datetime.rst:343 msgid "``repr(t)``" msgstr "``repr(t)``" -#: library/datetime.rst:340 +#: library/datetime.rst:343 msgid "" "Returns a string representation of the :class:`timedelta` object as a " "constructor call with canonical attribute values." @@ -684,28 +693,28 @@ msgstr "" "Renvoie une chaîne de la forme objet :class:`timedelta` comme un appel " "construit avec des valeurs d'attributs canoniques." -#: library/datetime.rst:593 library/datetime.rst:2472 +#: library/datetime.rst:596 library/datetime.rst:2475 msgid "Notes:" msgstr "Notes :" -#: library/datetime.rst:349 +#: library/datetime.rst:352 msgid "This is exact but may overflow." msgstr "Ceci est exact, mais peut provoquer un débordement." -#: library/datetime.rst:352 +#: library/datetime.rst:355 msgid "This is exact and cannot overflow." msgstr "Ceci est exact, et ne peut pas provoquer un débordement." -#: library/datetime.rst:355 +#: library/datetime.rst:358 msgid "Division by 0 raises :exc:`ZeroDivisionError`." msgstr "Une division par 0 provoque :exc:`ZeroDivisionError`." -#: library/datetime.rst:358 +#: library/datetime.rst:361 msgid "-*timedelta.max* is not representable as a :class:`timedelta` object." msgstr "" "*-timedelta.max* n'est pas représentable avec un objet :class:`timedelta`." -#: library/datetime.rst:361 +#: library/datetime.rst:364 msgid "" "String representations of :class:`timedelta` objects are normalized " "similarly to their internal representation. This leads to somewhat unusual " @@ -715,7 +724,7 @@ msgstr "" "normalisée similairement à leur représentation interne. Cela amène à des " "résultats inhabituels pour des *timedeltas* négatifs. Par exemple ::" -#: library/datetime.rst:371 +#: library/datetime.rst:374 msgid "" "The expression ``t2 - t3`` will always be equal to the expression ``t2 + (-" "t3)`` except when t3 is equal to ``timedelta.max``; in that case the former " @@ -725,7 +734,7 @@ msgstr "" "sauf si *t3* vaut ``timedelta.max`` ; dans ce cas, la première expression " "produit une valeur alors que la seconde lève une ``OverflowError``." -#: library/datetime.rst:375 +#: library/datetime.rst:378 msgid "" "In addition to the operations listed above, :class:`timedelta` objects " "support certain additions and subtractions with :class:`date` and :class:`." @@ -735,7 +744,7 @@ msgstr "" "implémentent certaines additions et soustractions avec des objets :class:" "`date` et :class:`datetime` (voir ci-dessous)." -#: library/datetime.rst:379 +#: library/datetime.rst:382 msgid "" "Floor division and true division of a :class:`timedelta` object by another :" "class:`timedelta` object are now supported, as are remainder operations and " @@ -748,14 +757,14 @@ msgstr "" "division et la multiplication d'un objet :class:`timedelta` par un :class:" "`float` sont maintenant implémentées." -#: library/datetime.rst:386 +#: library/datetime.rst:389 msgid "" "Comparisons of :class:`timedelta` objects are supported, with some caveats." msgstr "" "Les comparaisons des objets :class:`timedelta` sont gérées, avec quelques " "réserves." -#: library/datetime.rst:388 +#: library/datetime.rst:391 msgid "" "The comparisons ``==`` or ``!=`` *always* return a :class:`bool`, no matter " "the type of the compared object::" @@ -763,7 +772,7 @@ msgstr "" "Les comparaisons ``==`` ou ``!=`` renvoient *toujours* un :class:`bool`, " "quel que soit le type de l'objet comparé ::" -#: library/datetime.rst:399 +#: library/datetime.rst:402 msgid "" "For all other comparisons (such as ``<`` and ``>``), when a :class:" "`timedelta` object is compared to an object of a different type, :exc:" @@ -773,7 +782,7 @@ msgstr "" "objet :class:`timedelta` est comparé à un objet d'un type différent, :exc:" "`TypeError` est levée ::" -#: library/datetime.rst:410 +#: library/datetime.rst:413 msgid "" "In Boolean contexts, a :class:`timedelta` object is considered to be true if " "and only if it isn't equal to ``timedelta(0)``." @@ -781,11 +790,11 @@ msgstr "" "Dans les contextes booléens, un objet :class:`timedelta` est considéré comme " "vrai si et seulement s'il n'est pas égal à ``timedelta(0)``." -#: library/datetime.rst:622 library/datetime.rst:1783 +#: library/datetime.rst:625 library/datetime.rst:1786 msgid "Instance methods:" msgstr "Méthodes de l'instance :" -#: library/datetime.rst:417 +#: library/datetime.rst:420 msgid "" "Return the total number of seconds contained in the duration. Equivalent to " "``td / timedelta(seconds=1)``. For interval units other than seconds, use " @@ -796,7 +805,7 @@ msgstr "" "seconde, utilisez directement la division (par exemple, ``td / " "timedelta(microseconds=1)``)." -#: library/datetime.rst:421 +#: library/datetime.rst:424 msgid "" "Note that for very large time intervals (greater than 270 years on most " "platforms) this method will lose microsecond accuracy." @@ -805,23 +814,23 @@ msgstr "" "sur la plupart des plateformes), cette méthode perdra la précision des " "microsecondes." -#: library/datetime.rst:427 +#: library/datetime.rst:430 msgid "Examples of usage: :class:`timedelta`" msgstr "Exemples d'utilisation de la classe :class:`timedelta` :" -#: library/datetime.rst:429 +#: library/datetime.rst:432 msgid "An additional example of normalization::" msgstr "Un exemple supplémentaire de normalisation ::" -#: library/datetime.rst:441 +#: library/datetime.rst:444 msgid "Examples of :class:`timedelta` arithmetic::" msgstr "Exemples d'arithmétique avec la classe :class:`timedelta` ::" -#: library/datetime.rst:460 +#: library/datetime.rst:463 msgid ":class:`date` Objects" msgstr "Objets :class:`date`" -#: library/datetime.rst:462 +#: library/datetime.rst:465 msgid "" "A :class:`date` object represents a date (year, month and day) in an " "idealized calendar, the current Gregorian calendar indefinitely extended in " @@ -831,7 +840,7 @@ msgstr "" "calendrier idéal, le calendrier grégorien actuel étant indéfiniment étendu " "dans les deux sens." -#: library/datetime.rst:466 +#: library/datetime.rst:469 msgid "" "January 1 of year 1 is called day number 1, January 2 of year 1 is called " "day number 2, and so on. [#]_" @@ -839,7 +848,7 @@ msgstr "" "Le 1\\ :sup:`er` janvier de l'année 1 est appelé jour numéro 1, le 2 janvier " "de l'année 1 est appelé jour numéro 2, et ainsi de suite. [#]_" -#: library/datetime.rst:471 +#: library/datetime.rst:474 msgid "" "All arguments are required. Arguments must be integers, in the following " "ranges:" @@ -847,38 +856,38 @@ msgstr "" "Tous les arguments sont requis. Les arguments peuvent être des entiers, dans " "les intervalles suivants :" -#: library/datetime.rst:474 +#: library/datetime.rst:477 msgid "``MINYEAR <= year <= MAXYEAR``" msgstr "``MINYEAR <= year <= MAXYEAR``" -#: library/datetime.rst:475 +#: library/datetime.rst:478 msgid "``1 <= month <= 12``" msgstr "``1 <= month <= 12``" -#: library/datetime.rst:476 +#: library/datetime.rst:479 msgid "``1 <= day <= number of days in the given month and year``" msgstr "``1 <= day <= nombre de jours dans le mois et l'année donnés``" -#: library/datetime.rst:840 +#: library/datetime.rst:843 msgid "" "If an argument outside those ranges is given, :exc:`ValueError` is raised." msgstr "" "Si un argument est donné en dehors de ces intervalles, une :exc:`valueError` " "est levée." -#: library/datetime.rst:845 +#: library/datetime.rst:848 msgid "Other constructors, all class methods:" msgstr "Autres constructeurs, méthodes de classe :" -#: library/datetime.rst:485 +#: library/datetime.rst:488 msgid "Return the current local date." msgstr "Renvoie la date locale courante." -#: library/datetime.rst:487 +#: library/datetime.rst:490 msgid "This is equivalent to ``date.fromtimestamp(time.time())``." msgstr "Cela est équivalent à ``date.fromtimestamp(time.time())``." -#: library/datetime.rst:491 +#: library/datetime.rst:494 msgid "" "Return the local date corresponding to the POSIX timestamp, such as is " "returned by :func:`time.time`." @@ -886,7 +895,7 @@ msgstr "" "Renvoie la date locale correspondant à l'horodatage POSIX, telle que " "renvoyée par :func:`time.time`." -#: library/datetime.rst:494 +#: library/datetime.rst:497 msgid "" "This may raise :exc:`OverflowError`, if the timestamp is out of the range of " "values supported by the platform C :c:func:`localtime` function, and :exc:" @@ -902,7 +911,7 @@ msgstr "" "non *POSIX* qui incluent les secondes intercalaires dans leur notion " "d'horodatage, ces secondes sont ignorées par :meth:`fromtimestamp`." -#: library/datetime.rst:501 +#: library/datetime.rst:504 msgid "" "Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is " "out of the range of values supported by the platform C :c:func:`localtime` " @@ -914,7 +923,7 @@ msgstr "" "fonction C :c:func:`localtime` de la plateforme. Lève une :exc:`OSError` " "plutôt qu'une :exc:`ValueError` en cas d'échec de :c:func:`localtime`." -#: library/datetime.rst:510 +#: library/datetime.rst:513 msgid "" "Return the date corresponding to the proleptic Gregorian ordinal, where " "January 1 of year 1 has ordinal 1." @@ -922,7 +931,7 @@ msgstr "" "Renvoie la date correspondant à l'ordinal grégorien proleptique, où le 1er " "janvier de l'an 1 a l'ordinal 1." -#: library/datetime.rst:513 +#: library/datetime.rst:516 msgid "" ":exc:`ValueError` is raised unless ``1 <= ordinal <= date.max.toordinal()``. " "For any date *d*, ``date.fromordinal(d.toordinal()) == d``." @@ -930,7 +939,7 @@ msgstr "" ":exc:`ValueError` est levée à moins que ``1 <= ordinal <= date.max." "toordinal()``. Pour toute date *d*, ``date.fromordinal(d.toordinal()) == d``." -#: library/datetime.rst:520 +#: library/datetime.rst:523 msgid "" "Return a :class:`date` corresponding to a *date_string* given in the format " "``YYYY-MM-DD``::" @@ -938,7 +947,7 @@ msgstr "" "Renvoie une :class:`date` correspondant à *date_string* dans le format " "``YYYY-MM-DD`` ::" -#: library/datetime.rst:527 +#: library/datetime.rst:530 msgid "" "This is the inverse of :meth:`date.isoformat`. It only supports the format " "``YYYY-MM-DD``." @@ -946,7 +955,7 @@ msgstr "" "C'est la réciproque de :meth:`date.isoformat`. Elle ne prend en charge que " "le format ``YYYY-MM-DD``." -#: library/datetime.rst:535 +#: library/datetime.rst:538 msgid "" "Return a :class:`date` corresponding to the ISO calendar date specified by " "year, week and day. This is the inverse of the function :meth:`date." @@ -956,15 +965,15 @@ msgstr "" "par l'année, la semaine et le jour. C'est la réciproque de la fonction :meth:" "`date.isocalendar`." -#: library/datetime.rst:545 +#: library/datetime.rst:548 msgid "The earliest representable date, ``date(MINYEAR, 1, 1)``." msgstr "La plus vieille date représentable, ``date(MINYEAR, 1, 1)``." -#: library/datetime.rst:550 +#: library/datetime.rst:553 msgid "The latest representable date, ``date(MAXYEAR, 12, 31)``." msgstr "La dernière date représentable, ``date(MAXYEAR, 12, 31)``." -#: library/datetime.rst:555 +#: library/datetime.rst:558 msgid "" "The smallest possible difference between non-equal date objects, " "``timedelta(days=1)``." @@ -972,48 +981,48 @@ msgstr "" "La plus petite différence possible entre deux objets dates non-égaux, " "``timedelta(days=1)``." -#: library/datetime.rst:1072 +#: library/datetime.rst:1075 msgid "Between :const:`MINYEAR` and :const:`MAXYEAR` inclusive." msgstr "Entre :const:`MINYEAR` et :const:`MAXYEAR` inclus." -#: library/datetime.rst:1077 +#: library/datetime.rst:1080 msgid "Between 1 and 12 inclusive." msgstr "Entre 1 et 12 inclus." -#: library/datetime.rst:1082 +#: library/datetime.rst:1085 msgid "Between 1 and the number of days in the given month of the given year." msgstr "Entre 1 et le nombre de jours du mois donné de l'année donnée." -#: library/datetime.rst:581 +#: library/datetime.rst:584 msgid "``date2 = date1 + timedelta``" msgstr "``date2 = date1 + timedelta``" -#: library/datetime.rst:581 +#: library/datetime.rst:584 msgid "*date2* is ``timedelta.days`` days removed from *date1*. (1)" msgstr "" "*date2* est décalée de ``timedelta.days`` jours par rapport à *date1*. (1)" -#: library/datetime.rst:584 +#: library/datetime.rst:587 msgid "``date2 = date1 - timedelta``" msgstr "``date2 = date1 - timedelta``" -#: library/datetime.rst:584 +#: library/datetime.rst:587 msgid "Computes *date2* such that ``date2 + timedelta == date1``. (2)" msgstr "Calcule *date2* de façon à avoir ``date2 + timedelta == date1``. (2)" -#: library/datetime.rst:587 +#: library/datetime.rst:590 msgid "``timedelta = date1 - date2``" msgstr "``timedelta = date1 - date2``" -#: library/datetime.rst:1130 +#: library/datetime.rst:1133 msgid "\\(3)" msgstr "\\(3)" -#: library/datetime.rst:589 +#: library/datetime.rst:592 msgid "``date1 < date2``" msgstr "``date1 < date2``" -#: library/datetime.rst:589 +#: library/datetime.rst:592 msgid "" "*date1* is considered less than *date2* when *date1* precedes *date2* in " "time. (4)" @@ -1021,7 +1030,7 @@ msgstr "" "*date1* est considérée comme inférieure à *date2* quand *date1* précède " "*date2* dans le temps. (4)" -#: library/datetime.rst:596 +#: library/datetime.rst:599 msgid "" "*date2* is moved forward in time if ``timedelta.days > 0``, or backward if " "``timedelta.days < 0``. Afterward ``date2 - date1 == timedelta.days``. " @@ -1035,11 +1044,11 @@ msgstr "" "Une :exc:`OverflowError` est levée si ``date2.year`` devait être inférieure " "à :const:`MINYEAR` ou supérieure à :const:`MAXYEAR`." -#: library/datetime.rst:603 +#: library/datetime.rst:606 msgid "``timedelta.seconds`` and ``timedelta.microseconds`` are ignored." msgstr "``timedelta.seconds`` et ``timedelta.microseconds`` sont ignorés." -#: library/datetime.rst:606 +#: library/datetime.rst:609 msgid "" "This is exact, and cannot overflow. timedelta.seconds and timedelta." "microseconds are 0, and date2 + timedelta == date1 after." @@ -1048,7 +1057,7 @@ msgstr "" "seconds`` et ``timedelta.microseconds`` valent ``0``, et ``date2 + timedelta " "== date1`` après cela." -#: library/datetime.rst:610 +#: library/datetime.rst:613 msgid "" "In other words, ``date1 < date2`` if and only if ``date1.toordinal() < date2." "toordinal()``. Date comparison raises :exc:`TypeError` if the other " @@ -1070,14 +1079,14 @@ msgstr "" "`TypeError` est levée à moins que la comparaison soit ``==`` ou ``!=``. Ces " "derniers cas renvoient respectivement :const:`False` et :const:`True`." -#: library/datetime.rst:620 +#: library/datetime.rst:623 msgid "" "In Boolean contexts, all :class:`date` objects are considered to be true." msgstr "" "Dans des contextes booléens, tous les objets :class:`date` sont considérés " "comme vrai." -#: library/datetime.rst:626 +#: library/datetime.rst:629 msgid "" "Return a date with the same value, except for those parameters given new " "values by whichever keyword arguments are specified." @@ -1085,11 +1094,11 @@ msgstr "" "Renvoie une date avec la même valeur, excepté pour les valeurs spécifiées " "par arguments nommés." -#: library/datetime.rst:1826 +#: library/datetime.rst:1829 msgid "Example::" msgstr "Exemple ::" -#: library/datetime.rst:1308 +#: library/datetime.rst:1311 msgid "" "Return a :class:`time.struct_time` such as returned by :func:`time." "localtime`." @@ -1097,16 +1106,16 @@ msgstr "" "Renvoie une :class:`time.struct_time` telle que renvoyée par :func:`time." "localtime`." -#: library/datetime.rst:641 +#: library/datetime.rst:644 msgid "The hours, minutes and seconds are 0, and the DST flag is -1." msgstr "" "Les heures, minutes et secondes sont égales à 0 et le drapeau DST vaut -1." -#: library/datetime.rst:1310 +#: library/datetime.rst:1313 msgid "``d.timetuple()`` is equivalent to::" msgstr "``d.timetuple()`` est équivalent à ::" -#: library/datetime.rst:647 +#: library/datetime.rst:650 msgid "" "where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " "day number within the current year starting with ``1`` for January 1st." @@ -1115,7 +1124,7 @@ msgstr "" "numéro du jour dans l'année courante commençant par ``1`` pour le 1\\ :sup:" "`er` janvier." -#: library/datetime.rst:653 +#: library/datetime.rst:656 msgid "" "Return the proleptic Gregorian ordinal of the date, where January 1 of year " "1 has ordinal 1. For any :class:`date` object *d*, ``date.fromordinal(d." @@ -1125,7 +1134,7 @@ msgstr "" "l'an 1 a l'ordinal 1. Pour tout objet :class:`date` *d*, ``date." "fromordinal(d.toordinal()) == d``." -#: library/datetime.rst:660 +#: library/datetime.rst:663 msgid "" "Return the day of the week as an integer, where Monday is 0 and Sunday is 6. " "For example, ``date(2002, 12, 4).weekday() == 2``, a Wednesday. See also :" @@ -1135,7 +1144,7 @@ msgstr "" "dimanche vaut 6. Par exemple, ``date(2002, 12, 4).weekday() == 2``, un " "mercredi. Voir aussi :meth:`isoweekday`." -#: library/datetime.rst:667 +#: library/datetime.rst:670 msgid "" "Return the day of the week as an integer, where Monday is 1 and Sunday is 7. " "For example, ``date(2002, 12, 4).isoweekday() == 3``, a Wednesday. See also :" @@ -1145,7 +1154,7 @@ msgstr "" "dimanche vaut 7. Par exemple, ``date(2002, 12, 4).isoweekday() == 3``, un " "mercredi. Voir aussi :meth:`weekday`, :meth:`isocalendar`." -#: library/datetime.rst:674 +#: library/datetime.rst:677 msgid "" "Return a :term:`named tuple` object with three components: ``year``, " "``week`` and ``weekday``." @@ -1153,14 +1162,14 @@ msgstr "" "Renvoie un objet :term:`named tuple` avec trois composants : ``year``, " "``week`` et ``weekday``." -#: library/datetime.rst:677 +#: library/datetime.rst:680 msgid "" "The ISO calendar is a widely used variant of the Gregorian calendar. [#]_" msgstr "" "Le calendrier ISO est une variante largement utilisée du calendrier " "grégorien. [#]_" -#: library/datetime.rst:679 +#: library/datetime.rst:682 msgid "" "The ISO year consists of 52 or 53 full weeks, and where a week starts on a " "Monday and ends on a Sunday. The first week of an ISO year is the first " @@ -1174,7 +1183,7 @@ msgstr "" "un jeudi. Elle est appelée la semaine numéro 1, et l'année ISO de ce jeudi " "est la même que son année Grégorienne." -#: library/datetime.rst:684 +#: library/datetime.rst:687 msgid "" "For example, 2004 begins on a Thursday, so the first week of ISO year 2004 " "begins on Monday, 29 Dec 2003 and ends on Sunday, 4 Jan 2004::" @@ -1183,34 +1192,34 @@ msgstr "" "l'année ISO 2004 débute le lundi 29 décembre 2003 et se termine le dimanche " "4 janvier 2004 ::" -#: library/datetime.rst:693 +#: library/datetime.rst:696 msgid "Result changed from a tuple to a :term:`named tuple`." msgstr "Le résultat a changé d'un *n*-uplet à un :term:`named tuple`." -#: library/datetime.rst:698 +#: library/datetime.rst:701 msgid "" "Return a string representing the date in ISO 8601 format, ``YYYY-MM-DD``::" msgstr "" "Renvoie une chaîne de caractères représentant la date au format ISO 8601, " "\"YYYY-MM-DD\" ::" -#: library/datetime.rst:704 +#: library/datetime.rst:707 msgid "This is the inverse of :meth:`date.fromisoformat`." msgstr "C'est la réciproque de :meth:`date.fromisoformat`." -#: library/datetime.rst:708 +#: library/datetime.rst:711 msgid "For a date *d*, ``str(d)`` is equivalent to ``d.isoformat()``." msgstr "Pour une date *d*, ``str(d)`` est équivalent à ``d.isoformat()``." -#: library/datetime.rst:713 +#: library/datetime.rst:716 msgid "Return a string representing the date::" msgstr "Renvoie une chaîne de caractères représentant la date ::" -#: library/datetime.rst:1494 +#: library/datetime.rst:1497 msgid "``d.ctime()`` is equivalent to::" msgstr "``d.ctime()`` est équivalent à ::" -#: library/datetime.rst:723 +#: library/datetime.rst:726 msgid "" "on platforms where the native C :c:func:`ctime` function (which :func:`time." "ctime` invokes, but which :meth:`date.ctime` does not invoke) conforms to " @@ -1219,7 +1228,7 @@ msgstr "" "sur les plateformes où la fonction C native :c:func:`ctime` (que :func:`time." "ctime` invoque, mais pas :meth:`date.ctime`) est conforme au standard C." -#: library/datetime.rst:730 +#: library/datetime.rst:733 msgid "" "Return a string representing the date, controlled by an explicit format " "string. Format codes referring to hours, minutes or seconds will see 0 " @@ -1231,7 +1240,7 @@ msgstr "" "heures, minutes ou secondes auront pour valeur 0. Pour une liste complète " "des directives de formatage, voir :ref:`strftime-strptime-behavior`." -#: library/datetime.rst:738 +#: library/datetime.rst:741 msgid "" "Same as :meth:`.date.strftime`. This makes it possible to specify a format " "string for a :class:`.date` object in :ref:`formatted string literals `__." -#: library/datetime.rst:1423 library/datetime.rst:1770 +#: library/datetime.rst:1426 library/datetime.rst:1773 msgid "Examples::" msgstr "Exemples ::" -#: library/datetime.rst:1025 +#: library/datetime.rst:1028 msgid "" "Return a :class:`.datetime` corresponding to the ISO calendar date specified " "by year, week and day. The non-date components of the datetime are populated " @@ -1632,7 +1641,7 @@ msgstr "" "la date de *datetime* sont renseignées avec leurs valeurs par défaut " "normales. C'est la réciproque de la fonction :meth:`datetime.isocalendar`." -#: library/datetime.rst:1034 +#: library/datetime.rst:1037 msgid "" "Return a :class:`.datetime` corresponding to *date_string*, parsed according " "to *format*." @@ -1640,11 +1649,11 @@ msgstr "" "Renvoie une classe :class:`.datetime` correspondant à *date_string*, " "analysée selon *format*." -#: library/datetime.rst:1037 +#: library/datetime.rst:1040 msgid "This is equivalent to::" msgstr "C’est équivalent à ::" -#: library/datetime.rst:1041 +#: library/datetime.rst:1044 msgid "" ":exc:`ValueError` is raised if the date_string and format can't be parsed " "by :func:`time.strptime` or if it returns a value which isn't a time tuple. " @@ -1656,7 +1665,7 @@ msgstr "" "pas un *n*-uplet de temps. Pour une liste complète des directives de " "formatage, voir :ref:`strftime-strptime-behavior`." -#: library/datetime.rst:1052 +#: library/datetime.rst:1055 msgid "" "The earliest representable :class:`.datetime`, ``datetime(MINYEAR, 1, 1, " "tzinfo=None)``." @@ -1664,7 +1673,7 @@ msgstr "" "Le plus ancien :class:`.datetime` représentable, ``datetime(MINYEAR, 1, 1, " "tzinfo=None)``." -#: library/datetime.rst:1058 +#: library/datetime.rst:1061 msgid "" "The latest representable :class:`.datetime`, ``datetime(MAXYEAR, 12, 31, 23, " "59, 59, 999999, tzinfo=None)``." @@ -1672,7 +1681,7 @@ msgstr "" "Le dernier :class:`.datetime` représentable, ``datetime(MAXYEAR, 12, 31, 23, " "59, 59, 999999, tzinfo=None)``." -#: library/datetime.rst:1064 +#: library/datetime.rst:1067 msgid "" "The smallest possible difference between non-equal :class:`.datetime` " "objects, ``timedelta(microseconds=1)``." @@ -1680,19 +1689,19 @@ msgstr "" "La plus petite différence possible entre deux objets :class:`.datetime` non-" "égaux, ``timedelta(microseconds=1)``." -#: library/datetime.rst:1690 +#: library/datetime.rst:1693 msgid "In ``range(24)``." msgstr "Dans ``range(24)``." -#: library/datetime.rst:1097 library/datetime.rst:1700 +#: library/datetime.rst:1100 library/datetime.rst:1703 msgid "In ``range(60)``." msgstr "Dans ``range(60)``." -#: library/datetime.rst:1705 +#: library/datetime.rst:1708 msgid "In ``range(1000000)``." msgstr "Dans ``range(1000000)``." -#: library/datetime.rst:1107 +#: library/datetime.rst:1110 msgid "" "The object passed as the *tzinfo* argument to the :class:`.datetime` " "constructor, or ``None`` if none was passed." @@ -1700,7 +1709,7 @@ msgstr "" "L'objet passé en tant que paramètre *tzinfo* du constructeur de la classe :" "class:`.datetime` ou ``None`` si aucun n'a été donné." -#: library/datetime.rst:1716 +#: library/datetime.rst:1719 msgid "" "In ``[0, 1]``. Used to disambiguate wall times during a repeated interval. " "(A repeated interval occurs when clocks are rolled back at the end of " @@ -1714,36 +1723,36 @@ msgstr "" "décrémenté pour des raisons politiques.) La valeur 0 (1) représente le plus " "ancien (récent) des deux moments représentés par la même heure." -#: library/datetime.rst:1126 +#: library/datetime.rst:1129 msgid "``datetime2 = datetime1 + timedelta``" msgstr "``datetime2 = datetime1 + timedelta``" -#: library/datetime.rst:2308 library/datetime.rst:2325 -#: library/datetime.rst:2390 library/datetime.rst:2399 +#: library/datetime.rst:2310 library/datetime.rst:2327 +#: library/datetime.rst:2392 library/datetime.rst:2401 msgid "\\(1)" msgstr "\\(1)" -#: library/datetime.rst:1128 +#: library/datetime.rst:1131 msgid "``datetime2 = datetime1 - timedelta``" msgstr "``datetime2 = datetime1 - timedelta``" -#: library/datetime.rst:2341 +#: library/datetime.rst:2343 msgid "\\(2)" msgstr "\\(2)" -#: library/datetime.rst:1130 +#: library/datetime.rst:1133 msgid "``timedelta = datetime1 - datetime2``" msgstr "``timedelta = datetime1 - datetime2``" -#: library/datetime.rst:1132 +#: library/datetime.rst:1135 msgid "``datetime1 < datetime2``" msgstr "``datetime1 < datetime2``" -#: library/datetime.rst:1132 +#: library/datetime.rst:1135 msgid "Compares :class:`.datetime` to :class:`.datetime`. (4)" msgstr "Compare :class:`.datetime` à :class:`.datetime`. (4)" -#: library/datetime.rst:1137 +#: library/datetime.rst:1140 #, fuzzy msgid "" "datetime2 is a duration of timedelta removed from datetime1, moving forward " @@ -1763,7 +1772,7 @@ msgstr "" "qu'aucun ajustement de fuseau horaire n'est réalisé même si l'entrée est " "avisée." -#: library/datetime.rst:1146 +#: library/datetime.rst:1149 msgid "" "Computes the datetime2 such that datetime2 + timedelta == datetime1. As for " "addition, the result has the same :attr:`~.datetime.tzinfo` attribute as the " @@ -1775,7 +1784,7 @@ msgstr "" "que le *datetime* d'entrée, et aucun ajustement de fuseau horaire n'est " "réalisé même si l'entrée est avisée." -#: library/datetime.rst:1151 +#: library/datetime.rst:1154 #, fuzzy msgid "" "Subtraction of a :class:`.datetime` from a :class:`.datetime` is defined " @@ -1787,7 +1796,7 @@ msgstr "" "avisés. Si l'un est avisé et que l'autre est naïf, une :exc:`TypeError` est " "levée." -#: library/datetime.rst:1155 +#: library/datetime.rst:1158 #, fuzzy msgid "" "If both are naive, or both are aware and have the same :attr:`~.datetime." @@ -1801,7 +1810,7 @@ msgstr "" "``datetime2 + t == datetime1``. Aucun ajustement de fuseau horaire n'a lieu " "dans ce cas." -#: library/datetime.rst:1160 +#: library/datetime.rst:1163 #, fuzzy msgid "" "If both are aware and have different :attr:`~.datetime.tzinfo` attributes, " @@ -1816,7 +1825,7 @@ msgstr "" "a.utcoffset()) - (b.replace(tzinfo=None) - b.utcoffset())`` à l'exception " "que l'implémentation ne produit jamais de débordement." -#: library/datetime.rst:1166 +#: library/datetime.rst:1169 msgid "" "*datetime1* is considered less than *datetime2* when *datetime1* precedes " "*datetime2* in time." @@ -1824,7 +1833,7 @@ msgstr "" "*datetime1* est considéré inférieur à *datetime2* quand il le précède dans " "le temps." -#: library/datetime.rst:1169 +#: library/datetime.rst:1172 #, fuzzy msgid "" "If one comparand is naive and the other is aware, :exc:`TypeError` is raised " @@ -1835,7 +1844,7 @@ msgstr "" "une comparaison d'ordre est attendue. Pour les comparaisons d'égalité, les " "instances naïves ne sont jamais égales aux instances avisées." -#: library/datetime.rst:1173 +#: library/datetime.rst:1176 #, fuzzy msgid "" "If both comparands are aware, and have the same :attr:`~.datetime.tzinfo` " @@ -1852,7 +1861,7 @@ msgstr "" "premièrement ajustés en soustrayant leurs décalages UTC (obtenus depuis " "``self.utcoffset()``)." -#: library/datetime.rst:1179 +#: library/datetime.rst:1182 #, fuzzy msgid "" "Equality comparisons between aware and naive :class:`.datetime` instances " @@ -1861,7 +1870,7 @@ msgstr "" "Les comparaisons d'égalité entre des instances :class:`.datetime` naïves et " "avisées ne lèvent pas de :exc:`TypeError`." -#: library/datetime.rst:1185 +#: library/datetime.rst:1188 #, fuzzy msgid "" "In order to stop comparison from falling back to the default scheme of " @@ -1885,11 +1894,11 @@ msgstr "" "comparaison soit ``==`` ou ``!=``. Ces derniers cas renvoient " "respectivement :const:`False` et :const:`True`." -#: library/datetime.rst:1199 +#: library/datetime.rst:1202 msgid "Return :class:`date` object with same year, month and day." msgstr "Renvoie un objet :class:`date` avec les mêmes année, mois et jour." -#: library/datetime.rst:1204 +#: library/datetime.rst:1207 #, fuzzy msgid "" "Return :class:`.time` object with same hour, minute, second, microsecond and " @@ -1899,11 +1908,11 @@ msgstr "" "microseconde et *fold*. :attr:`.tzinfo` est ``None``. Voir aussi la " "méthode :meth:`timetz`." -#: library/datetime.rst:1216 +#: library/datetime.rst:1219 msgid "The fold value is copied to the returned :class:`.time` object." msgstr "La valeur *fold* est copiée vers l'objet :class:`.time` renvoyé." -#: library/datetime.rst:1213 +#: library/datetime.rst:1216 #, fuzzy msgid "" "Return :class:`.time` object with same hour, minute, second, microsecond, " @@ -1913,7 +1922,7 @@ msgstr "" "seconde, microseconde, *fold* et *tzinfo*. Voir aussi la méthode :meth:" "`time`." -#: library/datetime.rst:1224 +#: library/datetime.rst:1227 #, fuzzy msgid "" "Return a datetime with the same attributes, except for those attributes " @@ -1926,7 +1935,7 @@ msgstr "" "Notez que ``tzinfo=None`` peut être spécifié pour créer un *datetime* naïf " "depuis un *datetime* avisé sans conversion de la date ou de l'heure." -#: library/datetime.rst:1235 +#: library/datetime.rst:1238 msgid "" "Return a :class:`.datetime` object with new :attr:`.tzinfo` attribute *tz*, " "adjusting the date and time data so the result is the same UTC time as " @@ -1936,7 +1945,7 @@ msgstr "" "valant *tz*, ajustant la date et l'heure pour que le résultat soit le même " "temps UTC que *self*, mais dans le temps local au fuseau *tz*." -#: library/datetime.rst:1239 +#: library/datetime.rst:1242 #, fuzzy msgid "" "If provided, *tz* must be an instance of a :class:`tzinfo` subclass, and " @@ -1948,7 +1957,7 @@ msgstr "" "``None``. Si *self* est naïf, Python considère que le temps est exprimé " "dans le fuseau horaire du système." -#: library/datetime.rst:1243 +#: library/datetime.rst:1246 #, fuzzy msgid "" "If called without arguments (or with ``tz=None``) the system local timezone " @@ -1961,7 +1970,7 @@ msgstr "" "l'instance *datetime* convertie aura pour valeur une instance de :class:" "`timezone` avec le nom de fuseau et le décalage obtenus depuis l'OS." -#: library/datetime.rst:1248 +#: library/datetime.rst:1251 msgid "" "If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no " "adjustment of date or time data is performed. Else the result is local time " @@ -1975,7 +1984,7 @@ msgstr "" "après ``astz = dt.astimezone(tz)``, ``astz - astz.utcoffset()`` aura les " "mêmes données de date et d'heure que ``dt - dt.utcoffset()``." -#: library/datetime.rst:1254 +#: library/datetime.rst:1257 #, fuzzy msgid "" "If you merely want to attach a time zone object *tz* to a datetime *dt* " @@ -1989,7 +1998,7 @@ msgstr "" "d'un *datetime* *dt* avisé sans conversion des données de date et d'heure, " "utilisez ``dt.replace(tzinfo=None)``." -#: library/datetime.rst:1259 +#: library/datetime.rst:1262 msgid "" "Note that the default :meth:`tzinfo.fromutc` method can be overridden in a :" "class:`tzinfo` subclass to affect the result returned by :meth:`astimezone`. " @@ -2000,11 +2009,11 @@ msgstr "" "meth:`astimezone`. En ignorant les cas d'erreurs, :meth:`astimezone` se " "comporte comme ::" -#: library/datetime.rst:1271 +#: library/datetime.rst:1274 msgid "*tz* now can be omitted." msgstr "*tz* peut maintenant être omis." -#: library/datetime.rst:1274 +#: library/datetime.rst:1277 msgid "" "The :meth:`astimezone` method can now be called on naive instances that are " "presumed to represent system local time." @@ -2012,7 +2021,7 @@ msgstr "" "La méthode :meth:`astimezone` peut maintenant être appelée sur des instances " "naïves qui sont supposées représenter un temps local au système." -#: library/datetime.rst:1281 +#: library/datetime.rst:1284 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "utcoffset(self)``, and raises an exception if the latter doesn't return " @@ -2023,12 +2032,12 @@ msgstr "" "ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " "inférieure à un jour." -#: library/datetime.rst:1868 library/datetime.rst:2220 -#: library/datetime.rst:2528 +#: library/datetime.rst:1871 library/datetime.rst:2222 +#: library/datetime.rst:2531 msgid "The UTC offset is not restricted to a whole number of minutes." msgstr "Le décalage UTC peut aussi être autre chose qu'un ensemble de minutes." -#: library/datetime.rst:1291 +#: library/datetime.rst:1294 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "dst(self)``, and raises an exception if the latter doesn't return ``None`` " @@ -2039,11 +2048,11 @@ msgstr "" "renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " "inférieure à un jour." -#: library/datetime.rst:1878 library/datetime.rst:2028 +#: library/datetime.rst:1881 library/datetime.rst:2031 msgid "The DST offset is not restricted to a whole number of minutes." msgstr "Le décalage DST n'est pas restreint à des minutes entières." -#: library/datetime.rst:1301 +#: library/datetime.rst:1304 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "tzname(self)``, raises an exception if the latter doesn't return ``None`` or " @@ -2053,7 +2062,7 @@ msgstr "" "tzinfo.tzname(self)``, lève une exception si l'expression précédente ne " "renvoie pas ``None`` ou une chaîne de caractères," -#: library/datetime.rst:1316 +#: library/datetime.rst:1319 #, fuzzy msgid "" "where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " @@ -2074,7 +2083,7 @@ msgstr "" "une valeur non-nulle, :attr:`tm_isdst` est mise à ``1`` ; sinon :attr:" "`tm_isdst` est mise à ``0``." -#: library/datetime.rst:1327 +#: library/datetime.rst:1330 #, fuzzy msgid "" "If :class:`.datetime` instance *d* is naive, this is the same as ``d." @@ -2086,7 +2095,7 @@ msgstr "" "de ce que renvoie ``d.dst()``. L'heure d'été n'est jamais effective pour un " "temps UTC." -#: library/datetime.rst:1331 +#: library/datetime.rst:1334 #, fuzzy msgid "" "If *d* is aware, *d* is normalized to UTC time, by subtracting ``d." @@ -2101,7 +2110,7 @@ msgstr "" "`OverflowError` peut être levée si *d.year* vaut ``MINYEAR``ou ``MAXYEAR`` " "et que l'ajustement UTC fait dépasser les bornes." -#: library/datetime.rst:1340 +#: library/datetime.rst:1343 msgid "" "Because naive ``datetime`` objects are treated by many ``datetime`` methods " "as local times, it is preferred to use aware datetimes to represent times in " @@ -2118,7 +2127,7 @@ msgstr "" "``datetime.replace(tzinfo=timezone.utc)`` pour la rendre avisée, puis vous " "pouvez utiliser :meth:`.datetime.timetuple`." -#: library/datetime.rst:1349 +#: library/datetime.rst:1352 msgid "" "Return the proleptic Gregorian ordinal of the date. The same as ``self." "date().toordinal()``." @@ -2126,7 +2135,7 @@ msgstr "" "Renvoie l'ordinal du calendrier grégorien proleptique de cette date. " "Identique à ``self.date().toordinal()``." -#: library/datetime.rst:1354 +#: library/datetime.rst:1357 msgid "" "Return POSIX timestamp corresponding to the :class:`.datetime` instance. The " "return value is a :class:`float` similar to that returned by :func:`time." @@ -2136,7 +2145,7 @@ msgstr "" "La valeur renvoyée est un :class:`float` similaire à ceux renvoyés par :func:" "`time.time`." -#: library/datetime.rst:1358 +#: library/datetime.rst:1361 #, fuzzy msgid "" "Naive :class:`.datetime` instances are assumed to represent local time and " @@ -2152,14 +2161,14 @@ msgstr "" "plateformes, cette méthode peut lever une :exc:`OverflowError` pour les " "temps trop éloignés dans le passé ou le futur." -#: library/datetime.rst:1365 +#: library/datetime.rst:1368 msgid "" "For aware :class:`.datetime` instances, the return value is computed as::" msgstr "" "Pour les instances :class:`.datetime` avisées, la valeur renvoyée est " "calculée comme suit ::" -#: library/datetime.rst:1372 +#: library/datetime.rst:1375 msgid "" "The :meth:`timestamp` method uses the :attr:`.fold` attribute to " "disambiguate the times during a repeated interval." @@ -2167,7 +2176,7 @@ msgstr "" "La méthode :meth:`timestamp` utilise l'attribut :attr:`.fold` pour " "désambiguïser le temps dans un intervalle répété." -#: library/datetime.rst:1378 +#: library/datetime.rst:1381 #, fuzzy msgid "" "There is no method to obtain the POSIX timestamp directly from a naive :" @@ -2181,11 +2190,11 @@ msgstr "" "que le fuseau horaire de votre système est UTC, vous pouvez obtenir " "l'horodatage *POSIX* en fournissant ``tzinfo=timezone.utc`` ::" -#: library/datetime.rst:1386 +#: library/datetime.rst:1389 msgid "or by calculating the timestamp directly::" msgstr "ou en calculant l'horodatage (*timestamp* en anglais) directement ::" -#: library/datetime.rst:1392 +#: library/datetime.rst:1395 msgid "" "Return the day of the week as an integer, where Monday is 0 and Sunday is 6. " "The same as ``self.date().weekday()``. See also :meth:`isoweekday`." @@ -2194,7 +2203,7 @@ msgstr "" "dimanche vaut 6. Identique à ``self.date().weekday()``. Voir aussi :meth:" "`isoweekday`." -#: library/datetime.rst:1398 +#: library/datetime.rst:1401 msgid "" "Return the day of the week as an integer, where Monday is 1 and Sunday is 7. " "The same as ``self.date().isoweekday()``. See also :meth:`weekday`, :meth:" @@ -2204,7 +2213,7 @@ msgstr "" "dimanche vaut 7. Identique à ``self.date().isoweekday()``. Voir aussi :meth:" "`weekday`, :meth:`isocalendar`." -#: library/datetime.rst:1405 +#: library/datetime.rst:1408 msgid "" "Return a :term:`named tuple` with three components: ``year``, ``week`` and " "``weekday``. The same as ``self.date().isocalendar()``." @@ -2212,20 +2221,20 @@ msgstr "" "Renvoie un :term:`n-uplet nommé` de 3 éléments : ``year``, " "``week`` et ``weekday``. Identique à ``self.date().isocalendar()``." -#: library/datetime.rst:1411 +#: library/datetime.rst:1414 msgid "Return a string representing the date and time in ISO 8601 format:" msgstr "" "Renvoie une chaîne représentant la date et l'heure au format ISO 8601 :" -#: library/datetime.rst:1413 +#: library/datetime.rst:1416 msgid "``YYYY-MM-DDTHH:MM:SS.ffffff``, if :attr:`microsecond` is not 0" msgstr "``YYYY-MM-DDTHH:MM:SS.ffffff``, si :attr:`microsecond` ne vaut pas 0" -#: library/datetime.rst:1414 +#: library/datetime.rst:1417 msgid "``YYYY-MM-DDTHH:MM:SS``, if :attr:`microsecond` is 0" msgstr "``YYYY-MM-DDTHH:MM:SS``, si :attr:`microsecond` vaut 0" -#: library/datetime.rst:1416 +#: library/datetime.rst:1419 msgid "" "If :meth:`utcoffset` does not return ``None``, a string is appended, giving " "the UTC offset:" @@ -2233,7 +2242,7 @@ msgstr "" "Si :meth:`utcoffset` ne renvoie pas ``None``, une chaîne est ajoutée, " "donnant le décalage UTC :" -#: library/datetime.rst:1419 +#: library/datetime.rst:1422 msgid "" "``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` " "is not 0" @@ -2241,13 +2250,13 @@ msgstr "" "``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` " "ne vaut pas 0" -#: library/datetime.rst:1421 +#: library/datetime.rst:1424 msgid "" "``YYYY-MM-DDTHH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0" msgstr "" "``YYYY-MM-DDTHH:MM:SS+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` vaut 0" -#: library/datetime.rst:1431 +#: library/datetime.rst:1434 msgid "" "The optional argument *sep* (default ``'T'``) is a one-character separator, " "placed between the date and time portions of the result. For example::" @@ -2256,7 +2265,7 @@ msgstr "" "caractère, placé entre les portions du résultat correspondant à la date et à " "l'heure. Par exemple ::" -#: library/datetime.rst:1806 +#: library/datetime.rst:1809 msgid "" "The optional argument *timespec* specifies the number of additional " "components of the time to include (the default is ``'auto'``). It can be one " @@ -2266,7 +2275,7 @@ msgstr "" "additionnels de temps à inclure (par défaut ``'auto'``). Il peut valoir " "l'une des valeurs suivantes :" -#: library/datetime.rst:1810 +#: library/datetime.rst:1813 msgid "" "``'auto'``: Same as ``'seconds'`` if :attr:`microsecond` is 0, same as " "``'microseconds'`` otherwise." @@ -2274,17 +2283,17 @@ msgstr "" "``'auto'`` : Identique à ``'seconds'`` si :attr:`microsecond` vaut 0, à " "``'microseconds'`` sinon." -#: library/datetime.rst:1812 +#: library/datetime.rst:1815 msgid "``'hours'``: Include the :attr:`hour` in the two-digit ``HH`` format." msgstr "``'hours'`` : Inclut :attr:`hour` au format à deux chiffres ``HH``." -#: library/datetime.rst:1813 +#: library/datetime.rst:1816 msgid "" "``'minutes'``: Include :attr:`hour` and :attr:`minute` in ``HH:MM`` format." msgstr "" "``'minutes'`` : Inclut :attr:`hour` et :attr:`minute` au format ``HH:MM``." -#: library/datetime.rst:1814 +#: library/datetime.rst:1817 msgid "" "``'seconds'``: Include :attr:`hour`, :attr:`minute`, and :attr:`second` in " "``HH:MM:SS`` format." @@ -2292,7 +2301,7 @@ msgstr "" "``'seconds'`` : Inclut :attr:`hour`, :attr:`minute` et :attr:`second` au " "format ``HH:MM:SS``." -#: library/datetime.rst:1816 +#: library/datetime.rst:1819 msgid "" "``'milliseconds'``: Include full time, but truncate fractional second part " "to milliseconds. ``HH:MM:SS.sss`` format." @@ -2300,25 +2309,25 @@ msgstr "" "``'milliseconds'`` : Inclut le temps complet, mais tronque la partie " "fractionnaire des millisecondes, au format ``HH:MM:SS.sss``." -#: library/datetime.rst:1818 +#: library/datetime.rst:1821 msgid "``'microseconds'``: Include full time in ``HH:MM:SS.ffffff`` format." msgstr "" "``'microseconds'`` : Inclut le temps complet, au format ``HH:MM:SS.ffffff``." -#: library/datetime.rst:1822 +#: library/datetime.rst:1825 msgid "Excluded time components are truncated, not rounded." msgstr "Les composants de temps exclus sont tronqués et non arrondis." -#: library/datetime.rst:1463 +#: library/datetime.rst:1466 msgid ":exc:`ValueError` will be raised on an invalid *timespec* argument::" msgstr "" "Une :exc:`ValueError` est levée en cas d'argument *timespec* invalide ::" -#: library/datetime.rst:1837 +#: library/datetime.rst:1840 msgid "Added the *timespec* argument." msgstr "Ajout de l'argument *timespec*." -#: library/datetime.rst:1479 +#: library/datetime.rst:1482 msgid "" "For a :class:`.datetime` instance *d*, ``str(d)`` is equivalent to ``d." "isoformat(' ')``." @@ -2326,11 +2335,11 @@ msgstr "" "Pour une instance *d* de :class:`.datetime`, ``str(d)`` est équivalent à ``d." "isoformat(' ')``." -#: library/datetime.rst:1485 +#: library/datetime.rst:1488 msgid "Return a string representing the date and time::" msgstr "Renvoie une chaîne de caractères représentant la date et l'heure ::" -#: library/datetime.rst:1491 +#: library/datetime.rst:1494 msgid "" "The output string will *not* include time zone information, regardless of " "whether the input is aware or naive." @@ -2338,7 +2347,7 @@ msgstr "" "La chaîne de caractères en sortie n'inclura *pas* d'informations sur le " "fuseau horaire, que l'entrée soit avisée ou naïve." -#: library/datetime.rst:1498 +#: library/datetime.rst:1501 #, fuzzy msgid "" "on platforms where the native C :c:func:`ctime` function (which :func:`time." @@ -2351,7 +2360,7 @@ msgstr "" "plateformes où la fonction C native :c:func:`ctime` (que :func:`time.ctime` " "invoque, mais pas :meth:`date.ctime`) est conforme au standard C." -#: library/datetime.rst:1504 +#: library/datetime.rst:1507 #, fuzzy msgid "" "Return a string representing the date and time, controlled by an explicit " @@ -2362,7 +2371,7 @@ msgstr "" "de format explicite. Pour une liste complète des directives de formatage, " "voir :ref:`strftime-strptime-behavior`." -#: library/datetime.rst:1511 +#: library/datetime.rst:1514 #, fuzzy msgid "" "Same as :meth:`.datetime.strftime`. This makes it possible to specify a " @@ -2376,15 +2385,15 @@ msgstr "" "une liste complète des directives de formatage, voir :ref:`strftime-strptime-" "behavior`." -#: library/datetime.rst:1518 +#: library/datetime.rst:1521 msgid "Examples of Usage: :class:`.datetime`" msgstr "Exemple d'utilisation de la classe :class:`.datetime` :" -#: library/datetime.rst:1520 +#: library/datetime.rst:1523 msgid "Examples of working with :class:`~datetime.datetime` objects:" msgstr "Exemples d'utilisation des objets :class:`~datetime.datetime` :" -#: library/datetime.rst:1573 +#: library/datetime.rst:1576 msgid "" "The example below defines a :class:`tzinfo` subclass capturing time zone " "information for Kabul, Afghanistan, which used +4 UTC until 1945 and then " @@ -2394,15 +2403,15 @@ msgstr "" "des informations sur les fuseaux horaires pour Kaboul, en Afghanistan, qui a " "utilisé +4 UTC jusqu'en 1945, puis +4:30 UTC par la suite ::" -#: library/datetime.rst:1620 +#: library/datetime.rst:1623 msgid "Usage of ``KabulTz`` from above::" msgstr "Utilisation de ``KabulTz`` cité plus haut ::" -#: library/datetime.rst:1646 +#: library/datetime.rst:1649 msgid ":class:`.time` Objects" msgstr "Objets :class:`.time`" -#: library/datetime.rst:1648 +#: library/datetime.rst:1651 #, fuzzy msgid "" "A :class:`time` object represents a (local) time of day, independent of any " @@ -2411,7 +2420,7 @@ msgstr "" "Un objet *time* représente une heure (locale) du jour, indépendante de tout " "jour particulier, et sujette à des ajustements par un objet :class:`tzinfo`." -#: library/datetime.rst:1653 +#: library/datetime.rst:1656 #, fuzzy msgid "" "All arguments are optional. *tzinfo* may be ``None``, or an instance of a :" @@ -2422,7 +2431,7 @@ msgstr "" "instance d'une sous-classe :class:`tzinfo`. Les autres arguments doivent " "être des nombres entiers, dans les intervalles suivants :" -#: library/datetime.rst:1663 +#: library/datetime.rst:1666 #, fuzzy msgid "" "If an argument outside those ranges is given, :exc:`ValueError` is raised. " @@ -2432,18 +2441,18 @@ msgstr "" "levée. Ils valent tous ``0`` par défaut, à l'exception de *tzinfo* qui " "vaut :const:`None`." -#: library/datetime.rst:1671 +#: library/datetime.rst:1674 msgid "The earliest representable :class:`.time`, ``time(0, 0, 0, 0)``." msgstr "" "Le plus petit objet :class:`.time` représentable, ``time(0, 0, 0, 0)``." -#: library/datetime.rst:1676 +#: library/datetime.rst:1679 msgid "The latest representable :class:`.time`, ``time(23, 59, 59, 999999)``." msgstr "" "Le plus grand objet :class:`.time` représentable, ``time(23, 59, 59, " "999999)``." -#: library/datetime.rst:1681 +#: library/datetime.rst:1684 msgid "" "The smallest possible difference between non-equal :class:`.time` objects, " "``timedelta(microseconds=1)``, although note that arithmetic on :class:`." @@ -2453,7 +2462,7 @@ msgstr "" "égaux, ``timedelta(microseconds=1)``, notez cependant que les objets :class:" "`.time` n'implémentent pas d'opérations arithmétiques." -#: library/datetime.rst:1710 +#: library/datetime.rst:1713 msgid "" "The object passed as the tzinfo argument to the :class:`.time` constructor, " "or ``None`` if none was passed." @@ -2461,7 +2470,7 @@ msgstr "" "L'objet passé comme argument *tzinfo* au constructeur de :class:`.time`, ou " "``None`` si aucune valeur n'a été passée." -#: library/datetime.rst:1724 +#: library/datetime.rst:1727 #, fuzzy msgid "" ":class:`.time` objects support comparison of :class:`.time` to :class:`." @@ -2476,7 +2485,7 @@ msgstr "" "`TypeError` est levée. Pour les égalités, les instances naïves ne sont " "jamais égales aux instances avisées." -#: library/datetime.rst:1730 +#: library/datetime.rst:1733 #, fuzzy msgid "" "If both comparands are aware, and have the same :attr:`~time.tzinfo` " @@ -2501,7 +2510,7 @@ msgstr "" "que la comparaison soit ``==`` ou ``!=``. Ces derniers cas renvoient " "respectivement :const:`False` et :const:`True`." -#: library/datetime.rst:1740 +#: library/datetime.rst:1743 #, fuzzy msgid "" "Equality comparisons between aware and naive :class:`~datetime.time` " @@ -2510,14 +2519,14 @@ msgstr "" "Les comparaisons d'égalité entre instances de :class:`~datetime.time` naïves " "et avisées ne lèvent pas de :exc:`TypeError`." -#: library/datetime.rst:1744 +#: library/datetime.rst:1747 msgid "" "In Boolean contexts, a :class:`.time` object is always considered to be true." msgstr "" "Dans un contexte booléen, un objet :class:`.time` est toujours considéré " "comme vrai." -#: library/datetime.rst:1746 +#: library/datetime.rst:1749 #, fuzzy msgid "" "Before Python 3.5, a :class:`.time` object was considered to be false if it " @@ -2530,11 +2539,11 @@ msgstr "" "propice aux erreurs, il a été supprimé en Python 3.5. Voir :issue:`13936` " "pour les détails complets." -#: library/datetime.rst:1753 +#: library/datetime.rst:1756 msgid "Other constructor:" msgstr "Autre constructeur :" -#: library/datetime.rst:1757 +#: library/datetime.rst:1760 #, fuzzy msgid "" "Return a :class:`.time` corresponding to a *time_string* in one of the " @@ -2545,7 +2554,7 @@ msgstr "" "par :meth:`date.isoformat`. Spécifiquement, cette fonction gère des chaînes " "dans le(s) format(s) ``YYYY-MM-DD``." -#: library/datetime.rst:1767 +#: library/datetime.rst:1770 #, fuzzy msgid "" "This does *not* support parsing arbitrary ISO 8601 strings. It is only " @@ -2554,7 +2563,7 @@ msgstr "" "Ceci ne gère pas l'analyse arbitraire de chaînes ISO 8601, ceci est " "seulement destiné à l'opération inverse de :meth:`time.isoformat`." -#: library/datetime.rst:1788 +#: library/datetime.rst:1791 #, fuzzy msgid "" "Return a :class:`.time` with the same value, except for those attributes " @@ -2568,20 +2577,20 @@ msgstr "" "`.time` naïve à partir d'une instance :class:`.time` avisée, sans conversion " "des données de temps." -#: library/datetime.rst:1799 +#: library/datetime.rst:1802 msgid "Return a string representing the time in ISO 8601 format, one of:" msgstr "" "Renvoie une chaîne de caractères représentant la date au format ISO 8601 :" -#: library/datetime.rst:1801 +#: library/datetime.rst:1804 msgid "``HH:MM:SS.ffffff``, if :attr:`microsecond` is not 0" msgstr "``HH:MM:SS.ffffff``, si :attr:`microsecond` ne vaut pas 0" -#: library/datetime.rst:1802 +#: library/datetime.rst:1805 msgid "``HH:MM:SS``, if :attr:`microsecond` is 0" msgstr "``HH:MM:SS``, si :attr:`microsecond` vaut 0" -#: library/datetime.rst:1803 +#: library/datetime.rst:1806 msgid "" "``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :meth:`utcoffset` does not " "return ``None``" @@ -2589,7 +2598,7 @@ msgstr "" "``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, si :meth:`utcoffset` ne renvoie pas " "``None``" -#: library/datetime.rst:1804 +#: library/datetime.rst:1807 msgid "" "``HH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0 and :meth:" "`utcoffset` does not return ``None``" @@ -2597,16 +2606,16 @@ msgstr "" "``HH:MM:SS+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` vaut 0 et :meth:" "`utcoffset` ne renvoie pas ``None``" -#: library/datetime.rst:1824 +#: library/datetime.rst:1827 msgid ":exc:`ValueError` will be raised on an invalid *timespec* argument." msgstr "" "Une :exc:`ValueError` sera levée en cas d'argument *timespec* invalide." -#: library/datetime.rst:1843 +#: library/datetime.rst:1846 msgid "For a time *t*, ``str(t)`` is equivalent to ``t.isoformat()``." msgstr "Pour un temps *t*, ``str(t)`` est équivalent à ``t.isoformat()``." -#: library/datetime.rst:1848 +#: library/datetime.rst:1851 #, fuzzy msgid "" "Return a string representing the time, controlled by an explicit format " @@ -2617,7 +2626,7 @@ msgstr "" "chaîne de formatage explicite. Pour une liste complète des directives de " "formatage, voir :ref:`strftime-strptime-behavior`." -#: library/datetime.rst:1855 +#: library/datetime.rst:1858 #, fuzzy msgid "" "Same as :meth:`.time.strftime`. This makes it possible to specify a format " @@ -2631,7 +2640,7 @@ msgstr "" "liste complète des directives de formatage, voir :ref:`strftime-strptime-" "behavior`." -#: library/datetime.rst:1864 +#: library/datetime.rst:1867 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "utcoffset(None)``, and raises an exception if the latter doesn't return " @@ -2642,7 +2651,7 @@ msgstr "" "ne renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " "inférieure à un jour." -#: library/datetime.rst:1874 +#: library/datetime.rst:1877 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "dst(None)``, and raises an exception if the latter doesn't return ``None``, " @@ -2653,7 +2662,7 @@ msgstr "" "renvoie pas ``None`` ou un objet :class:`timedelta` d'une magnitude " "inférieure à un jour." -#: library/datetime.rst:1883 +#: library/datetime.rst:1886 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "tzname(None)``, or raises an exception if the latter doesn't return ``None`` " @@ -2663,19 +2672,19 @@ msgstr "" "tzinfo.tzname(None)``, et lève une exception si l'expression précédente ne " "renvoie pas ``None`` ou une chaîne de caractères." -#: library/datetime.rst:1888 +#: library/datetime.rst:1891 msgid "Examples of Usage: :class:`.time`" msgstr "Exemples d'utilisation de :class:`.time`" -#: library/datetime.rst:1890 +#: library/datetime.rst:1893 msgid "Examples of working with a :class:`.time` object::" msgstr "Exemples d'utilisation de l'objet :class:`.time` ::" -#: library/datetime.rst:1921 +#: library/datetime.rst:1924 msgid ":class:`tzinfo` Objects" msgstr "Objets :class:`tzinfo`" -#: library/datetime.rst:1925 +#: library/datetime.rst:1928 msgid "" "This is an abstract base class, meaning that this class should not be " "instantiated directly. Define a subclass of :class:`tzinfo` to capture " @@ -2686,7 +2695,7 @@ msgstr "" "class:`tzinfo` pour capturer des informations sur un fuseau horaire " "particulier." -#: library/datetime.rst:1929 +#: library/datetime.rst:1932 msgid "" "An instance of (a concrete subclass of) :class:`tzinfo` can be passed to the " "constructors for :class:`.datetime` and :class:`.time` objects. The latter " @@ -2702,7 +2711,7 @@ msgstr "" "temps local par rapport à UTC, le nom du fuseau horaire, le décalage d'heure " "d'été, tous relatifs à un objet de date ou d'heure qui leur est passé." -#: library/datetime.rst:1935 +#: library/datetime.rst:1938 #, fuzzy msgid "" "You need to derive a concrete subclass, and (at least) supply " @@ -2721,7 +2730,7 @@ msgstr "" "avec des décalages fixes par rapport à UTC, tels qu'UTC lui-même ou les nord-" "américains EST et EDT." -#: library/datetime.rst:1942 +#: library/datetime.rst:1945 #, fuzzy msgid "" "Special requirement for pickling: A :class:`tzinfo` subclass must have an :" @@ -2734,7 +2743,7 @@ msgstr "" "sans quoi un objet sérialisé ne pourrait pas toujours être désérialisé. " "C'est un prérequis technique qui pourrait être assoupli dans le futur." -#: library/datetime.rst:1947 +#: library/datetime.rst:1950 #, fuzzy msgid "" "A concrete subclass of :class:`tzinfo` may need to implement the following " @@ -2746,7 +2755,7 @@ msgstr "" "l'utilisation qui est faite des objets :mod:`datetime` avisés. Dans le " "doute, implémentez-les toutes." -#: library/datetime.rst:1954 +#: library/datetime.rst:1957 msgid "" "Return offset of local time from UTC, as a :class:`timedelta` object that is " "positive east of UTC. If local time is west of UTC, this should be negative." @@ -2755,7 +2764,7 @@ msgstr "" "objet :class:`timedelta` qui est positif à l'est de UTC. Si l'heure locale " "est à l'ouest de UTC, il doit être négatif." -#: library/datetime.rst:1957 +#: library/datetime.rst:1960 #, fuzzy msgid "" "This represents the *total* offset from UTC; for example, if a :class:" @@ -2778,7 +2787,7 @@ msgstr "" "un jour). La plupart des implémentations de :meth:`utcoffset` ressembleront " "probablement à l'une des deux suivantes ::" -#: library/datetime.rst:1968 +#: library/datetime.rst:1971 msgid "" "If :meth:`utcoffset` does not return ``None``, :meth:`dst` should not return " "``None`` either." @@ -2786,7 +2795,7 @@ msgstr "" "Si :meth:`utcoffset` ne renvoie pas ``None``, :meth:`dst` ne doit pas non " "plus renvoyer ``None``." -#: library/datetime.rst:1971 +#: library/datetime.rst:1974 msgid "" "The default implementation of :meth:`utcoffset` raises :exc:" "`NotImplementedError`." @@ -2794,7 +2803,7 @@ msgstr "" "L'implémentation par défaut de :meth:`utcoffset` lève une :exc:" "`NotImplementedError`." -#: library/datetime.rst:1980 +#: library/datetime.rst:1983 msgid "" "Return the daylight saving time (DST) adjustment, as a :class:`timedelta` " "object or ``None`` if DST information isn't known." @@ -2802,7 +2811,7 @@ msgstr "" "Renvoie le réglage de l'heure d'été (DST), sous la forme d'un objet :class:" "`timedelta` ou ``None`` si l'information DST n'est pas connue." -#: library/datetime.rst:1984 +#: library/datetime.rst:1987 #, fuzzy msgid "" "Return ``timedelta(0)`` if DST is not in effect. If DST is in effect, return " @@ -2829,7 +2838,7 @@ msgstr "" "`dst` pour tenir compte des heures d'été quand elle traverse des fuseaux " "horaires." -#: library/datetime.rst:1994 +#: library/datetime.rst:1997 msgid "" "An instance *tz* of a :class:`tzinfo` subclass that models both standard and " "daylight times must be consistent in this sense:" @@ -2837,11 +2846,11 @@ msgstr "" "Une instance *tz* d'une sous-classe :class:`tzinfo` convenant à la fois pour " "une heure standard et une heure d'été doit être cohérente :" -#: library/datetime.rst:1997 +#: library/datetime.rst:2000 msgid "``tz.utcoffset(dt) - tz.dst(dt)``" msgstr "``tz.utcoffset(dt) - tz.dst(dt)``" -#: library/datetime.rst:1999 +#: library/datetime.rst:2002 #, fuzzy msgid "" "must return the same result for every :class:`.datetime` *dt* with ``dt." @@ -2865,7 +2874,7 @@ msgstr "" "l'implémentation par défaut de :meth:`tzinfo.fromutc` pour tout de même " "fonctionner correctement avec :meth:`astimezone`." -#: library/datetime.rst:2008 +#: library/datetime.rst:2011 msgid "" "Most implementations of :meth:`dst` will probably look like one of these " "two::" @@ -2873,18 +2882,18 @@ msgstr "" "La plupart des implémentations de :meth:`dst` ressembleront probablement à " "l'une des deux suivantes ::" -#: library/datetime.rst:2014 +#: library/datetime.rst:2017 msgid "or::" msgstr "ou ::" -#: library/datetime.rst:2026 +#: library/datetime.rst:2029 msgid "" "The default implementation of :meth:`dst` raises :exc:`NotImplementedError`." msgstr "" "L'implémentation par défaut de :meth:`dst` lève une :exc:" "`NotImplementedError`." -#: library/datetime.rst:2034 +#: library/datetime.rst:2037 #, fuzzy msgid "" "Return the time zone name corresponding to the :class:`.datetime` object " @@ -2908,7 +2917,7 @@ msgstr "" "renvoyer des noms différents en fonction de valeurs de *dt* spécifiques, en " "particulier si la classe :class:`tzinfo` tient compte de l'heure d'été." -#: library/datetime.rst:2044 +#: library/datetime.rst:2047 msgid "" "The default implementation of :meth:`tzname` raises :exc:" "`NotImplementedError`." @@ -2916,7 +2925,7 @@ msgstr "" "L'implémentation par défaut de :meth:`tzname` lève une :exc:" "`NotImplementedError`." -#: library/datetime.rst:2047 +#: library/datetime.rst:2050 #, fuzzy msgid "" "These methods are called by a :class:`.datetime` or :class:`.time` object, " @@ -2933,7 +2942,7 @@ msgstr "" "être prêtes à recevoir un argument ``None`` pour *dt*, ou une instance de :" "class:`.datetime`." -#: library/datetime.rst:2053 +#: library/datetime.rst:2056 #, fuzzy msgid "" "When ``None`` is passed, it's up to the class designer to decide the best " @@ -2949,7 +2958,7 @@ msgstr "" "``utcoffset(None)`` de renvoyer le décalage UTC standard, comme il n'existe " "aucune autre convention pour obtenir ce décalage." -#: library/datetime.rst:2059 +#: library/datetime.rst:2062 #, fuzzy msgid "" "When a :class:`.datetime` object is passed in response to a :class:`." @@ -2967,7 +2976,7 @@ msgstr "" "étant le temps local, et n'aient pas à se soucier des objets dans d'autres " "fuseaux horaires." -#: library/datetime.rst:2065 +#: library/datetime.rst:2068 msgid "" "There is one more :class:`tzinfo` method that a subclass may wish to " "override:" @@ -2975,7 +2984,7 @@ msgstr "" "Il y a une dernière méthode de :class:`tzinfo` que les sous-classes peuvent " "vouloir redéfinir :" -#: library/datetime.rst:2070 +#: library/datetime.rst:2073 #, fuzzy msgid "" "This is called from the default :class:`datetime.astimezone()` " @@ -2991,7 +3000,7 @@ msgstr "" "et d'heure, renvoyant un objet *datetime* équivalent à *self*, dans le temps " "local." -#: library/datetime.rst:2076 +#: library/datetime.rst:2079 #, fuzzy msgid "" "Most :class:`tzinfo` subclasses should be able to inherit the default :meth:" @@ -3018,7 +3027,7 @@ msgstr "" "ne pas produire les résultats attendus si le résultat est l'une des heures " "affectées par le changement d'heure." -#: library/datetime.rst:2087 +#: library/datetime.rst:2090 msgid "" "Skipping code for error cases, the default :meth:`fromutc` implementation " "acts like::" @@ -3026,7 +3035,7 @@ msgstr "" "En omettant le code des cas d'erreurs, l'implémentation par défaut de :meth:" "`fromutc` se comporte comme suit ::" -#: library/datetime.rst:2105 +#: library/datetime.rst:2108 msgid "" "In the following :download:`tzinfo_examples.py <../includes/tzinfo_examples." "py>` file there are some examples of :class:`tzinfo` classes:" @@ -3034,7 +3043,7 @@ msgstr "" "Dans le fichier :download:`tzinfo_examples.py <../includes/tzinfo_examples." "py>` il y a des exemples de :class:`tzinfo` classes:" -#: library/datetime.rst:2111 +#: library/datetime.rst:2114 #, fuzzy msgid "" "Note that there are unavoidable subtleties twice per year in a :class:" @@ -3050,7 +3059,7 @@ msgstr "" "la minute qui suit 1:59 (EST) le second dimanche de mars, et se termine à la " "minute qui suit 1:59 (EDT) le premier dimanche de novembre ::" -#: library/datetime.rst:2125 +#: library/datetime.rst:2128 #, fuzzy msgid "" "When DST starts (the \"start\" line), the local wall clock leaps from 1:59 " @@ -3065,7 +3074,7 @@ msgstr "" "== 2`` pour le jour où débute l'heure d'été. Par exemple, lors de la " "transition du printemps 2016, nous obtenons ::" -#: library/datetime.rst:2144 +#: library/datetime.rst:2147 #, fuzzy msgid "" "When DST ends (the \"end\" line), there's a potentially worse problem: " @@ -3093,7 +3102,7 @@ msgstr "" "attr:`~datetime.fold` à 0 et les plus récentes l'ont à 1. Par exemple, lors " "de la transition de l'automne 2016, nous obtenons ::" -#: library/datetime.rst:2166 +#: library/datetime.rst:2169 #, fuzzy msgid "" "Note that the :class:`.datetime` instances that differ only by the value of " @@ -3103,7 +3112,7 @@ msgstr "" "valeur de leur attribut :attr:`~datetime.fold` sont considérées égales dans " "les comparaisons." -#: library/datetime.rst:2169 +#: library/datetime.rst:2172 msgid "" "Applications that can't bear wall-time ambiguities should explicitly check " "the value of the :attr:`~datetime.fold` attribute or avoid using hybrid :" @@ -3120,11 +3129,11 @@ msgstr "" "représentant uniquement le fuseau EST (de décalage fixe *-5h*) ou uniquement " "EDT (*-4h*))." -#: library/datetime.rst:2184 -msgid "`dateutil.tz `_" -msgstr "`dateutil.tz `_" +#: library/datetime.rst:2186 +msgid ":mod:`zoneinfo`" +msgstr ":mod:`zoneinfo`" -#: library/datetime.rst:2178 +#: library/datetime.rst:2181 #, fuzzy msgid "" "The :mod:`datetime` module has a basic :class:`timezone` class (for handling " @@ -3135,22 +3144,23 @@ msgstr "" "décalages fixes par rapport à UTC et :attr:`timezone.utc` comme instance du " "fuseau horaire UTC." -#: library/datetime.rst:2182 +#: library/datetime.rst:2185 +#, fuzzy msgid "" -"*dateutil.tz* library brings the *IANA timezone database* (also known as the " -"Olson database) to Python, and its usage is recommended." +"``zoneinfo`` brings the *IANA timezone database* (also known as the Olson " +"database) to Python, and its usage is recommended." msgstr "" "La bibliothèque *dateutil.tz* apporte à Python la *base de données de " "fuseaux horaires IANA* (aussi appelée base de données Olson), et son " "utilisation est recommandée." -#: library/datetime.rst:2190 +#: library/datetime.rst:2192 msgid "`IANA timezone database `_" msgstr "" "`Base de données des fuseaux horaires de l'IANA `_" -#: library/datetime.rst:2187 +#: library/datetime.rst:2189 msgid "" "The Time Zone Database (often called tz, tzdata or zoneinfo) contains code " "and data that represent the history of local time for many representative " @@ -3165,11 +3175,11 @@ msgstr "" "politiques sur les bornes du fuseau, les décalages UTC, et les règles de " "passage à l'heure d'été." -#: library/datetime.rst:2197 +#: library/datetime.rst:2199 msgid ":class:`timezone` Objects" msgstr "Objets :class:`timezone`" -#: library/datetime.rst:2199 +#: library/datetime.rst:2201 msgid "" "The :class:`timezone` class is a subclass of :class:`tzinfo`, each instance " "of which represents a timezone defined by a fixed offset from UTC." @@ -3178,7 +3188,7 @@ msgstr "" "chaque instance représente un fuseau horaire défini par un décalage fixe par " "rapport à UTC." -#: library/datetime.rst:2203 +#: library/datetime.rst:2205 #, fuzzy msgid "" "Objects of this class cannot be used to represent timezone information in " @@ -3192,7 +3202,7 @@ msgstr "" "emplacements où plusieurs décalages sont utilisés au cours de l'année ou où " "des changements historiques ont été opérés sur le temps civil." -#: library/datetime.rst:2210 +#: library/datetime.rst:2212 #, fuzzy msgid "" "The *offset* argument must be specified as a :class:`timedelta` object " @@ -3205,7 +3215,7 @@ msgstr "" "strictement compris entre ``-timedelta(hours=24)`` et " "``timedelta(hours=24)``, autrement une :exc:`ValueError` est levée." -#: library/datetime.rst:2215 +#: library/datetime.rst:2217 #, fuzzy msgid "" "The *name* argument is optional. If specified it must be a string that will " @@ -3215,7 +3225,7 @@ msgstr "" "caractères qui sera utilisée comme valeur de retour de la méthode :meth:" "`datetime.tzname`." -#: library/datetime.rst:2237 +#: library/datetime.rst:2239 msgid "" "Return the fixed value specified when the :class:`timezone` instance is " "constructed." @@ -3223,7 +3233,7 @@ msgstr "" "Renvoie la valeur fixe spécifiée lorsque l'instance :class:`timezone` est " "construite." -#: library/datetime.rst:2229 +#: library/datetime.rst:2231 #, fuzzy msgid "" "The *dt* argument is ignored. The return value is a :class:`timedelta` " @@ -3234,7 +3244,7 @@ msgstr "" "instance :class:`timedelta` égale à la différence entre le temps local et " "UTC." -#: library/datetime.rst:2240 +#: library/datetime.rst:2242 #, fuzzy msgid "" "If *name* is not provided in the constructor, the name returned by " @@ -3251,19 +3261,19 @@ msgstr "" "et HH et MM sont respectivement les représentations à deux chiffres de " "``offset.hours`` et ``offset.minutes``." -#: library/datetime.rst:2246 +#: library/datetime.rst:2248 msgid "" -"Name generated from ``offset=timedelta(0)`` is now plain `'UTC'`, not ``'UTC" -"+00:00'``." +"Name generated from ``offset=timedelta(0)`` is now plain `'UTC'`, not " +"``'UTC+00:00'``." msgstr "" "Le nom généré à partir de ``offset=timedelta(0)`` est maintenant \"UTC\" " "plutôt que \"UTC+00:00\"." -#: library/datetime.rst:2253 +#: library/datetime.rst:2255 msgid "Always returns ``None``." msgstr "Renvoie toujours ``None``." -#: library/datetime.rst:2257 +#: library/datetime.rst:2259 msgid "" "Return ``dt + offset``. The *dt* argument must be an aware :class:`." "datetime` instance, with ``tzinfo`` set to ``self``." @@ -3271,15 +3281,15 @@ msgstr "" "Renvoie ``dt + offset``. L'argument *dt* doit être une instance avisée de :" "class:`.datetime`, avec ``tzinfo`` valant ``self``." -#: library/datetime.rst:2264 +#: library/datetime.rst:2266 msgid "The UTC timezone, ``timezone(timedelta(0))``." msgstr "Le fuseau horaire UTC, ``timezone(timedelta(0))``." -#: library/datetime.rst:2273 +#: library/datetime.rst:2275 msgid ":meth:`strftime` and :meth:`strptime` Behavior" msgstr "Comportement de :meth:`strftime` et :meth:`strptime`" -#: library/datetime.rst:2275 +#: library/datetime.rst:2277 #, fuzzy msgid "" ":class:`date`, :class:`.datetime`, and :class:`.time` objects all support a " @@ -3293,7 +3303,7 @@ msgstr "" "la fonction ``time.strftime(fmt, d.timetuple())`` du module :mod:`time`, " "bien que tous les objets ne comportent pas de méthode :meth:`timetuple`." -#: library/datetime.rst:2279 +#: library/datetime.rst:2281 msgid "" "Conversely, the :meth:`datetime.strptime` class method creates a :class:`." "datetime` object from a string representing a date and time and a " @@ -3303,7 +3313,7 @@ msgstr "" "class:`.datetime` à partir d'une chaîne représentant une date et une heure, " "et une chaîne de format correspondante." -#: library/datetime.rst:2283 +#: library/datetime.rst:2285 msgid "" "The table below provides a high-level comparison of :meth:`strftime` versus :" "meth:`strptime`:" @@ -3311,70 +3321,70 @@ msgstr "" "Le tableau ci-dessous fournit une comparaison de haut niveau entre :meth:" "`strftime` et :meth:`strptime` :" -#: library/datetime.rst:2287 +#: library/datetime.rst:2289 msgid "``strftime``" msgstr "``strftime``" -#: library/datetime.rst:2287 +#: library/datetime.rst:2289 msgid "``strptime``" msgstr "``strptime``" -#: library/datetime.rst:2289 +#: library/datetime.rst:2291 msgid "Usage" msgstr "Utilisation" -#: library/datetime.rst:2289 +#: library/datetime.rst:2291 msgid "Convert object to a string according to a given format" msgstr "Convertit un objet en une chaîne de caractères selon un format donné" -#: library/datetime.rst:2289 +#: library/datetime.rst:2291 msgid "" "Parse a string into a :class:`.datetime` object given a corresponding format" msgstr "" "Analyse une chaîne de caractères dans un objet :class:`.datetime` en " "fonction du format de correspondance donné" -#: library/datetime.rst:2291 +#: library/datetime.rst:2293 msgid "Type of method" msgstr "Type de méthode" -#: library/datetime.rst:2291 +#: library/datetime.rst:2293 msgid "Instance method" msgstr "Méthode d'instance" -#: library/datetime.rst:2291 +#: library/datetime.rst:2293 msgid "Class method" msgstr "Méthode de classe" -#: library/datetime.rst:2293 +#: library/datetime.rst:2295 msgid "Method of" msgstr "Méthode de" -#: library/datetime.rst:2293 +#: library/datetime.rst:2295 msgid ":class:`date`; :class:`.datetime`; :class:`.time`" msgstr ":class:`date` ; :class:`.datetime` ; :class:`.time`" -#: library/datetime.rst:2293 +#: library/datetime.rst:2295 msgid ":class:`.datetime`" msgstr ":class:`.datetime`" -#: library/datetime.rst:2295 +#: library/datetime.rst:2297 msgid "Signature" msgstr "Signature" -#: library/datetime.rst:2295 +#: library/datetime.rst:2297 msgid "``strftime(format)``" msgstr "``strftime(format)``" -#: library/datetime.rst:2295 +#: library/datetime.rst:2297 msgid "``strptime(date_string, format)``" msgstr "``strptime(date_string, format)``" -#: library/datetime.rst:2300 +#: library/datetime.rst:2302 msgid ":meth:`strftime` and :meth:`strptime` Format Codes" msgstr "Codes de formatage de :meth:`strftime` et :meth:`strptime`" -#: library/datetime.rst:2302 +#: library/datetime.rst:2304 msgid "" "The following is a list of all the format codes that the 1989 C standard " "requires, and these work on all platforms with a standard C implementation." @@ -3383,27 +3393,27 @@ msgstr "" "standard C (version 1989), ils fonctionnent sur toutes les plateformes " "possédant une implémentation de C standard." -#: library/datetime.rst:2409 +#: library/datetime.rst:2411 msgid "Directive" msgstr "Directive" -#: library/datetime.rst:2409 +#: library/datetime.rst:2411 msgid "Meaning" msgstr "Signification" -#: library/datetime.rst:2409 +#: library/datetime.rst:2411 msgid "Example" msgstr "Exemple" -#: library/datetime.rst:2409 +#: library/datetime.rst:2411 msgid "Notes" msgstr "Notes" -#: library/datetime.rst:2308 +#: library/datetime.rst:2310 msgid "``%a``" msgstr "``%a``" -#: library/datetime.rst:2308 +#: library/datetime.rst:2310 msgid "Weekday as locale's abbreviated name." msgstr "Jour de la semaine abrégé dans la langue locale." @@ -3415,11 +3425,11 @@ msgstr "Sun, Mon, ..., Sat (en_US);" msgid "So, Mo, ..., Sa (de_DE)" msgstr "Lu, Ma, ..., Di (*fr_FR*)" -#: library/datetime.rst:2313 +#: library/datetime.rst:2315 msgid "``%A``" msgstr "``%A``" -#: library/datetime.rst:2313 +#: library/datetime.rst:2315 msgid "Weekday as locale's full name." msgstr "Jour de la semaine complet dans la langue locale." @@ -3431,41 +3441,41 @@ msgstr "*Sunday*, *Monday*, ..., *Saturday* (*en_US*);" msgid "Sonntag, Montag, ..., Samstag (de_DE)" msgstr "Lundi, Mardi, ..., Dimanche (*fr_FR*)" -#: library/datetime.rst:2318 +#: library/datetime.rst:2320 msgid "``%w``" msgstr "``%w``" -#: library/datetime.rst:2318 +#: library/datetime.rst:2320 msgid "Weekday as a decimal number, where 0 is Sunday and 6 is Saturday." msgstr "" "Jour de la semaine en chiffre, avec 0 pour le dimanche et 6 pour le samedi." -#: library/datetime.rst:2318 +#: library/datetime.rst:2320 msgid "0, 1, ..., 6" msgstr "0, 1, ..., 6" -#: library/datetime.rst:2322 +#: library/datetime.rst:2324 msgid "``%d``" msgstr "``%d``" -#: library/datetime.rst:2322 +#: library/datetime.rst:2324 msgid "Day of the month as a zero-padded decimal number." msgstr "Jour du mois sur deux chiffres." -#: library/datetime.rst:2322 +#: library/datetime.rst:2324 msgid "01, 02, ..., 31" msgstr "01, 02, ..., 31" -#: library/datetime.rst:2335 library/datetime.rst:2344 -#: library/datetime.rst:2353 library/datetime.rst:2371 +#: library/datetime.rst:2337 library/datetime.rst:2346 +#: library/datetime.rst:2355 library/datetime.rst:2373 msgid "\\(9)" msgstr "\\(9)" -#: library/datetime.rst:2325 +#: library/datetime.rst:2327 msgid "``%b``" msgstr "``%b``" -#: library/datetime.rst:2325 +#: library/datetime.rst:2327 msgid "Month as locale's abbreviated name." msgstr "Nom du mois abrégé dans la langue locale." @@ -3477,11 +3487,11 @@ msgstr "Jan, Feb, ..., Dec (*en_US*);" msgid "Jan, Feb, ..., Dez (de_DE)" msgstr "janv., févr., ..., déc. (*fr_FR*)" -#: library/datetime.rst:2330 +#: library/datetime.rst:2332 msgid "``%B``" msgstr "``%B``" -#: library/datetime.rst:2330 +#: library/datetime.rst:2332 msgid "Month as locale's full name." msgstr "Nom complet du mois dans la langue locale." @@ -3493,67 +3503,67 @@ msgstr "*January*, *February*, ..., *December* (*en_US*);" msgid "Januar, Februar, ..., Dezember (de_DE)" msgstr "janvier, février, ..., décembre (*fr_FR*)" -#: library/datetime.rst:2335 +#: library/datetime.rst:2337 msgid "``%m``" msgstr "``%m``" -#: library/datetime.rst:2335 +#: library/datetime.rst:2337 msgid "Month as a zero-padded decimal number." msgstr "Numéro du mois sur deux chiffres." -#: library/datetime.rst:2347 +#: library/datetime.rst:2349 msgid "01, 02, ..., 12" msgstr "01, 02, ..., 12" -#: library/datetime.rst:2338 +#: library/datetime.rst:2340 msgid "``%y``" msgstr "``%y``" -#: library/datetime.rst:2338 +#: library/datetime.rst:2340 msgid "Year without century as a zero-padded decimal number." msgstr "Année sur deux chiffres (sans le siècle)." -#: library/datetime.rst:2338 +#: library/datetime.rst:2340 msgid "00, 01, ..., 99" msgstr "00, 01, ..., 99" -#: library/datetime.rst:2341 +#: library/datetime.rst:2343 msgid "``%Y``" msgstr "``%Y``" -#: library/datetime.rst:2341 +#: library/datetime.rst:2343 msgid "Year with century as a decimal number." msgstr "Année complète sur quatre chiffres." -#: library/datetime.rst:2411 +#: library/datetime.rst:2413 msgid "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" msgstr "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" -#: library/datetime.rst:2344 +#: library/datetime.rst:2346 msgid "``%H``" msgstr "``%H``" -#: library/datetime.rst:2344 +#: library/datetime.rst:2346 msgid "Hour (24-hour clock) as a zero-padded decimal number." msgstr "Heure à deux chiffres de 00 à 23." -#: library/datetime.rst:2344 +#: library/datetime.rst:2346 msgid "00, 01, ..., 23" msgstr "00, 01, ..., 23" -#: library/datetime.rst:2347 +#: library/datetime.rst:2349 msgid "``%I``" msgstr "``%I``" -#: library/datetime.rst:2347 +#: library/datetime.rst:2349 msgid "Hour (12-hour clock) as a zero-padded decimal number." msgstr "Heure à deux chiffres pour les horloges 12h (01 à 12)." -#: library/datetime.rst:2350 +#: library/datetime.rst:2352 msgid "``%p``" msgstr "``%p``" -#: library/datetime.rst:2350 +#: library/datetime.rst:2352 msgid "Locale's equivalent of either AM or PM." msgstr "Équivalent local à AM/PM." @@ -3565,55 +3575,56 @@ msgstr "AM, PM (en_US);" msgid "am, pm (de_DE)" msgstr "am, pm (de_DE)" -#: library/datetime.rst:2350 +#: library/datetime.rst:2352 msgid "\\(1), \\(3)" msgstr "\\(1), \\(3)" -#: library/datetime.rst:2353 +#: library/datetime.rst:2355 msgid "``%M``" msgstr "``%M``" -#: library/datetime.rst:2353 +#: library/datetime.rst:2355 msgid "Minute as a zero-padded decimal number." msgstr "Minutes sur deux chiffres." -#: library/datetime.rst:2356 +#: library/datetime.rst:2358 msgid "00, 01, ..., 59" msgstr "00, 01, ..., 59" -#: library/datetime.rst:2356 +#: library/datetime.rst:2358 msgid "``%S``" msgstr "``%S``" -#: library/datetime.rst:2356 +#: library/datetime.rst:2358 msgid "Second as a zero-padded decimal number." msgstr "Secondes sur deux chiffres." -#: library/datetime.rst:2356 +#: library/datetime.rst:2358 msgid "\\(4), \\(9)" msgstr "\\(4), \\(9)" -#: library/datetime.rst:2359 +#: library/datetime.rst:2361 msgid "``%f``" msgstr "``%f``" -#: library/datetime.rst:2359 -msgid "Microsecond as a decimal number, zero-padded on the left." +#: library/datetime.rst:2361 +#, fuzzy +msgid "Microsecond as a decimal number, zero-padded to 6 digits." msgstr "Microsecondes sur 6 chiffres." -#: library/datetime.rst:2359 +#: library/datetime.rst:2361 msgid "000000, 000001, ..., 999999" msgstr "000000, 000001, ..., 999999" -#: library/datetime.rst:2359 +#: library/datetime.rst:2361 msgid "\\(5)" msgstr "\\(5)" -#: library/datetime.rst:2526 +#: library/datetime.rst:2529 msgid "``%z``" msgstr "``%z``" -#: library/datetime.rst:2363 +#: library/datetime.rst:2365 msgid "" "UTC offset in the form ``±HHMM[SS[.ffffff]]`` (empty string if the object is " "naive)." @@ -3621,45 +3632,46 @@ msgstr "" "Décalage horaire UTC sous la forme ``±HHMM[SS[.ffffff]]`` (chaîne vide si " "l'instance est naïve)." -#: library/datetime.rst:2363 +#: library/datetime.rst:2365 msgid "(empty), +0000, -0400, +1030, +063415, -030712.345216" msgstr "(vide), +0000, -0400, +1030, +063415, -030712.345216" -#: library/datetime.rst:2368 +#: library/datetime.rst:2370 msgid "\\(6)" msgstr "\\(6)" -#: library/datetime.rst:2550 +#: library/datetime.rst:2553 msgid "``%Z``" msgstr "``%Z``" -#: library/datetime.rst:2368 +#: library/datetime.rst:2370 msgid "Time zone name (empty string if the object is naive)." msgstr "Nom du fuseau horaire (chaîne vide si l'instance est naïve)." -#: library/datetime.rst:2368 +#: library/datetime.rst:2370 msgid "(empty), UTC, GMT" msgstr "(vide), UTC, GMT" -#: library/datetime.rst:2371 +#: library/datetime.rst:2373 msgid "``%j``" msgstr "``%j``" -#: library/datetime.rst:2371 +#: library/datetime.rst:2373 msgid "Day of the year as a zero-padded decimal number." msgstr "Numéro du jour dans l'année sur trois chiffres." -#: library/datetime.rst:2371 +#: library/datetime.rst:2373 msgid "001, 002, ..., 366" msgstr "001, 002, ..., 366" -#: library/datetime.rst:2374 +#: library/datetime.rst:2376 msgid "``%U``" msgstr "``%U``" -#: library/datetime.rst:2374 +#: library/datetime.rst:2376 +#, fuzzy msgid "" -"Week number of the year (Sunday as the first day of the week) as a zero " +"Week number of the year (Sunday as the first day of the week) as a zero-" "padded decimal number. All days in a new year preceding the first Sunday are " "considered to be in week 0." msgstr "" @@ -3667,33 +3679,34 @@ msgstr "" "premier jour de la semaine). Tous les jours de l'année précédent le premier " "dimanche sont considérés comme appartenant à la semaine 0." -#: library/datetime.rst:2382 +#: library/datetime.rst:2384 msgid "00, 01, ..., 53" msgstr "00, 01, ..., 53" -#: library/datetime.rst:2382 +#: library/datetime.rst:2384 msgid "\\(7), \\(9)" msgstr "\\(7), \\(9)" -#: library/datetime.rst:2382 +#: library/datetime.rst:2384 msgid "``%W``" msgstr "``%W``" -#: library/datetime.rst:2382 +#: library/datetime.rst:2384 +#, fuzzy msgid "" -"Week number of the year (Monday as the first day of the week) as a decimal " -"number. All days in a new year preceding the first Monday are considered to " -"be in week 0." +"Week number of the year (Monday as the first day of the week) as a zero-" +"padded decimal number. All days in a new year preceding the first Monday are " +"considered to be in week 0." msgstr "" -"Numéro de la semaine à deux chiffres (où lundi est considéré comme le " +"Numéro de la semaine à deux chiffres (où dimanche est considéré comme le " "premier jour de la semaine). Tous les jours de l'année précédent le premier " -"lundi sont considérés comme appartenant à la semaine 0." +"dimanche sont considérés comme appartenant à la semaine 0." -#: library/datetime.rst:2390 +#: library/datetime.rst:2392 msgid "``%c``" msgstr "``%c``" -#: library/datetime.rst:2390 +#: library/datetime.rst:2392 msgid "Locale's appropriate date and time representation." msgstr "Représentation locale de la date et de l'heure." @@ -3705,11 +3718,11 @@ msgstr "Tue Aug 16 21:30:00 1988 (*en_US*);" msgid "Di 16 Aug 21:30:00 1988 (de_DE)" msgstr "mar. 16 août 1988 21:30:00 (*fr_FR*)" -#: library/datetime.rst:2395 +#: library/datetime.rst:2397 msgid "``%x``" msgstr "``%x``" -#: library/datetime.rst:2395 +#: library/datetime.rst:2397 msgid "Locale's appropriate date representation." msgstr "Représentation locale de la date." @@ -3725,11 +3738,11 @@ msgstr "08/16/1988 (*en_US*);" msgid "16.08.1988 (de_DE)" msgstr "16/08/1988 (*fr_FR*)" -#: library/datetime.rst:2399 +#: library/datetime.rst:2401 msgid "``%X``" msgstr "``%X``" -#: library/datetime.rst:2399 +#: library/datetime.rst:2401 msgid "Locale's appropriate time representation." msgstr "Représentation locale de l'heure." @@ -3741,19 +3754,19 @@ msgstr "21:30:00 (*en_US*) ;" msgid "21:30:00 (de_DE)" msgstr "21:30:00 (*fr_FR*)" -#: library/datetime.rst:2402 +#: library/datetime.rst:2404 msgid "``%%``" msgstr "``%%``" -#: library/datetime.rst:2402 +#: library/datetime.rst:2404 msgid "A literal ``'%'`` character." msgstr "Un caractère ``'%'`` littéral." -#: library/datetime.rst:2402 +#: library/datetime.rst:2404 msgid "%" msgstr "%" -#: library/datetime.rst:2405 +#: library/datetime.rst:2407 msgid "" "Several additional directives not required by the C89 standard are included " "for convenience. These parameters all correspond to ISO 8601 date values." @@ -3762,11 +3775,11 @@ msgstr "" "incluses pour des raisons de commodité. Ces paramètres correspondent tous " "aux valeurs de date de la norme ISO 8601." -#: library/datetime.rst:2411 +#: library/datetime.rst:2413 msgid "``%G``" msgstr "``%G``" -#: library/datetime.rst:2411 +#: library/datetime.rst:2413 msgid "" "ISO 8601 year with century representing the year that contains the greater " "part of the ISO week (``%V``)." @@ -3774,27 +3787,27 @@ msgstr "" "Année complète ISO 8601 représentant l'année contenant la plus grande partie " "de la semaine ISO (``%V``)." -#: library/datetime.rst:2411 +#: library/datetime.rst:2413 msgid "\\(8)" msgstr "\\(8)" -#: library/datetime.rst:2416 +#: library/datetime.rst:2418 msgid "``%u``" msgstr "``%u``" -#: library/datetime.rst:2416 +#: library/datetime.rst:2418 msgid "ISO 8601 weekday as a decimal number where 1 is Monday." msgstr "Jour de la semaine ISO 8601 où 1 correspond au lundi." -#: library/datetime.rst:2416 +#: library/datetime.rst:2418 msgid "1, 2, ..., 7" msgstr "1, 2, ..., 7" -#: library/datetime.rst:2419 +#: library/datetime.rst:2421 msgid "``%V``" msgstr "``%V``" -#: library/datetime.rst:2419 +#: library/datetime.rst:2421 msgid "" "ISO 8601 week as a decimal number with Monday as the first day of the week. " "Week 01 is the week containing Jan 4." @@ -3802,15 +3815,15 @@ msgstr "" "Numéro de la semaine ISO 8601, avec lundi étant le premier jour de la " "semaine. La semaine 01 est la semaine contenant le 4 janvier." -#: library/datetime.rst:2419 +#: library/datetime.rst:2421 msgid "01, 02, ..., 53" msgstr "01, 02, ..., 53" -#: library/datetime.rst:2419 +#: library/datetime.rst:2421 msgid "\\(8), \\(9)" msgstr "\\(8), \\(9)" -#: library/datetime.rst:2426 +#: library/datetime.rst:2428 #, fuzzy msgid "" "These may not be available on all platforms when used with the :meth:" @@ -3827,13 +3840,15 @@ msgstr "" "directives d'année et de semaine précédentes. Appeler :meth:`strptime` avec " "des directives ISO 8601 incomplètes ou ambiguës lèvera une :exc:`ValueError`." -#: library/datetime.rst:2431 +#: library/datetime.rst:2433 #, fuzzy msgid "" "The full set of format codes supported varies across platforms, because " "Python calls the platform C library's :func:`strftime` function, and " "platform variations are common. To see the full set of format codes " -"supported on your platform, consult the :manpage:`strftime(3)` documentation." +"supported on your platform, consult the :manpage:`strftime(3)` " +"documentation. There are also differences between platforms in handling of " +"unsupported format specifiers." msgstr "" "L'ensemble complet des codes de formatage implémentés varie selon les " "plateformes, parce que Python appelle la fonction :func:`strftime` de la " @@ -3841,15 +3856,15 @@ msgstr "" "voir un ensemble complet des codes de formatage implémentés par votre " "plateforme, consultez la documentation de :manpage:`strftime(3)`." -#: library/datetime.rst:2436 +#: library/datetime.rst:2439 msgid "``%G``, ``%u`` and ``%V`` were added." msgstr "``%G``, ``%u`` et ``%V`` ont été ajoutés." -#: library/datetime.rst:2440 +#: library/datetime.rst:2443 msgid "Technical Detail" msgstr "Détail technique" -#: library/datetime.rst:2442 +#: library/datetime.rst:2445 #, fuzzy msgid "" "Broadly speaking, ``d.strftime(fmt)`` acts like the :mod:`time` module's " @@ -3863,7 +3878,7 @@ msgstr "" "la fonction ``time.strftime(fmt, d.timetuple())`` du module :mod:`time`, " "bien que tous les objets ne comportent pas de méthode :meth:`timetuple`." -#: library/datetime.rst:2446 +#: library/datetime.rst:2449 msgid "" "For the :meth:`datetime.strptime` class method, the default value is " "``1900-01-01T00:00:00.000``: any components not specified in the format " @@ -3873,12 +3888,12 @@ msgstr "" "``1900-01-01T00:00:00.000`` : tous les composants non spécifiés dans la " "chaîne de formatage seront retirés de la valeur par défaut. [#]_" -#: library/datetime.rst:2450 +#: library/datetime.rst:2453 msgid "Using ``datetime.strptime(date_string, format)`` is equivalent to::" msgstr "" "L'utilisation de ``datetime.strptime(date_string, format)`` équivaut à ::" -#: library/datetime.rst:2454 +#: library/datetime.rst:2457 msgid "" "except when the format includes sub-second components or timezone offset " "information, which are supported in ``datetime.strptime`` but are discarded " @@ -3888,7 +3903,7 @@ msgstr "" "informations de décalage de fuseau horaire, qui sont prises en charge dans " "``datetime.strptime`` mais pas par ``time.strptime``." -#: library/datetime.rst:2458 +#: library/datetime.rst:2461 #, fuzzy msgid "" "For :class:`.time` objects, the format codes for year, month, and day should " @@ -3901,7 +3916,7 @@ msgstr "" "possèdent pas de telles valeurs. S'ils sont tout de même utilisés, ``1900`` " "est substitué à l'année, et ``1`` au mois et au jour." -#: library/datetime.rst:2462 +#: library/datetime.rst:2465 #, fuzzy msgid "" "For :class:`date` objects, the format codes for hours, minutes, seconds, and " @@ -3913,7 +3928,7 @@ msgstr "" "les objets :class:`date` ne possèdent pas de telles valeurs. S'ils sont " "tous de même utilisés, ils sont substitués par ``0``." -#: library/datetime.rst:2466 +#: library/datetime.rst:2469 msgid "" "For the same reason, handling of format strings containing Unicode code " "points that can't be represented in the charset of the current locale is " @@ -3928,7 +3943,7 @@ msgstr "" "plateformes ``strftime`` lève une :exc:`UnicodeError` ou renvoie une chaîne " "vide." -#: library/datetime.rst:2475 +#: library/datetime.rst:2478 msgid "" "Because the format depends on the current locale, care should be taken when " "making assumptions about the output value. Field orderings will vary (for " @@ -3947,7 +3962,7 @@ msgstr "" "utilisez :meth:`locale.getlocale` pour déterminer l'encodage de la locale " "courante)." -#: library/datetime.rst:2484 +#: library/datetime.rst:2487 msgid "" "The :meth:`strptime` method can parse years in the full [1, 9999] range, but " "years < 1000 must be zero-filled to 4-digit width." @@ -3956,7 +3971,7 @@ msgstr "" "[1, 9999], mais toutes les années < 1000 doivent être représentées sur " "quatre chiffres." -#: library/datetime.rst:2487 +#: library/datetime.rst:2490 msgid "" "In previous versions, :meth:`strftime` method was restricted to years >= " "1900." @@ -3964,13 +3979,13 @@ msgstr "" "Dans les versions précédentes, la méthode :meth:`strftime` était limitée aux " "années >= 1900." -#: library/datetime.rst:2491 +#: library/datetime.rst:2494 msgid "" "In version 3.2, :meth:`strftime` method was restricted to years >= 1000." msgstr "" "En version 3.2, la méthode :meth:`strftime` était limitée aux années >= 1000." -#: library/datetime.rst:2496 +#: library/datetime.rst:2499 msgid "" "When used with the :meth:`strptime` method, the ``%p`` directive only " "affects the output hour field if the ``%I`` directive is used to parse the " @@ -3980,7 +3995,7 @@ msgstr "" "n'affecte l'heure extraite que si la directive ``%I`` est utilisée pour " "analyser l'heure." -#: library/datetime.rst:2500 +#: library/datetime.rst:2503 msgid "" "Unlike the :mod:`time` module, the :mod:`datetime` module does not support " "leap seconds." @@ -3988,7 +4003,7 @@ msgstr "" "À l'inverse du module :mod:`time`, le module :mod:`datetime` ne gère pas les " "secondes intercalaires." -#: library/datetime.rst:2504 +#: library/datetime.rst:2507 #, fuzzy msgid "" "When used with the :meth:`strptime` method, the ``%f`` directive accepts " @@ -4002,7 +4017,7 @@ msgstr "" "caractères de formatage du standard C (mais implémentée séparément dans les " "objets *datetime*, la rendant ainsi toujours disponible)." -#: library/datetime.rst:2511 +#: library/datetime.rst:2514 msgid "" "For a naive object, the ``%z`` and ``%Z`` format codes are replaced by empty " "strings." @@ -4010,11 +4025,11 @@ msgstr "" "Pour les objets naïfs, les codes de formatage ``%z`` et ``%Z`` sont " "remplacés par des chaînes vides." -#: library/datetime.rst:2514 +#: library/datetime.rst:2517 msgid "For an aware object:" msgstr "Pour un objet avisé :" -#: library/datetime.rst:2517 +#: library/datetime.rst:2520 #, fuzzy msgid "" ":meth:`utcoffset` is transformed into a string of the form ``±HHMM[SS[." @@ -4038,7 +4053,7 @@ msgstr "" "``timedelta(hours=-3, minutes=-30)``, ``%z`` est remplacé par la chaîne " "`'-0330'``." -#: library/datetime.rst:2531 +#: library/datetime.rst:2534 msgid "" "When the ``%z`` directive is provided to the :meth:`strptime` method, the " "UTC offsets can have a colon as a separator between hours, minutes and " @@ -4050,7 +4065,7 @@ msgstr "" "minutes et secondes. Par exemple, ``'+01:00:00'``, est analysé comme un " "décalage d'une heure. Par ailleurs, ``'Z'`` est identique à ``'+00:00'``." -#: library/datetime.rst:2539 +#: library/datetime.rst:2542 #, fuzzy msgid "" "In :meth:`strftime`, ``%Z`` is replaced by an empty string if :meth:`tzname` " @@ -4061,19 +4076,19 @@ msgstr "" "vide. Autrement ``%Z`` est remplacé par la valeur renvoyée, qui doit être " "une chaîne." -#: library/datetime.rst:2543 +#: library/datetime.rst:2546 msgid ":meth:`strptime` only accepts certain values for ``%Z``:" msgstr ":meth:`strptime` accepte seulement certaines valeurs pour ``%Z`` :" -#: library/datetime.rst:2545 +#: library/datetime.rst:2548 msgid "any value in ``time.tzname`` for your machine's locale" msgstr "toute valeur dans ``time.tzname`` pour votre machine locale" -#: library/datetime.rst:2546 +#: library/datetime.rst:2549 msgid "the hard-coded values ``UTC`` and ``GMT``" msgstr "les valeurs ``UTC`` et ``GMT`` codés en dur" -#: library/datetime.rst:2548 +#: library/datetime.rst:2551 msgid "" "So someone living in Japan may have ``JST``, ``UTC``, and ``GMT`` as valid " "values, but probably not ``EST``. It will raise ``ValueError`` for invalid " @@ -4083,7 +4098,7 @@ msgstr "" "``UTC`` et ``GMT``, mais probablement pas ``EST``. Les valeurs invalides " "lèvent ``ValueError``." -#: library/datetime.rst:2552 +#: library/datetime.rst:2555 #, fuzzy msgid "" "When the ``%z`` directive is provided to the :meth:`strptime` method, an " @@ -4094,7 +4109,7 @@ msgstr "" "objet :class:`.datetime` avisé est construit. L'attribut ``tzinfo`` du " "résultat aura pour valeur une instance de :class:`timezone`." -#: library/datetime.rst:2558 +#: library/datetime.rst:2561 msgid "" "When used with the :meth:`strptime` method, ``%U`` and ``%W`` are only used " "in calculations when the day of the week and the calendar year (``%Y``) are " @@ -4104,7 +4119,7 @@ msgstr "" "et ``%W`` ne sont utilisées dans les calculs que si le jour de la semaine et " "l'année calendaire (``%Y``) sont spécifiés." -#: library/datetime.rst:2563 +#: library/datetime.rst:2566 msgid "" "Similar to ``%U`` and ``%W``, ``%V`` is only used in calculations when the " "day of the week and the ISO year (``%G``) are specified in a :meth:" @@ -4113,29 +4128,29 @@ msgid "" msgstr "" "De façon similaire à ``%U`` et ``%W``, ``%v`` n'est utilisé dans les calculs " "que lorsque le jour de la semaine et l'année ISO (``%G``) sont spécifiés " -"dans la chaîne de formatage :meth:`strptime`. Notez aussi que ``%G`` et ``" -"%Y`` ne sont pas interchangeables." +"dans la chaîne de formatage :meth:`strptime`. Notez aussi que ``%G`` et " +"``%Y`` ne sont pas interchangeables." -#: library/datetime.rst:2569 +#: library/datetime.rst:2572 msgid "" "When used with the :meth:`strptime` method, the leading zero is optional " "for formats ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, ``%J``, ``%U``, " "``%W``, and ``%V``. Format ``%y`` does require a leading zero." msgstr "" "Quand cette directive est utilisée avec la méthode :meth:`strptime`, le zéro " -"d'entête est optionnel pour les formats ``%d``, ``%m``, ``%H``, ``%I``, ``" -"%M``, ``%S``, ``%J``, ``%U``, ``%W`` et ``%V``. Le format ``%y`` requiert un " -"zéro en entête." +"d'entête est optionnel pour les formats ``%d``, ``%m``, ``%H``, ``%I``, " +"``%M``, ``%S``, ``%J``, ``%U``, ``%W`` et ``%V``. Le format ``%y`` requiert " +"un zéro en entête." -#: library/datetime.rst:2574 +#: library/datetime.rst:2577 msgid "Footnotes" msgstr "Notes" -#: library/datetime.rst:2575 +#: library/datetime.rst:2578 msgid "If, that is, we ignore the effects of Relativity" msgstr "Si on ignore les effets de la Relativité" -#: library/datetime.rst:2577 +#: library/datetime.rst:2580 #, fuzzy msgid "" "This matches the definition of the \"proleptic Gregorian\" calendar in " @@ -4153,7 +4168,7 @@ msgstr "" "base de tous les calculs. Référez-vous au livre pour les algorithmes de " "conversion entre calendriers grégorien proleptique et les autres systèmes." -#: library/datetime.rst:2583 +#: library/datetime.rst:2586 msgid "" "See R. H. van Gent's `guide to the mathematics of the ISO 8601 calendar " "`_ for a " @@ -4163,7 +4178,7 @@ msgstr "" "www.staff.science.uu.nl/~gent0113/calendar/isocalendar.htm>`_ pour une bonne " "explication." -#: library/datetime.rst:2587 +#: library/datetime.rst:2590 msgid "" "Passing ``datetime.strptime('Feb 29', '%b %d')`` will fail since ``1900`` is " "not a leap year." @@ -4171,6 +4186,18 @@ msgstr "" "Passer ``datetime.strptime(‘Feb 29’, ‘%b %d’)`` ne marchera pas car ``1900`` " "n’est pas une année bissextile." +#~ msgid "`dateutil.tz `_" +#~ msgstr "`dateutil.tz `_" + +#~ msgid "" +#~ "Week number of the year (Monday as the first day of the week) as a " +#~ "decimal number. All days in a new year preceding the first Monday are " +#~ "considered to be in week 0." +#~ msgstr "" +#~ "Numéro de la semaine à deux chiffres (où lundi est considéré comme le " +#~ "premier jour de la semaine). Tous les jours de l'année précédent le " +#~ "premier lundi sont considérés comme appartenant à la semaine 0." + #~ msgid "Return a 3-tuple, (ISO year, ISO week number, ISO weekday)." #~ msgstr "" #~ "Renvoie un *n*-uplet de 3 éléments, (année ISO, numéro de semaine ISO, " diff --git a/library/dbm.po b/library/dbm.po index eaacdea199..3f5fca735b 100644 --- a/library/dbm.po +++ b/library/dbm.po @@ -162,7 +162,7 @@ msgstr "" #: library/dbm.rst:121 msgid "Module :mod:`shelve`" -msgstr "" +msgstr "Module :mod:`shelve`" #: library/dbm.rst:122 msgid "Persistence module which stores non-string data." diff --git a/library/decimal.po b/library/decimal.po index 2dc929a750..667532f289 100644 --- a/library/decimal.po +++ b/library/decimal.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-10-07 18:55+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" @@ -708,24 +708,33 @@ msgid "" "otherwise. Currently, a :class:`Decimal` instance is always canonical, so " "this operation always returns :const:`True`." msgstr "" +"Renvoie :const:`True` si l'argument est sous forme canonique et :const:" +"`False` sinon. Actuellement, une instance :class:`Decimal` est toujours " +"canonique, donc cette opération renvoie toujours :const:`True`." #: library/decimal.rst:616 msgid "" "Return :const:`True` if the argument is a finite number, and :const:`False` " "if the argument is an infinity or a NaN." msgstr "" +"Renvoie :const:`True` si l'argument est un nombre fini et :const:`False` si " +"l'argument est un infini ou NaN." #: library/decimal.rst:621 msgid "" "Return :const:`True` if the argument is either positive or negative infinity " "and :const:`False` otherwise." msgstr "" +"Renvoie :const:`True` si l'argument est un infini positif ou négatif et :" +"const:`False` sinon." #: library/decimal.rst:626 msgid "" "Return :const:`True` if the argument is a (quiet or signaling) NaN and :" "const:`False` otherwise." msgstr "" +"Renvoie :const:`True` si l'argument est un NaN (signalétique ou silencieux) " +"et :const:`False` sinon." #: library/decimal.rst:631 msgid "" @@ -738,18 +747,24 @@ msgid "" "Return :const:`True` if the argument is a quiet NaN, and :const:`False` " "otherwise." msgstr "" +"Renvoie :const:`True` si l'argument est un NaN silencieux et :const:`False` " +"sinon." #: library/decimal.rst:641 msgid "" "Return :const:`True` if the argument has a negative sign and :const:`False` " "otherwise. Note that zeros and NaNs can both carry signs." msgstr "" +"Renvoie :const:`True` si l'argument est négatif et :const:`False` sinon. " +"Notez que les zéros et les NaNs peuvent être signés." #: library/decimal.rst:646 msgid "" "Return :const:`True` if the argument is a signaling NaN and :const:`False` " "otherwise." msgstr "" +"Renvoie :const:`True` si l'argument est un NaN signalétique et :const:" +"`False` sinon." #: library/decimal.rst:651 msgid "" @@ -762,18 +777,24 @@ msgid "" "Return :const:`True` if the argument is a (positive or negative) zero and :" "const:`False` otherwise." msgstr "" +"Renvoie :const:`True` si l'argument est un zéro (positif ou négatif) et :" +"const:`False` sinon." #: library/decimal.rst:661 msgid "" "Return the natural (base e) logarithm of the operand. The result is " "correctly rounded using the :const:`ROUND_HALF_EVEN` rounding mode." msgstr "" +"Renvoie le logarithme naturel (base e) de l'opérande. Le résultat est " +"arrondi avec le mode :const:`ROUND_HALF_EVEN`." #: library/decimal.rst:666 msgid "" "Return the base ten logarithm of the operand. The result is correctly " "rounded using the :const:`ROUND_HALF_EVEN` rounding mode." msgstr "" +"Renvoie le logarithme en base 10 de l'opérande. Le résultat est arrondi avec " +"le mode :const:`ROUND_HALF_EVEN`." #: library/decimal.rst:671 msgid "" @@ -876,7 +897,7 @@ msgstr "" #: library/decimal.rst:757 msgid "``\"-Infinity\"``, indicating that the operand is negative infinity." -msgstr "" +msgstr "``\"-Infinity\"``, indiquant que l'opérande est l'infini négatif ;" #: library/decimal.rst:758 msgid "" @@ -890,11 +911,11 @@ msgstr "" #: library/decimal.rst:760 msgid "``\"-Zero\"``, indicating that the operand is a negative zero." -msgstr "" +msgstr "``\"-Zero\"``, indiquant que l'opérande est un zéro négatif ;" #: library/decimal.rst:761 msgid "``\"+Zero\"``, indicating that the operand is a positive zero." -msgstr "" +msgstr "``\"+Zero\"``, indiquant que l'opérande est un zéro positif ;" #: library/decimal.rst:762 msgid "" @@ -908,15 +929,19 @@ msgstr "" #: library/decimal.rst:764 msgid "``\"+Infinity\"``, indicating that the operand is positive infinity." -msgstr "" +msgstr "``\"+Infinity\"``, indiquant que l'opérande est l'infini positif ;" #: library/decimal.rst:765 msgid "``\"NaN\"``, indicating that the operand is a quiet NaN (Not a Number)." msgstr "" +"``\"NaN\"``, indiquant que l'opérande est un NaN (*Not a Number*, pas un " +"nombre) silencieux ;" #: library/decimal.rst:766 msgid "``\"sNaN\"``, indicating that the operand is a signaling NaN." msgstr "" +"``\"sNaN\"``, indiquant que l'opérande est un NaN (*Not a Number*, pas un " +"nombre) signalétique." #: library/decimal.rst:770 msgid "" @@ -1168,9 +1193,9 @@ msgstr "" #: library/decimal.rst:987 msgid "" -"The default values are :attr:`prec`\\ =\\ :const:`28`, :attr:`rounding`\\ =" -"\\ :const:`ROUND_HALF_EVEN`, and enabled traps for :class:`Overflow`, :class:" -"`InvalidOperation`, and :class:`DivisionByZero`." +"The default values are :attr:`prec`\\ =\\ :const:`28`, :attr:`rounding`\\ " +"=\\ :const:`ROUND_HALF_EVEN`, and enabled traps for :class:`Overflow`, :" +"class:`InvalidOperation`, and :class:`DivisionByZero`." msgstr "" #: library/decimal.rst:992 @@ -1325,7 +1350,7 @@ msgstr "Renvoie la valeur absolue de *x*." #: library/decimal.rst:1135 msgid "Return the sum of *x* and *y*." -msgstr "" +msgstr "Renvoie la somme de *x* et *y*." #: library/decimal.rst:1140 msgid "Returns the same Decimal object *x*." @@ -1354,23 +1379,23 @@ msgstr "" #: library/decimal.rst:1170 msgid "Returns a copy of *x* with the sign inverted." -msgstr "" +msgstr "Renvoie une copie de *x* mais de signe opposé." #: library/decimal.rst:1175 msgid "Copies the sign from *y* to *x*." -msgstr "" +msgstr "Copie le signe de *y* vers *x*." #: library/decimal.rst:1180 msgid "Return *x* divided by *y*." -msgstr "" +msgstr "Renvoie *x* divisé par *y*." #: library/decimal.rst:1185 msgid "Return *x* divided by *y*, truncated to an integer." -msgstr "" +msgstr "Renvoie *x* divisé par *y*, tronqué comme entier." #: library/decimal.rst:1190 msgid "Divides two numbers and returns the integer part of the result." -msgstr "" +msgstr "Renvoie la partie entière de la division entre deux nombres." #: library/decimal.rst:1195 msgid "Returns `e ** x`." @@ -1378,7 +1403,7 @@ msgstr "" #: library/decimal.rst:1200 msgid "Returns *x* multiplied by *y*, plus *z*." -msgstr "" +msgstr "Renvoie *x* multiplié par *y*, plus *z*." #: library/decimal.rst:1205 msgid "Returns ``True`` if *x* is canonical; otherwise returns ``False``." @@ -1390,11 +1415,13 @@ msgstr "" #: library/decimal.rst:1215 msgid "Returns ``True`` if *x* is infinite; otherwise returns ``False``." -msgstr "" +msgstr "Renvoie ``True`` si *x* est infini et ``False`` sinon." #: library/decimal.rst:1220 msgid "Returns ``True`` if *x* is a qNaN or sNaN; otherwise returns ``False``." msgstr "" +"Renvoie ``True`` si *x* est un NaN (silencieux ou signalétique) et ``False`` " +"sinon." #: library/decimal.rst:1225 msgid "" @@ -1403,16 +1430,16 @@ msgstr "" #: library/decimal.rst:1230 msgid "Returns ``True`` if *x* is a quiet NaN; otherwise returns ``False``." -msgstr "" +msgstr "Renvoie ``True`` si *x* est un NaN silencieux et ``False`` sinon." #: library/decimal.rst:1235 msgid "Returns ``True`` if *x* is negative; otherwise returns ``False``." -msgstr "" +msgstr "Renvoie ``True`` si *x* est négatif et ``False`` sinon." #: library/decimal.rst:1240 msgid "" "Returns ``True`` if *x* is a signaling NaN; otherwise returns ``False``." -msgstr "" +msgstr "Renvoie ``True`` si *x* est un NaN signalétique et ``False`` sinon." #: library/decimal.rst:1245 msgid "Returns ``True`` if *x* is subnormal; otherwise returns ``False``." @@ -1420,15 +1447,15 @@ msgstr "" #: library/decimal.rst:1250 msgid "Returns ``True`` if *x* is a zero; otherwise returns ``False``." -msgstr "" +msgstr "Renvoie ``True`` si *x* est un zéro et ``False`` sinon." #: library/decimal.rst:1255 msgid "Returns the natural (base e) logarithm of *x*." -msgstr "" +msgstr "Renvoie le logarithme naturel (en base e) de *x*." #: library/decimal.rst:1260 msgid "Returns the base 10 logarithm of *x*." -msgstr "" +msgstr "Renvoie le logarithme en base 10 de *x*." #: library/decimal.rst:1265 msgid "Returns the exponent of the magnitude of the operand's MSD." @@ -1452,7 +1479,7 @@ msgstr "" #: library/decimal.rst:1290 msgid "Compares two values numerically and returns the maximum." -msgstr "" +msgstr "Renvoie le maximum entre les deux valeurs numériques." #: library/decimal.rst:1305 msgid "Compares the values numerically with their sign ignored." @@ -1468,7 +1495,7 @@ msgstr "" #: library/decimal.rst:1315 msgid "Return the product of *x* and *y*." -msgstr "" +msgstr "Renvoie la multiplication de *x* avec *y*." #: library/decimal.rst:1320 msgid "Returns the largest representable number smaller than *x*." @@ -1484,7 +1511,7 @@ msgstr "" #: library/decimal.rst:1335 msgid "Reduces *x* to its simplest form." -msgstr "" +msgstr "Réduit *x* à sa forme la plus simple." #: library/decimal.rst:1340 msgid "Returns an indication of the class of *x*." @@ -1535,11 +1562,11 @@ msgstr "" #: library/decimal.rst:1372 msgid "``y`` must be nonnegative" -msgstr "" +msgstr "``y`` ne doit pas être négatif ;" #: library/decimal.rst:1373 msgid "at least one of ``x`` or ``y`` must be nonzero" -msgstr "" +msgstr "au moins l'un de ``x`` ou ``y`` doit être différent de zéro ;" #: library/decimal.rst:1374 msgid "``modulo`` must be nonzero and have at most 'precision' digits" @@ -1560,11 +1587,11 @@ msgstr "" #: library/decimal.rst:1391 msgid "Just returns 10, as this is Decimal, :)" -msgstr "" +msgstr "Renvoie 10 car c'est Decimal, :)" #: library/decimal.rst:1396 msgid "Returns the remainder from integer division." -msgstr "" +msgstr "Donne le reste de la division entière." #: library/decimal.rst:1398 msgid "" @@ -1584,7 +1611,7 @@ msgstr "" #: library/decimal.rst:1415 msgid "Returns ``True`` if the two operands have the same exponent." -msgstr "" +msgstr "Renvoie ``True`` si les deux opérandes ont le même exposant." #: library/decimal.rst:1420 msgid "Returns the first operand after adding the second value its exp." @@ -1619,6 +1646,9 @@ msgid "" "The constants in this section are only relevant for the C module. They are " "also included in the pure Python version for compatibility." msgstr "" +"Les constantes de cette section ne sont pertinentes que pour le module C. " +"Elles sont aussi incluses pour le compatibilité dans la version en Python " +"pur." #: library/decimal.rst:1467 msgid "32-bit" @@ -1656,6 +1686,8 @@ msgstr ":const:`-1999999999999999997`" msgid "" "The value is ``True``. Deprecated, because Python now always has threads." msgstr "" +"La valeur est ``True``. Déprécié, parce que maintenant Python possède " +"toujours des fils d'exécution." #: library/decimal.rst:1487 msgid "" @@ -1671,7 +1703,7 @@ msgstr "" #: library/decimal.rst:1495 msgid "Rounding modes" -msgstr "" +msgstr "Modes d'arrondi" #: library/decimal.rst:1499 msgid "Round towards :const:`Infinity`." @@ -1709,7 +1741,7 @@ msgstr "" #: library/decimal.rst:1534 msgid "Signals" -msgstr "" +msgstr "Signaux" #: library/decimal.rst:1536 msgid "" @@ -1783,7 +1815,7 @@ msgstr "" #: library/decimal.rst:1602 msgid "Numerical overflow." -msgstr "" +msgstr "Débordement numérique." #: library/decimal.rst:1604 msgid "" @@ -2041,6 +2073,8 @@ msgid "" "Q. Once I have valid two place inputs, how do I maintain that invariant " "throughout an application?" msgstr "" +"Q. Une fois que mes entrées sont à deux décimales valides, comment maintenir " +"cet invariant dans l'application ?" #: library/decimal.rst:2019 msgid "" @@ -2049,12 +2083,20 @@ msgid "" "division and non-integer multiplication, will change the number of decimal " "places and need to be followed-up with a :meth:`quantize` step:" msgstr "" +"R. Certaines opérations comme l'addition, la soustraction et la " +"multiplication par un entier préservent automatiquement la virgule fixe. " +"D'autres opérations, comme la division et la multiplication par des non-" +"entiers, changent le nombre de décimales et doivent être suivies d'une " +"étape :meth:`quantize` :" #: library/decimal.rst:2037 msgid "" "In developing fixed-point applications, it is convenient to define functions " "to handle the :meth:`quantize` step:" msgstr "" +"Lors du développement d'applications en virgule fixe, il est pratique de " +"définir des fonctions pour gérer cette étape de quantification par :meth:" +"`quantize` :" #: library/decimal.rst:2050 msgid "" diff --git a/library/difflib.po b/library/difflib.po index 4790874a38..e2d05fb155 100644 --- a/library/difflib.po +++ b/library/difflib.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-10-15 09:15+0200\n" "Last-Translator: Loc Cosnier \n" "Language-Team: French \n" @@ -656,8 +656,8 @@ msgstr "" #: library/difflib.rst:468 msgid "" "Return list of triples describing non-overlapping matching subsequences. " -"Each triple is of the form ``(i, j, n)``, and means that ``a[i:i+n] == b[j:j" -"+n]``. The triples are monotonically increasing in *i* and *j*." +"Each triple is of the form ``(i, j, n)``, and means that ``a[i:i+n] == b[j:" +"j+n]``. The triples are monotonically increasing in *i* and *j*." msgstr "" #: library/difflib.rst:473 diff --git a/library/dis.po b/library/dis.po index bd017d256e..064d8fbb74 100644 --- a/library/dis.po +++ b/library/dis.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-02-24 17:33+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-07-18 21:03+0200\n" "Last-Translator: Aya Keddam \n" "Language-Team: FRENCH \n" @@ -818,7 +818,7 @@ msgstr "" msgid "" "This opcode performs several operations before a with block starts. First, " "it loads :meth:`~object.__exit__` from the context manager and pushes it " -"onto the stack for later use by :opcode:`WITH_CLEANUP_START`. Then, :meth:" +"onto the stack for later use by :opcode:`WITH_EXCEPT_START`. Then, :meth:" "`~object.__enter__` is called, and a finally block pointing to *delta* is " "pushed. Finally, the result of calling the ``__enter__()`` method is pushed " "onto the stack. The next opcode will either ignore it (:opcode:`POP_TOP`), " diff --git a/library/doctest.po b/library/doctest.po index 38f6cb8c36..c80fd91e42 100644 --- a/library/doctest.po +++ b/library/doctest.po @@ -5,23 +5,23 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" +"PO-Revision-Date: 2021-09-12 09:38-0400\n" +"Last-Translator: Edith Viau \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.3\n" #: library/doctest.rst:2 msgid ":mod:`doctest` --- Test interactive Python examples" -msgstr "" +msgstr ":mod:`doctest` — Exemples de tests interactifs en Python" #: library/doctest.rst:12 -#, fuzzy msgid "**Source code:** :source:`Lib/doctest.py`" -msgstr "**Code source:** :source:`Lib/os.py`" +msgstr "**Code source :** :source:`Lib/doctest.py`" #: library/doctest.rst:16 msgid "" @@ -29,18 +29,27 @@ msgid "" "interactive Python sessions, and then executes those sessions to verify that " "they work exactly as shown. There are several common ways to use doctest:" msgstr "" +"Le module :mod:`doctest` cherche des extraits de texte ressemblant à des " +"sessions Python interactives avant de les exécuter, de façon à vérifier que " +"le fonctionnement correspond exactement à la description. Voici quelques cas " +"d'utilisation de *doctest* :" #: library/doctest.rst:20 msgid "" "To check that a module's docstrings are up-to-date by verifying that all " "interactive examples still work as documented." msgstr "" +"Vérifier que les *docstrings* d'un module sont à jour en vérifiant que tous " +"les exemples interactifs fonctionnent toujours tels que décrits." #: library/doctest.rst:23 msgid "" "To perform regression testing by verifying that interactive examples from a " "test file or a test object work as expected." msgstr "" +"Réaliser un test de régression en vérifiant que les exemples interactifs " +"provenant d'un fichier de test ou d'un objet de test fonctionnent comme " +"prévu." #: library/doctest.rst:26 msgid "" @@ -49,16 +58,22 @@ msgid "" "text are emphasized, this has the flavor of \"literate testing\" or " "\"executable documentation\"." msgstr "" +"Rédiger de la documentation sous forme de tutoriel pour un paquet, avec une " +"abondance d'exemples ayant des entrées et des sorties. On pourrait voir ça " +"comme des tests « dans le texte » ou de la « documentation exécutable », " +"selon le point de vue." #: library/doctest.rst:31 msgid "Here's a complete but small example module::" -msgstr "" +msgstr "Voici un petit exemple d'un module qui soit tout de même complet ::" #: library/doctest.rst:88 msgid "" "If you run :file:`example.py` directly from the command line, :mod:`doctest` " "works its magic:" msgstr "" +"L'exécution du fichier :file:`example.py` directement à partir de la ligne " +"de commande démontre la magie de :mod:`doctest` :" #: library/doctest.rst:96 msgid "" @@ -66,10 +81,14 @@ msgid "" "Pass ``-v`` to the script, and :mod:`doctest` prints a detailed log of what " "it's trying, and prints a summary at the end:" msgstr "" +"Il n'y a pas de sortie ! C'est normal, cela signifie que tous les exemples " +"fonctionnent. Passez ``-v`` au script pour que :mod:`doctest` affiche un " +"journal détaillé de ce qui a été essayé, avant d'afficher un résumé à la " +"fin :" #: library/doctest.rst:114 msgid "And so on, eventually ending with:" -msgstr "" +msgstr "Et ainsi de suite, jusqu'à ce qu'on atteigne :" #: library/doctest.rst:133 msgid "" @@ -79,26 +98,37 @@ msgid "" "libraries. Especially useful examples can be found in the standard test " "file :file:`Lib/test/test_doctest.py`." msgstr "" +"C'est tout ce dont vous avez besoin pour pouvoir commencer une utilisation " +"productive de :mod:`doctest` ! Allez-y. Les sections suivantes donnent tous " +"les détails. Notez qu'il y a plusieurs exemples de *doctests* dans la suite " +"de tests de la bibliothèque standard de Python et dans les autres " +"bibliothèques. Des exemples particulièrement utiles se situent dans le " +"fichier de test standard :file:`Lib/test/test_doctest.py`." #: library/doctest.rst:143 msgid "Simple Usage: Checking Examples in Docstrings" -msgstr "" +msgstr "Utilisation simple : vérifier des exemples dans des *docstrings*" #: library/doctest.rst:145 msgid "" "The simplest way to start using doctest (but not necessarily the way you'll " "continue to do it) is to end each module :mod:`M` with::" msgstr "" +"Le plus simple pour commencer à utiliser *doctest* (mais pas nécessairement " +"la façon avec laquelle vous continuerez) est de terminer chaque module :mod:" +"`M` avec ::" #: library/doctest.rst:152 msgid ":mod:`doctest` then examines docstrings in module :mod:`M`." -msgstr "" +msgstr ":mod:`doctest` examine alors les *docstrings* dans le module :mod:`M`." #: library/doctest.rst:154 msgid "" "Running the module as a script causes the examples in the docstrings to get " "executed and verified::" msgstr "" +"Exécuter le module comme un script a comme conséquence d'exécuter et de " +"vérifier les exemples dans les *docstrings* ::" #: library/doctest.rst:159 msgid "" @@ -107,16 +137,22 @@ msgid "" "and the final line of output is ``***Test Failed*** N failures.``, where *N* " "is the number of examples that failed." msgstr "" +"Ceci n'affiche rien à moins qu'un exemple échoue ; le cas échéant, les " +"exemples défaillants et les causes du ou des échecs sont affichés sur " +"*stdout*, et la ligne finale de la sortie est ``***Test Failed*** *N " +"failures*.``, où *N* est le nombre d'exemples défaillants." #: library/doctest.rst:164 msgid "Run it with the ``-v`` switch instead::" -msgstr "" +msgstr "À la place, exécutez-la avec l'option de ligne de commande ``-v`` ::" #: library/doctest.rst:168 msgid "" "and a detailed report of all examples tried is printed to standard output, " "along with assorted summaries at the end." msgstr "" +"alors, un rapport détaillé de tous les exemples faisant partie de l'essai " +"est affiché sur la sortie standard, accompagné à la fin de leurs résumés." #: library/doctest.rst:171 msgid "" @@ -125,6 +161,10 @@ msgid "" "``sys.argv`` is not examined by :func:`testmod` (so passing ``-v`` or not " "has no effect)." msgstr "" +"Vous pouvez activer le mode verbeux en passant ``verbose=True`` à :func:" +"`testmod`, ou vous le désactiver en lui passant ``verbose=False``. Dans ces " +"deux cas, ``sys.argv`` n'est pas inspecté par :func:`testmod` (ainsi, lui " +"passer ``-v`` ou pas n'a aucun effet)." #: library/doctest.rst:176 msgid "" @@ -132,6 +172,10 @@ msgid "" "instruct the Python interpreter to run the doctest module directly from the " "standard library and pass the module name(s) on the command line::" msgstr "" +"Il y a un raccourci pour exécuter :func:`testmod` à partir de la ligne de " +"commande. Vous demandez à l'interpréteur Python d'exécuter le module " +"*doctest* directement à partir de la bibliothèque standard afin de passer le " +"ou les noms des modules à partir de la ligne de commande ainsi ::" #: library/doctest.rst:182 msgid "" @@ -139,22 +183,31 @@ msgid "" "`testmod` on it. Note that this may not work correctly if the file is part " "of a package and imports other submodules from that package." msgstr "" +"Ceci importera :file:`example.py` comme un module autonome et exécutera :" +"func:`testmod` sur celui-ci. Notez que ceci peut ne pas fonctionner si le " +"fichier fait partie d'un paquet et importe d'autres sous-modules de ce " +"paquet." #: library/doctest.rst:186 msgid "" "For more information on :func:`testmod`, see section :ref:`doctest-basic-" "api`." msgstr "" +"Pour plus d'informations sur :func:`testmod`, consultez la section :ref:" +"`doctest-basic-api`." #: library/doctest.rst:192 msgid "Simple Usage: Checking Examples in a Text File" -msgstr "" +msgstr "Utilisation simple : vérifier des exemples dans un fichier texte" #: library/doctest.rst:194 msgid "" "Another simple application of doctest is testing interactive examples in a " "text file. This can be done with the :func:`testfile` function::" msgstr "" +"Une autre application simple de *doctest* est de tester des exemples " +"interactifs dans un fichier texte. Ceci est fait avec la fonction :func:" +"`testfile` ::" #: library/doctest.rst:200 msgid "" @@ -163,12 +216,19 @@ msgid "" "if it were a single giant docstring; the file doesn't need to contain a " "Python program! For example, perhaps :file:`example.txt` contains this:" msgstr "" +"Ce court script exécute et vérifie chacun des exemples Python interactifs " +"contenus dans le fichier :file:`example.txt`. Le contenu du fichier est " +"traité comme une seule *docstring* géante ; le fichier n'a pas besoin de " +"contenir un programme Python ! Par exemple, prenons un fichier :file:" +"`example.txt` contenant :" #: library/doctest.rst:223 msgid "" "Running ``doctest.testfile(\"example.txt\")`` then finds the error in this " "documentation::" msgstr "" +"Exécuter ``doctest.testfile(\"example.txt\")`` recherche les erreurs dans " +"cette documentation ::" #: library/doctest.rst:234 msgid "" @@ -177,6 +237,10 @@ msgid "" "cause(s) of the failure(s) are printed to stdout, using the same format as :" "func:`testmod`." msgstr "" +"Comme pour :func:`testmod`, :func:`testfile` n'affichera rien sauf si un " +"exemple échoue. Si un exemple échoue, alors le ou les exemples défaillants " +"et leurs causes sont affichés sur *stdout*, dans le même format que :func:" +"`testmod`." #: library/doctest.rst:239 msgid "" @@ -185,12 +249,19 @@ msgid "" "optional arguments that can be used to tell it to look for files in other " "locations." msgstr "" +"Par défaut, :func:`testfile` cherche les fichiers dans le répertoire où se " +"situe le module qui l'appelle. Consultez la section :ref:`doctest-basic-api` " +"pour une description des options de ligne de commande à utiliser afin de " +"chercher dans d'autres répertoires." #: library/doctest.rst:243 msgid "" "Like :func:`testmod`, :func:`testfile`'s verbosity can be set with the ``-" "v`` command-line switch or with the optional keyword argument *verbose*." msgstr "" +"Comme pour :func:`testmod`, la verbosité de :func:`testfile` peut être " +"ajustée avec l'option de ligne de commande ``-v`` ou avec le mot clé " +"*verbose*." #: library/doctest.rst:247 msgid "" @@ -198,22 +269,31 @@ msgid "" "instruct the Python interpreter to run the doctest module directly from the " "standard library and pass the file name(s) on the command line::" msgstr "" +"Il y a un raccourci pour exécuter :func:`testfile` à partir de la ligne de " +"commande. Demandez à l'interpréteur Python d'exécuter le module *doctest* " +"directement à partir de la bibliothèque standard et de passer le ou les noms " +"des modules à partir de la ligne de commande ainsi ::" #: library/doctest.rst:253 msgid "" "Because the file name does not end with :file:`.py`, :mod:`doctest` infers " "that it must be run with :func:`testfile`, not :func:`testmod`." msgstr "" +"Puisque le nom du fichier ne se termine pas par :file:`.py`, :mod:`doctest` " +"en déduit qu'il s'exécute à l'aide de :func:`testfile`, et non pas :func:" +"`testmod`." #: library/doctest.rst:256 msgid "" "For more information on :func:`testfile`, see section :ref:`doctest-basic-" "api`." msgstr "" +"Pour plus d'information sur :func:`testfile`, consultez la section :ref:" +"`doctest-basic-api`." #: library/doctest.rst:262 msgid "How It Works" -msgstr "" +msgstr "Comment ça marche" #: library/doctest.rst:264 msgid "" @@ -224,16 +304,27 @@ msgid "" "examples; for information about actually running doctest on these examples, " "see the following sections." msgstr "" +"Cette section examine en détail le fonctionnement de *doctest* : quelles " +"*docstrings* sont considérées, comment sont trouvés les exemples " +"interactifs, quel est le contexte d'exécution sélectionné, comment les " +"exceptions sont gérées, et de quelles façons les options de ligne de " +"commande peuvent être utilisées pour définir le comportement. Ceci est " +"l'information dont vous avez besoin pour écrire des exemples *doctest* ; " +"pour de l'information sur l'exécution de *doctest* sur ces exemples, " +"consultez les sections suivantes." #: library/doctest.rst:275 msgid "Which Docstrings Are Examined?" -msgstr "" +msgstr "Quelles *docstrings* sont considérées ?" #: library/doctest.rst:277 msgid "" "The module docstring, and all function, class and method docstrings are " "searched. Objects imported into the module are not searched." msgstr "" +"Les *docstrings* du module, de toutes les fonctions, classes, et méthodes " +"sont cherchées. Les objets qui sont importés dans le module ne sont pas " +"cherchés." #: library/doctest.rst:280 msgid "" @@ -243,16 +334,24 @@ msgid "" "searched, and strings are treated as if they were docstrings. In output, a " "key ``K`` in ``M.__test__`` appears with name ::" msgstr "" +"De plus, si ``M.__test__`` existe et qu'il est vrai, il doit être un *dict* " +"dont chaque élément lie un nom (chaîne de caractère) à un objet (fonction, " +"classe, chaîne de caractère). Les *docstrings* d'objets fonctions et classes " +"trouvées dans ``M.__test__`` sont cherchés, et les chaînes de caractères " +"sont traitées comme si elles étaient des *docstrings*. En sortie, une clé " +"``K`` dans ``M.__test__`` apparaît avec le nom ::" #: library/doctest.rst:288 msgid "" "Any classes found are recursively searched similarly, to test docstrings in " "their contained methods and nested classes." msgstr "" +"Toute classe trouvée est ainsi cherchée récursivement, afin de tester les " +"*docstrings* contenues dans leurs méthodes et leurs classes imbriquées." #: library/doctest.rst:299 msgid "How are Docstring Examples Recognized?" -msgstr "" +msgstr "Comment les exemples *docstring* sont-ils identifiés ?" #: library/doctest.rst:301 msgid "" @@ -260,6 +359,9 @@ msgid "" "but doctest isn't trying to do an exact emulation of any specific Python " "shell." msgstr "" +"Dans la plupart des cas, un copier-coller d'une séance interactive de " +"console fonctionne bien, mais *doctest* n'essaye pas de faire une simulation " +"exacte d'un *shell* Python spécifique." #: library/doctest.rst:326 msgid "" @@ -267,10 +369,13 @@ msgid "" "'`` line containing the code, and the expected output (if any) extends to " "the next ``'>>> '`` or all-whitespace line." msgstr "" +"Toute sortie souhaitée doit immédiatement suivre le dernier ``'>>> '`` ou le " +"dernier ``'... '`` contenant le code, et la sortie souhaitée, s'il y en a " +"une, s'étend jusqu'au prochain ``'>>> '`` ou à la prochaine ligne vide." #: library/doctest.rst:330 msgid "The fine print:" -msgstr "" +msgstr "En détail :" #: library/doctest.rst:332 msgid "" @@ -279,6 +384,10 @@ msgid "" "a blank line, put ```` in your doctest example each place a blank " "line is expected." msgstr "" +"La sortie souhaitée ne peut pas contenir une ligne vide, puisque contenir " +"une telle ligne signale la fin de la sortie souhaitée. Si la sortie " +"souhaitée doit contenir une ligne vide, ajoutez ```` dans votre " +"exemple *doctest* à chaque endroit où une ligne vide est souhaitée." #: library/doctest.rst:337 msgid "" @@ -294,12 +403,29 @@ msgid "" "different algorithm for handling tabs by writing a custom :class:" "`DocTestParser` class." msgstr "" +"Tous les caractères de tabulation insécables (*hard tab characters*) sont " +"convertis en espaces, en utilisant des taquets de tabulation de 8 espaces. " +"Les tabulations se trouvant dans la sortie générée par le code test ne sont " +"pas modifiées. Comme tout caractère de tabulation insécable *est* converti, " +"ceci veut dire que si le code de sortie inclut des caractères de tabulation " +"insécables, alors la seule façon que le *doctest* peut réussir est si " +"l'option :const:`NORMALIZE_WHITESPACE` ou si :ref:`directive ` a cours. De façon alternative, le test peut être ré-écrit afin " +"de capturer la sortie et de la comparer à un ensemble de valeurs attendues, " +"et ce, en tant qu'étape du test. Cette gestion des tabulations à la source a " +"été obtenue suite à un processus d'essais et d'erreurs ; il a été démontré " +"que c'était là la façon de les gérer qui soit la moins susceptible de " +"générer des erreurs. Il est possible d'utiliser un algorithme différent pour " +"la gestion des tabulations en rédigeant une classe sur mesure :class:" +"`DocTestParser`." #: library/doctest.rst:349 msgid "" "Output to stdout is captured, but not output to stderr (exception tracebacks " "are captured via a different means)." msgstr "" +"La sortie vers *stdout* est capturée, mais pas la sortie vers *stderr* (les " +"traces d'appel sont capturées par d'autres moyens)." #: library/doctest.rst:352 msgid "" @@ -307,6 +433,10 @@ msgid "" "any other reason use a backslash, you should use a raw docstring, which will " "preserve your backslashes exactly as you type them::" msgstr "" +"Si vous souhaitez conserver les barres obliques inversées telles quelles " +"lorsque vous terminez une ligne avec une barre oblique inversée dans une " +"séance interactive, ou quand vous utilisez une telle barre pour toute autre " +"raison, vous devez utiliser une *docstring* brute ::" #: library/doctest.rst:361 msgid "" @@ -315,20 +445,27 @@ msgid "" "Alternatively, you can double each backslash in the doctest version (and not " "use a raw string)::" msgstr "" +"Sinon, la barre oblique inversée est interprétée comme faisant partie de la " +"chaîne de caractères. Par exemple, le ``\\n`` ci-dessus est interprété comme " +"un caractère de saut de ligne. De façon alternative, vous pouvez doubler " +"chaque barre oblique inversée dans la version *doctest* (et n'utilisez pas " +"dans ce cas de *docstring* brute) ::" #: library/doctest.rst:370 msgid "The starting column doesn't matter::" -msgstr "" +msgstr "La colonne de départ n'a pas d'importance ::" #: library/doctest.rst:377 msgid "" "and as many leading whitespace characters are stripped from the expected " "output as appeared in the initial ``'>>> '`` line that started the example." msgstr "" +"et autant d'espaces sont retirés de la sortie attendue qu'il y avait " +"d'espaces avant la ligne commençant par ``'>>> '``." #: library/doctest.rst:384 msgid "What's the Execution Context?" -msgstr "" +msgstr "Quel est le contexte d'exécution ?" #: library/doctest.rst:386 msgid "" @@ -340,16 +477,28 @@ msgid "" "names defined earlier in the docstring being run. Examples cannot see names " "defined in other docstrings." msgstr "" +"Par défaut, chaque fois que :mod:`doctest` trouve une *docstring* à tester, " +"il utilise une *copie superficielle* des variables globales de :mod:`M`, de " +"telle façon que l'exécution de tests ne change pas les variables globales " +"réelles du module et que l'exécution d'un unique test dans :mod:`M` ne " +"puisse laisser traîner des miettes pouvant accidentellement causer la " +"réussite d'un autre test. Ceci signifie que les exemples peuvent utiliser " +"librement n'importe quel nom défini au niveau supérieur dans :mod:`M` ainsi " +"que les noms définis précédemment dans la *docstring* en cours d'exécution. " +"Les exemples ne peuvent voir les noms définis dans d'autres *docstrings*." #: library/doctest.rst:394 msgid "" "You can force use of your own dict as the execution context by passing " "``globs=your_dict`` to :func:`testmod` or :func:`testfile` instead." msgstr "" +"Vous pouvez forcer l'utilisation de votre propre *dict* comme contexte " +"d'exécution en passant ``globs=your_dict`` à :func:`testmod` ou encore, à :" +"func:`testfile`." #: library/doctest.rst:401 msgid "What About Exceptions?" -msgstr "" +msgstr "Qu'en est-il des exceptions ?" #: library/doctest.rst:403 msgid "" @@ -359,16 +508,23 @@ msgid "" "numbers), this is one case where doctest works hard to be flexible in what " "it accepts." msgstr "" +"Pas de problèmes, tant que la trace d'appels est la seule sortie produite " +"par l'exemple : il suffit d'ajouter la trace. [#]_ Comme les traces d'appels " +"contiennent des détails qui sont sujets à changement rapide (par exemple, le " +"chemin exact vers un fichier et les numéros de ligne), ceci est un cas où " +"*doctest* fait un effort pour être flexible dans ce qu'il accepte." #: library/doctest.rst:409 msgid "Simple example::" -msgstr "" +msgstr "Exemple simple ::" #: library/doctest.rst:416 msgid "" "That doctest succeeds if :exc:`ValueError` is raised, with the ``list." "remove(x): x not in list`` detail as shown." msgstr "" +"Ce *doctest* réussit si :exc:`ValueError` est levée, avec le détail ``list." +"remote(x): x not in list`` tel que montré." #: library/doctest.rst:419 msgid "" @@ -376,6 +532,9 @@ msgid "" "which may be either of the following two lines, indented the same as the " "first line of the example::" msgstr "" +"La sortie attendue pour une exception doit commencer par un en-tête de trace " +"d'appels, qui peut être l'une des deux lignes suivantes, avec la même " +"indentation que la première ligne de l'exemple ::" #: library/doctest.rst:426 msgid "" @@ -383,6 +542,10 @@ msgid "" "contents are ignored by doctest. The traceback stack is typically omitted, " "or copied verbatim from an interactive session." msgstr "" +"L'en-tête de la trace d'appels est suivi par une pile optionnelle de trace " +"d'appels, dont le contenu est ignoré par *doctest*. La trace d'appels est " +"habituellement omise, ou est copiée verbatim à partir d'une séance " +"interactive." #: library/doctest.rst:430 msgid "" @@ -391,12 +554,20 @@ msgid "" "a traceback, but can extend across multiple lines if the exception has a " "multi-line detail::" msgstr "" +"La pile de trace d'appels est suivie par la partie la plus intéressante : la " +"ou les lignes contenant le type et le détail de l'exception. Ceci est " +"habituellement la dernière ligne de la trace d'appels ; dans le cas où " +"l'exception a un détail sur plusieurs lignes, il est possible de prolonger " +"sur plusieurs lignes ::" #: library/doctest.rst:442 msgid "" "The last three lines (starting with :exc:`ValueError`) are compared against " "the exception's type and detail, and the rest are ignored." msgstr "" +"Les trois dernières lignes (en commençant par :exc:`ValueError`) sont " +"comparées avec le type et le détail de l'exception ; tout le reste est " +"ignoré." #: library/doctest.rst:445 msgid "" @@ -404,6 +575,9 @@ msgid "" "documentation value to the example. So the last example is probably better " "as::" msgstr "" +"La pratique optimale est d'omettre la pile de trace d'appels, à moins que " +"celle-ci ait une valeur significative de documentation de l'exemple. Ainsi, " +"le dernier exemple est probablement meilleur tel qui suit ::" #: library/doctest.rst:455 msgid "" @@ -413,10 +587,18 @@ msgid "" "just as well be three (or three hundred) commas or digits, or an indented " "transcript of a Monty Python skit." msgstr "" +"Prenez note que les traces d'appels sont traitées de façon vraiment " +"particulière. Précisément, dans l'exemple ré-écrit, l'utilisation de ``...`` " +"est indépendante de l'option *doctest* :const:`ELLIPSIS`. Les points de " +"suspension dans cet exemple peuvent être omis, ou peuvent aussi être trois " +"(ou trois cents) virgules ou chiffres, ou une retranscription indentée d'une " +"parodie de Monty Python." #: library/doctest.rst:461 msgid "Some details you should read once, but won't need to remember:" msgstr "" +"Quelques détails que vous devriez lire une fois, mais que vous pouvez " +"oublier :" #: library/doctest.rst:463 msgid "" @@ -427,6 +609,13 @@ msgid "" "ordinary output rarely begins with a traceback header line, so this doesn't " "create real problems." msgstr "" +"*Doctest* ne peut pas deviner si votre sortie attendue provient d'une trace " +"d'appels issue d'une exception ou d'un affichage ordinaire. Ainsi, si nous " +"avons un exemple s'attendant à obtenir ``ValueError: 42 is prime``, celui-ci " +"réussira peu importe si :exc:`ValueError` est réellement levée ou si " +"l'exemple affiche simplement ce texte de trace d'appels. Dans la pratique, " +"une sortie ordinaire commence rarement par une ligne d'en-tête de trace " +"d'appels ; ainsi, ceci ne pose pas de vrai problème." #: library/doctest.rst:470 msgid "" @@ -436,6 +625,13 @@ msgid "" "with an alphanumeric is taken to be the start of the exception detail. Of " "course this does the right thing for genuine tracebacks." msgstr "" +"Chaque ligne de la trace d'appel (s'il y en a) doit soit être indentée d'un " +"niveau supplémentaire au niveau de la première ligne de l'exemple *ou* doit " +"commencer par un caractère qui ne soit pas alphanumérique. La première ligne " +"suivant l'en-tête de la trace d'appels qui soit indentée similairement et " +"qui commence par un caractère alphanumérique est comprise comme étant le " +"début du détail de l'exception. Bien sûr, ceci fait la chose adéquate pour " +"les traces d'appels véritables." #: library/doctest.rst:476 msgid "" @@ -443,6 +639,9 @@ msgid "" "everything following the leftmost colon and any module information in the " "exception name is ignored." msgstr "" +"Lorsque l'option de *doctest* :const:`IGNORE_EXCEPTION_DETAIL` est définie, " +"tout ce qui suit le point-virgule se trouvant le plus à gauche ainsi que " +"toute information liée au module dans le nom de l'exception sont ignorés." #: library/doctest.rst:480 msgid "" @@ -452,12 +651,21 @@ msgid "" "need to test a :exc:`SyntaxError` that omits the traceback header, you will " "need to manually add the traceback header line to your test example." msgstr "" +"Le shell interactif omet la ligne d'en-tête de la trace d'appels pour " +"certaines erreurs :exc:`SyntaxError`. Ceci étant dit, *doctest* utilise la " +"ligne d'en-tête de la trace d'appels afin de faire une distinction entre les " +"exceptions et les autres types d'erreurs. Ainsi, dans les rares cas où vous " +"avez besoin de tester une erreur :exc:`SyntaxError` qui omet l'en-tête de la " +"trace d'appels, il vous est nécessaire d'ajouter manuellement la ligne d'en-" +"tête de la trace d'appels à l'exemple de test." #: library/doctest.rst:488 msgid "" "For some :exc:`SyntaxError`\\ s, Python displays the character position of " "the syntax error, using a ``^`` marker::" msgstr "" +"Pour certaines erreurs :exc:`SyntaxError`, Python affiche la position du " +"caractère de l'erreur de syntaxe, en utilisant un marqueur ``^`` ::" #: library/doctest.rst:497 msgid "" @@ -466,10 +674,14 @@ msgid "" "following test would pass, even though it puts the ``^`` marker in the wrong " "location::" msgstr "" +"Comme les lignes dénotant la position de l'erreur précèdent le type et le " +"détail de l'exception, elles ne sont pas vérifiées par *doctest*. Par " +"exemple, le test suivant réussira, même si le marqueur ``^`` n'est pas à la " +"bonne place ::" #: library/doctest.rst:513 msgid "Option Flags" -msgstr "" +msgstr "Options de ligne de commande" #: library/doctest.rst:515 msgid "" @@ -480,16 +692,26 @@ msgid "" "and may be passed to the doctest command line interface via the ``-o`` " "option." msgstr "" +"Un ensemble d'options de ligne de commande contrôle différents aspects du " +"comportement de *doctest*. Pour les options, des noms symboliques sont " +"fournis comme des constantes de module, qui peuvent être composés par un OU " +"bit à bit (:ref:`bitwise ORed `) et passés à diverses fonctions. " +"Les noms peuvent aussi être utilisés dans des :ref:`instructions doctest " +"`, et peuvent être passés à l'interface de ligne de " +"commande de *doctest* à l'aide de l'option ``-o``." #: library/doctest.rst:521 msgid "The ``-o`` command line option." -msgstr "" +msgstr "L'option de ligne de commande ``-o``." #: library/doctest.rst:524 msgid "" "The first group of options define test semantics, controlling aspects of how " "doctest decides whether actual output matches an example's expected output:" msgstr "" +"Le premier groupe d'options définit les sémantiques de test, de façon à " +"contrôler comment *doctest* décide si la sortie obtenue correspond à la " +"sortie attendue de l'exemple :" #: library/doctest.rst:530 msgid "" @@ -502,6 +724,16 @@ msgid "" "output still work in these cases. This option will probably go away, but " "not for several years." msgstr "" +"Par défaut, si un bloc de sortie attendu contient uniquement un ``1``, un " +"vrai bloc de sortie contenant uniquement un ``1`` ou un ``True`` sera " +"considéré comme étant une correspondance ; de façon similaire, nous avons " +"une correspondance pour ``0`` et ``False``. Lorsque l'option :const:" +"`DONT_ACCEPT_TRUE_FOR_1` est précisée, aucune de ces substitutions n'est " +"acceptée. Le comportement par défaut s'ajuste au fait que Python a changé le " +"type de renvoi de plusieurs fonctions, passant de nombres entiers à des " +"booléens ; les *doctests* s'attendant à une sortie de \"petit " +"entier\" (*little integer*) fonctionnent encore dans ces cas. Cette option " +"disparaîtra probablement, mais pas avant plusieurs années." #: library/doctest.rst:542 msgid "" @@ -511,6 +743,13 @@ msgid "" "is the only way to communicate that a blank line is expected. When :const:" "`DONT_ACCEPT_BLANKLINE` is specified, this substitution is not allowed." msgstr "" +"Par défaut, si un bloc de sortie attendue contient une ligne contenant " +"uniquement la chaîne de caractères ````, alors cette ligne sera " +"en correspondance avec une ligne vide dans la sortie réelle. Puisqu'une " +"véritable ligne vide permet de délimiter la sortie attendue, ceci est la " +"seule façon de communiquer qu'une ligne vide est souhaitée. Lorsque " +"l'option :const:`DONT_ACCEPT_BLANKLINE` est précisée, cette substitution " +"n'est pas permise." #: library/doctest.rst:551 msgid "" @@ -521,6 +760,14 @@ msgid "" "useful when a line of expected output is very long, and you want to wrap it " "across multiple lines in your source." msgstr "" +"Lorsque précisé, toutes les séquences de caractères d'espacement et de " +"caractères de saut de ligne sont traitées comme équivalentes. Toute séquence " +"de caractères d'espacement à l'intérieur de la sortie attendue correspondra " +"alors à toute séquence de caractères d'espacement à l'intérieur de la sortie " +"réelle. Par défaut, les caractères d'espacement doivent correspondre de " +"façon exacte. L'option :const:`NORMALIZE_WHITESPACE` est particulièrement " +"utile lorsqu'une ligne de sortie attendue est très longue, et que l'on " +"souhaite la répartir sur plusieurs lignes dans le fichier source." #: library/doctest.rst:562 msgid "" @@ -530,49 +777,49 @@ msgid "" "this simple. Complicated uses can lead to the same kinds of \"oops, it " "matched too much!\" surprises that ``.*`` is prone to in regular expressions." msgstr "" +"Lorsque précisé, un marqueur de points de suspension (``...``) dans la " +"sortie attendue peut correspondre à n'importe quelle partie de chaîne de " +"caractères dans la sortie réelle. Ceci inclut les parties qui traversent les " +"frontières de lignes, ainsi que les parties vides de chaînes de caractères ; " +"ainsi, il est préférable d'en faire une utilisation simple. Les usages " +"complexes mènent aux mêmes surprises du type \"oups, il y avait trop de " +"correspondances !\" que l'utilisation de ``.*`` dans les expressions " +"régulières." #: library/doctest.rst:571 msgid "" -"When specified, an example that expects an exception passes if an exception " -"of the expected type is raised, even if the exception detail does not " -"match. For example, an example expecting ``ValueError: 42`` will pass if " -"the actual exception raised is ``ValueError: 3*14``, but will fail, e.g., " -"if :exc:`TypeError` is raised." +"When specified, doctests expecting exceptions pass so long as an exception " +"of the expected type is raised, even if the details (message and fully-" +"qualified exception name) don't match." msgstr "" -#: library/doctest.rst:577 +#: library/doctest.rst:575 msgid "" -"It will also ignore the module name used in Python 3 doctest reports. Hence " -"both of these variations will work with the flag specified, regardless of " -"whether the test is run under Python 2.7 or Python 3.2 (or later versions)::" +"For example, an example expecting ``ValueError: 42`` will pass if the actual " +"exception raised is ``ValueError: 3*14``, but will fail if, say, a :exc:" +"`TypeError` is raised instead. It will also ignore any fully-qualified name " +"included before the exception class, which can vary between implementations " +"and versions of Python and the code/libraries in use. Hence, all three of " +"these variations will work with the flag specified:" msgstr "" -#: library/doctest.rst:589 +#: library/doctest.rst:597 msgid "" "Note that :const:`ELLIPSIS` can also be used to ignore the details of the " -"exception message, but such a test may still fail based on whether or not " -"the module details are printed as part of the exception name. Using :const:" -"`IGNORE_EXCEPTION_DETAIL` and the details from Python 2.3 is also the only " -"clear way to write a doctest that doesn't care about the exception detail " -"yet continues to pass under Python 2.3 or earlier (those releases do not " -"support :ref:`doctest directives ` and ignore them as " -"irrelevant comments). For example::" +"exception message, but such a test may still fail based on whether the " +"module name is present or matches exactly." msgstr "" -#: library/doctest.rst:603 -msgid "" -"passes under Python 2.3 and later Python versions with the flag specified, " -"even though the detail changed in Python 2.4 to say \"does not\" instead of " -"\"doesn't\"." -msgstr "" - -#: library/doctest.rst:607 +#: library/doctest.rst:601 msgid "" ":const:`IGNORE_EXCEPTION_DETAIL` now also ignores any information relating " "to the module containing the exception under test." msgstr "" +"Maintenant, :const:`IGNORE_EXCEPTION_DETAIL` permet aussi d'ignorer toute " +"information liée au module contenant l'exception qui est en train d'être " +"testée." -#: library/doctest.rst:614 +#: library/doctest.rst:608 msgid "" "When specified, do not run the example at all. This can be useful in " "contexts where doctest examples serve as both documentation and test cases, " @@ -580,33 +827,50 @@ msgid "" "be checked. E.g., the example's output might be random; or the example " "might depend on resources which would be unavailable to the test driver." msgstr "" +"Lorsque précisé, cesse complètement l'exécution de tous les exemples. Ceci " +"peut être utile dans des contextes où les exemples *doctest* sont à la fois " +"de la documentation et des cas de tests, et qu'un exemple doit être inclus " +"pour des raisons de documentation, mais ne devrait pas être vérifié. Par " +"exemple, la sortie de l'exemple doit être aléatoire ; ou encore, lorsque " +"l'exemple peut dépendre de ressources inatteignables pour l'exécuteur de " +"test." -#: library/doctest.rst:620 +#: library/doctest.rst:614 msgid "" "The SKIP flag can also be used for temporarily \"commenting out\" examples." msgstr "" +"L'option *SKIP* peut aussi être utilisée temporairement afin de commenter " +"des exemples et d'en empêcher l'exécution." -#: library/doctest.rst:625 +#: library/doctest.rst:619 msgid "A bitmask or'ing together all the comparison flags above." msgstr "" +"Un masque binaire effectuant une composition avec OU de toutes les options " +"de comparaisons ci-dessus." -#: library/doctest.rst:627 +#: library/doctest.rst:621 msgid "The second group of options controls how test failures are reported:" msgstr "" +"Le deuxième groupe d'options détermine comment les échecs de tests sont " +"signalés :" -#: library/doctest.rst:632 +#: library/doctest.rst:626 msgid "" "When specified, failures that involve multi-line expected and actual outputs " "are displayed using a unified diff." msgstr "" +"Lorsque précisé, les défaillances qui font intervenir des sorties attendues " +"et réelles multi-lignes sont affichées dans une *diff* unifiée." -#: library/doctest.rst:638 +#: library/doctest.rst:632 msgid "" "When specified, failures that involve multi-line expected and actual outputs " "will be displayed using a context diff." msgstr "" +"Lorsque précisé, les défaillances qui font intervenir des sorties attendues " +"et réelles multi-lignes sont affichées dans une *diff* de contexte." -#: library/doctest.rst:644 +#: library/doctest.rst:638 msgid "" "When specified, differences are computed by ``difflib.Differ``, using the " "same algorithm as the popular :file:`ndiff.py` utility. This is the only " @@ -615,8 +879,15 @@ msgid "" "output contains letter ``l``, a line is inserted with a caret marking the " "mismatching column positions." msgstr "" +"Lorsque précisé, les différences sont obtenues grâce à ``difflib.Differ``, " +"en utilisant le même algorithme que le populaire utilitaire :file:`ndiff." +"py`. Ceci est la seule méthode qui puisse faire la différence à l'intérieur " +"des lignes ainsi que parmi les lignes prises conjointement. Par exemple, si " +"une ligne de sortie attendue contient le chiffre ``1`` alors que la sortie " +"réelle contient la lettre ``l``, une ligne est insérée avec un marqueur " +"caret démarquant les positions de colonnes où il n'y a pas de correspondance." -#: library/doctest.rst:653 +#: library/doctest.rst:647 msgid "" "When specified, display the first failing example in each doctest, but " "suppress output for all remaining examples. This will prevent doctest from " @@ -626,32 +897,52 @@ msgid "" "remaining examples are still run, and still count towards the total number " "of failures reported; only the output is suppressed." msgstr "" +"Lorsque précisé, le premier exemple défaillant de chaque *doctest* est " +"affiché, mais la sortie est supprimée pour tous les autres exemples. Ceci " +"empêche *doctest* de rapporter les exemples adéquats qui échouent du fait " +"d'échecs précédents ; ceci peut aussi cacher des exemples inadéquats qui " +"échouent de façon indépendante au premier échec. Lorsque :const:" +"`REPORT_ONLY_FIRST_FAILURE` est précisé, les exemples restants sont toujours " +"exécutés, et sont toujours comptabilisés dans le nombre total des lignes " +"échouant ; seulement la sortie est omise." -#: library/doctest.rst:664 +#: library/doctest.rst:658 msgid "" "When specified, exit after the first failing example and don't attempt to " "run the remaining examples. Thus, the number of failures reported will be at " "most 1. This flag may be useful during debugging, since examples after the " "first failure won't even produce debugging output." msgstr "" +"Lorsque précisé, mettre fin à l'exécution après le premier exemple " +"défaillant et ne pas essayer d'exécuter les exemples restants. Ainsi, le " +"nombre d'échecs rapporté sera au plus un (1). Cette option peut être utile " +"durant le débogage, étant donné que les exemples suivant le premier échec ne " +"produiront aucune sortie de débogage." -#: library/doctest.rst:669 +#: library/doctest.rst:663 msgid "" "The doctest command line accepts the option ``-f`` as a shorthand for ``-o " "FAIL_FAST``." msgstr "" +"La ligne de commande de *doctest* accepte l'option ``-f`` comme un raccourci " +"de ``-o FAIL_FAST``." -#: library/doctest.rst:677 +#: library/doctest.rst:671 msgid "A bitmask or'ing together all the reporting flags above." msgstr "" +"Un masque binaire effectuant une composition avec le OU de toutes les " +"options de signalement ci-dessus." -#: library/doctest.rst:680 +#: library/doctest.rst:674 msgid "" "There is also a way to register new option flag names, though this isn't " "useful unless you intend to extend :mod:`doctest` internals via subclassing:" msgstr "" +"Il y a aussi une façon d'enregistrer des nouveaux noms d'option, quoique " +"ceci n'est pas utile sauf dans le cas où vous devez faire une extension pour " +"le code interne de :mod:`doctest` par le biais d'une sous-classe :" -#: library/doctest.rst:686 +#: library/doctest.rst:680 msgid "" "Create a new option flag with a given name, and return the new flag's " "integer value. :func:`register_optionflag` can be used when subclassing :" @@ -659,64 +950,94 @@ msgid "" "are supported by your subclasses. :func:`register_optionflag` should always " "be called using the following idiom::" msgstr "" +"Crée une nouvelle option avec un nom donné, et renvoie la valeur en nombre " +"entier de la nouvelle option. La fonction :func:`register_optionflag` peut " +"être utilisée lors de la création de sous-classes à partir de :class:" +"`OutputChecker` ou :class:`DocTestRunner` pour créer de nouvelles options " +"qui sont supportées par vos sous-classes. La fonction :func:" +"`register_optionflag` devrait toujours être appelée par l'expression " +"suivante ::" -#: library/doctest.rst:702 -#, fuzzy +#: library/doctest.rst:696 msgid "Directives" -msgstr "Directive" +msgstr "Instructions" -#: library/doctest.rst:704 +#: library/doctest.rst:698 msgid "" "Doctest directives may be used to modify the :ref:`option flags ` for an individual example. Doctest directives are special Python " "comments following an example's source code:" msgstr "" +"Les instructions *doctest* peuvent être utilisées afin de modifier les :ref:" +"`options ` pour un exemple individuel. Les instructions " +"*doctest* sont des commentaires Python spéciaux suivant le code source d'un " +"exemple :" -#: library/doctest.rst:715 +#: library/doctest.rst:709 +#, fuzzy msgid "" "Whitespace is not allowed between the ``+`` or ``-`` and the directive " "option name. The directive option name can be any of the option flag names " "explained above." msgstr "" +"Les caractères d'espacement ne sont pas permis entre les ``+`` ou les ``-`` " +"et le nom de l'option d'instruction. Le nom de l'option d'instruction peut " +"être n'importe lequel des noms d'options expliqués ci-dessus." -#: library/doctest.rst:719 +#: library/doctest.rst:713 msgid "" "An example's doctest directives modify doctest's behavior for that single " "example. Use ``+`` to enable the named behavior, or ``-`` to disable it." msgstr "" +"Les instructions d'un exemple *doctest* modifient le comportement de " +"*doctest* et ce, seulement pour cet exemple. Utilisez ``+`` pour activer le " +"comportement nommé, ou ``-`` pour le désactiver." -#: library/doctest.rst:722 +#: library/doctest.rst:716 msgid "For example, this test passes::" -msgstr "" +msgstr "Par exemple, ce test réussit ::" -#: library/doctest.rst:728 +#: library/doctest.rst:722 msgid "" "Without the directive it would fail, both because the actual output doesn't " "have two blanks before the single-digit list elements, and because the " "actual output is on a single line. This test also passes, and also requires " "a directive to do so::" msgstr "" +"Sans l'instruction, ce serait un échec, et ce, à la fois parce que la sortie " +"réelle n'a pas deux espaces vides avant les éléments de la liste formés d'un " +"seul chiffre, et aussi parce que la sortie réelle est contenue sur une seule " +"ligne. Ce test réussit aussi, et nécessite lui aussi une instruction pour ce " +"faire ::" -#: library/doctest.rst:736 +#: library/doctest.rst:730 msgid "" "Multiple directives can be used on a single physical line, separated by " "commas::" msgstr "" +"Plusieurs instructions sont utilisées sur une unique ligne physique, " +"séparées par des virgules ::" -#: library/doctest.rst:742 +#: library/doctest.rst:736 msgid "" "If multiple directive comments are used for a single example, then they are " "combined::" msgstr "" +"Si plusieurs commentaires d'instructions sont utilisés pour un exemple " +"unique, alors ils sont combinés ::" -#: library/doctest.rst:749 +#: library/doctest.rst:743 msgid "" "As the previous example shows, you can add ``...`` lines to your example " "containing only directives. This can be useful when an example is too long " "for a directive to comfortably fit on the same line::" msgstr "" +"Comme l'exemple précédent le démontre, vous pouvez ajouter des lignes " +"contenant des points de suspension ``...`` à votre exemple ne contenant que " +"des instructions. Ceci peut être utile lorsqu'un exemple est trop long pour " +"qu'une instruction puisse être écrite sur la même ligne ::" -#: library/doctest.rst:757 +#: library/doctest.rst:751 msgid "" "Note that since all options are disabled by default, and directives apply " "only to the example they appear in, enabling options (via ``+`` in a " @@ -725,12 +1046,20 @@ msgid "" "defaults. In such cases, disabling an option via ``-`` in a directive can " "be useful." msgstr "" +"Prendre note que puisque toutes les options sont désactivées par défaut, et " +"comme les instructions s'appliquent uniquement aux exemples dans lesquelles " +"elles apparaissent, activer les options (par le biais de ``+`` dans une " +"instruction) est habituellement le seul choix ayant du sens. Toutefois, les " +"options peuvent aussi être passées aux fonctions qui exécutent les " +"*doctests*, définissant de nouvelles valeurs par défaut. Dans de tels cas, " +"désactiver une option par l'utilisation de ``-`` dans une instruction peut " +"être utile." -#: library/doctest.rst:767 +#: library/doctest.rst:761 msgid "Warnings" msgstr "Avertissements" -#: library/doctest.rst:769 +#: library/doctest.rst:763 msgid "" ":mod:`doctest` is serious about requiring exact matches in expected output. " "If even a single character doesn't match, the test fails. This will " @@ -739,85 +1068,120 @@ msgid "" "doesn't guarantee that the element is printed in any particular order, so a " "test like ::" msgstr "" +"Le module :mod:`doctest` est rigoureux pour ce qui est d'inclure des " +"correspondances exactes dans la sortie attendue. Si un seul caractère ne " +"correspond pas, le test échoue. Ceci vous surprendra probablement quelques " +"fois, alors que vous apprenez exactement ce que Python garantit et ne " +"garantit pas pour qui est des sorties. Par exemple, lorsqu'on affiche un " +"ensemble (set), Python ne garantit pas que les éléments sont affichés dans " +"un ordre particulier ; ainsi un test tel que ::" -#: library/doctest.rst:778 +#: library/doctest.rst:772 msgid "is vulnerable! One workaround is to do ::" -msgstr "" +msgstr "est vulnérable ! Une alternative est de faire ::" -#: library/doctest.rst:783 +#: library/doctest.rst:777 msgid "instead. Another is to do ::" -msgstr "" +msgstr "à la place. Une autre façon de faire est ::" -#: library/doctest.rst:791 +#: library/doctest.rst:785 msgid "" "Before Python 3.6, when printing a dict, Python did not guarantee that the " "key-value pairs was printed in any particular order." msgstr "" +"Avant Python 3.6, lorsque Python affichait un *dict*, il ne garantissait pas " +"que les paires clés-valeurs suivaient un ordre particulier." -#: library/doctest.rst:794 +#: library/doctest.rst:788 msgid "There are others, but you get the idea." -msgstr "" +msgstr "Il y en a d'autres, mais vous saisissez l'idée." -#: library/doctest.rst:796 +#: library/doctest.rst:790 msgid "" "Another bad idea is to print things that embed an object address, like ::" msgstr "" +"Une autre mauvaise idée est d'afficher des choses intégrant l'adresse d'un " +"objet, comme ceci ::" -#: library/doctest.rst:804 +#: library/doctest.rst:798 msgid "" "The :const:`ELLIPSIS` directive gives a nice approach for the last example::" msgstr "" +"L'instruction :const:`ELLIPSIS` donne une approche sympathique pour le " +"dernier exemple ::" -#: library/doctest.rst:809 +#: library/doctest.rst:803 msgid "" "Floating-point numbers are also subject to small output variations across " "platforms, because Python defers to the platform C library for float " "formatting, and C libraries vary widely in quality here. ::" msgstr "" +"Les nombres à virgule flottante sont aussi sujets à de petites variations à " +"la sortie, tout dépendamment de la plateforme utilisée, étant donné que " +"Python s'en remet à la bibliothèque de la plateforme C pour la mise-en-forme " +"des *floats*, et les bibliothèques C varient grandement pour ce qui de leur " +"qualité sur ce point. ::" -#: library/doctest.rst:820 +#: library/doctest.rst:814 +#, fuzzy msgid "" "Numbers of the form ``I/2.**J`` are safe across all platforms, and I often " "contrive doctest examples to produce numbers of that form::" msgstr "" +"Les nombres ayant la forme ``I/2.**J`` sont sécuritaires pour toutes les " +"plateformes, et je restreins souvent les exemples *doctest* à produire des " +"nombres ayant cette forme ::" -#: library/doctest.rst:826 +#: library/doctest.rst:820 msgid "" "Simple fractions are also easier for people to understand, and that makes " "for better documentation." msgstr "" +"Les fractions simples sont aussi plus faciles à comprendre, et cela fait une " +"meilleure documentation." -#: library/doctest.rst:833 +#: library/doctest.rst:827 msgid "Basic API" -msgstr "" +msgstr "API de base" -#: library/doctest.rst:835 +#: library/doctest.rst:829 msgid "" "The functions :func:`testmod` and :func:`testfile` provide a simple " "interface to doctest that should be sufficient for most basic uses. For a " "less formal introduction to these two functions, see sections :ref:`doctest-" "simple-testmod` and :ref:`doctest-simple-testfile`." msgstr "" +"Les fonctions :func:`testmod` et :func:`testfile` fournissent une interface " +"simple pour *doctest* qui est suffisante pour les cas d'usage les plus " +"élémentaires. Pour une introduction moins formelle à ces deux fonctions, " +"voir les sections :ref:`doctest-simple-testmod` et :ref:`doctest-simple-" +"testfile`." -#: library/doctest.rst:843 +#: library/doctest.rst:837 msgid "" "All arguments except *filename* are optional, and should be specified in " "keyword form." msgstr "" +"Tous les arguments sauf *filename* sont optionnels, et doivent être précisés " +"sous forme lettrée." -#: library/doctest.rst:846 +#: library/doctest.rst:840 msgid "" "Test examples in the file named *filename*. Return ``(failure_count, " "test_count)``." msgstr "" +"Teste les exemples dans le fichier nommé *filename*. Renvoie " +"``(failure_count, test_count)``." -#: library/doctest.rst:849 +#: library/doctest.rst:843 msgid "" "Optional argument *module_relative* specifies how the filename should be " "interpreted:" msgstr "" +"L'argument optionnel *module_relative* précise comment le nom de fichier " +"doit être interprété :" -#: library/doctest.rst:852 +#: library/doctest.rst:846 msgid "" "If *module_relative* is ``True`` (the default), then *filename* specifies an " "OS-independent module-relative path. By default, this path is relative to " @@ -826,21 +1190,34 @@ msgid "" "should use ``/`` characters to separate path segments, and may not be an " "absolute path (i.e., it may not begin with ``/``)." msgstr "" +"Si *module_relative* prend la valeur ``True`` (la valeur par défaut), alors " +"*filename* précise un chemin relatif au module qui soit indépendant du " +"système d'exploitation (*OS*). Par défaut, ce chemin est relatif au " +"répertoire du module appelant ; mais si l'argument *package* est précisé, " +"alors il est relatif à ce paquet. Pour garantir l'indépendance quant au " +"système d'exploitation, *filename* doit utiliser des caractères ``/`` pour " +"séparer chaque segment de chemin, et ne peut pas être un chemin absolu " +"(c'est-à-dire qu'il ne peut pas commencer par ``/``)." -#: library/doctest.rst:859 +#: library/doctest.rst:853 msgid "" "If *module_relative* is ``False``, then *filename* specifies an OS-specific " "path. The path may be absolute or relative; relative paths are resolved " "with respect to the current working directory." msgstr "" +"Si *module_relative* prend la valeur ``False``, alors *filename* précise un " +"chemin en fonction du système d'exploitation. Le chemin peut être absolu ou " +"relatif ; les chemins relatifs sont résolus en rapport au répertoire actif." -#: library/doctest.rst:863 +#: library/doctest.rst:857 msgid "" "Optional argument *name* gives the name of the test; by default, or if " "``None``, ``os.path.basename(filename)`` is used." msgstr "" +"L'option *name* désigne le nom du test ; par défaut, ou si ``None`` est " +"passé en argument, ``os.path.basename(filename)`` est utilisé." -#: library/doctest.rst:866 +#: library/doctest.rst:860 msgid "" "Optional argument *package* is a Python package or the name of a Python " "package whose directory should be used as the base directory for a module-" @@ -848,16 +1225,26 @@ msgid "" "directory is used as the base directory for module-relative filenames. It " "is an error to specify *package* if *module_relative* is ``False``." msgstr "" +"L'option *package* est un paquet Python ou le nom d'un paquet Python dont le " +"répertoire doit être utilisé comme le répertoire principal pour un nom de " +"fichier lié à un module. Si aucun paquet n'est spécifié, le répertoire du " +"module appelé à l'exécution est utilisé comme le répertoire principal pour " +"les noms de fichiers liés au module. C'est une erreur que de spécifier " +"*package* si *module_relative* a ``False`` comme valeur." -#: library/doctest.rst:872 +#: library/doctest.rst:866 msgid "" "Optional argument *globs* gives a dict to be used as the globals when " "executing examples. A new shallow copy of this dict is created for the " "doctest, so its examples start with a clean slate. By default, or if " "``None``, a new empty dict is used." msgstr "" +"L'option *globs* spécifie un *dict* à utiliser comme *globals* lorsque des " +"exemples sont exécutés. Une copie superficielle de ce *dict* est créée pour " +"le *doctest* ; ainsi, ces exemples commencent avec un état vide. Par défaut, " +"ou si ``None`` est passé en argument, un nouveau *dict* vide est utilisé." -#: library/doctest.rst:877 +#: library/doctest.rst:871 msgid "" "Optional argument *extraglobs* gives a dict merged into the globals used to " "execute examples. This works like :meth:`dict.update`: if *globs* and " @@ -869,85 +1256,131 @@ msgid "" "passing an *extraglobs* dict mapping the generic name to the subclass to be " "tested." msgstr "" +"L'option *extraglobs* spécifie un *dict* intégré dans les variables globales " +"utilisées pour exécuter l'exemple. Ceci fonctionne comme :meth:`dict." +"update` : si *globs* et *extraglobs* ont une clé commune, la valeur associée " +"à *extraglobs* apparaît dans le *dict* combiné. Par défaut, ou si ``None`` " +"est passé en argument, aucune variable globale supplémentaire est utilisée. " +"Ceci est une fonctionnalité avancée qui permet la configuration des " +"*doctests*. Par exemple, un *doctest* peut être rédigé pour une classe de " +"base, en utilisant un nom générique pour la classe, puis réutilisé afin de " +"tester un nombre indéfini de sous-classes en passant un *dict* *extraglobs* " +"reliant le nom générique à la sous-classe qui doit être testée." -#: library/doctest.rst:886 +#: library/doctest.rst:880 msgid "" "Optional argument *verbose* prints lots of stuff if true, and prints only " "failures if false; by default, or if ``None``, it's true if and only if ``'-" "v'`` is in ``sys.argv``." msgstr "" +"L'option *verbose* affiche une grande quantité d'information si elle est " +"vraie, et affiche uniquement les défaillances si elle est fausse ; par " +"défaut, ou si ``None``, celle-ci est vraie si et seulement si ``-v`` est " +"présent dans ``sys.argv``." -#: library/doctest.rst:890 +#: library/doctest.rst:884 msgid "" "Optional argument *report* prints a summary at the end when true, else " "prints nothing at the end. In verbose mode, the summary is detailed, else " "the summary is very brief (in fact, empty if all tests passed)." msgstr "" +"L'option *report* affiche un résumé à la fin lorsque vraie ; sinon, rien " +"n'est affiché à la fin. En mode *verbose*, le résumé est détaillé, sinon le " +"résumé est très bref (en fait, vide si tous les tests ont réussi)." -#: library/doctest.rst:894 +#: library/doctest.rst:888 msgid "" "Optional argument *optionflags* (default value 0) takes the :ref:`bitwise OR " "` of option flags. See section :ref:`doctest-options`." msgstr "" +"L'option *optionflags* (dont la valeur par défaut est de zéro) calcule la " +"valeur :ref:`bitwise OR ` des options de ligne de commande. Voir la " +"section :ref:`doctest-options`." -#: library/doctest.rst:898 +#: library/doctest.rst:892 msgid "" "Optional argument *raise_on_error* defaults to false. If true, an exception " "is raised upon the first failure or unexpected exception in an example. " "This allows failures to be post-mortem debugged. Default behavior is to " "continue running examples." msgstr "" +"L'option *raise_on_error* est fausse par défaut. Si elle est vraie, une " +"exception est levée à la première défaillance ou à la première exception qui " +"ne soit prévue dans l'exemple. Ceci permet aux défaillances d'être analysées " +"lors d'un post-mortem. Le comportement par défaut est de poursuivre " +"l'exécution des exemples." -#: library/doctest.rst:1043 +#: library/doctest.rst:1037 msgid "" "Optional argument *parser* specifies a :class:`DocTestParser` (or subclass) " "that should be used to extract tests from the files. It defaults to a " "normal parser (i.e., ``DocTestParser()``)." msgstr "" +"L'option *parser* définit une classe ou une sous-classe :class:" +"`DocTestParser` qui doit être utilisée pour extraire les tests des fichiers. " +"Par défaut, on utilise un analyseur normal (c'est-à-dire, " +"``DocTestParser()``)." -#: library/doctest.rst:1047 +#: library/doctest.rst:1041 msgid "" "Optional argument *encoding* specifies an encoding that should be used to " "convert the file to unicode." msgstr "" +"L'option *encoding* définit un encodage à utiliser pour convertir le fichier " +"en format *unicode*." -#: library/doctest.rst:913 +#: library/doctest.rst:907 msgid "" "All arguments are optional, and all except for *m* should be specified in " "keyword form." msgstr "" +"Toutes les options sont facultatives, et toutes sauf *m* doivent être " +"définies en format lettré." -#: library/doctest.rst:916 +#: library/doctest.rst:910 msgid "" "Test examples in docstrings in functions and classes reachable from module " "*m* (or module :mod:`__main__` if *m* is not supplied or is ``None``), " "starting with ``m.__doc__``." msgstr "" +"Ceci teste les exemples en *docstrings* dans les fonctions et les classes " +"accessibles depuis le module *m* (ou depuis le module :mod:`__main__` si *m* " +"n'a pas été défini ou est ``None``), en commençant par ``m.__doc__``." -#: library/doctest.rst:920 +#: library/doctest.rst:914 msgid "" "Also test examples reachable from dict ``m.__test__``, if it exists and is " "not ``None``. ``m.__test__`` maps names (strings) to functions, classes and " "strings; function and class docstrings are searched for examples; strings " "are searched directly, as if they were docstrings." msgstr "" +"Ceci teste aussi les exemples accessibles depuis le *dict* ``m.__test__``, " +"si et seulement s'il existe et qu'il n'est pas ``None``. Le *dict* ``m." +"__test__`` associe des noms (chaînes de caractères) à des fonctions, des " +"classes et des chaînes de caractères ; les *docstrings* de fonctions et de " +"classes sont fouillées pour des exemples ; les chaînes de caractères sont " +"fouillées directement, comme si elles étaient des *docstrings*." -#: library/doctest.rst:925 +#: library/doctest.rst:919 msgid "" "Only docstrings attached to objects belonging to module *m* are searched." msgstr "" +"Seulement les *docstrings* attribuées à des objets appartenant au module *m* " +"sont fouillées." -#: library/doctest.rst:927 +#: library/doctest.rst:921 msgid "Return ``(failure_count, test_count)``." -msgstr "" +msgstr "Renvoie ``(failure_count, test_count)``." -#: library/doctest.rst:929 +#: library/doctest.rst:923 msgid "" "Optional argument *name* gives the name of the module; by default, or if " "``None``, ``m.__name__`` is used." msgstr "" +"L'option *name* donne le nom du module ; par défaut, ou si ``None``, ``m." +"__name__`` est utilisé." -#: library/doctest.rst:932 +#: library/doctest.rst:926 msgid "" "Optional argument *exclude_empty* defaults to false. If true, objects for " "which no doctests are found are excluded from consideration. The default is " @@ -956,57 +1389,83 @@ msgid "" "output for objects with no tests. The *exclude_empty* argument to the newer :" "class:`DocTestFinder` constructor defaults to true." msgstr "" +"L'option *exclude_empty* prend la valeur faux par défaut. Si la valeur est " +"vraie, les objets pour lesquels aucun *doctest* n'est trouvé ne sont pas " +"pris en compte. Le défaut est un bricolage permettant la compatibilité à " +"rebours, de façon à ce que le code qui utilise toujours :meth:`doctest." +"master.summarize` en conjonction avec :func:`testmod` puisse continuer " +"d'obtenir des sorties pour les objets n'ayant aucun test. L'option " +"*exclude_empty* dans le constructeur de la classe plus récente :class:" +"`DocTestFinder` prend vrai comme valeur par défaut." -#: library/doctest.rst:939 +#: library/doctest.rst:933 msgid "" "Optional arguments *extraglobs*, *verbose*, *report*, *optionflags*, " "*raise_on_error*, and *globs* are the same as for function :func:`testfile` " "above, except that *globs* defaults to ``m.__dict__``." msgstr "" +"Les options *extraglobs*, *verbose*, *report*, *optionflags*, " +"*raise_on_error*, et *globs* sont les mêmes que pour la fonction :func:" +"`testfile` ci-dessus, sauf pour *globs*, qui est ``m.__dict__`` par défaut." -#: library/doctest.rst:946 +#: library/doctest.rst:940 msgid "" "Test examples associated with object *f*; for example, *f* may be a string, " "a module, a function, or a class object." msgstr "" +"Les exemples de test associés à l'objet *f* ; par exemple, *f* peut être une " +"chaîne de caractères, un module, une fonction, ou un objet de classe." -#: library/doctest.rst:949 +#: library/doctest.rst:943 msgid "" "A shallow copy of dictionary argument *globs* is used for the execution " "context." msgstr "" +"Une copie superficielle de l'argument-dictionnaire *globs* est utilisée pour " +"le contexte d'exécution." -#: library/doctest.rst:951 +#: library/doctest.rst:945 msgid "" -"Optional argument *name* is used in failure messages, and defaults to ``" -"\"NoName\"``." +"Optional argument *name* is used in failure messages, and defaults to " +"``\"NoName\"``." msgstr "" +"L'option *name* est utilisée pour les messages d'échec, et prend " +"``\"NoName\"`` comme valeur par défaut." -#: library/doctest.rst:954 +#: library/doctest.rst:948 msgid "" "If optional argument *verbose* is true, output is generated even if there " "are no failures. By default, output is generated only in case of an example " "failure." msgstr "" +"Si l'option *verbose* est vraie, les sorties sont générées même s'il n'y a " +"aucun échec. Par défaut, la sortie est générée seulement si un exemple " +"échoue." -#: library/doctest.rst:957 +#: library/doctest.rst:951 msgid "" "Optional argument *compileflags* gives the set of flags that should be used " "by the Python compiler when running the examples. By default, or if " "``None``, flags are deduced corresponding to the set of future features " "found in *globs*." msgstr "" +"L'option *compileflags* donne l'ensemble des options qui doit être utilisée " +"par le compilateur Python lorsqu'il exécute les exemples. Par défaut, ou si " +"``None``, les options sont inférées à partir de l'ensemble des " +"fonctionnalités futures trouvées dans *globs*." -#: library/doctest.rst:961 +#: library/doctest.rst:955 msgid "" "Optional argument *optionflags* works as for function :func:`testfile` above." msgstr "" +"L'option *optionflags* fonctionne similairement à la fonction :func:" +"`testfile` ci-dessus." -#: library/doctest.rst:967 +#: library/doctest.rst:961 msgid "Unittest API" -msgstr "" +msgstr "API de tests unitaires" -#: library/doctest.rst:969 +#: library/doctest.rst:963 msgid "" "As your collection of doctest'ed modules grows, you'll want a way to run all " "their doctests systematically. :mod:`doctest` provides two functions that " @@ -1014,20 +1473,33 @@ msgid "" "files containing doctests. To integrate with :mod:`unittest` test " "discovery, include a :func:`load_tests` function in your test module::" msgstr "" +"Au fur et à mesure que la collection de modules testés avec *doctest* " +"s'agrandira, vous allez souhaiter avoir une façon d'exécuter " +"systématiquement tous les *doctests*. Le module :mod:`doctest` fournit deux " +"fonctions qui peuvent être utilisées afin de créer des suites de tests " +"unitaires :mod:`unittest` à partir des modules et des fichiers textes " +"contenant des *doctests*. Afin d'intégrer la découverte fournie par :mod:" +"`unittest`, il suffit d'ajouter une fonction :func:`load_tests` dans votre " +"module de test ::" -#: library/doctest.rst:983 +#: library/doctest.rst:977 msgid "" "There are two main functions for creating :class:`unittest.TestSuite` " "instances from text files and modules with doctests:" msgstr "" +"Il y a deux fonctions principales pour créer des instances de la classe :" +"class:`unittest.TestSuite` à partir de fichiers textes et de modules ayant " +"des *doctests* :" -#: library/doctest.rst:989 +#: library/doctest.rst:983 msgid "" "Convert doctest tests from one or more text files to a :class:`unittest." "TestSuite`." msgstr "" +"Convertit des tests *doctest* à partir d'un ou plusieurs fichiers vers une " +"classe :class:`unittest.TestSuite`." -#: library/doctest.rst:992 +#: library/doctest.rst:986 msgid "" "The returned :class:`unittest.TestSuite` is to be run by the unittest " "framework and runs the interactive examples in each file. If an example in " @@ -1035,22 +1507,32 @@ msgid "" "`failureException` exception is raised showing the name of the file " "containing the test and a (sometimes approximate) line number." msgstr "" +"La classe renvoyée :class:`unittest.TestSuite` doit être exécutée dans le " +"cadriciel de tests unitaires et exécute les exemples interactifs trouvés " +"dans chaque fichier. Si un exemple de n'importe quel fichier échoue, alors " +"le test unitaire de synthèse échoue aussi, et une exception :exc:" +"`failureException` est levée, affichant le nom du fichier contenant le test " +"et un numéro de ligne (celui-ci est parfois approximatif)." -#: library/doctest.rst:998 +#: library/doctest.rst:992 msgid "Pass one or more paths (as strings) to text files to be examined." msgstr "" +"Passe un ou plusieurs chemins (sous forme de chaînes de caractères) à des " +"fichiers textes afin d'être vérifiés." -#: library/doctest.rst:1000 +#: library/doctest.rst:994 msgid "Options may be provided as keyword arguments:" -msgstr "" +msgstr "Les options peuvent être fournies comme des options lettrées :" -#: library/doctest.rst:1002 +#: library/doctest.rst:996 msgid "" "Optional argument *module_relative* specifies how the filenames in *paths* " "should be interpreted:" msgstr "" +"L'option *module_relative* précise comment les noms de fichiers dans *paths* " +"doivent être interprétés :" -#: library/doctest.rst:1005 +#: library/doctest.rst:999 msgid "" "If *module_relative* is ``True`` (the default), then each filename in " "*paths* specifies an OS-independent module-relative path. By default, this " @@ -1060,15 +1542,26 @@ msgid "" "segments, and may not be an absolute path (i.e., it may not begin with ``/" "``)." msgstr "" +"Si *module_relative* a ``True`` comme valeur (valeur par défaut), alors " +"chaque nom de fichier dans *paths* précise un chemin relatif au module qui " +"soit indépendant du système d'exploitation. Par défaut, ce chemin est " +"relatif au répertoire du module appelant ; mais si l'option *package* est " +"précisée, alors il est relatif à ce paquet. Afin de garantir l'indépendance " +"face au système d'exploitation, chaque nom de fichier doit utiliser des " +"caractères ``/`` afin de séparer les segments de chemin, et ne peut pas être " +"un chemin absolu (c'est-à-dire, il ne peut pas commencer par ``/``)." -#: library/doctest.rst:1013 +#: library/doctest.rst:1007 msgid "" "If *module_relative* is ``False``, then each filename in *paths* specifies " "an OS-specific path. The path may be absolute or relative; relative paths " "are resolved with respect to the current working directory." msgstr "" +"Si *module_relative* prend la valeur ``False``, alors *filename* précise un " +"chemin en fonction du système d'exploitation. Le chemin peut être absolu ou " +"relatif ; les chemins relatifs sont résolus en rapport au répertoire actif." -#: library/doctest.rst:1017 +#: library/doctest.rst:1011 msgid "" "Optional argument *package* is a Python package or the name of a Python " "package whose directory should be used as the base directory for module-" @@ -1077,49 +1570,79 @@ msgid "" "filenames. It is an error to specify *package* if *module_relative* is " "``False``." msgstr "" +"L'option *package* est un paquet Python ou le nom d'un paquet Python dont le " +"répertoire dont être utilisé comme le répertoire principal pour un nom de " +"fichier dans *paths* qui soit lié à un module. Si aucun paquet n'est " +"spécifié, le répertoire du module appelé à l'exécution est utilisé comme le " +"répertoire principal pour les noms de fichiers liés au module. C'est une " +"erreur que de spécifier *package* si *module_relative* a ``False`` comme " +"valeur." -#: library/doctest.rst:1024 +#: library/doctest.rst:1018 msgid "" "Optional argument *setUp* specifies a set-up function for the test suite. " "This is called before running the tests in each file. The *setUp* function " "will be passed a :class:`DocTest` object. The setUp function can access the " "test globals as the *globs* attribute of the test passed." msgstr "" +"L'option *setUp* précise une fonction de mise-en-place pour la suite de " +"tests. Ceci est appelé avant l'exécution des tests dans chaque fichier. La " +"fonction *setUp* est passée à un objet :class:`DocTest`. La fonction *setUp* " +"peut accéder aux valeurs globales du test par le biais de l'attribut *globs* " +"du test passé." -#: library/doctest.rst:1029 +#: library/doctest.rst:1023 msgid "" "Optional argument *tearDown* specifies a tear-down function for the test " "suite. This is called after running the tests in each file. The *tearDown* " "function will be passed a :class:`DocTest` object. The setUp function can " "access the test globals as the *globs* attribute of the test passed." msgstr "" +"L'option *tearDown* précise une fonction de démolition pour la suite de " +"tests. Celle-ci est appelée après avoir exécuté les tests dans chaque " +"fichier. La fonction *tearDown* est passée à un objet :class:`DocTest`. La " +"fonction *setUp* peut accéder aux valeurs globales du test par l'attribut " +"*globs* du test passé." -#: library/doctest.rst:1068 +#: library/doctest.rst:1062 msgid "" "Optional argument *globs* is a dictionary containing the initial global " "variables for the tests. A new copy of this dictionary is created for each " "test. By default, *globs* is a new empty dictionary." msgstr "" +"L'option *globs* est un dictionnaire contenant les variables globales " +"initiales pour les tests. Une nouvelle copie de ce dictionnaire est créée " +"pour chaque test. Par défaut, *globs* est un nouveau dictionnaire vide." -#: library/doctest.rst:1038 +#: library/doctest.rst:1032 msgid "" "Optional argument *optionflags* specifies the default doctest options for " "the tests, created by or-ing together individual option flags. See section :" "ref:`doctest-options`. See function :func:`set_unittest_reportflags` below " "for a better way to set reporting options." msgstr "" +"Les options *optionflags* précisent les options par défaut de *doctest* pour " +"les tests, créées en composant par un OU les différentes options " +"individuelles. Voir la section :ref:`doctest-options`. Voir la fonction :" +"func:`set_unittest_reportflags` ci-dessous pour une meilleure façon de " +"préciser des options de rapport." -#: library/doctest.rst:1050 +#: library/doctest.rst:1044 msgid "" "The global ``__file__`` is added to the globals provided to doctests loaded " "from a text file using :func:`DocFileSuite`." msgstr "" +"La valeur globale ``__file__`` est ajoutée aux valeurs globales fournies par " +"les *doctests*, ceux-ci étant téléchargés d'un fichier texte utilisant la " +"fonction :func:`DocFileSuite`." -#: library/doctest.rst:1056 +#: library/doctest.rst:1050 msgid "Convert doctest tests for a module to a :class:`unittest.TestSuite`." msgstr "" +"Convertit les tests *doctest* pour un module donné à une classe :class:" +"`unittest.TestSuite`." -#: library/doctest.rst:1058 +#: library/doctest.rst:1052 msgid "" "The returned :class:`unittest.TestSuite` is to be run by the unittest " "framework and runs each doctest in the module. If any of the doctests fail, " @@ -1127,43 +1650,64 @@ msgid "" "exception is raised showing the name of the file containing the test and a " "(sometimes approximate) line number." msgstr "" +"La classe renvoyée :class:`unittest.TestSuite` doit être exécutée par le " +"cadriciel de test unitaire, afin d'exécuter chaque *doctest* dans le module. " +"Si n'importe lequel des *doctests* échoue, alors le test unitaire de " +"synthèse échoue, et une exception :exc:`failureException` est levée, " +"affichant le nom du fichier contenant le test et un numéro de ligne pouvant " +"être approximatif." -#: library/doctest.rst:1064 +#: library/doctest.rst:1058 msgid "" "Optional argument *module* provides the module to be tested. It can be a " "module object or a (possibly dotted) module name. If not specified, the " "module calling this function is used." msgstr "" +"L'option *module* fournit le module qui sera testé. Il peut prendre la forme " +"d'un objet-module ou celle du nom d'un module (possiblement *dotted*). Si " +"non-précisée, le module appelant cette fonction est utilisé." -#: library/doctest.rst:1072 +#: library/doctest.rst:1066 msgid "" "Optional argument *extraglobs* specifies an extra set of global variables, " "which is merged into *globs*. By default, no extra globals are used." msgstr "" +"L'option *extraglobs* précise un ensemble supplémentaire de variables " +"globales, à fusionner avec *globs*. Par défaut, aucune variable globale " +"supplémentaire est utilisée." -#: library/doctest.rst:1075 +#: library/doctest.rst:1069 msgid "" "Optional argument *test_finder* is the :class:`DocTestFinder` object (or a " "drop-in replacement) that is used to extract doctests from the module." msgstr "" +"L'option *test_finder* est l'instance de :class:`DocTestFinder` (ou un " +"remplacement *drop-in*) qui est utilisée pour extraire les *doctests* à " +"partir du module." -#: library/doctest.rst:1078 +#: library/doctest.rst:1072 msgid "" "Optional arguments *setUp*, *tearDown*, and *optionflags* are the same as " "for function :func:`DocFileSuite` above." msgstr "" +"Les options *setUp*, *tearDown* et *optionflags* sont les mêmes que pour la " +"fonction :func:`DocFileSuite` ci-dessus." -#: library/doctest.rst:1081 +#: library/doctest.rst:1075 msgid "This function uses the same search technique as :func:`testmod`." msgstr "" +"Cette fonction utilise la même technique de recherche que :func:`testmod`." -#: library/doctest.rst:1083 +#: library/doctest.rst:1077 msgid "" ":func:`DocTestSuite` returns an empty :class:`unittest.TestSuite` if " "*module* contains no docstrings instead of raising :exc:`ValueError`." msgstr "" +"La fonction :func:`DocTestSuite` renvoie une instance vide de la classe :" +"class:`unittest.TestSuite` si *module* ne contient aucune *docstring*, et " +"ce, au lieu de lever l'exception :exc:`ValueError`." -#: library/doctest.rst:1088 +#: library/doctest.rst:1082 msgid "" "Under the covers, :func:`DocTestSuite` creates a :class:`unittest.TestSuite` " "out of :class:`doctest.DocTestCase` instances, and :class:`DocTestCase` is a " @@ -1171,15 +1715,24 @@ msgid "" "documented here (it's an internal detail), but studying its code can answer " "questions about the exact details of :mod:`unittest` integration." msgstr "" +"Sous le capot, :func:`DocTestSuite` crée une classe :class:`unittest." +"TestSuite` à partir d'instances de :class:`doctest.DocTestCase` ; de plus, :" +"class:`DocTestCase` est une sous-classe de :class:`unittest.TestCase`. La " +"classe :class:`DocTestCase` n'est pas documentée ici (c'est un détail " +"interne), mais l'étude de son code peut répondre à des questions concernant " +"les détails exacts de l'intégration du module :mod:`doctest`." -#: library/doctest.rst:1094 +#: library/doctest.rst:1088 msgid "" "Similarly, :func:`DocFileSuite` creates a :class:`unittest.TestSuite` out " "of :class:`doctest.DocFileCase` instances, and :class:`DocFileCase` is a " "subclass of :class:`DocTestCase`." msgstr "" +"De la même façon, :func:`DocFileSuite` crée une classe :class:`unittest." +"TestSuite` à partir des instances :class:`doctest.DocFileCase`, où :class:" +"`DocFileCase` est une sous-classe de :class:`DocTestCase`." -#: library/doctest.rst:1098 +#: library/doctest.rst:1092 msgid "" "So both ways of creating a :class:`unittest.TestSuite` run instances of :" "class:`DocTestCase`. This is important for a subtle reason: when you run :" @@ -1191,24 +1744,43 @@ msgid "" "specified by command line options), but there's no way to pass options " "through :mod:`unittest` to :mod:`doctest` test runners." msgstr "" - -#: library/doctest.rst:1108 +"Ainsi, les deux façons de créer une :class:`unittest.TestSuite` utilisent " +"des instances de la classe :class:`DocTestCase`. Ceci est important pour une " +"raison subtile : lorsque vous exécutez par vous-même des fonctions :mod:" +"`doctest`, vous pouvez contrôler les options :mod:`doctest` qui sont " +"utilisées de façon directe, en passant des options aux fonctions :mod:" +"`doctest`. Toutefois, si vous écrivez un cadriciel :mod:`unittest`, alors :" +"mod:`unittest` a le contrôle final de quand et de comment les tests sont " +"exécutés. La personne qui écrit le cadriciel souhaite habituellement " +"contrôler les options de rapport de :mod:`doctest` (qui sont peut-être, par " +"exemple, spécifiées en options de ligne de commande), sauf qu'il n'y a pas " +"de moyen de spécifier des options à l'attention des exécuteurs de test de :" +"mod:`doctest` à partir de :mod:`unittest`." + +#: library/doctest.rst:1102 msgid "" "For this reason, :mod:`doctest` also supports a notion of :mod:`doctest` " "reporting flags specific to :mod:`unittest` support, via this function:" msgstr "" +"Pour cette raison, :mod:`doctest` implémente le concept d'options de rapport " +"de :mod:`doctest` qui soit spécifique à :mod:`unittest`, par le biais de " +"cette fonction :" -#: library/doctest.rst:1114 +#: library/doctest.rst:1108 msgid "Set the :mod:`doctest` reporting flags to use." msgstr "" +"Voir les options de ligne de commandes de :mod:`doctest` pour l'utilisation." -#: library/doctest.rst:1116 +#: library/doctest.rst:1110 msgid "" "Argument *flags* takes the :ref:`bitwise OR ` of option flags. See " "section :ref:`doctest-options`. Only \"reporting flags\" can be used." msgstr "" +"L'argument *flags* prend la :ref:`composition OU bit à bit ` des " +"arguments. Voir la section :ref:`doctest-options`. Ce sont uniquement les " +"\"options de rapport\" qui peuvent être utilisées." -#: library/doctest.rst:1119 +#: library/doctest.rst:1113 msgid "" "This is a module-global setting, and affects all future doctests run by " "module :mod:`unittest`: the :meth:`runTest` method of :class:`DocTestCase` " @@ -1221,18 +1793,32 @@ msgid "" "were specified when the :class:`DocTestCase` instance was constructed, :mod:" "`doctest`'s :mod:`unittest` reporting flags are ignored." msgstr "" - -#: library/doctest.rst:1130 +"Ceci est un paramètre au niveau global du module, et affecte tous les futurs " +"*doctests* exécutés par le module :mod:`unittest` : la méthode :meth:" +"`runTest` de :class:`DocTestCase` prend en compte les options précisées pour " +"le cas de test lorsque l'instance de la classe :class:`DocTestCase` a été " +"construite. Si aucune option de rapport n'a été précisée (ce qui est le cas " +"typique et attendu), les options de rapport du module :mod:`unitest` de :mod:" +"`doctest` sont :ref:`` vers les options, et " +"les options obtenues sont passées à l'instance de la classe :class:" +"`DocTestRunner` créée pour exécuter le *doctest*. Si une seule option de " +"rapport a été précisée lorsque l'instance de :class:`DocTestCase` a été " +"construite, les options de rapport du module :mod:`unittest` de :mod:" +"`doctest` sont ignorées." + +#: library/doctest.rst:1124 msgid "" "The value of the :mod:`unittest` reporting flags in effect before the " "function was called is returned by the function." msgstr "" +"La valeur prise par les options de rapport de :mod:`unittest` et ce, avant " +"que la fonction n'ait été appelée, est renvoyée par la fonction." -#: library/doctest.rst:1137 +#: library/doctest.rst:1131 msgid "Advanced API" -msgstr "" +msgstr "API avancé" -#: library/doctest.rst:1139 +#: library/doctest.rst:1133 msgid "" "The basic API is a simple wrapper that's intended to make doctest easy to " "use. It is fairly flexible, and should meet most users' needs; however, if " @@ -1240,85 +1826,91 @@ msgid "" "doctest's capabilities, then you should use the advanced API." msgstr "" -#: library/doctest.rst:1144 +#: library/doctest.rst:1138 msgid "" "The advanced API revolves around two container classes, which are used to " "store the interactive examples extracted from doctest cases:" msgstr "" -#: library/doctest.rst:1147 +#: library/doctest.rst:1141 msgid "" ":class:`Example`: A single Python :term:`statement`, paired with its " "expected output." msgstr "" +":class:`Example` : Un unique :term:`statement` Python, pris conjointement " +"avec sa sortie attendue." -#: library/doctest.rst:1150 +#: library/doctest.rst:1144 msgid "" ":class:`DocTest`: A collection of :class:`Example`\\ s, typically extracted " "from a single docstring or text file." msgstr "" +":class:`DocTest` : Une collection de :class:`Example`, habituellement " +"extraits d'une seule *docstring* ou fichier texte." -#: library/doctest.rst:1153 +#: library/doctest.rst:1147 msgid "" "Additional processing classes are defined to find, parse, and run, and check " "doctest examples:" msgstr "" -#: library/doctest.rst:1156 +#: library/doctest.rst:1150 msgid "" ":class:`DocTestFinder`: Finds all docstrings in a given module, and uses a :" "class:`DocTestParser` to create a :class:`DocTest` from every docstring that " "contains interactive examples." msgstr "" -#: library/doctest.rst:1160 +#: library/doctest.rst:1154 msgid "" ":class:`DocTestParser`: Creates a :class:`DocTest` object from a string " "(such as an object's docstring)." msgstr "" -#: library/doctest.rst:1163 +#: library/doctest.rst:1157 msgid "" ":class:`DocTestRunner`: Executes the examples in a :class:`DocTest`, and " "uses an :class:`OutputChecker` to verify their output." msgstr "" -#: library/doctest.rst:1166 +#: library/doctest.rst:1160 msgid "" ":class:`OutputChecker`: Compares the actual output from a doctest example " "with the expected output, and decides whether they match." msgstr "" -#: library/doctest.rst:1169 +#: library/doctest.rst:1163 msgid "" "The relationships among these processing classes are summarized in the " "following diagram::" msgstr "" -#: library/doctest.rst:1185 +#: library/doctest.rst:1179 msgid "DocTest Objects" -msgstr "" +msgstr "Objets *doctest*" -#: library/doctest.rst:1190 +#: library/doctest.rst:1184 msgid "" "A collection of doctest examples that should be run in a single namespace. " "The constructor arguments are used to initialize the attributes of the same " "names." msgstr "" -#: library/doctest.rst:1194 +#: library/doctest.rst:1188 msgid "" ":class:`DocTest` defines the following attributes. They are initialized by " "the constructor, and should not be modified directly." msgstr "" +":class:`DocTest` définit les attributs suivants. Ils sont initialisés par le " +"constructeur, et ne doivent pas être modifiés directement." -#: library/doctest.rst:1200 +#: library/doctest.rst:1194 msgid "" "A list of :class:`Example` objects encoding the individual interactive " "Python examples that should be run by this test." msgstr "" -#: library/doctest.rst:1206 +#: library/doctest.rst:1200 msgid "" "The namespace (aka globals) that the examples should be run in. This is a " "dictionary mapping names to values. Any changes to the namespace made by " @@ -1326,57 +1918,57 @@ msgid "" "`globs` after the test is run." msgstr "" -#: library/doctest.rst:1214 +#: library/doctest.rst:1208 msgid "" "A string name identifying the :class:`DocTest`. Typically, this is the name " "of the object or file that the test was extracted from." msgstr "" -#: library/doctest.rst:1220 +#: library/doctest.rst:1214 msgid "" "The name of the file that this :class:`DocTest` was extracted from; or " "``None`` if the filename is unknown, or if the :class:`DocTest` was not " "extracted from a file." msgstr "" -#: library/doctest.rst:1227 +#: library/doctest.rst:1221 msgid "" "The line number within :attr:`filename` where this :class:`DocTest` begins, " "or ``None`` if the line number is unavailable. This line number is zero-" "based with respect to the beginning of the file." msgstr "" -#: library/doctest.rst:1234 +#: library/doctest.rst:1228 msgid "" "The string that the test was extracted from, or ``None`` if the string is " "unavailable, or if the test was not extracted from a string." msgstr "" -#: library/doctest.rst:1241 +#: library/doctest.rst:1235 msgid "Example Objects" -msgstr "" +msgstr "Exemples d'objets" -#: library/doctest.rst:1246 +#: library/doctest.rst:1240 msgid "" "A single interactive example, consisting of a Python statement and its " "expected output. The constructor arguments are used to initialize the " "attributes of the same names." msgstr "" -#: library/doctest.rst:1251 +#: library/doctest.rst:1245 msgid "" ":class:`Example` defines the following attributes. They are initialized by " "the constructor, and should not be modified directly." msgstr "" -#: library/doctest.rst:1257 +#: library/doctest.rst:1251 msgid "" "A string containing the example's source code. This source code consists of " "a single Python statement, and always ends with a newline; the constructor " "adds a newline when necessary." msgstr "" -#: library/doctest.rst:1264 +#: library/doctest.rst:1258 msgid "" "The expected output from running the example's source code (either from " "stdout, or a traceback in case of exception). :attr:`want` ends with a " @@ -1384,7 +1976,7 @@ msgid "" "The constructor adds a newline when necessary." msgstr "" -#: library/doctest.rst:1272 +#: library/doctest.rst:1266 msgid "" "The exception message generated by the example, if the example is expected " "to generate an exception; or ``None`` if it is not expected to generate an " @@ -1393,20 +1985,20 @@ msgid "" "unless it's ``None``. The constructor adds a newline if needed." msgstr "" -#: library/doctest.rst:1281 +#: library/doctest.rst:1275 msgid "" "The line number within the string containing this example where the example " "begins. This line number is zero-based with respect to the beginning of the " "containing string." msgstr "" -#: library/doctest.rst:1288 +#: library/doctest.rst:1282 msgid "" "The example's indentation in the containing string, i.e., the number of " "space characters that precede the example's first prompt." msgstr "" -#: library/doctest.rst:1294 +#: library/doctest.rst:1288 msgid "" "A dictionary mapping from option flags to ``True`` or ``False``, which is " "used to override default options for this example. Any option flags not " @@ -1415,11 +2007,11 @@ msgid "" "are set." msgstr "" -#: library/doctest.rst:1303 +#: library/doctest.rst:1297 msgid "DocTestFinder objects" -msgstr "" +msgstr "Objets *DocTestFinder*" -#: library/doctest.rst:1308 +#: library/doctest.rst:1302 msgid "" "A processing class used to extract the :class:`DocTest`\\ s that are " "relevant to a given object, from its docstring and the docstrings of its " @@ -1427,48 +2019,48 @@ msgid "" "classes, functions, methods, staticmethods, classmethods, and properties." msgstr "" -#: library/doctest.rst:1313 +#: library/doctest.rst:1307 msgid "" "The optional argument *verbose* can be used to display the objects searched " "by the finder. It defaults to ``False`` (no output)." msgstr "" -#: library/doctest.rst:1316 +#: library/doctest.rst:1310 msgid "" "The optional argument *parser* specifies the :class:`DocTestParser` object " "(or a drop-in replacement) that is used to extract doctests from docstrings." msgstr "" -#: library/doctest.rst:1319 +#: library/doctest.rst:1313 msgid "" "If the optional argument *recurse* is false, then :meth:`DocTestFinder.find` " "will only examine the given object, and not any contained objects." msgstr "" -#: library/doctest.rst:1322 +#: library/doctest.rst:1316 msgid "" "If the optional argument *exclude_empty* is false, then :meth:`DocTestFinder." "find` will include tests for objects with empty docstrings." msgstr "" -#: library/doctest.rst:1326 +#: library/doctest.rst:1320 msgid ":class:`DocTestFinder` defines the following method:" -msgstr "" +msgstr "La classe :class:`DocTestFinder` définit la méthode suivante :" -#: library/doctest.rst:1331 +#: library/doctest.rst:1325 msgid "" "Return a list of the :class:`DocTest`\\ s that are defined by *obj*'s " "docstring, or by any of its contained objects' docstrings." msgstr "" -#: library/doctest.rst:1334 +#: library/doctest.rst:1328 msgid "" "The optional argument *name* specifies the object's name; this name will be " "used to construct names for the returned :class:`DocTest`\\ s. If *name* is " "not specified, then ``obj.__name__`` is used." msgstr "" -#: library/doctest.rst:1338 +#: library/doctest.rst:1332 msgid "" "The optional parameter *module* is the module that contains the given " "object. If the module is not specified or is ``None``, then the test finder " @@ -1476,26 +2068,26 @@ msgid "" "module is used:" msgstr "" -#: library/doctest.rst:1342 +#: library/doctest.rst:1336 msgid "As a default namespace, if *globs* is not specified." msgstr "" -#: library/doctest.rst:1344 +#: library/doctest.rst:1338 msgid "" "To prevent the DocTestFinder from extracting DocTests from objects that are " "imported from other modules. (Contained objects with modules other than " "*module* are ignored.)" msgstr "" -#: library/doctest.rst:1348 +#: library/doctest.rst:1342 msgid "To find the name of the file containing the object." -msgstr "" +msgstr "Afin de trouver le nom du fichier contenant l'objet." -#: library/doctest.rst:1350 +#: library/doctest.rst:1344 msgid "To help find the line number of the object within its file." msgstr "" -#: library/doctest.rst:1352 +#: library/doctest.rst:1346 msgid "" "If *module* is ``False``, no attempt to find the module will be made. This " "is obscure, of use mostly in testing doctest itself: if *module* is " @@ -1504,7 +2096,7 @@ msgid "" "contained objects will (recursively) be searched for doctests." msgstr "" -#: library/doctest.rst:1358 +#: library/doctest.rst:1352 msgid "" "The globals for each :class:`DocTest` is formed by combining *globs* and " "*extraglobs* (bindings in *extraglobs* override bindings in *globs*). A new " @@ -1514,34 +2106,39 @@ msgid "" "defaults to ``{}``." msgstr "" -#: library/doctest.rst:1369 +#: library/doctest.rst:1363 msgid "DocTestParser objects" -msgstr "" +msgstr "Objets *DocTestParser*" -#: library/doctest.rst:1374 +#: library/doctest.rst:1368 msgid "" "A processing class used to extract interactive examples from a string, and " "use them to create a :class:`DocTest` object." msgstr "" -#: library/doctest.rst:1446 +#: library/doctest.rst:1440 msgid ":class:`DocTestParser` defines the following methods:" -msgstr "" +msgstr "La classe :class:`DocTestFinder` définit les méthodes suivantes :" -#: library/doctest.rst:1383 +#: library/doctest.rst:1377 msgid "" "Extract all doctest examples from the given string, and collect them into a :" "class:`DocTest` object." msgstr "" +"Extrait tous les exemples de *doctests* à partir de la chaîne de caractère " +"donnée, et les réunit dans un objet :class:`DocTest`." -#: library/doctest.rst:1386 +#: library/doctest.rst:1380 msgid "" "*globs*, *name*, *filename*, and *lineno* are attributes for the new :class:" "`DocTest` object. See the documentation for :class:`DocTest` for more " "information." msgstr "" +"Notez que *globs*, *name*, *filname* et *lineno* sont des attributs pour le " +"nouvel objet :class:`DocTest`. Voir la documentation pour :class:`DocTest` " +"pour plus d'information." -#: library/doctest.rst:1393 +#: library/doctest.rst:1387 msgid "" "Extract all doctest examples from the given string, and return them as a " "list of :class:`Example` objects. Line numbers are 0-based. The optional " @@ -1549,7 +2146,7 @@ msgid "" "error messages." msgstr "" -#: library/doctest.rst:1400 +#: library/doctest.rst:1394 msgid "" "Divide the given string into examples and intervening text, and return them " "as a list of alternating :class:`Example`\\ s and strings. Line numbers for " @@ -1557,17 +2154,17 @@ msgid "" "name identifying this string, and is only used for error messages." msgstr "" -#: library/doctest.rst:1409 +#: library/doctest.rst:1403 msgid "DocTestRunner objects" -msgstr "" +msgstr "Objets *DocTestRunner*" -#: library/doctest.rst:1414 +#: library/doctest.rst:1408 msgid "" "A processing class used to execute and verify the interactive examples in a :" "class:`DocTest`." msgstr "" -#: library/doctest.rst:1417 +#: library/doctest.rst:1411 msgid "" "The comparison between expected outputs and actual outputs is done by an :" "class:`OutputChecker`. This comparison may be customized with a number of " @@ -1577,7 +2174,7 @@ msgid "" "constructor." msgstr "" -#: library/doctest.rst:1423 +#: library/doctest.rst:1417 msgid "" "The test runner's display output can be controlled in two ways. First, an " "output function can be passed to :meth:`TestRunner.run`; this function will " @@ -1588,14 +2185,14 @@ msgid "" "`report_unexpected_exception`, and :meth:`report_failure`." msgstr "" -#: library/doctest.rst:1431 +#: library/doctest.rst:1425 msgid "" "The optional keyword argument *checker* specifies the :class:`OutputChecker` " "object (or drop-in replacement) that should be used to compare the expected " "outputs to the actual outputs of doctest examples." msgstr "" -#: library/doctest.rst:1435 +#: library/doctest.rst:1429 msgid "" "The optional keyword argument *verbose* controls the :class:" "`DocTestRunner`'s verbosity. If *verbose* is ``True``, then information is " @@ -1604,56 +2201,56 @@ msgid "" "verbose output is used iff the command-line switch ``-v`` is used." msgstr "" -#: library/doctest.rst:1441 +#: library/doctest.rst:1435 msgid "" "The optional keyword argument *optionflags* can be used to control how the " "test runner compares expected output to actual output, and how it displays " "failures. For more information, see section :ref:`doctest-options`." msgstr "" -#: library/doctest.rst:1451 +#: library/doctest.rst:1445 msgid "" "Report that the test runner is about to process the given example. This " "method is provided to allow subclasses of :class:`DocTestRunner` to " "customize their output; it should not be called directly." msgstr "" -#: library/doctest.rst:1455 +#: library/doctest.rst:1449 msgid "" "*example* is the example about to be processed. *test* is the test " "*containing example*. *out* is the output function that was passed to :meth:" "`DocTestRunner.run`." msgstr "" -#: library/doctest.rst:1462 +#: library/doctest.rst:1456 msgid "" "Report that the given example ran successfully. This method is provided to " "allow subclasses of :class:`DocTestRunner` to customize their output; it " "should not be called directly." msgstr "" -#: library/doctest.rst:1477 +#: library/doctest.rst:1471 msgid "" "*example* is the example about to be processed. *got* is the actual output " "from the example. *test* is the test containing *example*. *out* is the " "output function that was passed to :meth:`DocTestRunner.run`." msgstr "" -#: library/doctest.rst:1473 +#: library/doctest.rst:1467 msgid "" "Report that the given example failed. This method is provided to allow " "subclasses of :class:`DocTestRunner` to customize their output; it should " "not be called directly." msgstr "" -#: library/doctest.rst:1484 +#: library/doctest.rst:1478 msgid "" "Report that the given example raised an unexpected exception. This method is " "provided to allow subclasses of :class:`DocTestRunner` to customize their " "output; it should not be called directly." msgstr "" -#: library/doctest.rst:1488 +#: library/doctest.rst:1482 msgid "" "*example* is the example about to be processed. *exc_info* is a tuple " "containing information about the unexpected exception (as returned by :func:" @@ -1661,13 +2258,13 @@ msgid "" "output function that was passed to :meth:`DocTestRunner.run`." msgstr "" -#: library/doctest.rst:1496 +#: library/doctest.rst:1490 msgid "" "Run the examples in *test* (a :class:`DocTest` object), and display the " "results using the writer function *out*." msgstr "" -#: library/doctest.rst:1499 +#: library/doctest.rst:1493 msgid "" "The examples are run in the namespace ``test.globs``. If *clear_globs* is " "true (the default), then this namespace will be cleared after the test runs, " @@ -1675,39 +2272,39 @@ msgid "" "after the test completes, then use *clear_globs=False*." msgstr "" -#: library/doctest.rst:1504 +#: library/doctest.rst:1498 msgid "" "*compileflags* gives the set of flags that should be used by the Python " "compiler when running the examples. If not specified, then it will default " "to the set of future-import flags that apply to *globs*." msgstr "" -#: library/doctest.rst:1508 +#: library/doctest.rst:1502 msgid "" "The output of each example is checked using the :class:`DocTestRunner`'s " "output checker, and the results are formatted by the :meth:`DocTestRunner." "report_\\*` methods." msgstr "" -#: library/doctest.rst:1515 +#: library/doctest.rst:1509 msgid "" "Print a summary of all the test cases that have been run by this " "DocTestRunner, and return a :term:`named tuple` ``TestResults(failed, " "attempted)``." msgstr "" -#: library/doctest.rst:1518 +#: library/doctest.rst:1512 msgid "" "The optional *verbose* argument controls how detailed the summary is. If " "the verbosity is not specified, then the :class:`DocTestRunner`'s verbosity " "is used." msgstr "" -#: library/doctest.rst:1525 +#: library/doctest.rst:1519 msgid "OutputChecker objects" -msgstr "" +msgstr "Objets *OutputChecker*" -#: library/doctest.rst:1530 +#: library/doctest.rst:1524 msgid "" "A class used to check the whether the actual output from a doctest example " "matches the expected output. :class:`OutputChecker` defines two methods: :" @@ -1716,11 +2313,11 @@ msgid "" "string describing the differences between two outputs." msgstr "" -#: library/doctest.rst:1537 +#: library/doctest.rst:1531 msgid ":class:`OutputChecker` defines the following methods:" -msgstr "" +msgstr "La classe :class:`OutputChecker` définit les méthodes suivantes :" -#: library/doctest.rst:1541 +#: library/doctest.rst:1535 msgid "" "Return ``True`` iff the actual output from an example (*got*) matches the " "expected output (*want*). These strings are always considered to match if " @@ -1729,28 +2326,31 @@ msgid "" "`doctest-options` for more information about option flags." msgstr "" -#: library/doctest.rst:1550 +#: library/doctest.rst:1544 msgid "" "Return a string describing the differences between the expected output for a " "given example (*example*) and the actual output (*got*). *optionflags* is " "the set of option flags used to compare *want* and *got*." msgstr "" -#: library/doctest.rst:1558 +#: library/doctest.rst:1552 msgid "Debugging" -msgstr "" +msgstr "Débogage" -#: library/doctest.rst:1560 +#: library/doctest.rst:1554 msgid "Doctest provides several mechanisms for debugging doctest examples:" msgstr "" +"*Doctest* fournit plusieurs mécanismes pour déboguer des exemples *doctest* :" -#: library/doctest.rst:1562 +#: library/doctest.rst:1556 msgid "" "Several functions convert doctests to executable Python programs, which can " "be run under the Python debugger, :mod:`pdb`." msgstr "" +"Plusieurs fonctions convertissent les *doctests* en programmes Python " +"exécutables, qui peuvent être exécutés grâce au débogueur Python, :mod:`pdb`." -#: library/doctest.rst:1565 +#: library/doctest.rst:1559 msgid "" "The :class:`DebugRunner` class is a subclass of :class:`DocTestRunner` that " "raises an exception for the first failing example, containing information " @@ -1758,13 +2358,13 @@ msgid "" "debugging on the example." msgstr "" -#: library/doctest.rst:1570 +#: library/doctest.rst:1564 msgid "" "The :mod:`unittest` cases generated by :func:`DocTestSuite` support the :" "meth:`debug` method defined by :class:`unittest.TestCase`." msgstr "" -#: library/doctest.rst:1573 +#: library/doctest.rst:1567 msgid "" "You can add a call to :func:`pdb.set_trace` in a doctest example, and you'll " "drop into the Python debugger when that line is executed. Then you can " @@ -1772,21 +2372,21 @@ msgid "" "`a.py` contains just this module docstring::" msgstr "" -#: library/doctest.rst:1588 +#: library/doctest.rst:1582 msgid "Then an interactive Python session may look like this::" -msgstr "" +msgstr "Alors une séance interactive de Python peut ressembler à ceci ::" -#: library/doctest.rst:1621 +#: library/doctest.rst:1615 msgid "" "Functions that convert doctests to Python code, and possibly run the " "synthesized code under the debugger:" msgstr "" -#: library/doctest.rst:1627 +#: library/doctest.rst:1621 msgid "Convert text with examples to a script." -msgstr "" +msgstr "Convertit du texte contenant des exemples en un script." -#: library/doctest.rst:1629 +#: library/doctest.rst:1623 msgid "" "Argument *s* is a string containing doctest examples. The string is " "converted to a Python script, where doctest examples in *s* are converted to " @@ -1794,22 +2394,26 @@ msgid "" "generated script is returned as a string. For example, ::" msgstr "" -#: library/doctest.rst:1644 +#: library/doctest.rst:1638 +#, fuzzy msgid "displays::" -msgstr "" +msgstr "affiche ::" -#: library/doctest.rst:1654 +#: library/doctest.rst:1648 msgid "" "This function is used internally by other functions (see below), but can " "also be useful when you want to transform an interactive Python session into " "a Python script." msgstr "" +"Cette fonction est utilisée à l'interne par d'autres fonctions (voir ci-" +"bas), mais peut aussi être utile lorsque l'on souhaite transformer une " +"séance interactive de Python en script Python." -#: library/doctest.rst:1661 +#: library/doctest.rst:1655 msgid "Convert the doctest for an object to a script." -msgstr "" +msgstr "Convertit en script l'objet *doctest*." -#: library/doctest.rst:1663 +#: library/doctest.rst:1657 msgid "" "Argument *module* is a module object, or dotted name of a module, containing " "the object whose doctests are of interest. Argument *name* is the name " @@ -1819,17 +2423,19 @@ msgid "" "module :file:`a.py` contains a top-level function :func:`f`, then ::" msgstr "" -#: library/doctest.rst:1673 +#: library/doctest.rst:1667 msgid "" "prints a script version of function :func:`f`'s docstring, with doctests " "converted to code, and the rest placed in comments." msgstr "" +"affiche une version script de la *docstring* de la fonction :func:`f`, avec " +"des *doctests* convertis en code, et le reste dans les commentaires." -#: library/doctest.rst:1679 +#: library/doctest.rst:1673 msgid "Debug the doctests for an object." -msgstr "" +msgstr "Débogue les *doctests* pour un objet." -#: library/doctest.rst:1681 +#: library/doctest.rst:1675 msgid "" "The *module* and *name* arguments are the same as for function :func:" "`testsource` above. The synthesized Python script for the named object's " @@ -1837,13 +2443,15 @@ msgid "" "the control of the Python debugger, :mod:`pdb`." msgstr "" -#: library/doctest.rst:1686 +#: library/doctest.rst:1680 msgid "" "A shallow copy of ``module.__dict__`` is used for both local and global " "execution context." msgstr "" +"Une copie superficielle de ``module.__dict__`` est utilisée à la fois pour " +"les contextes d'exécution locaux et globaux." -#: library/doctest.rst:1689 +#: library/doctest.rst:1683 msgid "" "Optional argument *pm* controls whether post-mortem debugging is used. If " "*pm* has a true value, the script file is run directly, and the debugger " @@ -1855,30 +2463,39 @@ msgid "" "to :func:`pdb.run`." msgstr "" -#: library/doctest.rst:1700 +#: library/doctest.rst:1694 msgid "Debug the doctests in a string." -msgstr "" +msgstr "Débogue les *doctests* dans une chaîne de caractères." -#: library/doctest.rst:1702 +#: library/doctest.rst:1696 msgid "" "This is like function :func:`debug` above, except that a string containing " "doctest examples is specified directly, via the *src* argument." msgstr "" +"Ceci est similaire à la fonction :func:`debug` décrite ci-haut, mis-à-part " +"qu'une chaîne de caractères contenant des exemples *doctest* est définie " +"directement, par l'option *src*." -#: library/doctest.rst:1705 +#: library/doctest.rst:1699 msgid "" "Optional argument *pm* has the same meaning as in function :func:`debug` " "above." msgstr "" +"L'option *pm* a la même définition que dans la fonction :func:`debug` ci-" +"haut." -#: library/doctest.rst:1707 +#: library/doctest.rst:1701 msgid "" "Optional argument *globs* gives a dictionary to use as both local and global " "execution context. If not specified, or ``None``, an empty dictionary is " "used. If specified, a shallow copy of the dictionary is used." msgstr "" +"L'option *globs* définit un dictionnaire à utiliser comme contexte " +"d'exécution global et local. Si elle n'est pas définie, ou si ``None``, un " +"dictionnaire vide est utilisé. Si définie, une copie superficielle du " +"dictionnaire est utilisée." -#: library/doctest.rst:1712 +#: library/doctest.rst:1706 msgid "" "The :class:`DebugRunner` class, and the special exceptions it may raise, are " "of most interest to testing framework authors, and will only be sketched " @@ -1886,7 +2503,7 @@ msgid "" "(which is a doctest!) for more details:" msgstr "" -#: library/doctest.rst:1720 +#: library/doctest.rst:1714 msgid "" "A subclass of :class:`DocTestRunner` that raises an exception as soon as a " "failure is encountered. If an unexpected exception occurs, an :exc:" @@ -1896,89 +2513,107 @@ msgid "" "the actual output." msgstr "" -#: library/doctest.rst:1727 +#: library/doctest.rst:1721 msgid "" "For information about the constructor parameters and methods, see the " "documentation for :class:`DocTestRunner` in section :ref:`doctest-advanced-" "api`." msgstr "" +"Pour de l'information sur les paramètres et méthodes du constructeur, voir " +"la documentation pour la classe :class:`DocTestrunner` dans la section :reF:" +"`doctest-advanced-api`." -#: library/doctest.rst:1730 +#: library/doctest.rst:1724 msgid "" "There are two exceptions that may be raised by :class:`DebugRunner` " "instances:" msgstr "" +"Il y a deux exceptions qui peuvent être levées par des instances :class:" +"`DebugRunner` :" -#: library/doctest.rst:1735 +#: library/doctest.rst:1729 msgid "" "An exception raised by :class:`DocTestRunner` to signal that a doctest " "example's actual output did not match its expected output. The constructor " "arguments are used to initialize the attributes of the same names." msgstr "" +"Une exception levée par :class:`DocTestRunner` pour signaler que la sortie " +"obtenue suite à un exemple *doctest* ne correspond pas à la sortie attendue. " +"Les arguments du constructeur sont utilisés pour initialiser les attributs " +"des mêmes noms." -#: library/doctest.rst:1739 +#: library/doctest.rst:1733 msgid ":exc:`DocTestFailure` defines the following attributes:" -msgstr "" +msgstr ":exc:`DocTestFailure` définit les attributs suivants :" -#: library/doctest.rst:1768 +#: library/doctest.rst:1762 msgid "The :class:`DocTest` object that was being run when the example failed." msgstr "" +"L'objet issu de la classe :class:`DocTest` qui était en cours d'exécution " +"lorsque l'exemple a échoué." -#: library/doctest.rst:1773 +#: library/doctest.rst:1767 msgid "The :class:`Example` that failed." -msgstr "" +msgstr "L'exemple :class:`Example` qui a échoué." -#: library/doctest.rst:1754 +#: library/doctest.rst:1748 msgid "The example's actual output." -msgstr "" +msgstr "La sortie obtenue par l'exécution de l'exemple." -#: library/doctest.rst:1759 +#: library/doctest.rst:1753 msgid "" "An exception raised by :class:`DocTestRunner` to signal that a doctest " "example raised an unexpected exception. The constructor arguments are used " "to initialize the attributes of the same names." msgstr "" +"Une exception levée par :class:`DocTestRunner` afin de signaler qu'un " +"exemple *doctest* a levé une exception inattendue. Les arguments du " +"constructeur sont utilisés pour initialiser les attributs des mêmes noms." -#: library/doctest.rst:1763 +#: library/doctest.rst:1757 msgid ":exc:`UnexpectedException` defines the following attributes:" -msgstr "" +msgstr ":exc:`UnexpectedException` définit les attributs suivants :" -#: library/doctest.rst:1778 +#: library/doctest.rst:1772 msgid "" "A tuple containing information about the unexpected exception, as returned " "by :func:`sys.exc_info`." msgstr "" +"Un n-uplet contenant l'information au sujet de l'exception inattendue, telle " +"que retourné par :func:`sys.exc_info`." -#: library/doctest.rst:1785 +#: library/doctest.rst:1779 msgid "Soapbox" -msgstr "" +msgstr "Éditorial" -#: library/doctest.rst:1787 +#: library/doctest.rst:1781 msgid "" "As mentioned in the introduction, :mod:`doctest` has grown to have three " "primary uses:" msgstr "" +"Comme mentionné dans l'introduction, :mod:`doctest` a présentement trois " +"usages principaux :" -#: library/doctest.rst:1790 +#: library/doctest.rst:1784 msgid "Checking examples in docstrings." -msgstr "" +msgstr "Vérifier les exemples dans les *docstrings*." -#: library/doctest.rst:1792 +#: library/doctest.rst:1786 msgid "Regression testing." -msgstr "" +msgstr "Test de régression." -#: library/doctest.rst:1794 +#: library/doctest.rst:1788 msgid "Executable documentation / literate testing." -msgstr "" +msgstr "De la documentation exécutable / des tests littéraires." -#: library/doctest.rst:1796 +#: library/doctest.rst:1790 msgid "" "These uses have different requirements, and it is important to distinguish " "them. In particular, filling your docstrings with obscure test cases makes " "for bad documentation." msgstr "" -#: library/doctest.rst:1800 +#: library/doctest.rst:1794 msgid "" "When writing a docstring, choose docstring examples with care. There's an " "art to this that needs to be learned---it may not be natural at first. " @@ -1990,7 +2625,7 @@ msgid "" "\"harmless\" change." msgstr "" -#: library/doctest.rst:1808 +#: library/doctest.rst:1802 msgid "" "Doctest also makes an excellent tool for regression testing, especially if " "you don't skimp on explanatory text. By interleaving prose and examples, it " @@ -2011,13 +2646,13 @@ msgid "" "different results, blurring the distinction between testing and explaining." msgstr "" -#: library/doctest.rst:1826 +#: library/doctest.rst:1820 msgid "" "Regression testing is best confined to dedicated objects or files. There " "are several options for organizing tests:" msgstr "" -#: library/doctest.rst:1829 +#: library/doctest.rst:1823 msgid "" "Write text files containing test cases as interactive examples, and test the " "files using :func:`testfile` or :func:`DocFileSuite`. This is recommended, " @@ -2025,7 +2660,7 @@ msgid "" "doctest." msgstr "" -#: library/doctest.rst:1834 +#: library/doctest.rst:1828 msgid "" "Define functions named ``_regrtest_topic`` that consist of single " "docstrings, containing test cases for the named topics. These functions can " @@ -2033,27 +2668,92 @@ msgid "" "test file." msgstr "" -#: library/doctest.rst:1838 +#: library/doctest.rst:1832 msgid "" "Define a ``__test__`` dictionary mapping from regression test topics to " "docstrings containing test cases." msgstr "" -#: library/doctest.rst:1841 +#: library/doctest.rst:1835 msgid "" "When you have placed your tests in a module, the module can itself be the " "test runner. When a test fails, you can arrange for your test runner to re-" "run only the failing doctest while you debug the problem. Here is a minimal " "example of such a test runner::" msgstr "" +"Lorsque vous placez vos tests dans un module, le module lui-même peut être " +"l'exécuteur de tests. Lorsqu'un test échoue, vous pouvez signifier à votre " +"exécuteur de tests de rouler une seconde fois uniquement les tests qui " +"échouent et ce, tant que vous travaillez sur le problème. Voici un exemple " +"minimal d'un test exécuteur de tests ::" -#: library/doctest.rst:1863 +#: library/doctest.rst:1857 msgid "Footnotes" msgstr "Notes" -#: library/doctest.rst:1864 +#: library/doctest.rst:1858 msgid "" "Examples containing both expected output and an exception are not supported. " "Trying to guess where one ends and the other begins is too error-prone, and " "that also makes for a confusing test." msgstr "" +"Les exemples contenant à la fois la sortie attendue et une exception ne sont " +"pas supportés. Tenter de deviner où finit l'un et où commence l'autre peut " +"mener à plusieurs erreurs, en plus d'être un test qui soit source de " +"confusion." + +#~ msgid "" +#~ "When specified, an example that expects an exception passes if an " +#~ "exception of the expected type is raised, even if the exception detail " +#~ "does not match. For example, an example expecting ``ValueError: 42`` " +#~ "will pass if the actual exception raised is ``ValueError: 3*14``, but " +#~ "will fail, e.g., if :exc:`TypeError` is raised." +#~ msgstr "" +#~ "Lorsque précisé, un exemple qui s'attend à une exception réussit le test " +#~ "si une exception du type attendu est levée, même si le détail de " +#~ "l'exception ne correspond pas. Par exemple, un exemple s'attendant à " +#~ "``ValueError: 42`` réussira si l'exception réellement levée est " +#~ "``ValueError: 3*14``, mais échouera si par exemple :exc:`TypeError` est " +#~ "levée." + +#~ msgid "" +#~ "It will also ignore the module name used in Python 3 doctest reports. " +#~ "Hence both of these variations will work with the flag specified, " +#~ "regardless of whether the test is run under Python 2.7 or Python 3.2 (or " +#~ "later versions)::" +#~ msgstr "" +#~ "Il fera fi du nom de module utilisé dans les rapports *doctest* de Python " +#~ "3. Ainsi, ces deux variations fonctionneront avec l'option précisée, peu " +#~ "importe si le test est exécuté avec Python 2.7 ou Python 3.2 (ou des " +#~ "versions ultérieures) ::" + +#~ msgid "" +#~ "Note that :const:`ELLIPSIS` can also be used to ignore the details of the " +#~ "exception message, but such a test may still fail based on whether or not " +#~ "the module details are printed as part of the exception name. Using :" +#~ "const:`IGNORE_EXCEPTION_DETAIL` and the details from Python 2.3 is also " +#~ "the only clear way to write a doctest that doesn't care about the " +#~ "exception detail yet continues to pass under Python 2.3 or earlier (those " +#~ "releases do not support :ref:`doctest directives ` " +#~ "and ignore them as irrelevant comments). For example::" +#~ msgstr "" +#~ "Prendre note que :const:`ELLIPSIS` peut aussi être utilisée afin " +#~ "d'ignorer les détails du message d'exception, mais un tel test peut tout " +#~ "de même échouer si les détails du module sont affichés comme faisant " +#~ "partie du nom de l'exception. L'utilisation de :const:" +#~ "`IGNORE_EXCEPTION_DETAIL` et des détails de Python 2.3 est aussi la seule " +#~ "façon claire d'écrire un *doctest* qui ne se soucie pas du détail " +#~ "d'exception tout en continuant de réussir, et ce, pour Python 2.3 ou " +#~ "antérieur (ces versions ne supportent pas les :ref:`instructions doctest " +#~ "`, les ignorant et les traitant comme des " +#~ "commentaires sans pertinence). Par exemple ::" + +#~ msgid "" +#~ "passes under Python 2.3 and later Python versions with the flag " +#~ "specified, even though the detail changed in Python 2.4 to say \"does " +#~ "not\" instead of \"doesn't\"." +#~ msgstr "" +#~ "réussit sous Python 2.3 ainsi que pour les versions ultérieures de " +#~ "Python, avec l'option précisée, même si le détail a été changé dans " +#~ "Python 2.4 pour mentionner *\"does not\"* plutôt que *\"doesn't\"* (ne " +#~ "fait pas)." diff --git a/library/email.charset.po b/library/email.charset.po index 40174038f6..bcaa01fa8a 100644 --- a/library/email.charset.po +++ b/library/email.charset.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -97,15 +97,15 @@ msgstr "" #: library/email.charset.rst:60 msgid "" "If the character set must be encoded before it can be used in an email " -"header, this attribute will be set to ``Charset.QP`` (for quoted-printable), " -"``Charset.BASE64`` (for base64 encoding), or ``Charset.SHORTEST`` for the " +"header, this attribute will be set to ``charset.QP`` (for quoted-printable), " +"``charset.BASE64`` (for base64 encoding), or ``charset.SHORTEST`` for the " "shortest of QP or BASE64 encoding. Otherwise, it will be ``None``." msgstr "" #: library/email.charset.rst:69 msgid "" "Same as *header_encoding*, but describes the encoding for the mail message's " -"body, which indeed may be different than the header encoding. ``Charset." +"body, which indeed may be different than the header encoding. ``charset." "SHORTEST`` is not allowed for *body_encoding*." msgstr "" @@ -239,8 +239,8 @@ msgstr "" #: library/email.charset.rst:178 msgid "" -"Optional *header_enc* and *body_enc* is either ``Charset.QP`` for quoted-" -"printable, ``Charset.BASE64`` for base64 encoding, ``Charset.SHORTEST`` for " +"Optional *header_enc* and *body_enc* is either ``charset.QP`` for quoted-" +"printable, ``charset.BASE64`` for base64 encoding, ``charset.SHORTEST`` for " "the shortest of quoted-printable or base64 encoding, or ``None`` for no " "encoding. ``SHORTEST`` is only valid for *header_enc*. The default is " "``None`` for no encoding." diff --git a/library/email.compat32-message.po b/library/email.compat32-message.po index 5e704ab34d..01ef0937f6 100644 --- a/library/email.compat32-message.po +++ b/library/email.compat32-message.po @@ -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-05-19 22:36+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -45,7 +45,7 @@ msgstr "" #: library/email.compat32-message.rst:25 msgid "" "An email message consists of *headers* and a *payload*. Headers must be :" -"rfc:`5233` style names and values, where the field name and value are " +"rfc:`5322` style names and values, where the field name and value are " "separated by a colon. The colon is not part of either the field name or the " "field value. The payload may be a simple text message, or a binary object, " "or a structured sequence of sub-messages each with their own set of headers " diff --git a/library/email.encoders.po b/library/email.encoders.po index 46fd9480bc..57395c4f6c 100644 --- a/library/email.encoders.po +++ b/library/email.encoders.po @@ -40,6 +40,10 @@ msgid "" "sets the content type and CTE header using the *_subtype* and *_charset* " "values passed during the instantiation of that class." msgstr "" +"Ce module est obsolète en Python 3. Il n'est pas de besoin d'appeler " +"explicitement les fonctions définies ici puisque la classe :class:`~email." +"mime.text.MIMEText` ajuste le type de contenu et l'entête CTE à l'aide des " +"paramètres *_subtype* et *_charset* de son constructeur." #: library/email.encoders.rst:20 msgid "" diff --git a/library/email.header.po b/library/email.header.po index e761d13ceb..4019d95a31 100644 --- a/library/email.header.po +++ b/library/email.header.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -203,9 +203,9 @@ msgstr "" #: library/email.header.rst:138 msgid "" "*linesep* specifies the characters used to separate the lines of the folded " -"header. It defaults to the most useful value for Python application code (``" -"\\n``), but ``\\r\\n`` can be specified in order to produce headers with RFC-" -"compliant line separators." +"header. It defaults to the most useful value for Python application code " +"(``\\n``), but ``\\r\\n`` can be specified in order to produce headers with " +"RFC-compliant line separators." msgstr "" #: library/email.header.rst:143 diff --git a/library/email.headerregistry.po b/library/email.headerregistry.po index 6019a94e17..7eee55f11b 100644 --- a/library/email.headerregistry.po +++ b/library/email.headerregistry.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-09-06 13:49+0200\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -177,8 +177,8 @@ msgstr "" msgid "" ":rfc:`5322` specifies a very specific format for dates within email headers. " "The ``DateHeader`` parser recognizes that date format, as well as " -"recognizing a number of variant forms that are sometimes found \"in the wild" -"\"." +"recognizing a number of variant forms that are sometimes found \"in the " +"wild\"." msgstr "" #: library/email.headerregistry.rst:146 library/email.headerregistry.rst:188 diff --git a/library/email.po b/library/email.po index 0795072a4c..0ae75b2f72 100644 --- a/library/email.po +++ b/library/email.po @@ -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-05-19 22:36+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -28,7 +28,7 @@ msgid "" "specifically *not* designed to do any sending of email messages to SMTP (:" "rfc:`2821`), NNTP, or other servers; those are functions of modules such as :" "mod:`smtplib` and :mod:`nntplib`. The :mod:`email` package attempts to be " -"as RFC-compliant as possible, supporting :rfc:`5233` and :rfc:`6532`, as " +"as RFC-compliant as possible, supporting :rfc:`5322` and :rfc:`6532`, as " "well as such MIME-related RFCs as :rfc:`2045`, :rfc:`2046`, :rfc:`2047`, :" "rfc:`2183`, and :rfc:`2231`." msgstr "" @@ -36,7 +36,7 @@ msgstr "" "spécifiquement conçu pour ne pas gérer les envois d'e-mails vers SMTP (:rfc:" "`2821`), NNTP, ou autres serveurs ; ces fonctions sont du ressort " "des modules comme :mod:`smtplib` et :mod:`nntplib`. Le paquet :mod:`email` " -"tente de respecter les RFC autant que possible, il gère :rfc:`5233` et :rfc:" +"tente de respecter les RFC autant que possible, il gère :rfc:`5322` et :rfc:" "`6532`, ainsi que les RFCs en rapport avec les MIME comme :rfc:`2045`, :rfc:" "`2046`, :rfc:`2047`, :rfc:`2183`, et :rfc:`2231`." diff --git a/library/email.policy.po b/library/email.policy.po index a862b68eec..5eb52ded8b 100644 --- a/library/email.policy.po +++ b/library/email.policy.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -595,8 +595,8 @@ msgstr "" #: library/email.policy.rst:520 msgid "" "An instance of ``EmailPolicy`` with all defaults unchanged. This policy " -"uses the standard Python ``\\n`` line endings rather than the RFC-correct ``" -"\\r\\n``." +"uses the standard Python ``\\n`` line endings rather than the RFC-correct " +"``\\r\\n``." msgstr "" #: library/email.policy.rst:527 diff --git a/library/ensurepip.po b/library/ensurepip.po index f68d024b18..9314c62af9 100644 --- a/library/ensurepip.po +++ b/library/ensurepip.po @@ -17,7 +17,7 @@ msgstr "" #: library/ensurepip.rst:2 msgid ":mod:`ensurepip` --- Bootstrapping the ``pip`` installer" -msgstr "" +msgstr ":mod:`ensurepip` — Amorçage de l'installateur ``pip``" #: library/ensurepip.rst:12 msgid "" @@ -28,6 +28,12 @@ msgid "" "is bundled with maintenance and feature releases of the CPython reference " "interpreter." msgstr "" +"Le module :mod:`ensurepip` met en place l'installateur ``pip`` dans un " +"environnement Python, classique ou virtuel. Ce principe d'amorçage a été " +"choisi car ``pip`` est un projet séparé de Python avec son propre cycle de " +"versions. Il permet en particulier d'embarquer la version la plus récente de " +"``pip`` dans les mises à jour de maintenance de l'interpréteur CPython comme " +"dans les nouvelles versions principales." #: library/ensurepip.rst:19 msgid "" @@ -36,12 +42,19 @@ msgid "" "needed if installing ``pip`` was skipped when installing Python (or when " "creating a virtual environment) or after explicitly uninstalling ``pip``." msgstr "" +"Dans la plupart des cas, il n'est pas nécessaire de recourir à ce module. " +"``pip`` est le plus souvent déjà installé pour vous. Cependant, " +"``ensurepip`` peut s'avérer utile si l'installation de ``pip`` a été sautée " +"au moment de l'installation de Python (ou en créant un environnement " +"virtuel), ou bien si ``pip`` a été désinstallé par l'utilisateur." #: library/ensurepip.rst:27 msgid "" "This module *does not* access the internet. All of the components needed to " "bootstrap ``pip`` are included as internal parts of the package." msgstr "" +"Ce module n'accède *pas* au réseau. Tout ce qu'il faut pour amorcer ``pip`` " +"est compris dans le paquet." #: library/ensurepip.rst:34 msgid ":ref:`installing-index`" @@ -49,15 +62,17 @@ msgstr ":ref:`installing-index`" #: library/ensurepip.rst:34 msgid "The end user guide for installing Python packages" -msgstr "" +msgstr "Guide de l'utilisateur final pour installer des paquets Python" #: library/ensurepip.rst:36 msgid ":pep:`453`: Explicit bootstrapping of pip in Python installations" msgstr "" +":pep:`453` : Amorçage explicite de pip dans les installations de Python" #: library/ensurepip.rst:37 msgid "The original rationale and specification for this module." msgstr "" +"Les motivations pour l'ajout de ce module et sa spécification d'origine" #: library/ensurepip.rst:41 #, fuzzy @@ -68,10 +83,12 @@ msgstr "Interface en ligne de commande" msgid "" "The command line interface is invoked using the interpreter's ``-m`` switch." msgstr "" +"On fait appel à l'interface en ligne de commande à l'aide de l'option ``-m`` " +"de l'interpréteur." #: library/ensurepip.rst:45 msgid "The simplest possible invocation is::" -msgstr "" +msgstr "L'invocation la plus simple est ::" #: library/ensurepip.rst:49 msgid "" @@ -88,6 +105,9 @@ msgid "" "virtual environment). The installation location can be controlled through " "two additional command line options:" msgstr "" +"``pip`` est installé par défaut dans l'environnement virtuel courant, s'il y " +"en a un, ou bien dans le dossier ``site-packages`` du système. L'emplacement " +"d'installation se règle à travers deux options :" #: library/ensurepip.rst:61 msgid "" @@ -95,6 +115,9 @@ msgid "" "rather than the root of the currently active virtual environment (if any) or " "the default root for the current Python installation." msgstr "" +"``--root `` : installe ``pip`` sur un chemin relatif à la racine " +"*dossier* au lieu de la racine de l'environnement virtuel ou la racine par " +"défaut de l'installation de Python." #: library/ensurepip.rst:64 msgid "" @@ -102,6 +125,9 @@ msgid "" "than globally for the current Python installation (this option is not " "permitted inside an active virtual environment)." msgstr "" +"``--user`` : installe ``pip`` dans le dossier ``site-packages`` propre à " +"l'utilisateur au lieu du dossier global de l'installation de Python. Cette " +"option n'est pas valide dans un environnement virtuel." #: library/ensurepip.rst:68 msgid "" @@ -109,31 +135,40 @@ msgid "" "stands for the version of Python used to invoke ``ensurepip``). The scripts " "installed can be controlled through two additional command line options:" msgstr "" +"Par défaut, les commandes ``pipX`` et ``pipX.Y`` sont créées (où X.Y est la " +"version de Python avec laquelle ``ensurepip`` est utilisé). Cela se contrôle " +"par deux options supplémentaires :" #: library/ensurepip.rst:73 msgid "" "``--altinstall``: if an alternate installation is requested, the ``pipX`` " "script will *not* be installed." msgstr "" +"``--altinstall`` : dans ce mode d'« installation parallèle », seule la " +"commande ``pipX.Y`` est ajoutée, et pas la commande ``pipX``." #: library/ensurepip.rst:76 msgid "" "``--default-pip``: if a \"default pip\" installation is requested, the " "``pip`` script will be installed in addition to the two regular scripts." msgstr "" +"``--default-pip`` : ce mode d'« installation de la version par défaut » crée " +"la commande ``pip`` en plus de ``pipX`` et ``pipX.Y``." #: library/ensurepip.rst:79 msgid "" "Providing both of the script selection options will trigger an exception." -msgstr "" +msgstr "Combiner ces deux options conduit à une exception." #: library/ensurepip.rst:83 msgid "Module API" -msgstr "" +msgstr "API du module" #: library/ensurepip.rst:85 msgid ":mod:`ensurepip` exposes two functions for programmatic use:" msgstr "" +"Le module :mod:`ensurepip` définit deux fonctions pour utilisation dans les " +"programmes :" #: library/ensurepip.rst:89 msgid "" @@ -144,6 +179,7 @@ msgstr "" #: library/ensurepip.rst:96 msgid "Bootstraps ``pip`` into the current or designated environment." msgstr "" +"Amorce ``pip`` dans l'environnement courant ou un environnement spécifique." #: library/ensurepip.rst:98 msgid "" @@ -151,6 +187,9 @@ msgid "" "*root* is ``None``, then installation uses the default install location for " "the current environment." msgstr "" +"Passer *root* permet de changer la racine du chemin d'installation. Si " +"*root* vaut ``None`` (la valeur par défaut), l'installation se fait dans la " +"racine par défaut pour l'environnement courant." #: library/ensurepip.rst:102 msgid "" @@ -163,39 +202,52 @@ msgid "" "*user* indicates whether to use the user scheme rather than installing " "globally." msgstr "" +"Si *user* vaut vrai, ``pip`` est mis dans des chemins qui le rendent " +"disponible pour cet utilisateur uniquement, et non pour tous les " +"utilisateurs de l'installation de Python." #: library/ensurepip.rst:108 msgid "" "By default, the scripts ``pipX`` and ``pipX.Y`` will be installed (where X.Y " "stands for the current version of Python)." msgstr "" +"Par défaut, les commandes créées sont ``pipX`` et ``pipX.Y`` (où X.Y est la " +"version de Python)." #: library/ensurepip.rst:111 msgid "If *altinstall* is set, then ``pipX`` will *not* be installed." -msgstr "" +msgstr "Si *altinstall* vaut vrai, ``pipX`` n'est pas créée." #: library/ensurepip.rst:113 msgid "" "If *default_pip* is set, then ``pip`` will be installed in addition to the " "two regular scripts." msgstr "" +"Si *default_pip* vaut vrai, la commande ``pip`` est créée en plus des deux " +"autres." #: library/ensurepip.rst:116 msgid "" "Setting both *altinstall* and *default_pip* will trigger :exc:`ValueError`." msgstr "" +"Le fait de combiner *altinstall* et *default_pip* lève l'exception :exc:" +"`ValueError`." #: library/ensurepip.rst:119 msgid "" "*verbosity* controls the level of output to :data:`sys.stdout` from the " "bootstrapping operation." msgstr "" +"*verbosity* règle le niveau de verbosité des messages émis sur :data:`sys." +"stdout` pendant l'amorçage." #: library/ensurepip.rst:122 msgid "" "Raises an :ref:`auditing event ` ``ensurepip.bootstrap`` with " "argument ``root``." msgstr "" +"Cette fonction lève un :ref:`événement d'audit ` ``ensurepip." +"bootstrap`` avec l'argument ``root``." #: library/ensurepip.rst:126 msgid "" @@ -203,6 +255,9 @@ msgid "" "environ``. Invoking the command line interface in a subprocess instead " "allows these side effects to be avoided." msgstr "" +"Le processus d'amorçage a des effets de bord sur ``sys.path`` et ``os." +"environ``. Pour les éviter, on peut appeler l'interface en ligne de commande " +"dans un sous-processus." #: library/ensurepip.rst:132 msgid "" @@ -211,3 +266,7 @@ msgid "" "be present by default (as the dependencies may be removed in a future " "version of ``pip``)." msgstr "" +"L'amorçage peut installer des modules supplémentaires qui sont requis pour " +"``pip``. Les autres programmes ne doivent pas prendre pour acquise la " +"présence de ces modules, car ``pip`` pourrait dans une version future se " +"passer de ces dépendances." diff --git a/library/enum.po b/library/enum.po index 82b0d09704..d2e36f7359 100644 --- a/library/enum.po +++ b/library/enum.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-12-11 11:26+0100\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" @@ -36,13 +36,17 @@ msgstr "" #: library/enum.rst:22 msgid "Case of Enum Members" -msgstr "" +msgstr "Convention de nommage pour les membres d'une **Enum**" #: library/enum.rst:24 msgid "" "Because Enums are used to represent constants we recommend using UPPER_CASE " "names for enum members, and will be using that style in our examples." msgstr "" +"Puisque les **Enums** sont utilisées pour représenter des constantes, il est " +"recommandé d'utiliser des majuscules (format ``MAJUSCULE_AVEC_SOULIGNÉS``) " +"pour leurs membres. Cette convention de style sera utilisée dans les " +"exemples." #: library/enum.rst:30 msgid "Module Contents" @@ -313,20 +317,20 @@ msgstr "" "être redéfinie ::" #: library/enum.rst:279 -#, fuzzy msgid "" "The goal of the default :meth:`_generate_next_value_` method is to provide " "the next :class:`int` in sequence with the last :class:`int` provided, but " "the way it does this is an implementation detail and may change." msgstr "" -"La méthode par défaut :meth:`_generate_next_value_` doit fournir le :class:" -"`int` suivant de la séquence en fonction du dernier :class:`int` fourni, " -"mais la séquence générée dépend de l'implémentation Python." +"La méthode :meth:`_generate_next_value_` doit renvoyer le prochain :class:" +"`int` de la séquence à partir du dernier :class:`int` fourni, mais " +"l'implémentation de cette fonction peut changer." #: library/enum.rst:285 msgid "" "The :meth:`_generate_next_value_` method must be defined before any members." msgstr "" +"La méthode :meth:`_generate_next_value_` doit être définie avant tout membre." #: library/enum.rst:288 msgid "Iteration" @@ -434,15 +438,14 @@ msgstr "" "attr:`_ignore_`." #: library/enum.rst:396 -#, fuzzy msgid "" "Note: if your enumeration defines :meth:`__new__` and/or :meth:`__init__` " "then any value(s) given to the enum member will be passed into those " "methods. See `Planet`_ for an example." msgstr "" -"Remarque : si l'énumération définit :meth:`__new__` ou :meth:`__init__`, " -"alors la (ou les) valeur affectée au membre sera passée à ces méthodes. Voir " -"l'exemple de `Planet`_." +"Remarque : si votre énumération définit :meth:`__new__` ou :meth:`__init__`, " +"alors les valeurs affectées aux membres seront passées à ces méthodes. Voir " +"`Planet`_ pour exemple." #: library/enum.rst:402 msgid "Restricted Enum subclassing" @@ -867,7 +870,6 @@ msgstr "" "comme dans l'exemple de :class:`IntEnum` ci-dessus." #: library/enum.rst:741 -#, fuzzy msgid "" "While :class:`Enum` can have members of any type, once you mix in an " "additional type, all the members must have values of that type, e.g. :class:" @@ -875,10 +877,10 @@ msgid "" "methods and don't specify another type." msgstr "" "Même si une classe :class:`Enum` peut avoir des membres de n'importe quel " -"type, dès lors qu'un type de mélange est ajouté, tous les membres doivent " -"être de ce type, p. ex. :class:`int` ci-dessus. Cette restriction ne " -"s'applique pas aux types de mélange qui ne font qu'ajouter des méthodes et " -"ne définissent pas de type de données, tels :class:`int` ou :class:`str`. " +"type, dès qu'un type est spécifié à la déclaration de la classe, alors tous " +"les membres doivent être de ce type, p. ex. :class:`int` ci-dessus. Cette " +"restriction ne s'applique pas aux classes dérivées qui n'ajoutent que des " +"méthodes supplémentaires sans spécifier un type de données." #: library/enum.rst:745 msgid "" @@ -893,8 +895,8 @@ msgstr "" #: library/enum.rst:748 msgid "" "%-style formatting: `%s` and `%r` call the :class:`Enum` class's :meth:" -"`__str__` and :meth:`__repr__` respectively; other codes (such as `%i` or `" -"%h` for IntEnum) treat the enum member as its mixed-in type." +"`__str__` and :meth:`__repr__` respectively; other codes (such as `%i` or " +"`%h` for IntEnum) treat the enum member as its mixed-in type." msgstr "" "Formatage de style *%* : `%s` et `%r` appellent respectivement les méthodes :" "meth:`__str__` et :meth:`__repr__` de la classe :class:`Enum` ; les autres " @@ -902,7 +904,6 @@ msgstr "" "celui-ci était converti en son type de mélange." #: library/enum.rst:751 -#, fuzzy msgid "" ":ref:`Formatted string literals `, :meth:`str.format`, and :func:" "`format` will use the mixed-in type's :meth:`__format__` unless :meth:" @@ -911,10 +912,13 @@ msgid "" "and !r format codes to force usage of the :class:`Enum` class's :meth:" "`__str__` and :meth:`__repr__` methods." msgstr "" -":ref:`Chaînes de caractères formatées littérales ` : :meth:`str." -"format` et :func:`format` appellent la méthode :meth:`__format__` du type de " -"mélange. Pour appeler les fonctions :func:`str` ou :func:`repr` de la " -"classe :class:`Enum`, il faut utiliser les codes de formatage `!s` ou `!r`." +"Les :ref:`chaînes littérales formatées ` : :meth:`str.format` et :" +"func:`format` appellent la méthode :meth:`__format__` du type dérivé à moins " +"que :meth:`__str__` ou :meth:`__format__` soit surchargée dans la sous-" +"classe, auquel cas les méthodes surchargées ou celles de la classe :class:" +"`Enum` seront utilisées. Pour appeler les méthodes :meth:`__str__` ou :meth:" +"`__repr__` de la classe :class:`Enum`, il faut utiliser les codes de " +"formatage ``!s`` ou ``!r``." #: library/enum.rst:759 msgid "When to use :meth:`__new__` vs. :meth:`__init__`" @@ -926,6 +930,10 @@ msgid "" "of the :class:`Enum` member. Any other modifications may go in either :meth:" "`__new__` or :meth:`__init__`, with :meth:`__init__` being preferred." msgstr "" +":meth:`__new__` doit être utilisé dès que vous souhaitez personnaliser la " +"valeur effective des membres d'un :class:`Enum`. Tout autre modification " +"peut autant aller dans :meth:`__new__` que dans :meth:`__init__`, mais " +"l'usage de :meth:`__init__` est recommandé." #: library/enum.rst:765 msgid "" @@ -1042,12 +1050,16 @@ msgid "" "To make a more general purpose ``AutoNumber``, add ``*args`` to the " "signature::" msgstr "" +"Pour définir un ``AutoNumber`` plus générique, ajoutez ``*args`` à la " +"signature ::" #: library/enum.rst:900 msgid "" "Then when you inherit from ``AutoNumber`` you can write your own " "``__init__`` to handle any extra arguments::" msgstr "" +"Ainsi, quand vous héritez d'``AutoNumber``, vous pouvez définir ``__init__`` " +"pour gérer tout argument supplémentaire ::" #: library/enum.rst:919 msgid "" @@ -1220,14 +1232,13 @@ msgstr "" "n'est pas trouvée ; elle peut être redéfinie" #: library/enum.rst:1093 -#, fuzzy msgid "" "``_ignore_`` -- a list of names, either as a :class:`list` or a :class:" "`str`, that will not be transformed into members, and will be removed from " "the final class" msgstr "" -"``_ignore_`` -- une liste de noms, sous la forme de :func:`list` ou de :func:" -"`str`, qui ne seront pas transformés en membres, et seront supprimés de la " +"``_ignore_`` — liste de noms, sous la forme d'une :func:`list` ou d'une :" +"func:`str`, qui ne sont pas convertis en membres et sont supprimés de la " "classe résultante" #: library/enum.rst:1096 @@ -1276,13 +1287,14 @@ msgstr "" #: library/enum.rst:1126 msgid "_Private__names" -msgstr "" +msgstr "_Noms__privés" #: library/enum.rst:1128 msgid "" -"Private names will be normal attributes in Python 3.10 instead of either an " -"error or a member (depending on if the name ends with an underscore). Using " -"these names in 3.9 will issue a :exc:`DeprecationWarning`." +":ref:`Private names ` will be normal attributes in " +"Python 3.11 instead of either an error or a member (depending on if the name " +"ends with an underscore). Using these names in 3.9 and 3.10 will issue a :" +"exc:`DeprecationWarning`." msgstr "" #: library/enum.rst:1134 @@ -1306,11 +1318,15 @@ msgstr "" "(c'est une autre bonne raison pour définir tous les noms des membres en " "majuscules) ::" -#: library/enum.rst:1157 +#: library/enum.rst:1155 +msgid "This behavior is deprecated and will be removed in 3.11." +msgstr "Ce comportement est obsolète et sera retiré en 3.11." + +#: library/enum.rst:1161 msgid "Boolean value of ``Enum`` classes and members" msgstr "Valeur booléenne des classes ``Enum`` et de leurs membres" -#: library/enum.rst:1159 +#: library/enum.rst:1163 msgid "" ":class:`Enum` members that are mixed with non-:class:`Enum` types (such as :" "class:`int`, :class:`str`, etc.) are evaluated according to the mixed-in " @@ -1324,15 +1340,15 @@ msgstr "" "faire dépendre l'évaluation booléenne de votre propre *Enum* de la valeur du " "membre, il faut ajouter le code suivant à votre classe ::" -#: library/enum.rst:1168 +#: library/enum.rst:1172 msgid ":class:`Enum` classes always evaluate as :data:`True`." msgstr "Les classes :class:`Enum` valent toujours :data:`True`." -#: library/enum.rst:1172 +#: library/enum.rst:1176 msgid "``Enum`` classes with methods" msgstr "Classes ``Enum`` avec des méthodes" -#: library/enum.rst:1174 +#: library/enum.rst:1178 msgid "" "If you give your :class:`Enum` subclass extra methods, like the `Planet`_ " "class above, those methods will show up in a :func:`dir` of the member, but " @@ -1342,11 +1358,11 @@ msgstr "" "la classe `Planet`_ ci-dessus, elles s'afficheront avec un appel à :func:" "`dir` sur le membre, mais pas avec un appel sur la classe ::" -#: library/enum.rst:1185 +#: library/enum.rst:1189 msgid "Combining members of ``Flag``" msgstr "Combinaison de membres de ``Flag``" -#: library/enum.rst:1187 +#: library/enum.rst:1191 msgid "" "If a combination of Flag members is not named, the :func:`repr` will include " "all named flags and all named combinations of flags that are in the value::" @@ -1354,3 +1370,10 @@ msgstr "" "Si une valeur issue de la combinaison de membres de *Flag* n'est pas " "associée explicitement à un membre, la fonction :func:`repr` inclut tous les " "membres et toutes les combinaisons de membres présents dans cette valeur ::" + +#: library/enum.rst:1209 +msgid "" +"In 3.11 unnamed combinations of flags will only produce the canonical flag " +"members (aka single-value flags). So ``Color(7)`` would produce something " +"like ````." +msgstr "" diff --git a/library/errno.po b/library/errno.po index 8fbcdbf3ad..c4d704b851 100644 --- a/library/errno.po +++ b/library/errno.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-06-10 15:48+0200\n" "Last-Translator: Dylan Gouin \n" "Language-Team: FRENCH \n" @@ -20,10 +20,11 @@ msgid ":mod:`errno` --- Standard errno system symbols" msgstr ":mod:`errno` — Symboles du système *errno* standard" #: library/errno.rst:9 +#, fuzzy msgid "" "This module makes available standard ``errno`` system symbols. The value of " "each symbol is the corresponding integer value. The names and descriptions " -"are borrowed from :file:`linux/include/errno.h`, which should be pretty all-" +"are borrowed from :file:`linux/include/errno.h`, which should be all-" "inclusive." msgstr "" "Ce module met à disposition des symboles du système standard ``errno``. La " @@ -61,495 +62,602 @@ msgstr "" "symboles disponibles font partie de cette liste :" #: library/errno.rst:30 -msgid "Operation not permitted" -msgstr "Opération interdite" - -#: library/errno.rst:35 -msgid "No such file or directory" -msgstr "Fichier ou répertoire inexistant" +#, fuzzy +msgid "" +"Operation not permitted. This error is mapped to the exception :exc:" +"`PermissionError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:40 -msgid "No such process" -msgstr "Processus inexistant" +#: library/errno.rst:36 +#, fuzzy +msgid "" +"No such file or directory. This error is mapped to the exception :exc:" +"`FileNotFoundError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:45 -msgid "Interrupted system call." -msgstr "Appel système interrompu" +#: library/errno.rst:42 +#, fuzzy +msgid "" +"No such process. This error is mapped to the exception :exc:" +"`ProcessLookupError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:48 -msgid "This error is mapped to the exception :exc:`InterruptedError`." +#, fuzzy +msgid "" +"Interrupted system call. This error is mapped to the exception :exc:" +"`InterruptedError`." msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:53 +#: library/errno.rst:54 msgid "I/O error" msgstr "Erreur d'entrée-sortie" -#: library/errno.rst:58 +#: library/errno.rst:59 msgid "No such device or address" msgstr "Dispositif ou adresse inexistant" -#: library/errno.rst:63 +#: library/errno.rst:64 msgid "Arg list too long" msgstr "Liste d'arguments trop longue" -#: library/errno.rst:68 +#: library/errno.rst:69 msgid "Exec format error" msgstr "Erreur de format d'exécution" -#: library/errno.rst:73 +#: library/errno.rst:74 msgid "Bad file number" msgstr "Mauvais descripteur de fichier" -#: library/errno.rst:78 -msgid "No child processes" -msgstr "Pas de processus fils" +#: library/errno.rst:79 +#, fuzzy +msgid "" +"No child processes. This error is mapped to the exception :exc:" +"`ChildProcessError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:83 -msgid "Try again" -msgstr "Ressource temporairement indisponible (réessayez)" +#: library/errno.rst:85 +#, fuzzy +msgid "" +"Try again. This error is mapped to the exception :exc:`BlockingIOError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:88 +#: library/errno.rst:90 msgid "Out of memory" msgstr "Mémoire insuffisante" -#: library/errno.rst:93 -msgid "Permission denied" -msgstr "Autorisation refusée" +#: library/errno.rst:95 +#, fuzzy +msgid "" +"Permission denied. This error is mapped to the exception :exc:" +"`PermissionError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:98 +#: library/errno.rst:101 msgid "Bad address" msgstr "Mauvaise adresse" -#: library/errno.rst:103 +#: library/errno.rst:106 msgid "Block device required" msgstr "Dispositif de bloc requis" -#: library/errno.rst:108 +#: library/errno.rst:111 msgid "Device or resource busy" msgstr "Dispositif ou ressource occupé" -#: library/errno.rst:113 -msgid "File exists" -msgstr "Fichier déjà existant" +#: library/errno.rst:116 +#, fuzzy +msgid "" +"File exists. This error is mapped to the exception :exc:`FileExistsError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:118 +#: library/errno.rst:122 msgid "Cross-device link" msgstr "Lien inapproprié" -#: library/errno.rst:123 +#: library/errno.rst:127 msgid "No such device" msgstr "Dispositif inexistant" -#: library/errno.rst:128 -msgid "Not a directory" -msgstr "Pas un répertoire" - -#: library/errno.rst:133 -msgid "Is a directory" -msgstr "Est un répertoire" +#: library/errno.rst:132 +#, fuzzy +msgid "" +"Not a directory. This error is mapped to the exception :exc:" +"`NotADirectoryError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." #: library/errno.rst:138 +#, fuzzy +msgid "" +"Is a directory. This error is mapped to the exception :exc:" +"`IsADirectoryError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." + +#: library/errno.rst:144 msgid "Invalid argument" msgstr "Argument invalide" -#: library/errno.rst:143 +#: library/errno.rst:149 msgid "File table overflow" msgstr "Plus de descripteur de fichier disponible" -#: library/errno.rst:148 +#: library/errno.rst:154 msgid "Too many open files" msgstr "Trop de fichiers ouverts" -#: library/errno.rst:153 +#: library/errno.rst:159 msgid "Not a typewriter" msgstr "Opération de contrôle d'entrée-sortie invalide" -#: library/errno.rst:158 +#: library/errno.rst:164 msgid "Text file busy" msgstr "Fichier texte occupé" -#: library/errno.rst:163 +#: library/errno.rst:169 msgid "File too large" msgstr "Fichier trop grand" -#: library/errno.rst:168 +#: library/errno.rst:174 msgid "No space left on device" msgstr "Plus de place sur le dispositif" -#: library/errno.rst:173 +#: library/errno.rst:179 msgid "Illegal seek" msgstr "Recherche invalide" -#: library/errno.rst:178 +#: library/errno.rst:184 msgid "Read-only file system" msgstr "Système de fichiers en lecture seule" -#: library/errno.rst:183 +#: library/errno.rst:189 msgid "Too many links" msgstr "Trop de liens symboliques" -#: library/errno.rst:188 -msgid "Broken pipe" -msgstr "Tube brisé" +#: library/errno.rst:194 +#, fuzzy +msgid "" +"Broken pipe. This error is mapped to the exception :exc:`BrokenPipeError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:193 +#: library/errno.rst:200 msgid "Math argument out of domain of func" msgstr "Argument mathématique hors du domaine de définition de la fonction" -#: library/errno.rst:198 +#: library/errno.rst:205 msgid "Math result not representable" msgstr "Résultat mathématique non représentable" -#: library/errno.rst:203 +#: library/errno.rst:210 msgid "Resource deadlock would occur" msgstr "Un interblocage se produirait sur cette ressource" -#: library/errno.rst:208 +#: library/errno.rst:215 msgid "File name too long" msgstr "Nom de fichier trop long" -#: library/errno.rst:213 +#: library/errno.rst:220 msgid "No record locks available" msgstr "Plus de verrou de fichier disponible" -#: library/errno.rst:218 +#: library/errno.rst:225 msgid "Function not implemented" msgstr "Fonction non implémentée" -#: library/errno.rst:223 +#: library/errno.rst:230 msgid "Directory not empty" msgstr "Dossier non vide" -#: library/errno.rst:228 +#: library/errno.rst:235 msgid "Too many symbolic links encountered" msgstr "Trop de liens symboliques trouvés" -#: library/errno.rst:233 -msgid "Operation would block" -msgstr "L'opération bloquerait" +#: library/errno.rst:240 +#, fuzzy +msgid "" +"Operation would block. This error is mapped to the exception :exc:" +"`BlockingIOError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:238 +#: library/errno.rst:246 msgid "No message of desired type" msgstr "Pas de message du type voulu" -#: library/errno.rst:243 +#: library/errno.rst:251 msgid "Identifier removed" msgstr "Identifiant supprimé" -#: library/errno.rst:248 +#: library/errno.rst:256 msgid "Channel number out of range" msgstr "Le numéro de canal est hors des limites" -#: library/errno.rst:253 +#: library/errno.rst:261 msgid "Level 2 not synchronized" msgstr "Le niveau 2 n'est pas synchronisé" -#: library/errno.rst:258 +#: library/errno.rst:266 msgid "Level 3 halted" msgstr "Niveau 3 stoppé" -#: library/errno.rst:263 +#: library/errno.rst:271 msgid "Level 3 reset" msgstr "Niveau 3 réinitialisé" -#: library/errno.rst:268 +#: library/errno.rst:276 msgid "Link number out of range" msgstr "Le numéro du lien est hors des limites" -#: library/errno.rst:273 +#: library/errno.rst:281 msgid "Protocol driver not attached" msgstr "Le pilote de protocole n'est pas attaché" -#: library/errno.rst:278 +#: library/errno.rst:286 msgid "No CSI structure available" msgstr "Pas de structure *CSI* disponible" -#: library/errno.rst:283 +#: library/errno.rst:291 msgid "Level 2 halted" msgstr "Niveau 2 stoppé" -#: library/errno.rst:288 +#: library/errno.rst:296 msgid "Invalid exchange" msgstr "Échange invalide" -#: library/errno.rst:293 +#: library/errno.rst:301 msgid "Invalid request descriptor" msgstr "Descripteur de requête invalide" -#: library/errno.rst:298 +#: library/errno.rst:306 msgid "Exchange full" msgstr "Échange complet" -#: library/errno.rst:303 +#: library/errno.rst:311 msgid "No anode" msgstr "Pas de *anode*" -#: library/errno.rst:308 +#: library/errno.rst:316 msgid "Invalid request code" msgstr "Code de requête invalide" -#: library/errno.rst:313 +#: library/errno.rst:321 msgid "Invalid slot" msgstr "*Slot* invalide" -#: library/errno.rst:318 +#: library/errno.rst:326 msgid "File locking deadlock error" msgstr "Interblocage lors du verrouillage de fichier" -#: library/errno.rst:323 +#: library/errno.rst:331 msgid "Bad font file format" msgstr "Mauvais format de fichier de police" -#: library/errno.rst:328 +#: library/errno.rst:336 msgid "Device not a stream" msgstr "Le périphérique n'est pas un flux" -#: library/errno.rst:333 +#: library/errno.rst:341 msgid "No data available" msgstr "Pas de donnée disponible" -#: library/errno.rst:338 +#: library/errno.rst:346 msgid "Timer expired" msgstr "Délai maximal atteint" -#: library/errno.rst:343 +#: library/errno.rst:351 msgid "Out of streams resources" msgstr "Pas assez de ressources de type flux" -#: library/errno.rst:348 +#: library/errno.rst:356 msgid "Machine is not on the network" msgstr "Machine hors réseau" -#: library/errno.rst:353 +#: library/errno.rst:361 msgid "Package not installed" msgstr "Paquet non installé" -#: library/errno.rst:358 +#: library/errno.rst:366 msgid "Object is remote" msgstr "L'objet est distant" -#: library/errno.rst:363 +#: library/errno.rst:371 msgid "Link has been severed" msgstr "Lien coupé" -#: library/errno.rst:368 +#: library/errno.rst:376 msgid "Advertise error" msgstr "Erreur d'annonce" -#: library/errno.rst:373 +#: library/errno.rst:381 msgid "Srmount error" msgstr "Erreur *Srmount*" -#: library/errno.rst:378 +#: library/errno.rst:386 msgid "Communication error on send" msgstr "Erreur de communication lors de l'envoi" -#: library/errno.rst:383 +#: library/errno.rst:391 msgid "Protocol error" msgstr "Erreur de protocole" -#: library/errno.rst:388 +#: library/errno.rst:396 msgid "Multihop attempted" msgstr "Transfert à sauts multiples essayé" -#: library/errno.rst:393 +#: library/errno.rst:401 msgid "RFS specific error" msgstr "erreur spécifique *RFS*" -#: library/errno.rst:398 +#: library/errno.rst:406 msgid "Not a data message" msgstr "Pas un message de données" -#: library/errno.rst:403 +#: library/errno.rst:411 msgid "Value too large for defined data type" msgstr "Valeur trop grande pour être stockée dans ce type de donnée" -#: library/errno.rst:408 +#: library/errno.rst:416 msgid "Name not unique on network" msgstr "Nom non-unique dans le réseau" -#: library/errno.rst:413 +#: library/errno.rst:421 msgid "File descriptor in bad state" msgstr "Descripteur de fichier en mauvais état" -#: library/errno.rst:418 +#: library/errno.rst:426 msgid "Remote address changed" msgstr "Adresse distante changée" -#: library/errno.rst:423 +#: library/errno.rst:431 msgid "Can not access a needed shared library" msgstr "Accès impossible à une bibliothèque partagée nécessaire" -#: library/errno.rst:428 +#: library/errno.rst:436 msgid "Accessing a corrupted shared library" msgstr "Accès à une bibliothèque partagée corrompue" -#: library/errno.rst:433 +#: library/errno.rst:441 msgid ".lib section in a.out corrupted" msgstr "Section *.lib* de *a.out* corrompue" -#: library/errno.rst:438 +#: library/errno.rst:446 msgid "Attempting to link in too many shared libraries" msgstr "Tentative de liaison entre trop de bibliothèques partagées" -#: library/errno.rst:443 +#: library/errno.rst:451 msgid "Cannot exec a shared library directly" msgstr "Impossible d'exécuter directement une bibliothèque partagée" -#: library/errno.rst:448 +#: library/errno.rst:456 msgid "Illegal byte sequence" msgstr "Séquence de *bytes* illégale" -#: library/errno.rst:453 +#: library/errno.rst:461 msgid "Interrupted system call should be restarted" msgstr "Appel système interrompu qui devrait être relancé" -#: library/errno.rst:458 +#: library/errno.rst:466 msgid "Streams pipe error" msgstr "Erreur d’enchaînement de flux" -#: library/errno.rst:463 +#: library/errno.rst:471 msgid "Too many users" msgstr "Trop d'utilisateurs" -#: library/errno.rst:468 +#: library/errno.rst:476 msgid "Socket operation on non-socket" msgstr "" "Opération d'interface de connexion alors que ce n'est pas une interface de " "connexion" -#: library/errno.rst:473 +#: library/errno.rst:481 msgid "Destination address required" msgstr "Adresse de destination obligatoire" -#: library/errno.rst:478 +#: library/errno.rst:486 msgid "Message too long" msgstr "Message trop long" -#: library/errno.rst:483 +#: library/errno.rst:491 msgid "Protocol wrong type for socket" msgstr "Mauvais type de protocole pour ce connecteur" -#: library/errno.rst:488 +#: library/errno.rst:496 msgid "Protocol not available" msgstr "Protocole pas disponible" -#: library/errno.rst:493 +#: library/errno.rst:501 msgid "Protocol not supported" msgstr "Protocole non géré" -#: library/errno.rst:498 +#: library/errno.rst:506 msgid "Socket type not supported" msgstr "Type de connecteur non géré" -#: library/errno.rst:503 +#: library/errno.rst:511 msgid "Operation not supported on transport endpoint" msgstr "Opération non gérée par cette fin de lien" -#: library/errno.rst:508 +#: library/errno.rst:516 msgid "Protocol family not supported" msgstr "Famille de protocole non gérée" -#: library/errno.rst:513 +#: library/errno.rst:521 msgid "Address family not supported by protocol" msgstr "Famille d'adresses non gérée par ce protocole" -#: library/errno.rst:518 +#: library/errno.rst:526 msgid "Address already in use" msgstr "Adresse déjà utilisée" -#: library/errno.rst:523 +#: library/errno.rst:531 msgid "Cannot assign requested address" msgstr "Impossible d'assigner l'adresse demandée" -#: library/errno.rst:528 +#: library/errno.rst:536 msgid "Network is down" msgstr "Le réseau est désactivé" -#: library/errno.rst:533 +#: library/errno.rst:541 msgid "Network is unreachable" msgstr "Réseau inaccessible" -#: library/errno.rst:538 +#: library/errno.rst:546 msgid "Network dropped connection because of reset" msgstr "Connexion annulée par le réseau" -#: library/errno.rst:543 -msgid "Software caused connection abort" -msgstr "Connexion abandonnée" +#: library/errno.rst:551 +#, fuzzy +msgid "" +"Software caused connection abort. This error is mapped to the exception :exc:" +"`ConnectionAbortedError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:548 -msgid "Connection reset by peer" -msgstr "Connexion réinitialisée" +#: library/errno.rst:557 +#, fuzzy +msgid "" +"Connection reset by peer. This error is mapped to the exception :exc:" +"`ConnectionResetError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:553 +#: library/errno.rst:563 msgid "No buffer space available" msgstr "Plus d'espace tampon disponible" -#: library/errno.rst:558 +#: library/errno.rst:568 msgid "Transport endpoint is already connected" msgstr "L'interface de connexion est déjà connectée" -#: library/errno.rst:563 +#: library/errno.rst:573 msgid "Transport endpoint is not connected" msgstr "L'interface de connexion n'est pas connectée" -#: library/errno.rst:568 -msgid "Cannot send after transport endpoint shutdown" -msgstr "Impossible d'envoyer après l'arrêt du point final du transport" +#: library/errno.rst:578 +#, fuzzy +msgid "" +"Cannot send after transport endpoint shutdown. This error is mapped to the " +"exception :exc:`BrokenPipeError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:573 +#: library/errno.rst:584 msgid "Too many references: cannot splice" msgstr "Trop de descripteurs : impossible d'effectuer la liaison" -#: library/errno.rst:578 -msgid "Connection timed out" -msgstr "Délai maximal de connexion écoulé" +#: library/errno.rst:589 +#, fuzzy +msgid "" +"Connection timed out. This error is mapped to the exception :exc:" +"`TimeoutError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:583 -msgid "Connection refused" -msgstr "Connexion refusée" +#: library/errno.rst:595 +#, fuzzy +msgid "" +"Connection refused. This error is mapped to the exception :exc:" +"`ConnectionRefusedError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:588 +#: library/errno.rst:601 msgid "Host is down" msgstr "Hôte éteint" -#: library/errno.rst:593 +#: library/errno.rst:606 msgid "No route to host" msgstr "Pas de route vers l'hôte" -#: library/errno.rst:598 -msgid "Operation already in progress" -msgstr "Connexion déjà en cours" +#: library/errno.rst:611 +#, fuzzy +msgid "" +"Operation already in progress. This error is mapped to the exception :exc:" +"`BlockingIOError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:603 -msgid "Operation now in progress" -msgstr "Opération en cours" +#: library/errno.rst:617 +#, fuzzy +msgid "" +"Operation now in progress. This error is mapped to the exception :exc:" +"`BlockingIOError`." +msgstr "Cette erreur est associée à l'exception :exc:`InterruptedError`." -#: library/errno.rst:608 +#: library/errno.rst:623 msgid "Stale NFS file handle" msgstr "Descripteur de fichier NFS corrompu" -#: library/errno.rst:613 +#: library/errno.rst:628 msgid "Structure needs cleaning" msgstr "La structure a besoin d'être nettoyée" -#: library/errno.rst:618 +#: library/errno.rst:633 msgid "Not a XENIX named type file" msgstr "N'est pas un fichier nommé du type *XENIX*" -#: library/errno.rst:623 +#: library/errno.rst:638 msgid "No XENIX semaphores available" msgstr "Pas de sémaphore *XENIX* disponible" -#: library/errno.rst:628 +#: library/errno.rst:643 msgid "Is a named type file" msgstr "Est un fichier nommé" -#: library/errno.rst:633 +#: library/errno.rst:648 msgid "Remote I/O error" msgstr "Erreur d'entrées-sorties distante" -#: library/errno.rst:638 +#: library/errno.rst:653 msgid "Quota exceeded" msgstr "Quota dépassé" + +#~ msgid "Operation not permitted" +#~ msgstr "Opération interdite" + +#~ msgid "No such file or directory" +#~ msgstr "Fichier ou répertoire inexistant" + +#~ msgid "No such process" +#~ msgstr "Processus inexistant" + +#~ msgid "Interrupted system call." +#~ msgstr "Appel système interrompu" + +#~ msgid "No child processes" +#~ msgstr "Pas de processus fils" + +#~ msgid "Try again" +#~ msgstr "Ressource temporairement indisponible (réessayez)" + +#~ msgid "Permission denied" +#~ msgstr "Autorisation refusée" + +#~ msgid "File exists" +#~ msgstr "Fichier déjà existant" + +#~ msgid "Not a directory" +#~ msgstr "Pas un répertoire" + +#~ msgid "Is a directory" +#~ msgstr "Est un répertoire" + +#~ msgid "Broken pipe" +#~ msgstr "Tube brisé" + +#~ msgid "Operation would block" +#~ msgstr "L'opération bloquerait" + +#~ msgid "Software caused connection abort" +#~ msgstr "Connexion abandonnée" + +#~ msgid "Connection reset by peer" +#~ msgstr "Connexion réinitialisée" + +#~ msgid "Cannot send after transport endpoint shutdown" +#~ msgstr "Impossible d'envoyer après l'arrêt du point final du transport" + +#~ msgid "Connection timed out" +#~ msgstr "Délai maximal de connexion écoulé" + +#~ msgid "Connection refused" +#~ msgstr "Connexion refusée" + +#~ msgid "Operation already in progress" +#~ msgstr "Connexion déjà en cours" + +#~ msgid "Operation now in progress" +#~ msgstr "Opération en cours" diff --git a/library/exceptions.po b/library/exceptions.po index 930d74abd1..d965968fd2 100644 --- a/library/exceptions.po +++ b/library/exceptions.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-10-15 09:04+0200\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -38,9 +38,9 @@ msgstr "" #: library/exceptions.rst:19 msgid "" "The built-in exceptions listed below can be generated by the interpreter or " -"built-in functions. Except where mentioned, they have an \"associated value" -"\" indicating the detailed cause of the error. This may be a string or a " -"tuple of several items of information (e.g., an error code and a string " +"built-in functions. Except where mentioned, they have an \"associated " +"value\" indicating the detailed cause of the error. This may be a string or " +"a tuple of several items of information (e.g., an error code and a string " "explaining the code). The associated value is usually passed as arguments " "to the exception class's constructor." msgstr "" @@ -80,52 +80,53 @@ msgstr "" "définition des exceptions sont disponibles dans le Tutoriel Python au " "chapitre :ref:`tut-userexceptions`." -#: library/exceptions.rst:37 -msgid "" -"When raising (or re-raising) an exception in an :keyword:`except` or :" -"keyword:`finally` clause :attr:`__context__` is automatically set to the " -"last exception caught; if the new exception is not handled the traceback " -"that is eventually displayed will include the originating exception(s) and " -"the final exception." -msgstr "" -"En levant (ou levant à nouveau) une exception dans une clause :keyword:" -"`except` ou :keyword:`finally`, :attr:`__context__` est automatiquement " -"assigné à la dernière exception interceptée ; si la nouvelle exception n'est " -"pas gérée, la trace d'appels affichée inclut la ou les exception(s) " -"d'origine et l'exception finale." - -#: library/exceptions.rst:43 -msgid "" -"When raising a new exception (rather than using a bare ``raise`` to re-raise " -"the exception currently being handled), the implicit exception context can " -"be supplemented with an explicit cause by using :keyword:`from` with :" -"keyword:`raise`::" -msgstr "" -"En levant une nouvelle exception (plutôt que d'utiliser un simple ``raise`` " -"pour lever à nouveau l'exception en cours de traitement), le contexte " -"implicite d'exception peut être complété par une cause explicite en " -"utilisant :keyword:`from` avec :keyword:`raise` ::" - -#: library/exceptions.rst:50 -msgid "" -"The expression following :keyword:`from` must be an exception or ``None``. " -"It will be set as :attr:`__cause__` on the raised exception. Setting :attr:" -"`__cause__` also implicitly sets the :attr:`__suppress_context__` attribute " -"to ``True``, so that using ``raise new_exc from None`` effectively replaces " -"the old exception with the new one for display purposes (e.g. converting :" -"exc:`KeyError` to :exc:`AttributeError`), while leaving the old exception " -"available in :attr:`__context__` for introspection when debugging." -msgstr "" -"L'expression suivant :keyword:`from` doit être une exception ou ``None``. " -"Elle sera assignée en tant que :attr:`__cause__` dans l'exception levée. " -"Changer :attr:`__cause__` change aussi implicitement l'attribut :attr:" +#: library/exceptions.rst:39 +msgid "Exception context" +msgstr "Contexte des exceptions" + +#: library/exceptions.rst:41 +msgid "" +"When raising a new exception while another exception is already being " +"handled, the new exception's :attr:`__context__` attribute is automatically " +"set to the handled exception. An exception may be handled when an :keyword:" +"`except` or :keyword:`finally` clause, or a :keyword:`with` statement, is " +"used." +msgstr "" +"Quand une exception est levée pendant qu'une autre exception est déjà en " +"traitement, l'attribut :attr:`__context__` de la nouvelle exception est " +"automatiquement affecté à l'exception qui est en cours de traitement. Une " +"exception peut être traitée quand une clause :keyword:`except` ou :keyword:" +"`finally`, ou une instruction :keyword:`with` est utilisée." + +#: library/exceptions.rst:47 +msgid "" +"This implicit exception context can be supplemented with an explicit cause " +"by using :keyword:`!from` with :keyword:`raise`::" +msgstr "" +"Ce contexte implicite d'exception peut être complété par une cause explicite " +"en utilisant :keyword:`!from` avec :keyword:`raise` ::" + +#: library/exceptions.rst:53 +msgid "" +"The expression following :keyword:`from` must be an exception or " +"``None``. It will be set as :attr:`__cause__` on the raised exception. " +"Setting :attr:`__cause__` also implicitly sets the :attr:" +"`__suppress_context__` attribute to ``True``, so that using ``raise new_exc " +"from None`` effectively replaces the old exception with the new one for " +"display purposes (e.g. converting :exc:`KeyError` to :exc:`AttributeError`), " +"while leaving the old exception available in :attr:`__context__` for " +"introspection when debugging." +msgstr "" +"L'expression suivant :keyword:`from` doit être une exception ou " +"``None``. Elle sera assignée en tant que :attr:`__cause__` dans l'exception " +"levée. Changer :attr:`__cause__` change aussi implicitement l'attribut :attr:" "`__suppress_context__` à ``True``, de sorte que l'utilisation de ``raise " "new_exc from None`` remplace bien l'ancienne exception avec la nouvelle à " -"des fins d'affichage (e.g., convertir :exc:`KeyError` en :exc:" +"des fins d'affichage (par exemple, convertir :exc:`KeyError` en :exc:" "`AttributeError`), tout en laissant l'ancienne exception disponible dans :" "attr:`__context__` pour introspection lors du débogage." -#: library/exceptions.rst:59 +#: library/exceptions.rst:62 msgid "" "The default traceback display code shows these chained exceptions in " "addition to the traceback for the exception itself. An explicitly chained " @@ -140,7 +141,7 @@ msgstr "" "affichée que si :attr:`__cause__` est :const:`None` et :attr:" "`__suppress_context__` est faux." -#: library/exceptions.rst:65 +#: library/exceptions.rst:68 msgid "" "In either case, the exception itself is always shown after any chained " "exceptions so that the final line of the traceback always shows the last " @@ -150,11 +151,45 @@ msgstr "" "les exceptions enchaînées, de sorte que la dernière ligne de la trace " "d'appels montre toujours la dernière exception qui a été levée." -#: library/exceptions.rst:71 +#: library/exceptions.rst:74 +msgid "Inheriting from built-in exceptions" +msgstr "Hériter des exceptions natives" + +#: library/exceptions.rst:76 +msgid "" +"User code can create subclasses that inherit from an exception type. It's " +"recommended to only subclass one exception type at a time to avoid any " +"possible conflicts between how the bases handle the ``args`` attribute, as " +"well as due to possible memory layout incompatibilities." +msgstr "" +"Le code de l'utilisateur peut créer des sous-classes qui dérivent d'un type " +"d'exception. Il est recommandé de ne dériver que d'un seul type d'exception " +"à la fois pour éviter des conflits possibles dans la façon dont les classes " +"mères traitent l'argument ``args`` ainsi que des incompatibilités " +"potentielles avec l'utilisation de la mémoire." + +#: library/exceptions.rst:83 +msgid "" +"Most built-in exceptions are implemented in C for efficiency, see: :source:" +"`Objects/exceptions.c`. Some have custom memory layouts which makes it " +"impossible to create a subclass that inherits from multiple exception types. " +"The memory layout of a type is an implementation detail and might change " +"between Python versions, leading to new conflicts in the future. Therefore, " +"it's recommended to avoid subclassing multiple exception types altogether." +msgstr "" +"La majorité des exceptions natives sont implémentées en C pour des raisons " +"d'efficacité, voir :source:`Objects/exceptions.c`. L'architecture interne de " +"certaines est telle que cela rend impossible la création de sous-classes qui " +"dérivent de plusieurs types d'exceptions. L'agencement de la mémoire est un " +"détail d'implémentation qui est sujet à changement d'une version de Python à " +"l'autre, ce qui peut poser conflit dans le futur. Il est donc déconseillé de " +"dériver de plusieurs types d'exceptions." + +#: library/exceptions.rst:93 msgid "Base classes" msgstr "Classes de base" -#: library/exceptions.rst:73 +#: library/exceptions.rst:95 msgid "" "The following exceptions are used mostly as base classes for other " "exceptions." @@ -162,7 +197,7 @@ msgstr "" "Les exceptions suivantes sont utilisées principalement en tant que classes " "de base pour d'autres exceptions." -#: library/exceptions.rst:77 +#: library/exceptions.rst:99 msgid "" "The base class for all built-in exceptions. It is not meant to be directly " "inherited by user-defined classes (for that, use :exc:`Exception`). If :" @@ -176,7 +211,7 @@ msgstr "" "classe, la représentation du ou des argument(s) de l'instance est retournée, " "ou la chaîne vide s'il n'y avait pas d'arguments." -#: library/exceptions.rst:85 +#: library/exceptions.rst:107 msgid "" "The tuple of arguments given to the exception constructor. Some built-in " "exceptions (like :exc:`OSError`) expect a certain number of arguments and " @@ -189,7 +224,7 @@ msgstr "" "uplet, alors que d'autres ne sont généralement appelées qu'avec une seule " "chaîne de caractères rendant un message d'erreur." -#: library/exceptions.rst:92 +#: library/exceptions.rst:114 msgid "" "This method sets *tb* as the new traceback for the exception and returns the " "exception object. It is usually used in exception handling code like this::" @@ -198,7 +233,7 @@ msgstr "" "l'exception et retourne l'objet exception. Elle est généralement utilisée " "dans du code de gestion d'exceptions comme ceci ::" -#: library/exceptions.rst:105 +#: library/exceptions.rst:127 msgid "" "All built-in, non-system-exiting exceptions are derived from this class. " "All user-defined exceptions should also be derived from this class." @@ -207,7 +242,7 @@ msgstr "" "dérivent de cette classe. Toutes les exceptions définies par l'utilisateur " "devraient également être dérivées de cette classe." -#: library/exceptions.rst:111 +#: library/exceptions.rst:133 msgid "" "The base class for those built-in exceptions that are raised for various " "arithmetic errors: :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:" @@ -217,7 +252,7 @@ msgstr "" "erreurs arithmétiques : :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:" "`FloatingPointError`." -#: library/exceptions.rst:118 +#: library/exceptions.rst:140 msgid "" "Raised when a :ref:`buffer ` related operation cannot be " "performed." @@ -225,7 +260,7 @@ msgstr "" "Levée lorsqu'une opération liée à un :ref:`tampon ` ne peut " "pas être exécutée." -#: library/exceptions.rst:124 +#: library/exceptions.rst:146 msgid "" "The base class for the exceptions that are raised when a key or index used " "on a mapping or sequence is invalid: :exc:`IndexError`, :exc:`KeyError`. " @@ -236,19 +271,19 @@ msgstr "" "invalide : :exc:`IndexError`, :exc:`KeyError`. Peut être levée directement " "par :func:`codecs.lookup`." -#: library/exceptions.rst:130 +#: library/exceptions.rst:152 msgid "Concrete exceptions" msgstr "Exceptions concrètes" -#: library/exceptions.rst:132 +#: library/exceptions.rst:154 msgid "The following exceptions are the exceptions that are usually raised." msgstr "Les exceptions suivantes sont celles qui sont habituellement levées." -#: library/exceptions.rst:138 +#: library/exceptions.rst:160 msgid "Raised when an :keyword:`assert` statement fails." msgstr "Levée lorsqu'une instruction :keyword:`assert` échoue." -#: library/exceptions.rst:143 +#: library/exceptions.rst:165 msgid "" "Raised when an attribute reference (see :ref:`attribute-references`) or " "assignment fails. (When an object does not support attribute references or " @@ -258,7 +293,7 @@ msgstr "" "`attribute-references`) échoue. (Lorsqu'un objet ne supporte pas du tout la " "référence ou l'assignation d'attribut, :exc:`TypeError` est levé.)" -#: library/exceptions.rst:150 +#: library/exceptions.rst:172 msgid "" "Raised when the :func:`input` function hits an end-of-file condition (EOF) " "without reading any data. (N.B.: the :meth:`io.IOBase.read` and :meth:`io." @@ -269,11 +304,11 @@ msgstr "" "read` et :meth:`io.IOBase.readline` retournent une chaîne vide lorsqu'elles " "atteignent EOF.)" -#: library/exceptions.rst:157 +#: library/exceptions.rst:179 msgid "Not currently used." msgstr "N’est pas utilisé pour le moment." -#: library/exceptions.rst:162 +#: library/exceptions.rst:184 msgid "" "Raised when a :term:`generator` or :term:`coroutine` is closed; see :meth:" "`generator.close` and :meth:`coroutine.close`. It directly inherits from :" @@ -285,7 +320,7 @@ msgstr "" "de :exc:`BaseException` au lieu de :exc:`Exception` puisqu'il ne s'agit pas " "techniquement d'une erreur." -#: library/exceptions.rst:170 +#: library/exceptions.rst:192 msgid "" "Raised when the :keyword:`import` statement has troubles trying to load a " "module. Also raised when the \"from list\" in ``from ... import`` has a " @@ -295,7 +330,7 @@ msgstr "" "de charger un module. Également levée lorsque Python ne trouve pas un nom " "dans ``from ... import``." -#: library/exceptions.rst:174 +#: library/exceptions.rst:196 msgid "" "The :attr:`name` and :attr:`path` attributes can be set using keyword-only " "arguments to the constructor. When set they represent the name of the module " @@ -307,11 +342,11 @@ msgstr "" "ils représentent respectivement le nom du module qui a été tenté d'être " "importé et le chemin d'accès au fichier qui a déclenché l'exception." -#: library/exceptions.rst:179 +#: library/exceptions.rst:201 msgid "Added the :attr:`name` and :attr:`path` attributes." msgstr "Ajout des attributs :attr:`name` et :attr:`path`." -#: library/exceptions.rst:184 +#: library/exceptions.rst:206 msgid "" "A subclass of :exc:`ImportError` which is raised by :keyword:`import` when a " "module could not be located. It is also raised when ``None`` is found in :" @@ -321,7 +356,7 @@ msgstr "" "lorsqu'un module n'a pas pu être localisé. Elle est généralement levée quand " "``None`` est trouvé dans :data:`sys.modules`." -#: library/exceptions.rst:193 +#: library/exceptions.rst:215 msgid "" "Raised when a sequence subscript is out of range. (Slice indices are " "silently truncated to fall in the allowed range; if an index is not an " @@ -331,7 +366,7 @@ msgstr "" "tranches (*slices*) sont tronqués silencieusement pour tomber dans la plage " "autorisée ; si un indice n'est pas un entier, :exc:`TypeError` est levée.)" -#: library/exceptions.rst:202 +#: library/exceptions.rst:224 msgid "" "Raised when a mapping (dictionary) key is not found in the set of existing " "keys." @@ -339,7 +374,7 @@ msgstr "" "Levée lorsqu'une clef (de dictionnaire) n'est pas trouvée dans l'ensemble " "des clefs existantes." -#: library/exceptions.rst:209 +#: library/exceptions.rst:231 msgid "" "Raised when the user hits the interrupt key (normally :kbd:`Control-C` or :" "kbd:`Delete`). During execution, a check for interrupts is made regularly. " @@ -354,7 +389,22 @@ msgstr "" "du code qui intercepte :exc:`Exception` et ainsi empêcher l'interpréteur de " "quitter." -#: library/exceptions.rst:218 +#: library/exceptions.rst:239 +msgid "" +"Catching a :exc:`KeyboardInterrupt` requires special consideration. Because " +"it can be raised at unpredictable points, it may, in some circumstances, " +"leave the running program in an inconsistent state. It is generally best to " +"allow :exc:`KeyboardInterrupt` to end the program as quickly as possible or " +"avoid raising it entirely. (See :ref:`handlers-and-exceptions`.)" +msgstr "" +"Attraper une :exc:`KeyboardInterrupt` demande une considération " +"particulière. Comme elle peut être levée à des moments imprévisibles, elle " +"peut dans certains cas laisser le programme en cours d'exécution dans un " +"état incohérent. Il est généralement préférable de laisser :exc:" +"`KeyboardInterrupt` arrêter le programme aussi rapidement que possible ou " +"d'éviter catégoriquement de la lever (voir :ref:`handlers-and-exceptions`)." + +#: library/exceptions.rst:249 msgid "" "Raised when an operation runs out of memory but the situation may still be " "rescued (by deleting some objects). The associated value is a string " @@ -373,7 +423,7 @@ msgstr "" "une exception pour qu'une pile d'appels puisse être affichée, dans le cas où " "un programme en cours d'exécution en était la cause." -#: library/exceptions.rst:229 +#: library/exceptions.rst:260 msgid "" "Raised when a local or global name is not found. This applies only to " "unqualified names. The associated value is an error message that includes " @@ -383,7 +433,7 @@ msgstr "" "qu'aux noms non qualifiés. La valeur associée est un message d'erreur qui " "inclut le nom qui n'a pas pu être trouvé." -#: library/exceptions.rst:236 +#: library/exceptions.rst:267 msgid "" "This exception is derived from :exc:`RuntimeError`. In user defined base " "classes, abstract methods should raise this exception when they require " @@ -396,7 +446,7 @@ msgstr "" "méthode, ou lorsque la classe est en cours de développement pour indiquer " "que l'implémentation concrète doit encore être ajoutée." -#: library/exceptions.rst:243 +#: library/exceptions.rst:274 msgid "" "It should not be used to indicate that an operator or method is not meant to " "be supported at all -- in that case either leave the operator / method " @@ -407,7 +457,7 @@ msgstr "" "laissez soit l'opérateur / la méthode non défini, soit, s'il s'agit d'une " "sous-classe, assignez-le à :data:`None`." -#: library/exceptions.rst:249 +#: library/exceptions.rst:280 msgid "" "``NotImplementedError`` and ``NotImplemented`` are not interchangeable, even " "though they have similar names and purposes. See :data:`NotImplemented` for " @@ -417,18 +467,18 @@ msgstr "" "même s'ils ont des noms et des objectifs similaires. Voir :data:" "`NotImplemented` pour des détails sur la façon de les utiliser." -#: library/exceptions.rst:258 +#: library/exceptions.rst:289 msgid "" "This exception is raised when a system function returns a system-related " -"error, including I/O failures such as \"file not found\" or \"disk full" -"\" (not for illegal argument types or other incidental errors)." +"error, including I/O failures such as \"file not found\" or \"disk " +"full\" (not for illegal argument types or other incidental errors)." msgstr "" "Cette exception est levée lorsqu'une fonction système retourne une erreur " "liée au système, incluant les erreurs entrées-sorties telles que \"fichier " "non trouvé\" ou \"disque plein\" (pas pour les types d'arguments illégaux ou " "d'autres erreurs accidentelles)." -#: library/exceptions.rst:262 +#: library/exceptions.rst:293 msgid "" "The second form of the constructor sets the corresponding attributes, " "described below. The attributes default to :const:`None` if not specified. " @@ -442,7 +492,7 @@ msgstr "" "l'attribut :attr:`~BaseException.args` contient seulement une paire avec les " "valeurs des deux premiers arguments du constructeur." -#: library/exceptions.rst:268 +#: library/exceptions.rst:299 msgid "" "The constructor often actually returns a subclass of :exc:`OSError`, as " "described in `OS exceptions`_ below. The particular subclass depends on the " @@ -456,11 +506,11 @@ msgstr "" "de la construction d':exc:`OSError` directement ou via un alias, et n'est " "pas hérité lors du sous-classement." -#: library/exceptions.rst:276 +#: library/exceptions.rst:307 msgid "A numeric error code from the C variable :c:data:`errno`." msgstr "Code d'erreur numérique de la variable C :c:data:`errno`." -#: library/exceptions.rst:280 +#: library/exceptions.rst:311 msgid "" "Under Windows, this gives you the native Windows error code. The :attr:`." "errno` attribute is then an approximate translation, in POSIX terms, of that " @@ -470,7 +520,7 @@ msgstr "" "errno` est alors une traduction approximative, en termes POSIX, de ce code " "d'erreur natif." -#: library/exceptions.rst:284 +#: library/exceptions.rst:315 msgid "" "Under Windows, if the *winerror* constructor argument is an integer, the :" "attr:`.errno` attribute is determined from the Windows error code, and the " @@ -482,7 +532,7 @@ msgstr "" "et l'argument *errno* est ignoré. Sur d'autres plateformes, l'argument " "*winerror* est ignoré, et l'attribut :attr:`winerror` n'existe pas." -#: library/exceptions.rst:292 +#: library/exceptions.rst:323 msgid "" "The corresponding error message, as provided by the operating system. It is " "formatted by the C functions :c:func:`perror` under POSIX, and :c:func:" @@ -492,7 +542,7 @@ msgstr "" "d'exploitation. Il est formaté par les fonctions C :c:func:`perror` sous " "POSIX, et :c:func:`FormatMessage` sous Windows." -#: library/exceptions.rst:300 +#: library/exceptions.rst:331 msgid "" "For exceptions that involve a file system path (such as :func:`open` or :" "func:`os.unlink`), :attr:`filename` is the file name passed to the function. " @@ -506,7 +556,7 @@ msgstr "" "à deux chemins d'accès au système de fichiers (comme :func:`os.rename`), :" "attr:`filename2` correspond au deuxième nom de fichier passé à la fonction." -#: library/exceptions.rst:307 +#: library/exceptions.rst:338 msgid "" ":exc:`EnvironmentError`, :exc:`IOError`, :exc:`WindowsError`, :exc:`socket." "error`, :exc:`select.error` and :exc:`mmap.error` have been merged into :exc:" @@ -516,7 +566,7 @@ msgstr "" "error`, :exc:`select.error` et :exc:`mmap.error` ont fusionnées en :exc:" "`OSError`, et le constructeur peut renvoyer une sous-classe." -#: library/exceptions.rst:313 +#: library/exceptions.rst:344 msgid "" "The :attr:`filename` attribute is now the original file name passed to the " "function, instead of the name encoded to or decoded from the filesystem " @@ -528,7 +578,7 @@ msgstr "" "système de fichiers. De plus, l'argument du constructeur et attribut " "*filename2* a été ajouté." -#: library/exceptions.rst:322 +#: library/exceptions.rst:353 msgid "" "Raised when the result of an arithmetic operation is too large to be " "represented. This cannot occur for integers (which would rather raise :exc:" @@ -545,7 +595,7 @@ msgstr "" "normalisation de la gestion des exceptions de virgule flottante en C, la " "plupart des opérations en virgule flottante ne sont pas vérifiées." -#: library/exceptions.rst:332 +#: library/exceptions.rst:363 msgid "" "This exception is derived from :exc:`RuntimeError`. It is raised when the " "interpreter detects that the maximum recursion depth (see :func:`sys." @@ -555,11 +605,11 @@ msgstr "" "l'interpréteur détecte que la profondeur de récursivité maximale (voir :func:" "`sys.getrecursionlimit`) est dépassée." -#: library/exceptions.rst:336 +#: library/exceptions.rst:367 msgid "Previously, a plain :exc:`RuntimeError` was raised." msgstr "Auparavant, une simple :exc:`RuntimeError` était levée." -#: library/exceptions.rst:342 +#: library/exceptions.rst:373 msgid "" "This exception is raised when a weak reference proxy, created by the :func:" "`weakref.proxy` function, is used to access an attribute of the referent " @@ -572,7 +622,7 @@ msgstr "" "Pour plus d'informations sur les pointeurs faibles, voir le module :mod:" "`weakref`." -#: library/exceptions.rst:350 +#: library/exceptions.rst:381 msgid "" "Raised when an error is detected that doesn't fall in any of the other " "categories. The associated value is a string indicating what precisely went " @@ -582,7 +632,7 @@ msgstr "" "détectée. La valeur associée est une chaîne de caractères indiquant " "précisément ce qui s'est mal passé." -#: library/exceptions.rst:357 +#: library/exceptions.rst:388 msgid "" "Raised by built-in function :func:`next` and an :term:`iterator`\\'s :meth:" "`~iterator.__next__` method to signal that there are no further items " @@ -592,7 +642,7 @@ msgstr "" "__next__` d'un :term:`iterator` (itérateur) pour signaler qu'il n'y a pas " "d'autres éléments produits par l'itérateur." -#: library/exceptions.rst:361 +#: library/exceptions.rst:392 msgid "" "The exception object has a single attribute :attr:`value`, which is given as " "an argument when constructing the exception, and defaults to :const:`None`." @@ -601,7 +651,7 @@ msgstr "" "argument lors de la construction de l'exception, et vaut :const:`None` par " "défaut." -#: library/exceptions.rst:365 +#: library/exceptions.rst:396 msgid "" "When a :term:`generator` or :term:`coroutine` function returns, a new :exc:" "`StopIteration` instance is raised, and the value returned by the function " @@ -612,7 +662,7 @@ msgstr "" "valeur retournée par la fonction est passée au paramètre :attr:`value` du " "constructeur de l'exception." -#: library/exceptions.rst:370 +#: library/exceptions.rst:401 msgid "" "If a generator code directly or indirectly raises :exc:`StopIteration`, it " "is converted into a :exc:`RuntimeError` (retaining the :exc:`StopIteration` " @@ -622,7 +672,7 @@ msgstr "" "`StopIteration`, elle est convertie en :exc:`RuntimeError` (en conservant :" "exc:`StopIteration` comme cause de la nouvelle exception)." -#: library/exceptions.rst:374 +#: library/exceptions.rst:405 msgid "" "Added ``value`` attribute and the ability for generator functions to use it " "to return a value." @@ -630,7 +680,7 @@ msgstr "" "Ajout de l'attribut ``value`` et de la possibilité pour les fonctions de " "générateur de l'utiliser pour retourner une valeur." -#: library/exceptions.rst:378 +#: library/exceptions.rst:409 msgid "" "Introduced the RuntimeError transformation via ``from __future__ import " "generator_stop``, see :pep:`479`." @@ -638,7 +688,7 @@ msgstr "" "Introduit la transformation des erreurs RuntimeError via ``from __future__ " "import generator_stop``, cf. :pep:`479`." -#: library/exceptions.rst:382 +#: library/exceptions.rst:413 msgid "" "Enable :pep:`479` for all code by default: a :exc:`StopIteration` error " "raised in a generator is transformed into a :exc:`RuntimeError`." @@ -647,7 +697,7 @@ msgstr "" "`StopIteration` est levée dans un générateur elle est transformée en une :" "exc:`RuntimeError`." -#: library/exceptions.rst:388 +#: library/exceptions.rst:419 msgid "" "Must be raised by :meth:`__anext__` method of an :term:`asynchronous " "iterator` object to stop the iteration." @@ -655,30 +705,61 @@ msgstr "" "Doit être levée par la méthode :meth:`__anext__` d'un objet :term:" "`asynchronous iterator` pour arrêter l'itération." -#: library/exceptions.rst:395 +#: library/exceptions.rst:426 msgid "" "Raised when the parser encounters a syntax error. This may occur in an :" -"keyword:`import` statement, in a call to the built-in functions :func:`exec` " -"or :func:`eval`, or when reading the initial script or standard input (also " -"interactively)." +"keyword:`import` statement, in a call to the built-in functions :func:" +"`compile`, :func:`exec`, or :func:`eval`, or when reading the initial script " +"or standard input (also interactively)." msgstr "" "Levée lorsque l'analyseur syntaxique rencontre une erreur de syntaxe. Cela " "peut se produire dans une instruction :keyword:`import`, dans un appel aux " -"fonctions natives :func:`exec` ou :func:`eval`, ou lors de la lecture du " -"script initial ou de l'entrée standard (également de manière interactive)." +"fonctions natives :func:`compile`, :func:`exec` ou :func:`eval`, ou lors de " +"la lecture du script initial ou de l'entrée standard (également de manière " +"interactive)." + +#: library/exceptions.rst:432 +msgid "" +"The :func:`str` of the exception instance returns only the error message. " +"Details is a tuple whose members are also available as separate attributes." +msgstr "" +"La conversion en chaîne avec :func:`str` de l'instance de l'exception ne " +"renvoie que le message d'erreur. L'argument ``details`` est un *n*-uplet " +"dont les membres sont disponibles en tant qu'attributs séparés." + +#: library/exceptions.rst:437 +msgid "The name of the file the syntax error occurred in." +msgstr "Le nom du fichier dans lequel l'erreur de syntaxe a été rencontrée." + +#: library/exceptions.rst:441 +msgid "" +"Which line number in the file the error occurred in. This is 1-indexed: the " +"first line in the file has a ``lineno`` of 1." +msgstr "" +"Le numéro de la ligne dans le fichier où l'erreur s'est produite. L'indiçage " +"commence à 1 : ``lineno`` vaut 1 pour la première ligne du fichier." + +#: library/exceptions.rst:446 +msgid "" +"The column in the line where the error occurred. This is 1-indexed: the " +"first character in the line has an ``offset`` of 1." +msgstr "" +"La colonne dans la ligne où l'erreur s'est produite. L'indiçage commence à " +"1 : ``offset`` vaut 1 pour le premier caractère de la ligne." + +#: library/exceptions.rst:451 +msgid "The source code text involved in the error." +msgstr "Le texte du code source impliqué dans l'erreur." -#: library/exceptions.rst:400 +#: library/exceptions.rst:453 msgid "" -"Instances of this class have attributes :attr:`filename`, :attr:`lineno`, :" -"attr:`offset` and :attr:`text` for easier access to the details. :func:" -"`str` of the exception instance returns only the message." +"For errors in f-string fields, the message is prefixed by \"f-string: \" and " +"the offsets are offsets in a text constructed from the replacement " +"expression. For example, compiling f'Bad {a b} field' results in this args " +"attribute: ('f-string: ...', ('', 1, 4, '(a b)\\n'))." msgstr "" -"Les instances de cette classe ont des attributs :attr:`filename`, :attr:" -"`lineno`, :attr:`offset` et :attr:`text` pour accéder plus facilement aux " -"détails. La représentation :func:`str` de l'instance de l'exception retourne " -"seulement le message." -#: library/exceptions.rst:407 +#: library/exceptions.rst:461 msgid "" "Base class for syntax errors related to incorrect indentation. This is a " "subclass of :exc:`SyntaxError`." @@ -686,7 +767,7 @@ msgstr "" "Classe de base pour les erreurs de syntaxe liées à une indentation " "incorrecte. C'est une sous-classe de :exc:`SyntaxError`." -#: library/exceptions.rst:413 +#: library/exceptions.rst:467 msgid "" "Raised when indentation contains an inconsistent use of tabs and spaces. " "This is a subclass of :exc:`IndentationError`." @@ -694,7 +775,7 @@ msgstr "" "Levée lorsqu'une indentation contient une utilisation incohérente des " "tabulations et des espaces. C'est une sous-classe de :exc:`IndentationError`." -#: library/exceptions.rst:419 +#: library/exceptions.rst:473 msgid "" "Raised when the interpreter finds an internal error, but the situation does " "not look so serious to cause it to abandon all hope. The associated value is " @@ -705,7 +786,7 @@ msgstr "" "espoir. La valeur associée est une chaîne de caractères indiquant l'erreur " "qui est survenue (en termes bas niveau)." -#: library/exceptions.rst:423 +#: library/exceptions.rst:477 msgid "" "You should report this to the author or maintainer of your Python " "interpreter. Be sure to report the version of the Python interpreter (``sys." @@ -719,7 +800,7 @@ msgstr "" "interactive), le message d'erreur exact (la valeur associée à l'exception) " "et si possible le code source du programme qui a déclenché l'erreur." -#: library/exceptions.rst:432 +#: library/exceptions.rst:486 msgid "" "This exception is raised by the :func:`sys.exit` function. It inherits " "from :exc:`BaseException` instead of :exc:`Exception` so that it is not " @@ -744,7 +825,7 @@ msgstr "" "autre type (comme une chaîne de caractères), la valeur de l'objet est " "affichée et l'état de sortie est un." -#: library/exceptions.rst:443 +#: library/exceptions.rst:497 msgid "" "A call to :func:`sys.exit` is translated into an exception so that clean-up " "handlers (:keyword:`finally` clauses of :keyword:`try` statements) can be " @@ -761,7 +842,7 @@ msgstr "" "immédiatement (par exemple, dans le processus enfant après un appel à :func:" "`os.fork`)." -#: library/exceptions.rst:452 +#: library/exceptions.rst:506 msgid "" "The exit status or error message that is passed to the constructor. " "(Defaults to ``None``.)" @@ -769,7 +850,7 @@ msgstr "" "L'état de sortie ou le message d'erreur passé au constructeur. (``None`` par " "défaut.)" -#: library/exceptions.rst:458 +#: library/exceptions.rst:512 msgid "" "Raised when an operation or function is applied to an object of " "inappropriate type. The associated value is a string giving details about " @@ -779,7 +860,7 @@ msgstr "" "inapproprié. La valeur associée est une chaîne de caractères donnant des " "détails sur le type d'inadéquation." -#: library/exceptions.rst:461 +#: library/exceptions.rst:515 msgid "" "This exception may be raised by user code to indicate that an attempted " "operation on an object is not supported, and is not meant to be. If an " @@ -792,7 +873,7 @@ msgstr "" "donnée mais n'a pas encore fourni une implémentation, lever :exc:" "`NotImplementedError` est plus approprié." -#: library/exceptions.rst:466 +#: library/exceptions.rst:520 msgid "" "Passing arguments of the wrong type (e.g. passing a :class:`list` when an :" "class:`int` is expected) should result in a :exc:`TypeError`, but passing " @@ -804,7 +885,7 @@ msgstr "" "le passage d'arguments avec la mauvaise valeur (e.g. un nombre en dehors des " "limites attendues) devrait résulter en une :exc:`ValueError`." -#: library/exceptions.rst:473 +#: library/exceptions.rst:527 msgid "" "Raised when a reference is made to a local variable in a function or method, " "but no value has been bound to that variable. This is a subclass of :exc:" @@ -814,7 +895,7 @@ msgstr "" "ou une méthode, mais qu'aucune valeur n'a été liée à cette variable. C'est " "une sous-classe de :exc:`NameError`." -#: library/exceptions.rst:480 +#: library/exceptions.rst:534 msgid "" "Raised when a Unicode-related encoding or decoding error occurs. It is a " "subclass of :exc:`ValueError`." @@ -822,7 +903,7 @@ msgstr "" "Levée lorsqu'une erreur d'encodage ou de décodage liée à Unicode se produit. " "C'est une sous-classe de :exc:`ValueError`." -#: library/exceptions.rst:483 +#: library/exceptions.rst:537 msgid "" ":exc:`UnicodeError` has attributes that describe the encoding or decoding " "error. For example, ``err.object[err.start:err.end]`` gives the particular " @@ -832,27 +913,27 @@ msgstr "" "décodage. Par exemple, ``err.object[err.start:err.end]`` donne l'entrée " "particulière invalide sur laquelle le codec a échoué." -#: library/exceptions.rst:489 +#: library/exceptions.rst:543 msgid "The name of the encoding that raised the error." msgstr "Le nom de l'encodage qui a provoqué l'erreur." -#: library/exceptions.rst:493 +#: library/exceptions.rst:547 msgid "A string describing the specific codec error." msgstr "Une chaîne de caractères décrivant l'erreur de codec spécifique." -#: library/exceptions.rst:497 +#: library/exceptions.rst:551 msgid "The object the codec was attempting to encode or decode." msgstr "L'objet que le codec essayait d'encoder ou de décoder." -#: library/exceptions.rst:501 +#: library/exceptions.rst:555 msgid "The first index of invalid data in :attr:`object`." msgstr "Le premier index des données invalides dans :attr:`object`." -#: library/exceptions.rst:505 +#: library/exceptions.rst:559 msgid "The index after the last invalid data in :attr:`object`." msgstr "L'index après la dernière donnée invalide dans :attr:`object`." -#: library/exceptions.rst:510 +#: library/exceptions.rst:564 msgid "" "Raised when a Unicode-related error occurs during encoding. It is a " "subclass of :exc:`UnicodeError`." @@ -860,7 +941,7 @@ msgstr "" "Levée lorsqu'une erreur liée à Unicode se produit durant l'encodage. C'est " "une sous-classe d':exc:`UnicodeError`." -#: library/exceptions.rst:516 +#: library/exceptions.rst:570 msgid "" "Raised when a Unicode-related error occurs during decoding. It is a " "subclass of :exc:`UnicodeError`." @@ -868,7 +949,7 @@ msgstr "" "Levée lorsqu'une erreur liée à Unicode se produit durant le décodage. C'est " "une sous-classe d':exc:`UnicodeError`." -#: library/exceptions.rst:522 +#: library/exceptions.rst:576 msgid "" "Raised when a Unicode-related error occurs during translating. It is a " "subclass of :exc:`UnicodeError`." @@ -876,7 +957,7 @@ msgstr "" "Levée lorsqu'une erreur liée à Unicode se produit durant la traduction. " "C'est une sous-classe d':exc:`UnicodeError`." -#: library/exceptions.rst:528 +#: library/exceptions.rst:582 msgid "" "Raised when an operation or function receives an argument that has the right " "type but an inappropriate value, and the situation is not described by a " @@ -886,7 +967,7 @@ msgstr "" "le bon type mais une valeur inappropriée, et que la situation n'est pas " "décrite par une exception plus précise telle que :exc:`IndexError`." -#: library/exceptions.rst:535 +#: library/exceptions.rst:589 msgid "" "Raised when the second argument of a division or modulo operation is zero. " "The associated value is a string indicating the type of the operands and the " @@ -896,7 +977,7 @@ msgstr "" "est zéro. La valeur associée est une chaîne indiquant le type des opérandes " "et de l'opération." -#: library/exceptions.rst:540 +#: library/exceptions.rst:594 msgid "" "The following exceptions are kept for compatibility with previous versions; " "starting from Python 3.3, they are aliases of :exc:`OSError`." @@ -904,15 +985,15 @@ msgstr "" "Les exceptions suivantes sont conservées pour la compatibilité avec les " "anciennes versions ; depuis Python 3.3, ce sont des alias d':exc:`OSError`." -#: library/exceptions.rst:549 +#: library/exceptions.rst:603 msgid "Only available on Windows." msgstr "Seulement disponible sous Windows." -#: library/exceptions.rst:553 +#: library/exceptions.rst:607 msgid "OS exceptions" msgstr "Exceptions système" -#: library/exceptions.rst:555 +#: library/exceptions.rst:609 msgid "" "The following exceptions are subclasses of :exc:`OSError`, they get raised " "depending on the system error code." @@ -920,17 +1001,19 @@ msgstr "" "Les exceptions suivantes sont des sous-classes d':exc:`OSError`, elles sont " "levées en fonction du code d'erreur système." -#: library/exceptions.rst:560 +#: library/exceptions.rst:614 msgid "" "Raised when an operation would block on an object (e.g. socket) set for non-" -"blocking operation. Corresponds to :c:data:`errno` ``EAGAIN``, ``EALREADY``, " -"``EWOULDBLOCK`` and ``EINPROGRESS``." +"blocking operation. Corresponds to :c:data:`errno` :py:data:`~errno." +"EAGAIN`, :py:data:`~errno.EALREADY`, :py:data:`~errno.EWOULDBLOCK` and :py:" +"data:`~errno.EINPROGRESS`." msgstr "" "Levée lorsqu'une opération bloque sur un objet (par exemple un connecteur) " -"configuré pour une opération non-bloquante. Correspond à :c:data:`errno` " -"``EAGAIN``, ``EALREADY``, ``EWOULDBLOCK`` et ``EINPROGRESS``." +"configuré pour une opération non-bloquante. Correspond à :c:data:`errno` :py:" +"data:`~errno.EAGAIN`, :py:data:`~errno.EALREADY`, :py:data:`~errno." +"EWOULDBLOCK` et :py:data:`~errno.EINPROGRESS`." -#: library/exceptions.rst:565 +#: library/exceptions.rst:619 msgid "" "In addition to those of :exc:`OSError`, :exc:`BlockingIOError` can have one " "more attribute:" @@ -938,7 +1021,7 @@ msgstr "" "En plus de ceux de :exc:`OSError`, :exc:`BlockingIOError` peut avoir un " "attribut de plus :" -#: library/exceptions.rst:570 +#: library/exceptions.rst:624 msgid "" "An integer containing the number of characters written to the stream before " "it blocked. This attribute is available when using the buffered I/O classes " @@ -948,19 +1031,19 @@ msgstr "" "qu'il ne soit bloqué. Cet attribut est disponible lors de l'utilisation des " "classes tampon entrées-sorties du module :mod:`io`." -#: library/exceptions.rst:576 +#: library/exceptions.rst:630 msgid "" "Raised when an operation on a child process failed. Corresponds to :c:data:" -"`errno` ``ECHILD``." +"`errno` :py:data:`~errno.ECHILD`." msgstr "" "Levée lorsqu'une opération sur un processus enfant a échoué. Correspond à :c:" -"data:`errno` ``ECHILD``." +"data:`errno` :py:data:`~errno.ECHILD`." -#: library/exceptions.rst:581 +#: library/exceptions.rst:635 msgid "A base class for connection-related issues." msgstr "Une classe de base pour les problèmes de connexion." -#: library/exceptions.rst:583 +#: library/exceptions.rst:637 msgid "" "Subclasses are :exc:`BrokenPipeError`, :exc:`ConnectionAbortedError`, :exc:" "`ConnectionRefusedError` and :exc:`ConnectionResetError`." @@ -969,61 +1052,65 @@ msgstr "" "`ConnectionAbortedError`, :exc:`ConnectionRefusedError` et :exc:" "`ConnectionResetError`." -#: library/exceptions.rst:588 +#: library/exceptions.rst:642 msgid "" "A subclass of :exc:`ConnectionError`, raised when trying to write on a pipe " "while the other end has been closed, or trying to write on a socket which " -"has been shutdown for writing. Corresponds to :c:data:`errno` ``EPIPE`` and " -"``ESHUTDOWN``." +"has been shutdown for writing. Corresponds to :c:data:`errno` :py:data:" +"`~errno.EPIPE` and :py:data:`~errno.ESHUTDOWN`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levé en essayant d'écrire sur un " "*pipe* alors que l'autre extrémité a été fermée, ou en essayant d'écrire sur " "un connecteur (*socket* en anglais) qui a été fermé pour l'écriture. " -"Correspond à :c:data:`errno` ``EPIPE`` et ``ESHUTDOWN``." +"Correspond à :c:data:`errno` :py:data:`~errno.EPIPE` et :py:data:`~errno." +"ESHUTDOWN`." -#: library/exceptions.rst:595 +#: library/exceptions.rst:649 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " -"aborted by the peer. Corresponds to :c:data:`errno` ``ECONNABORTED``." +"aborted by the peer. Corresponds to :c:data:`errno` :py:data:`~errno." +"ECONNABORTED`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levée lorsqu'une tentative de " -"connexion est interrompue par le pair. Correspond à :c:data:`errno` " -"``ECONNABORTED``." +"connexion est interrompue par le pair. Correspond à :c:data:`errno` :py:data:" +"`~errno.ECONNABORTED`." -#: library/exceptions.rst:601 +#: library/exceptions.rst:655 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " -"refused by the peer. Corresponds to :c:data:`errno` ``ECONNREFUSED``." +"refused by the peer. Corresponds to :c:data:`errno` :py:data:`~errno." +"ECONNREFUSED`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levée lorsqu'une tentative de " -"connexion est refusée par le pair. Correspond à :c:data:`errno` " -"``ECONNREFUSED``." +"connexion est refusée par le pair. Correspond à :c:data:`errno` :py:data:" +"`~errno.ECONNREFUSED`." -#: library/exceptions.rst:607 +#: library/exceptions.rst:661 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection is reset by " -"the peer. Corresponds to :c:data:`errno` ``ECONNRESET``." +"the peer. Corresponds to :c:data:`errno` :py:data:`~errno.ECONNRESET`." msgstr "" "Une sous-classe de :exc:`ConnectionError`, levée lorsqu'une connexion est " -"réinitialisée par le pair. Correspond à :c:data:`errno` ``ECONNRESET``." +"réinitialisée par le pair. Correspond à :c:data:`errno` :py:data:`~errno." +"ECONNRESET`." -#: library/exceptions.rst:613 +#: library/exceptions.rst:667 msgid "" "Raised when trying to create a file or directory which already exists. " -"Corresponds to :c:data:`errno` ``EEXIST``." +"Corresponds to :c:data:`errno` :py:data:`~errno.EEXIST`." msgstr "" -"Levée en essayant de créer un fichier ou un répertoire qui existe déjà. " -"Correspond à :c:data:`errno` ``EEXIST``." +"Levée pendant la tentative de création d'un fichier ou d'un répertoire qui " +"existe déjà. Correspond à :c:data:`errno` :py:data:`~errno.EEXIST`." -#: library/exceptions.rst:618 +#: library/exceptions.rst:672 msgid "" "Raised when a file or directory is requested but doesn't exist. Corresponds " -"to :c:data:`errno` ``ENOENT``." +"to :c:data:`errno` :py:data:`~errno.ENOENT`." msgstr "" "Levée lorsqu'un fichier ou répertoire est demandé mais n'existe pas. " -"Correspond à :c:data:`errno` ``ENOENT``." +"Correspond à :c:data:`errno` :py:data:`~errno.ENOENT`." -#: library/exceptions.rst:623 +#: library/exceptions.rst:677 msgid "" "Raised when a system call is interrupted by an incoming signal. Corresponds " "to :c:data:`errno` :py:data:`~errno.EINTR`." @@ -1031,7 +1118,7 @@ msgstr "" "Levée lorsqu'un appel système est interrompu par un signal entrant. " "Correspond à :c:data:`errno` :py:data:`~errno.EINTR`." -#: library/exceptions.rst:626 +#: library/exceptions.rst:680 msgid "" "Python now retries system calls when a syscall is interrupted by a signal, " "except if the signal handler raises an exception (see :pep:`475` for the " @@ -1041,63 +1128,69 @@ msgstr "" "un signal, sauf si le gestionnaire de signal lève une exception (voir :pep:" "`475` pour les raisons), au lieu de lever :exc:`InterruptedError`." -#: library/exceptions.rst:633 +#: library/exceptions.rst:687 msgid "" "Raised when a file operation (such as :func:`os.remove`) is requested on a " -"directory. Corresponds to :c:data:`errno` ``EISDIR``." +"directory. Corresponds to :c:data:`errno` :py:data:`~errno.EISDIR`." msgstr "" "Levée lorsqu'une opération sur un fichier (comme :func:`os.remove`) est " -"demandée sur un répertoire. Correspond à :c:data:`errno` ``EISDIR``." +"demandée sur un répertoire. Correspond à :c:data:`errno` :py:data:`~errno." +"EISDIR`." -#: library/exceptions.rst:639 +#: library/exceptions.rst:693 msgid "" "Raised when a directory operation (such as :func:`os.listdir`) is requested " -"on something which is not a directory. Corresponds to :c:data:`errno` " -"``ENOTDIR``." +"on something which is not a directory. On most POSIX platforms, it may also " +"be raised if an operation attempts to open or traverse a non-directory file " +"as if it were a directory. Corresponds to :c:data:`errno` :py:data:`~errno." +"ENOTDIR`." msgstr "" "Levée lorsqu'une opération sur un répertoire (comme :func:`os.listdir`) est " -"demandée sur autre chose qu'un répertoire. Correspond à :c:data:`errno` " -"``ENOTDIR``." +"demandée sur autre chose qu'un répertoire. Sur la majorité des plateformes " +"*POSIX*, elle est aussi levée quand une opération tente d'ouvrir ou de " +"traverser un fichier qui n'est pas un répertoire comme s'il en était un. " +"Correspond à :c:data:`errno` :py:data:`~errno.ENOTDIR`." -#: library/exceptions.rst:645 +#: library/exceptions.rst:701 +#, fuzzy msgid "" "Raised when trying to run an operation without the adequate access rights - " -"for example filesystem permissions. Corresponds to :c:data:`errno` " -"``EACCES`` and ``EPERM``." +"for example filesystem permissions. Corresponds to :c:data:`errno` :py:data:" +"`~errno.EACCES` and :py:data:`~errno.EPERM`." msgstr "" "Levée lorsqu'on essaye d'exécuter une opération sans les droits d'accès " "adéquats — par exemple les permissions du système de fichiers. Correspond à :" "c:data:`errno` ``EACCES`` et ``EPERM``." -#: library/exceptions.rst:651 +#: library/exceptions.rst:707 msgid "" -"Raised when a given process doesn't exist. Corresponds to :c:data:`errno` " -"``ESRCH``." +"Raised when a given process doesn't exist. Corresponds to :c:data:`errno` :" +"py:data:`~errno.ESRCH`." msgstr "" -"Levée lorsqu'un processus donné n'existe pas. Correspond à :c:data:`errno` " -"``ESRCH``." +"Levée lorsqu'un processus donné n'existe pas. Correspond à :c:data:`errno` :" +"py:data:`~errno.ESRCH`." -#: library/exceptions.rst:656 +#: library/exceptions.rst:712 msgid "" "Raised when a system function timed out at the system level. Corresponds to :" -"c:data:`errno` ``ETIMEDOUT``." +"c:data:`errno` :py:data:`~errno.ETIMEDOUT`." msgstr "" "Levée lorsqu'une fonction système a expiré au niveau système. Correspond à :" -"c:data:`errno` ``ETIMEDOUT``." +"c:data:`errno` :py:data:`~errno.ETIMEDOUT`." -#: library/exceptions.rst:659 +#: library/exceptions.rst:715 msgid "All the above :exc:`OSError` subclasses were added." msgstr "Toutes les sous-classes d':exc:`OSError` ci-dessus ont été ajoutées." -#: library/exceptions.rst:665 +#: library/exceptions.rst:721 msgid ":pep:`3151` - Reworking the OS and IO exception hierarchy" msgstr ":pep:`3151` -- Refonte de la hiérarchie des exceptions système et IO" -#: library/exceptions.rst:671 +#: library/exceptions.rst:727 msgid "Warnings" msgstr "Avertissements" -#: library/exceptions.rst:673 +#: library/exceptions.rst:729 msgid "" "The following exceptions are used as warning categories; see the :ref:" "`warning-categories` documentation for more details." @@ -1105,16 +1198,16 @@ msgstr "" "Les exceptions suivantes sont utilisées comme catégories d'avertissement ; " "voir :mod:`warning-categories` pour plus d'informations." -#: library/exceptions.rst:678 +#: library/exceptions.rst:734 msgid "Base class for warning categories." msgstr "Classe de base pour les catégories d'avertissement." -#: library/exceptions.rst:683 +#: library/exceptions.rst:739 msgid "Base class for warnings generated by user code." msgstr "" "Classe de base pour les avertissements générés par du code utilisateur." -#: library/exceptions.rst:688 +#: library/exceptions.rst:744 msgid "" "Base class for warnings about deprecated features when those warnings are " "intended for other Python developers." @@ -1122,14 +1215,21 @@ msgstr "" "Classe de base pour les avertissements sur les fonctionnalités obsolètes, " "lorsque ces avertissements sont destinés aux autres développeurs Python." -#: library/exceptions.rst:691 +#: library/exceptions.rst:747 msgid "" "Ignored by the default warning filters, except in the ``__main__`` module (:" "pep:`565`). Enabling the :ref:`Python Development Mode ` shows this " "warning." msgstr "" +"Ignoré par les filtres d'avertissements par défaut, sauf dans le module " +"``__main__`` (:pep:`565`). Activer le :ref:`mode de développement de Python " +"` affiche cet avertissement." + +#: library/exceptions.rst:767 +msgid "The deprecation policy is described in :pep:`387`." +msgstr "La politique relative à l'obsolescence est décrite dans la :pep:`387`." -#: library/exceptions.rst:698 +#: library/exceptions.rst:756 msgid "" "Base class for warnings about features which are obsolete and expected to be " "deprecated in the future, but are not deprecated at the moment." @@ -1138,7 +1238,7 @@ msgstr "" "indiquent que la fonctionnalité peut encore être utilisée actuellement, mais " "qu'elle sera supprimée dans le futur." -#: library/exceptions.rst:702 +#: library/exceptions.rst:760 msgid "" "This class is rarely used as emitting a warning about a possible upcoming " "deprecation is unusual, and :exc:`DeprecationWarning` is preferred for " @@ -1148,23 +1248,25 @@ msgstr "" "d’une obsolescence à venir est inhabituel, et :exc:`DeprecationWarning` est " "préféré pour les obsolescences actuelles." -#: library/exceptions.rst:730 library/exceptions.rst:748 +#: library/exceptions.rst:790 library/exceptions.rst:808 msgid "" "Ignored by the default warning filters. Enabling the :ref:`Python " "Development Mode ` shows this warning." msgstr "" +"Ignoré par les filtres d'avertissements par défaut. Activer le :ref:`mode de " +"développement de Python ` affiche cet avertissement." -#: library/exceptions.rst:712 +#: library/exceptions.rst:772 msgid "Base class for warnings about dubious syntax." msgstr "Classe de base pour les avertissements sur de la syntaxe douteuse." -#: library/exceptions.rst:717 +#: library/exceptions.rst:777 msgid "Base class for warnings about dubious runtime behavior." msgstr "" "Classe de base pour les avertissements sur les comportements d'exécution " "douteux." -#: library/exceptions.rst:722 +#: library/exceptions.rst:782 msgid "" "Base class for warnings about deprecated features when those warnings are " "intended for end users of applications that are written in Python." @@ -1173,36 +1275,59 @@ msgstr "" "seront obsolètes dans le futur quand ces avertissements destinés aux " "utilisateurs finaux des applications écrites en Python." -#: library/exceptions.rst:728 +#: library/exceptions.rst:788 msgid "Base class for warnings about probable mistakes in module imports." msgstr "" "Classe de base pour les avertissements sur des erreurs probables dans les " "importations de modules." -#: library/exceptions.rst:736 +#: library/exceptions.rst:796 msgid "Base class for warnings related to Unicode." msgstr "Classe de base pour les avertissements liés à l'Unicode." -#: library/exceptions.rst:741 +#: library/exceptions.rst:801 msgid "" "Base class for warnings related to :class:`bytes` and :class:`bytearray`." msgstr "" "Classe de base pour les avertissements liés à :class:`bytes` et :class:" "`bytearray`." -#: library/exceptions.rst:746 -#, fuzzy +#: library/exceptions.rst:806 msgid "Base class for warnings related to resource usage." -msgstr "Classe de base pour les avertissements liés à l'Unicode." +msgstr "" +"Classe mère pour les avertissements liés à l'utilisation des ressources." -#: library/exceptions.rst:756 +#: library/exceptions.rst:816 msgid "Exception hierarchy" msgstr "Hiérarchie des exceptions" -#: library/exceptions.rst:758 +#: library/exceptions.rst:818 msgid "The class hierarchy for built-in exceptions is:" msgstr "La hiérarchie de classes pour les exceptions natives est la suivante :" +#~ msgid "" +#~ "When raising (or re-raising) an exception in an :keyword:`except` or :" +#~ "keyword:`finally` clause :attr:`__context__` is automatically set to the " +#~ "last exception caught; if the new exception is not handled the traceback " +#~ "that is eventually displayed will include the originating exception(s) " +#~ "and the final exception." +#~ msgstr "" +#~ "En levant (ou levant à nouveau) une exception dans une clause :keyword:" +#~ "`except` ou :keyword:`finally`, :attr:`__context__` est automatiquement " +#~ "assigné à la dernière exception interceptée ; si la nouvelle exception " +#~ "n'est pas gérée, la trace d'appels affichée inclut la ou les exception(s) " +#~ "d'origine et l'exception finale." + +#~ msgid "" +#~ "Instances of this class have attributes :attr:`filename`, :attr:" +#~ "`lineno`, :attr:`offset` and :attr:`text` for easier access to the " +#~ "details. :func:`str` of the exception instance returns only the message." +#~ msgstr "" +#~ "Les instances de cette classe ont des attributs :attr:`filename`, :attr:" +#~ "`lineno`, :attr:`offset` et :attr:`text` pour accéder plus facilement aux " +#~ "détails. La représentation :func:`str` de l'instance de l'exception " +#~ "retourne seulement le message." + #~ msgid "" #~ "Base class for warnings related to resource usage. Ignored by the default " #~ "warning filters." diff --git a/library/fcntl.po b/library/fcntl.po index fd4d1271cf..df092b1ede 100644 --- a/library/fcntl.po +++ b/library/fcntl.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2017-08-10 00:59+0200\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" @@ -54,14 +54,14 @@ msgid "" "On macOS, the fcntl module exposes the ``F_GETPATH`` constant, which obtains " "the path of a file from a file descriptor. On Linux(>=3.15), the fcntl " "module exposes the ``F_OFD_GETLK``, ``F_OFD_SETLK`` and ``F_OFD_SETLKW`` " -"constants, which working with open file description locks." +"constants, which are used when working with open file description locks." msgstr "" -#: library/fcntl.rst:42 +#: library/fcntl.rst:43 msgid "The module defines the following functions:" msgstr "Le module définit les fonctions suivantes :" -#: library/fcntl.rst:47 +#: library/fcntl.rst:48 msgid "" "Perform the operation *cmd* on file descriptor *fd* (file objects providing " "a :meth:`~io.IOBase.fileno` method are accepted as well). The values used " @@ -80,23 +80,23 @@ msgid "" "result in a segmentation violation or a more subtle data corruption." msgstr "" -#: library/fcntl.rst:64 +#: library/fcntl.rst:65 msgid "If the :c:func:`fcntl` fails, an :exc:`OSError` is raised." msgstr "" -#: library/fcntl.rst:66 +#: library/fcntl.rst:67 msgid "" "Raises an :ref:`auditing event ` ``fcntl.fcntl`` with arguments " "``fd``, ``cmd``, ``arg``." msgstr "" -#: library/fcntl.rst:71 +#: library/fcntl.rst:72 msgid "" "This function is identical to the :func:`~fcntl.fcntl` function, except that " "the argument handling is even more complicated." msgstr "" -#: library/fcntl.rst:74 +#: library/fcntl.rst:75 msgid "" "The *request* parameter is limited to values that can fit in 32-bits. " "Additional constants of interest for use as the *request* argument can be " @@ -104,26 +104,26 @@ msgid "" "relevant C header files." msgstr "" -#: library/fcntl.rst:79 +#: library/fcntl.rst:80 msgid "" "The parameter *arg* can be one of an integer, an object supporting the read-" "only buffer interface (like :class:`bytes`) or an object supporting the read-" "write buffer interface (like :class:`bytearray`)." msgstr "" -#: library/fcntl.rst:83 +#: library/fcntl.rst:84 msgid "" "In all but the last case, behaviour is as for the :func:`~fcntl.fcntl` " "function." msgstr "" -#: library/fcntl.rst:86 +#: library/fcntl.rst:87 msgid "" "If a mutable buffer is passed, then the behaviour is determined by the value " "of the *mutate_flag* parameter." msgstr "" -#: library/fcntl.rst:89 +#: library/fcntl.rst:90 msgid "" "If it is false, the buffer's mutability is ignored and behaviour is as for a " "read-only buffer, except that the 1024 byte limit mentioned above is avoided " @@ -131,7 +131,7 @@ msgid "" "system wants to put there, things should work." msgstr "" -#: library/fcntl.rst:94 +#: library/fcntl.rst:95 msgid "" "If *mutate_flag* is true (the default), then the buffer is (in effect) " "passed to the underlying :func:`ioctl` system call, the latter's return code " @@ -142,21 +142,21 @@ msgid "" "copied back into the supplied buffer." msgstr "" -#: library/fcntl.rst:102 +#: library/fcntl.rst:103 msgid "If the :c:func:`ioctl` fails, an :exc:`OSError` exception is raised." msgstr "" -#: library/fcntl.rst:104 +#: library/fcntl.rst:105 msgid "An example::" msgstr "Un exemple ::" -#: library/fcntl.rst:117 +#: library/fcntl.rst:118 msgid "" "Raises an :ref:`auditing event ` ``fcntl.ioctl`` with arguments " "``fd``, ``request``, ``arg``." msgstr "" -#: library/fcntl.rst:122 +#: library/fcntl.rst:123 msgid "" "Perform the lock operation *operation* on file descriptor *fd* (file objects " "providing a :meth:`~io.IOBase.fileno` method are accepted as well). See the " @@ -164,17 +164,17 @@ msgid "" "function is emulated using :c:func:`fcntl`.)" msgstr "" -#: library/fcntl.rst:127 +#: library/fcntl.rst:128 msgid "If the :c:func:`flock` fails, an :exc:`OSError` exception is raised." msgstr "" -#: library/fcntl.rst:129 +#: library/fcntl.rst:130 msgid "" "Raises an :ref:`auditing event ` ``fcntl.flock`` with arguments " "``fd``, ``operation``." msgstr "" -#: library/fcntl.rst:134 +#: library/fcntl.rst:135 msgid "" "This is essentially a wrapper around the :func:`~fcntl.fcntl` locking calls. " "*fd* is the file descriptor (file objects providing a :meth:`~io.IOBase." @@ -182,19 +182,19 @@ msgid "" "*cmd* is one of the following values:" msgstr "" -#: library/fcntl.rst:139 +#: library/fcntl.rst:140 msgid ":const:`LOCK_UN` -- unlock" msgstr "" -#: library/fcntl.rst:140 +#: library/fcntl.rst:141 msgid ":const:`LOCK_SH` -- acquire a shared lock" msgstr "" -#: library/fcntl.rst:141 +#: library/fcntl.rst:142 msgid ":const:`LOCK_EX` -- acquire an exclusive lock" msgstr "" -#: library/fcntl.rst:143 +#: library/fcntl.rst:144 msgid "" "When *cmd* is :const:`LOCK_SH` or :const:`LOCK_EX`, it can also be bitwise " "ORed with :const:`LOCK_NB` to avoid blocking on lock acquisition. If :const:" @@ -206,44 +206,44 @@ msgid "" "for writing." msgstr "" -#: library/fcntl.rst:152 +#: library/fcntl.rst:153 msgid "" "*len* is the number of bytes to lock, *start* is the byte offset at which " "the lock starts, relative to *whence*, and *whence* is as with :func:`io." "IOBase.seek`, specifically:" msgstr "" -#: library/fcntl.rst:156 +#: library/fcntl.rst:157 msgid ":const:`0` -- relative to the start of the file (:data:`os.SEEK_SET`)" msgstr "" -#: library/fcntl.rst:157 +#: library/fcntl.rst:158 msgid "" ":const:`1` -- relative to the current buffer position (:data:`os.SEEK_CUR`)" msgstr "" -#: library/fcntl.rst:158 +#: library/fcntl.rst:159 msgid ":const:`2` -- relative to the end of the file (:data:`os.SEEK_END`)" msgstr "" -#: library/fcntl.rst:160 +#: library/fcntl.rst:161 msgid "" "The default for *start* is 0, which means to start at the beginning of the " "file. The default for *len* is 0 which means to lock to the end of the " "file. The default for *whence* is also 0." msgstr "" -#: library/fcntl.rst:164 +#: library/fcntl.rst:165 msgid "" "Raises an :ref:`auditing event ` ``fcntl.lockf`` with arguments " "``fd``, ``cmd``, ``len``, ``start``, ``whence``." msgstr "" -#: library/fcntl.rst:166 +#: library/fcntl.rst:167 msgid "Examples (all on a SVR4 compliant system)::" msgstr "" -#: library/fcntl.rst:176 +#: library/fcntl.rst:177 msgid "" "Note that in the first example the return value variable *rv* will hold an " "integer value; in the second example it will hold a :class:`bytes` object. " @@ -251,11 +251,11 @@ msgid "" "therefore using the :func:`flock` call may be better." msgstr "" -#: library/fcntl.rst:187 +#: library/fcntl.rst:188 msgid "Module :mod:`os`" msgstr "Module :mod:`os`" -#: library/fcntl.rst:185 +#: library/fcntl.rst:186 msgid "" "If the locking flags :data:`~os.O_SHLOCK` and :data:`~os.O_EXLOCK` are " "present in the :mod:`os` module (on BSD only), the :func:`os.open` function " diff --git a/library/filecmp.po b/library/filecmp.po index e9e81bce8c..90e22d292c 100644 --- a/library/filecmp.po +++ b/library/filecmp.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2019-05-23 20:39+0200\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -46,15 +46,23 @@ msgstr "" "égaux, ``False`` sinon." #: library/filecmp.rst:25 +#, fuzzy msgid "" -"If *shallow* is true, files with identical :func:`os.stat` signatures are " -"taken to be equal. Otherwise, the contents of the files are compared." +"If *shallow* is true and the :func:`os.stat` signatures (file type, size, " +"and modification time) of both files are identical, the files are taken to " +"be equal." msgstr "" "Si *shallow* est vrai, les fichiers avec des signatures :func:`os.stat()` " "identiques sont considérés comme égaux. Sinon, le contenu des fichiers est " "comparé." -#: library/filecmp.rst:28 +#: library/filecmp.rst:29 +msgid "" +"Otherwise, the files are treated as different if their sizes or contents " +"differ." +msgstr "" + +#: library/filecmp.rst:31 msgid "" "Note that no external programs are called from this function, giving it " "portability and efficiency." @@ -62,7 +70,7 @@ msgstr "" "Notez qu'aucun programme externe n'est appelé à partir de cette fonction, ce " "qui lui confère des qualités de portabilité et d'efficacité." -#: library/filecmp.rst:31 +#: library/filecmp.rst:34 msgid "" "This function uses a cache for past comparisons and the results, with cache " "entries invalidated if the :func:`os.stat` information for the file " @@ -73,7 +81,7 @@ msgstr "" "`os.stat()` du fichier sont modifiées. La totalité du cache peut être " "effacée avec :func:`clear_cache()`." -#: library/filecmp.rst:38 +#: library/filecmp.rst:41 msgid "" "Compare the files in the two directories *dir1* and *dir2* whose names are " "given by *common*." @@ -81,7 +89,7 @@ msgstr "" "Compare les fichiers des deux répertoires *dir1* et *dir2* dont les noms " "sont donnés par *common*." -#: library/filecmp.rst:41 +#: library/filecmp.rst:44 msgid "" "Returns three lists of file names: *match*, *mismatch*, *errors*. *match* " "contains the list of files that match, *mismatch* contains the names of " @@ -98,7 +106,7 @@ msgstr "" "l'utilisateur ne dispose pas de l'autorisation nécessaire pour les lire ou " "si la comparaison n'a pas pu être effectuée pour une autre raison." -#: library/filecmp.rst:48 +#: library/filecmp.rst:51 msgid "" "The *shallow* parameter has the same meaning and default value as for :func:" "`filecmp.cmp`." @@ -106,7 +114,7 @@ msgstr "" "Le paramètre *shallow* a la même signification et la même valeur par défaut " "que pour :func:`filecmp.cmp`." -#: library/filecmp.rst:51 +#: library/filecmp.rst:54 msgid "" "For example, ``cmpfiles('a', 'b', ['c', 'd/e'])`` will compare ``a/c`` with " "``b/c`` and ``a/d/e`` with ``b/d/e``. ``'c'`` and ``'d/e'`` will each be in " @@ -116,7 +124,7 @@ msgstr "" "c`` et ``a/d/e`` avec ``b/d/e``. ``'c'`` et ``'d/e'`` seront chacun dans " "l'une des trois listes renvoyées." -#: library/filecmp.rst:58 +#: library/filecmp.rst:61 msgid "" "Clear the filecmp cache. This may be useful if a file is compared so quickly " "after it is modified that it is within the mtime resolution of the " @@ -126,11 +134,11 @@ msgstr "" "juste après avoir été modifié (dans un délai inférieur à la résolution " "*mtime* du système de fichiers sous-jacent)." -#: library/filecmp.rst:68 +#: library/filecmp.rst:71 msgid "The :class:`dircmp` class" msgstr "La classe :class:`dircmp`" -#: library/filecmp.rst:72 +#: library/filecmp.rst:75 msgid "" "Construct a new directory comparison object, to compare the directories *a* " "and *b*. *ignore* is a list of names to ignore, and defaults to :attr:" @@ -142,7 +150,7 @@ msgstr "" "à :attr:`filecmp.DEFAULT_IGNORES`. *hide* est une liste de noms à cacher, " "par défaut à ``[os.curdir, os.pardir]``." -#: library/filecmp.rst:77 +#: library/filecmp.rst:80 msgid "" "The :class:`dircmp` class compares files by doing *shallow* comparisons as " "described for :func:`filecmp.cmp`." @@ -150,22 +158,22 @@ msgstr "" "La classe :class:`dircmp` compare les fichiers en faisant des comparaisons " "*superficielles* comme décrit pour :func:`filecmp.cmp`." -#: library/filecmp.rst:80 +#: library/filecmp.rst:83 msgid "The :class:`dircmp` class provides the following methods:" msgstr "La classe :class:`dircmp` fournit les méthodes suivantes :" -#: library/filecmp.rst:84 +#: library/filecmp.rst:87 msgid "Print (to :data:`sys.stdout`) a comparison between *a* and *b*." msgstr "Affiche (sur :data:`sys.stdout`) une comparaison entre *a* et *b*." -#: library/filecmp.rst:88 +#: library/filecmp.rst:91 msgid "" "Print a comparison between *a* and *b* and common immediate subdirectories." msgstr "" "Affiche une comparaison entre *a* et *b* et les sous-répertoires immédiats " "communs." -#: library/filecmp.rst:93 +#: library/filecmp.rst:96 msgid "" "Print a comparison between *a* and *b* and common subdirectories " "(recursively)." @@ -173,7 +181,7 @@ msgstr "" "Affiche une comparaison entre a et b et les sous-répertoires communs " "(récursivement)." -#: library/filecmp.rst:96 +#: library/filecmp.rst:99 msgid "" "The :class:`dircmp` class offers a number of interesting attributes that may " "be used to get various bits of information about the directory trees being " @@ -183,7 +191,7 @@ msgstr "" "qui peuvent être utilisés pour obtenir diverses informations sur les " "arborescences de répertoires comparées." -#: library/filecmp.rst:100 +#: library/filecmp.rst:103 msgid "" "Note that via :meth:`__getattr__` hooks, all attributes are computed lazily, " "so there is no speed penalty if only those attributes which are lightweight " @@ -193,45 +201,45 @@ msgstr "" "sont calculés de manière paresseuse. Il n'y a donc pas de pénalité en " "vitesse si seuls les attributs rapides à calculer sont utilisés." -#: library/filecmp.rst:107 +#: library/filecmp.rst:110 msgid "The directory *a*." msgstr "Le répertoire *a*." -#: library/filecmp.rst:112 +#: library/filecmp.rst:115 msgid "The directory *b*." msgstr "Le répertoire *b*." -#: library/filecmp.rst:117 +#: library/filecmp.rst:120 msgid "Files and subdirectories in *a*, filtered by *hide* and *ignore*." msgstr "" "Fichiers et sous-répertoires dans *a* , filtrés par *hide* et *ignore*." -#: library/filecmp.rst:122 +#: library/filecmp.rst:125 msgid "Files and subdirectories in *b*, filtered by *hide* and *ignore*." msgstr "" "Fichiers et sous-répertoires dans *b* , filtrés par *hide* et *ignore*." -#: library/filecmp.rst:127 +#: library/filecmp.rst:130 msgid "Files and subdirectories in both *a* and *b*." msgstr "Fichiers et sous-répertoires à la fois dans *a* et *b*." -#: library/filecmp.rst:132 +#: library/filecmp.rst:135 msgid "Files and subdirectories only in *a*." msgstr "Fichiers et sous-répertoires uniquement dans *a*." -#: library/filecmp.rst:137 +#: library/filecmp.rst:140 msgid "Files and subdirectories only in *b*." msgstr "Fichiers et sous-répertoires uniquement dans *b*." -#: library/filecmp.rst:142 +#: library/filecmp.rst:145 msgid "Subdirectories in both *a* and *b*." msgstr "Sous-répertoires à la fois dans *a* et *b*." -#: library/filecmp.rst:147 +#: library/filecmp.rst:150 msgid "Files in both *a* and *b*." msgstr "Fichiers à la fois dans *a* et *b*." -#: library/filecmp.rst:152 +#: library/filecmp.rst:155 msgid "" "Names in both *a* and *b*, such that the type differs between the " "directories, or names for which :func:`os.stat` reports an error." @@ -239,7 +247,7 @@ msgstr "" "Noms dans *a* et *b* , tels que le type diffère entre les répertoires, ou " "noms pour lesquels :func:`os.stat` signale une erreur." -#: library/filecmp.rst:158 +#: library/filecmp.rst:161 msgid "" "Files which are identical in both *a* and *b*, using the class's file " "comparison operator." @@ -247,7 +255,7 @@ msgstr "" "Fichiers identiques dans *a* et *b*, en utilisant l'opérateur de comparaison " "de fichiers de la classe." -#: library/filecmp.rst:164 +#: library/filecmp.rst:167 msgid "" "Files which are in both *a* and *b*, whose contents differ according to the " "class's file comparison operator." @@ -255,23 +263,23 @@ msgstr "" "Fichiers figurant à la fois dans *a* et dans *b* , dont le contenu diffère " "en fonction de l'opérateur de comparaison de fichiers de la classe." -#: library/filecmp.rst:170 +#: library/filecmp.rst:173 msgid "Files which are in both *a* and *b*, but could not be compared." msgstr "" "Fichiers à la fois dans *a* et dans *b* , mais ne pouvant pas être comparés." -#: library/filecmp.rst:175 +#: library/filecmp.rst:178 msgid "" "A dictionary mapping names in :attr:`common_dirs` to :class:`dircmp` objects." msgstr "" "Un dictionnaire faisant correspondre les noms dans :attr:`common_dirs` vers " "des objets :class:`dircmp`." -#: library/filecmp.rst:182 +#: library/filecmp.rst:185 msgid "List of directories ignored by :class:`dircmp` by default." msgstr "Liste des répertoires ignorés par défaut par :class:`dircmp`." -#: library/filecmp.rst:185 +#: library/filecmp.rst:188 msgid "" "Here is a simplified example of using the ``subdirs`` attribute to search " "recursively through two directories to show common different files::" diff --git a/library/fileinput.po b/library/fileinput.po index 8456c7ad15..125365013e 100644 --- a/library/fileinput.po +++ b/library/fileinput.po @@ -16,7 +16,7 @@ msgstr "" #: library/fileinput.rst:2 msgid ":mod:`fileinput` --- Iterate over lines from multiple input streams" -msgstr "" +msgstr ":mod:`fileinput` — Parcourt les lignes provenant de plusieurs entrées" #: library/fileinput.rst:10 msgid "**Source code:** :source:`Lib/fileinput.py`" @@ -28,10 +28,13 @@ msgid "" "over standard input or a list of files. If you just want to read or write " "one file see :func:`open`." msgstr "" +"Ce module offre une classe auxiliaire et des fonctions pour lire facilement " +"l'entrée standard ou bien les fichiers d'une liste. Si vous n'avez besoin de " +"lire ou écrire qu'un seul fichier, il suffit de :func:`open`." #: library/fileinput.rst:18 msgid "The typical use is::" -msgstr "" +msgstr "Ce module s'utilise le plus couramment comme ceci :" #: library/fileinput.rst:24 msgid "" @@ -42,6 +45,12 @@ msgid "" "it as the first argument to :func:`.input`. A single file name is also " "allowed." msgstr "" +"Ce code traite une à une les lignes des fichiers de ``sys.argv[1:]``. Si " +"cette liste est vide (pas d'argument en ligne de commande), il lit l'entrée " +"standard. Le nom de fichier ``'-'`` est équivalent à l'entrée standard (les " +"arguments facultatifs *mode* et *openhook* sont ignorés dans ce cas). On " +"peut aussi passer la liste des fichiers comme argument à :func:`.input`, " +"voire un nom de fichier unique." #: library/fileinput.rst:30 msgid "" @@ -50,12 +59,16 @@ msgid "" "`FileInput`. If an I/O error occurs during opening or reading a file, :exc:" "`OSError` is raised." msgstr "" +"Par défaut, tous les fichiers sont ouverts en mode texte. On peut changer ce " +"comportement à l'aide du paramètre *mode* de la fonction :func:`.input` ou " +"du constructeur de :class:`FileInput`. Si une erreur d'entrée-sortie se " +"produit durant l'ouverture ou la lecture d'un fichier, l'exception :exc:" +"`OSError` est levée." #: library/fileinput.rst:35 -#, fuzzy msgid ":exc:`IOError` used to be raised; it is now an alias of :exc:`OSError`." msgstr "" -":exc:`IOError` était normalement levée, elle est maintenant un alias de :exc:" +":exc:`IOError` était levée auparavant, elle est devenue un alias de :exc:" "`OSError`." #: library/fileinput.rst:38 @@ -64,6 +77,10 @@ msgid "" "return no lines, except perhaps for interactive use, or if it has been " "explicitly reset (e.g. using ``sys.stdin.seek(0)``)." msgstr "" +"Si ``sys.stdin`` apparaît plus d'une fois dans la liste, toutes les lignes " +"sont consommées dès la première fois, sauf éventuellement en cas d'usage " +"interactif ou si le flux d'entrée standard a été modifié dans l'intervalle " +"(par exemple avec ``sys.stdin.seek(0)``)." #: library/fileinput.rst:42 msgid "" @@ -71,12 +88,18 @@ msgid "" "in the list of filenames is noticeable at all is when the last file opened " "is empty." msgstr "" +"Les fichiers vides sont ouverts et refermés immédiatement. Ils ne sont pas " +"détectables dans la liste des fichiers, sauf éventuellement dans le cas où " +"le dernier fichier est vide." #: library/fileinput.rst:46 msgid "" "Lines are returned with any newlines intact, which means that the last line " "in a file may not have one." msgstr "" +"Les caractères de saut de ligne sont préservés, donc toutes les lignes se " +"terminent par un saut de ligne, sauf éventuellement la dernière ligne d'un " +"fichier." #: library/fileinput.rst:49 msgid "" @@ -89,7 +112,7 @@ msgstr "" #: library/fileinput.rst:55 msgid "The following function is the primary interface of this module:" -msgstr "" +msgstr "La fonction suivante constitue l'interface principale du module :" #: library/fileinput.rst:60 msgid "" @@ -98,6 +121,11 @@ msgid "" "to use during iteration. The parameters to this function will be passed " "along to the constructor of the :class:`FileInput` class." msgstr "" +"Crée une instance de :class:`FileInput`, qui devient l'état global pour " +"toutes les fonctions du module. Elle est également renvoyée afin que " +"l'utilisateur puisse la parcourir comme un objet itérable. Tous les " +"paramètres de cette fonction sont transmis au constructeur de :class:" +"`FileInput`." #: library/fileinput.rst:65 msgid "" @@ -105,32 +133,44 @@ msgid "" "keyword:`with` statement. In this example, *input* is closed after the :" "keyword:`!with` statement is exited, even if an exception occurs::" msgstr "" +"Les instances de :class:`FileInput` peuvent s'utiliser comme gestionnaires " +"de contexte, avec l'instruction :keyword:`with`. Dans le code suivant, " +"*input* est fermé lorsque le bloc :keyword:`!with` se termine, y compris si " +"une exception l'a interrompu." #: library/fileinput.rst:166 msgid "Can be used as a context manager." -msgstr "" +msgstr "prise en charge du protocole de gestionnaire de contexte." #: library/fileinput.rst:76 msgid "The keyword parameters *mode* and *openhook* are now keyword-only." -msgstr "" +msgstr "les paramètres *mode* et *openhook* doivent être nommés." #: library/fileinput.rst:80 msgid "" "The following functions use the global state created by :func:`fileinput." "input`; if there is no active state, :exc:`RuntimeError` is raised." msgstr "" +"Toutes les fonctions suivantes font appel à l'état global du module mis en " +"place par :func:`fileinput.input`. L'absence de cet état déclenche " +"l'exception :exc:`RuntimeError`." #: library/fileinput.rst:86 msgid "" "Return the name of the file currently being read. Before the first line has " "been read, returns ``None``." msgstr "" +"Renvoie le nom du fichier en train d'être lu, ou ``None`` avant la lecture " +"de la toute première ligne." #: library/fileinput.rst:92 msgid "" "Return the integer \"file descriptor\" for the current file. When no file is " "opened (before the first line and between files), returns ``-1``." msgstr "" +"Renvoie le descripteur de fichier (sous forme d'entier) utilisé pour lire le " +"fichier courant. Si aucun fichier n'est ouvert (avant la première ligne et " +"entre les fichiers), le résultat est ``-1``." #: library/fileinput.rst:98 msgid "" @@ -138,6 +178,10 @@ msgid "" "Before the first line has been read, returns ``0``. After the last line of " "the last file has been read, returns the line number of that line." msgstr "" +"Renvoie le numéro de la ligne qui vient d'être lue, en commençant par la " +"première ligne du premier fichier. Avant cette toute première ligne, renvoie " +"``0``. Après la dernière ligne du dernier fichier, renvoie le numéro de " +"cette ligne." #: library/fileinput.rst:105 msgid "" @@ -145,18 +189,25 @@ msgid "" "read, returns ``0``. After the last line of the last file has been read, " "returns the line number of that line within the file." msgstr "" +"Renvoie le numéro de ligne relatif au fichier courant. Avant la toute " +"première ligne, renvoie ``0``. Après la toute dernière ligne, renvoie le " +"numéro de cette ligne par rapport à son fichier source." #: library/fileinput.rst:112 msgid "" "Return ``True`` if the line just read is the first line of its file, " "otherwise return ``False``." msgstr "" +"Renvoie ``True`` ou ``False`` selon que la ligne qui vient d'être lue est la " +"première du fichier." #: library/fileinput.rst:118 msgid "" "Return ``True`` if the last line was read from ``sys.stdin``, otherwise " "return ``False``." msgstr "" +"``True`` ou ``False`` selon que la dernière ligne lue provenait de ``sys." +"stdin`` ou non." #: library/fileinput.rst:124 msgid "" @@ -168,16 +219,27 @@ msgid "" "file. After the last line of the last file has been read, this function has " "no effect." msgstr "" +"Ferme le fichier courant et laisse la lecture se poursuivre au début du " +"suivant (ou se terminer si c'était le dernier fichier ; dans ce cas cette " +"fonction ne fait rien). Les lignes court-circuitées ne comptent pas dans les " +"numéros des lignes des fichiers suivants. Le nom du fichier courant n'est " +"pas modifié immédiatement, mais seulement après que la première ligne du " +"fichier suivant a été lue. Cette fonction n'a pas d'effet avant la lecture " +"de la première ligne (elle ne peut pas sauter le premier fichier)." #: library/fileinput.rst:134 msgid "Close the sequence." msgstr "" +"Ferme le fichier courant et termine la lecture en sautant les fichiers " +"suivants." #: library/fileinput.rst:136 msgid "" "The class which implements the sequence behavior provided by the module is " "available for subclassing as well:" msgstr "" +"La classe qui implémente ce comportement du module est publique. On peut en " +"créer des classes filles." #: library/fileinput.rst:142 msgid "" @@ -203,6 +265,10 @@ msgid "" "*filename* and *mode*, and returns an accordingly opened file-like object. " "You cannot use *inplace* and *openhook* together." msgstr "" +"S'il est fourni, l'argument *openhook* est une fonction. Elle est appelée " +"avec les paramètres *filename* et *mode*, et renvoie un objet fichier-" +"compatible ouvert selon *mode*. Notez que *openhook* et *inplace* sont " +"mutuellement exclusifs." #: library/fileinput.rst:158 msgid "" @@ -210,18 +276,22 @@ msgid "" "keyword:`with` statement. In this example, *input* is closed after the :" "keyword:`!with` statement is exited, even if an exception occurs::" msgstr "" +"Les objets :class:`FileInput` peuvent aussi fonctionner comme gestionnaires " +"de contexte dans un bloc :keyword:`with`. Dans l'exemple suivant, *input* " +"est fermé à la fin du bloc :keyword:`!with`, même arrêté par une exception." #: library/fileinput.rst:169 msgid "The ``'rU'`` and ``'U'`` modes." -msgstr "" +msgstr "modes ``'rU'`` et ``'U'``." #: library/fileinput.rst:172 msgid "Support for :meth:`__getitem__` method is deprecated." -msgstr "" +msgstr "accès à un indice avec :meth:`__getitem__`." #: library/fileinput.rst:175 msgid "The keyword parameter *mode* and *openhook* are now keyword-only." msgstr "" +"les paramètres *mode* et *openhook* doivent impérativement être nommés." #: library/fileinput.rst:180 msgid "" @@ -236,10 +306,22 @@ msgid "" "extension is ``'.bak'`` and it is deleted when the output file is closed. " "In-place filtering is disabled when standard input is read." msgstr "" +"**Filtrage sur place optionnel :** si ``inplace=True`` est passé à :func:" +"`fileinput.input` ou au constructeur de :class:`FileInput`, chaque fichier " +"d'entrée est déplacé vers une sauvegarde et la sortie standard est redirigée " +"vers le fichier lui-même, ce qui permet d'écrire des filtres qui modifient " +"directement les fichiers existants. Si le paramètre *backup* est fourni, il " +"donne l'extension des fichiers de sauvegarde. Dans ce cas, la sauvegarde est " +"conservée après l'opération. Par défaut, les fichiers de sauvegarde ont " +"l'extension ``'.bak'`` et sont supprimés dès que le fichier de sortie est " +"fermé. Si un fichier existe avec le même nom que la sauvegarde, il est " +"écrasé. Le filtrage sur place ne fait rien pour l'entrée standard." #: library/fileinput.rst:192 msgid "The two following opening hooks are provided by this module:" msgstr "" +"Les deux fonctions suivantes fournissent des valeurs prédéfinies pour " +"*openhook*." #: library/fileinput.rst:196 msgid "" @@ -248,6 +330,11 @@ msgid "" "modules. If the filename extension is not ``'.gz'`` or ``'.bz2'``, the file " "is opened normally (ie, using :func:`open` without any decompression)." msgstr "" +"Ouvre de façon transparente les fichiers compressés avec gzip ou bzip2, à " +"l'aide des modules :mod:`gzip` et :mod:`bz2`. Les fichiers compressés sont " +"reconnus aux extensions ``'.gz'`` et ``'.bz2'``. Tous les fichiers qui n'ont " +"pas l'une de ces deux extensions sont ouverts normalement (avec :func:" +"`open`, sans décompression)." #: library/fileinput.rst:201 msgid "" @@ -260,13 +347,18 @@ msgid "" "Returns a hook which opens each file with :func:`open`, using the given " "*encoding* and *errors* to read the file." msgstr "" +"Renvoie une fonction qui ouvre les fichiers en passant à :func:`open` les " +"arguments *encoding* et *errors*. Le résultat peut être exploité à travers " +"le point d'entrée automatique *openhook*." #: library/fileinput.rst:209 msgid "" "Usage example: ``fi = fileinput.FileInput(openhook=fileinput." "hook_encoded(\"utf-8\", \"surrogateescape\"))``" msgstr "" +"Exemple d'utilisation : ``fi = fileinput.FileInput(openhook=fileinput." +"hook_encoded(\"utf-8\", \"surrogateescape\"))``." #: library/fileinput.rst:213 msgid "Added the optional *errors* parameter." -msgstr "" +msgstr "ajout du paramètre facultatif *errors*." diff --git a/library/fnmatch.po b/library/fnmatch.po index 8e8f545e7f..73943cbdb5 100644 --- a/library/fnmatch.po +++ b/library/fnmatch.po @@ -6,14 +6,14 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-27 19:26+0100\n" -"PO-Revision-Date: 2019-02-21 17:34+0100\n" -"Last-Translator: Julien VITARD \n" +"PO-Revision-Date: 2021-04-28 20:16+0200\n" +"Last-Translator: Dimitri Merejkowsky \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.2\n" +"X-Generator: Poedit 2.4.1\n" #: library/fnmatch.rst:2 msgid ":mod:`fnmatch` --- Unix filename pattern matching" @@ -130,7 +130,6 @@ msgstr "" "n'utilise pas la fonction :func:`os.path.normcase`." #: library/fnmatch.rst:78 -#, fuzzy msgid "" "Construct a list from those elements of the iterable *names* that match " "*pattern*. It is the same as ``[n for n in names if fnmatch(n, pattern)]``, " @@ -158,4 +157,4 @@ msgstr "Module :mod:`glob`" #: library/fnmatch.rst:102 msgid "Unix shell-style path expansion." -msgstr "Recherche de chemins de style shell Unix" +msgstr "Recherche de chemins de style shell Unix." diff --git a/library/fractions.po b/library/fractions.po index d764b6255c..a3fce028be 100644 --- a/library/fractions.po +++ b/library/fractions.po @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Gtranslator 3.38.0\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" +"X-Generator: Gtranslator 3.38.0\n" #: library/fractions.rst:2 msgid ":mod:`fractions` --- Rational numbers" diff --git a/library/ftplib.po b/library/ftplib.po index 4c99209932..baba6a9b5d 100644 --- a/library/ftplib.po +++ b/library/ftplib.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" +"POT-Creation-Date: 2021-05-19 22:36+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -16,7 +16,7 @@ msgstr "" #: library/ftplib.rst:2 msgid ":mod:`ftplib` --- FTP protocol client" -msgstr "" +msgstr ":mod:`ftplib` — Le protocole client FTP" #: library/ftplib.rst:7 msgid "**Source code:** :source:`Lib/ftplib.py`" @@ -34,17 +34,17 @@ msgstr "" #: library/ftplib.rst:22 msgid "The default encoding is UTF-8, following :rfc:`2640`." -msgstr "" +msgstr "L'encodage par défaut est UTF-8, voir la :rfc:`2640`." #: library/ftplib.rst:24 msgid "Here's a sample session using the :mod:`ftplib` module::" -msgstr "" +msgstr "Voici un exemple de session utilisant le module :mod:`ftplib` ::" -#: library/ftplib.rst:44 +#: library/ftplib.rst:46 msgid "The module defines the following items:" msgstr "Le module définit les éléments suivants :" -#: library/ftplib.rst:48 +#: library/ftplib.rst:50 msgid "" "Return a new instance of the :class:`FTP` class. When *host* is given, the " "method call ``connect(host)`` is made. When *user* is given, additionally " @@ -57,19 +57,21 @@ msgid "" "specifies the encoding for directories and filenames." msgstr "" -#: library/ftplib.rst:58 +#: library/ftplib.rst:60 msgid "The :class:`FTP` class supports the :keyword:`with` statement, e.g.:" msgstr "" +"La classe :class:`FTP` peut s'utiliser avec l'instruction :keyword:`with`, " +"p. ex.:" -#: library/ftplib.rst:72 +#: library/ftplib.rst:74 msgid "Support for the :keyword:`with` statement was added." msgstr "La prise en charge de l'instruction :keyword:`with` a été ajoutée." -#: library/ftplib.rst:101 library/ftplib.rst:210 +#: library/ftplib.rst:103 library/ftplib.rst:212 msgid "*source_address* parameter was added." msgstr "" -#: library/ftplib.rst:116 +#: library/ftplib.rst:118 msgid "" "If the *timeout* parameter is set to be zero, it will raise a :class:" "`ValueError` to prevent the creation of a non-blocking socket. The " @@ -77,7 +79,7 @@ msgid "" "UTF-8 to follow :rfc:`2640`." msgstr "" -#: library/ftplib.rst:86 +#: library/ftplib.rst:88 msgid "" "A :class:`FTP` subclass which adds TLS support to FTP as described in :rfc:" "`4217`. Connect as usual to port 21 implicitly securing the FTP control " @@ -89,54 +91,61 @@ msgid "" "best practices." msgstr "" -#: library/ftplib.rst:95 +#: library/ftplib.rst:97 msgid "" "*keyfile* and *certfile* are a legacy alternative to *context* -- they can " "point to PEM-formatted private key and certificate chain files " "(respectively) for the SSL connection." msgstr "" -#: library/ftplib.rst:104 +#: library/ftplib.rst:106 msgid "" "The class now supports hostname check with :attr:`ssl.SSLContext." "check_hostname` and *Server Name Indication* (see :data:`ssl.HAS_SNI`)." msgstr "" -#: library/ftplib.rst:111 +#: library/ftplib.rst:113 msgid "" "*keyfile* and *certfile* are deprecated in favor of *context*. Please use :" "meth:`ssl.SSLContext.load_cert_chain` instead, or let :func:`ssl." "create_default_context` select the system's trusted CA certificates for you." msgstr "" -#: library/ftplib.rst:122 +#: library/ftplib.rst:124 msgid "Here's a sample session using the :class:`FTP_TLS` class::" -msgstr "" +msgstr "Voici un exemple de session utilisant la classe :class:`FTP_TLS` ::" -#: library/ftplib.rst:135 +#: library/ftplib.rst:137 msgid "Exception raised when an unexpected reply is received from the server." -msgstr "" +msgstr "Exception levée lorsqu'une réponse inattendue est reçue du serveur." -#: library/ftplib.rst:140 +#: library/ftplib.rst:142 msgid "" "Exception raised when an error code signifying a temporary error (response " "codes in the range 400--499) is received." msgstr "" +"Exception levée lorsqu'un code d'erreur signifiant une erreur temporaire " +"(code de réponse dans l'intervalle 400-499) est reçu." -#: library/ftplib.rst:146 +#: library/ftplib.rst:148 msgid "" "Exception raised when an error code signifying a permanent error (response " "codes in the range 500--599) is received." msgstr "" +"Exception levée lorsqu'un code d'erreur signifiant une erreur permanente " +"(code de réponse dans l'intervalle 500-599) est reçu." -#: library/ftplib.rst:152 +#: library/ftplib.rst:154 msgid "" "Exception raised when a reply is received from the server that does not fit " "the response specifications of the File Transfer Protocol, i.e. begin with a " "digit in the range 1--5." msgstr "" +"Exception levée lorsqu'une réponse reçue du serveur ne correspond pas aux à " +"la spécification de File Transfer Protocol, c.-à-d. qu'elle doit commencer " +"par un chiffre dans l'intervalle 1-5." -#: library/ftplib.rst:159 +#: library/ftplib.rst:161 msgid "" "The set of all exceptions (as a tuple) that methods of :class:`FTP` " "instances may raise as a result of problems with the FTP connection (as " @@ -144,22 +153,22 @@ msgid "" "four exceptions listed above as well as :exc:`OSError` and :exc:`EOFError`." msgstr "" -#: library/ftplib.rst:169 +#: library/ftplib.rst:171 msgid "Module :mod:`netrc`" msgstr "" -#: library/ftplib.rst:168 +#: library/ftplib.rst:170 msgid "" "Parser for the :file:`.netrc` file format. The file :file:`.netrc` is " "typically used by FTP clients to load user authentication information before " "prompting the user." msgstr "" -#: library/ftplib.rst:176 +#: library/ftplib.rst:178 msgid "FTP Objects" msgstr "" -#: library/ftplib.rst:178 +#: library/ftplib.rst:180 msgid "" "Several methods are available in two flavors: one for handling text files " "and another for binary files. These are named for the command which is used " @@ -167,12 +176,12 @@ msgid "" "version." msgstr "" -#: library/ftplib.rst:182 -#, fuzzy +#: library/ftplib.rst:184 msgid ":class:`FTP` instances have the following methods:" -msgstr "Les instances :class:`Mailbox` contiennent les méthodes suivantes :" +msgstr "" +"Les instances de la classe :class:`FTP` possèdent les méthodes suivantes :" -#: library/ftplib.rst:187 +#: library/ftplib.rst:189 msgid "" "Set the instance's debugging level. This controls the amount of debugging " "output printed. The default, ``0``, produces no debugging output. A value " @@ -182,7 +191,7 @@ msgid "" "connection." msgstr "" -#: library/ftplib.rst:196 +#: library/ftplib.rst:198 msgid "" "Connect to the given host and port. The default port number is ``21``, as " "specified by the FTP protocol specification. It is rarely needed to specify " @@ -195,20 +204,20 @@ msgid "" "port)`` for the socket to bind to as its source address before connecting." msgstr "" -#: library/ftplib.rst:208 +#: library/ftplib.rst:210 msgid "" "Raises an :ref:`auditing event ` ``ftplib.connect`` with arguments " "``self``, ``host``, ``port``." msgstr "" -#: library/ftplib.rst:216 +#: library/ftplib.rst:218 msgid "" "Return the welcome message sent by the server in reply to the initial " "connection. (This message sometimes contains disclaimers or help " "information that may be relevant to the user.)" msgstr "" -#: library/ftplib.rst:223 +#: library/ftplib.rst:225 msgid "" "Log in as the given *user*. The *passwd* and *acct* parameters are optional " "and default to the empty string. If no *user* is specified, it defaults to " @@ -220,31 +229,31 @@ msgid "" "parameter supplies \"accounting information\"; few systems implement this." msgstr "" -#: library/ftplib.rst:235 +#: library/ftplib.rst:237 msgid "" "Abort a file transfer that is in progress. Using this does not always work, " "but it's worth a try." msgstr "" -#: library/ftplib.rst:241 +#: library/ftplib.rst:243 msgid "" "Send a simple command string to the server and return the response string." msgstr "" -#: library/ftplib.rst:252 +#: library/ftplib.rst:254 msgid "" "Raises an :ref:`auditing event ` ``ftplib.sendcmd`` with arguments " "``self``, ``cmd``." msgstr "" -#: library/ftplib.rst:248 +#: library/ftplib.rst:250 msgid "" "Send a simple command string to the server and handle the response. Return " "nothing if a response code corresponding to success (codes in the range " "200--299) is received. Raise :exc:`error_reply` otherwise." msgstr "" -#: library/ftplib.rst:257 +#: library/ftplib.rst:259 msgid "" "Retrieve a file in binary transfer mode. *cmd* should be an appropriate " "``RETR`` command: ``'RETR filename'``. The *callback* function is called for " @@ -256,7 +265,7 @@ msgid "" "`transfercmd` method." msgstr "" -#: library/ftplib.rst:269 +#: library/ftplib.rst:271 msgid "" "Retrieve a file or directory listing in the encoding specified by the " "*encoding* parameter at initialization. *cmd* should be an appropriate " @@ -268,13 +277,13 @@ msgid "" "*callback* prints the line to ``sys.stdout``." msgstr "" -#: library/ftplib.rst:282 +#: library/ftplib.rst:284 msgid "" "Enable \"passive\" mode if *val* is true, otherwise disable passive mode. " "Passive mode is on by default." msgstr "" -#: library/ftplib.rst:288 +#: library/ftplib.rst:290 msgid "" "Store a file in binary transfer mode. *cmd* should be an appropriate " "``STOR`` command: ``\"STOR filename\"``. *fp* is a :term:`file object` " @@ -285,11 +294,11 @@ msgid "" "*rest* means the same thing as in the :meth:`transfercmd` method." msgstr "" -#: library/ftplib.rst:296 +#: library/ftplib.rst:298 msgid "*rest* parameter added." msgstr "" -#: library/ftplib.rst:302 +#: library/ftplib.rst:304 msgid "" "Store a file in line mode. *cmd* should be an appropriate ``STOR`` command " "(see :meth:`storbinary`). Lines are read until EOF from the :term:`file " @@ -298,7 +307,7 @@ msgid "" "parameter callable that is called on each line after it is sent." msgstr "" -#: library/ftplib.rst:311 +#: library/ftplib.rst:313 msgid "" "Initiate a transfer over the data connection. If the transfer is active, " "send an ``EPRT`` or ``PORT`` command and the transfer command specified by " @@ -307,7 +316,7 @@ msgid "" "command. Either way, return the socket for the connection." msgstr "" -#: library/ftplib.rst:317 +#: library/ftplib.rst:319 msgid "" "If optional *rest* is given, a ``REST`` command is sent to the server, " "passing *rest* as an argument. *rest* is usually a byte offset into the " @@ -320,7 +329,7 @@ msgid "" "simply call :meth:`transfercmd` without a *rest* argument." msgstr "" -#: library/ftplib.rst:330 +#: library/ftplib.rst:332 msgid "" "Like :meth:`transfercmd`, but returns a tuple of the data connection and the " "expected size of the data. If the expected size could not be computed, " @@ -328,7 +337,7 @@ msgid "" "same thing as in :meth:`transfercmd`." msgstr "" -#: library/ftplib.rst:338 +#: library/ftplib.rst:340 msgid "" "List a directory in a standardized format by using ``MLSD`` command (:rfc:" "`3659`). If *path* is omitted the current directory is assumed. *facts* is " @@ -340,19 +349,26 @@ msgid "" "but server is not guaranteed to return all requested facts." msgstr "" -#: library/ftplib.rst:352 +#: library/ftplib.rst:354 msgid "" "Return a list of file names as returned by the ``NLST`` command. The " "optional *argument* is a directory to list (default is the current server " "directory). Multiple arguments can be used to pass non-standard options to " "the ``NLST`` command." msgstr "" +"Renvoie une liste de noms de fichiers comme celle que renvoie la commande " +"``NLST``. Le paramètre optionnel *argument* est une liste de dossiers (la " +"valeur par défaut est le répertoire courant du serveur). Plusieurs " +"paramètres peuvent être utilisés pour passer des paramètres non standards à " +"la commande ``NLST``." -#: library/ftplib.rst:369 +#: library/ftplib.rst:371 msgid "If your server supports the command, :meth:`mlsd` offers a better API." msgstr "" +"La commande :meth:`mlsd` offre une meilleure API si votre serveur sait la " +"gérer." -#: library/ftplib.rst:362 +#: library/ftplib.rst:364 msgid "" "Produce a directory listing as returned by the ``LIST`` command, printing it " "to standard output. The optional *argument* is a directory to list (default " @@ -362,34 +378,35 @@ msgid "" "default prints to ``sys.stdout``. This method returns ``None``." msgstr "" -#: library/ftplib.rst:374 +#: library/ftplib.rst:376 msgid "Rename file *fromname* on the server to *toname*." msgstr "" +"Renomme le fichier portant le nom *fromname* en *toname* sur le serveur." -#: library/ftplib.rst:379 +#: library/ftplib.rst:381 msgid "" "Remove the file named *filename* from the server. If successful, returns " "the text of the response, otherwise raises :exc:`error_perm` on permission " "errors or :exc:`error_reply` on other errors." msgstr "" -#: library/ftplib.rst:386 +#: library/ftplib.rst:388 msgid "Set the current directory on the server." msgstr "" -#: library/ftplib.rst:391 +#: library/ftplib.rst:393 msgid "Create a new directory on the server." -msgstr "" +msgstr "Crée un nouveau dossier sur le serveur." -#: library/ftplib.rst:396 +#: library/ftplib.rst:398 msgid "Return the pathname of the current directory on the server." -msgstr "" +msgstr "Renvoie le chemin d'accès au répertoire courant sur le serveur." -#: library/ftplib.rst:401 +#: library/ftplib.rst:403 msgid "Remove the directory named *dirname* on the server." -msgstr "" +msgstr "Supprime le dossier portant le nom *dirname* sur le serveur." -#: library/ftplib.rst:406 +#: library/ftplib.rst:408 msgid "" "Request the size of the file named *filename* on the server. On success, " "the size of the file is returned as an integer, otherwise ``None`` is " @@ -397,7 +414,7 @@ msgid "" "supported by many common server implementations." msgstr "" -#: library/ftplib.rst:414 +#: library/ftplib.rst:416 msgid "" "Send a ``QUIT`` command to the server and close the connection. This is the " "\"polite\" way to close a connection, but it may raise an exception if the " @@ -406,7 +423,7 @@ msgid "" "for subsequent calls (see below)." msgstr "" -#: library/ftplib.rst:423 +#: library/ftplib.rst:425 msgid "" "Close the connection unilaterally. This should not be applied to an already " "closed connection such as after a successful call to :meth:`~FTP.quit`. " @@ -415,43 +432,43 @@ msgid "" "connection by issuing another :meth:`login` method)." msgstr "" -#: library/ftplib.rst:431 +#: library/ftplib.rst:433 msgid "FTP_TLS Objects" msgstr "" -#: library/ftplib.rst:433 +#: library/ftplib.rst:435 msgid "" ":class:`FTP_TLS` class inherits from :class:`FTP`, defining these additional " "objects:" msgstr "" -#: library/ftplib.rst:437 +#: library/ftplib.rst:439 msgid "The SSL version to use (defaults to :attr:`ssl.PROTOCOL_SSLv23`)." msgstr "" -#: library/ftplib.rst:441 +#: library/ftplib.rst:443 msgid "" "Set up a secure control connection by using TLS or SSL, depending on what is " "specified in the :attr:`ssl_version` attribute." msgstr "" -#: library/ftplib.rst:444 +#: library/ftplib.rst:446 msgid "" "The method now supports hostname check with :attr:`ssl.SSLContext." "check_hostname` and *Server Name Indication* (see :data:`ssl.HAS_SNI`)." msgstr "" -#: library/ftplib.rst:451 +#: library/ftplib.rst:453 msgid "" "Revert control channel back to plaintext. This can be useful to take " "advantage of firewalls that know how to handle NAT with non-secure FTP " "without opening fixed ports." msgstr "" -#: library/ftplib.rst:459 +#: library/ftplib.rst:461 msgid "Set up secure data connection." -msgstr "" +msgstr "Établit une connexion de données sécurisée." -#: library/ftplib.rst:463 +#: library/ftplib.rst:465 msgid "Set up clear text data connection." -msgstr "" +msgstr "Établit une connexion de données non sécurisées." diff --git a/library/functions.po b/library/functions.po index b3eb438d49..d8e7762626 100644 --- a/library/functions.po +++ b/library/functions.po @@ -5,16 +5,16 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-03-19 16:59+0100\n" -"PO-Revision-Date: 2020-08-30 23:21+0200\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" +"PO-Revision-Date: 2023-03-22 22:49+0100\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.3\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 2.3\n" #: library/functions.rst:11 msgid "Built-in Functions" @@ -362,7 +362,7 @@ msgstr "" "Pour contrôler l'affichage du préfixe ``0b``, vous pouvez utiliser les " "moyens suivants." -#: library/functions.rst:750 library/functions.rst:1037 +#: library/functions.rst:757 library/functions.rst:1053 msgid "See also :func:`format` for more information." msgstr "Voir aussi :func:`format` pour plus d'informations." @@ -383,7 +383,7 @@ msgstr "" "ses seules instances sont ``False`` et ``True`` (voir :ref:`bltin-boolean-" "values`)." -#: library/functions.rst:625 library/functions.rst:834 +#: library/functions.rst:625 library/functions.rst:841 msgid "*x* is now a positional-only parameter." msgstr "*x* est désormais un argument exclusivement optionnel." @@ -456,14 +456,13 @@ msgstr "" "*null* ;" #: library/functions.rst:153 -#, fuzzy msgid "" "If it is an object conforming to the :ref:`buffer interface " "`, a read-only buffer of the object will be used to " "initialize the bytes array." msgstr "" -"si c'est un objet conforme au protocole tampon, un tampon en lecture seule " -"de l'objet est utilisé pour initialiser le tableau ;" +"si c'est un objet conforme à :ref:`l'interface tampon `, un " +"tampon en lecture seule de l'objet est utilisé pour initialiser le tableau ;" #: library/functions.rst:156 msgid "" @@ -644,7 +643,6 @@ msgstr "" "``None`` sont affichés)." #: library/functions.rst:248 -#, fuzzy msgid "" "The optional arguments *flags* and *dont_inherit* control which :ref:" "`compiler options ` should be activated and which :ref:" @@ -658,17 +656,18 @@ msgid "" "in the surrounding code are ignored." msgstr "" "Les arguments optionnels *flags* et *dont_inherit* contrôlent quelles :ref:" -"`instructions future ` affectent la compilation de *source*. Si " -"aucun des deux n'est présent (ou que les deux sont à 0), le code est compilé " -"avec les mêmes instructions *future* que le code appelant :func:`compile`. " -"Si l'argument *flags* est fourni mais que *dont_inherit* ne l'est pas (ou " -"vaut 0), alors les instructions *futures* utilisées sont celles définies par " +"`options de compilation ` seront activées et quelles :" +"ref:`instructions future ` seront autorisées. Si aucun des deux " +"n'est présent (ou que les deux sont à 0), le code est compilé avec les mêmes " +"paramètres que le code appelant :func:`compile`. Si l'argument *flags* est " +"fourni alors que *dont_inherit* ne l'est pas (ou vaut 0), les options de " +"compilation et les instructions *futures* utilisées sont celles définies par " "*flags* en plus de celles qui auraient été utilisées. Si *dont_inherit* est " -"un entier différent de zéro, *flags* est utilisé seul — les instructions " -"futures déclarées autour de l'appel à *compile* sont ignorées." +"un entier différent de zéro, *flags* est utilisé tel quel — les *flags* " +"(instructions futures et options de compilation) valables pour le code " +"encadrant *compile* sont ignorés." #: library/functions.rst:259 -#, fuzzy msgid "" "Compiler options and future statements are specified by bits which can be " "bitwise ORed together to specify multiple options. The bitfield required to " @@ -678,10 +677,12 @@ msgid "" "flags>` can be found in :mod:`ast` module, with ``PyCF_`` prefix." msgstr "" "Les instructions *future* sont contrôlées par des bits, il est ainsi " -"possible d'en activer plusieurs en les combinant avec un *ou* binaire. Les " +"possible d'en activer plusieurs en les combinant avec un *OU* binaire. Les " "bits requis pour demander une certaine fonctionnalité se trouvent dans " "l'attribut :attr:`~__future__._Feature.compiler_flag` de la classe :class:" -"`~__future__.Feature` du module :mod:`__future__`." +"`~__future__.Feature` du module :mod:`__future__`. Les :ref:`options du " +"compilateur ` se trouvent dans le module :mod:`ast`, " +"avec le préfixe ``PyCF_``." #: library/functions.rst:267 msgid "" @@ -715,13 +716,12 @@ msgstr "" "func:`ast.parse`." #: library/functions.rst:279 -#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``compile`` with arguments " "``source``, ``filename``." msgstr "" -"Lève un :ref:`auditing event ` ``open`` avec les arguments " -"``file``, ``mode``, ``flags``." +"Lève un :ref:`évènement d'audit ` ``compile`` avec les arguments " +"``source`` et ``filename``." #: library/functions.rst:281 msgid "" @@ -829,7 +829,7 @@ msgstr "" msgid "The complex type is described in :ref:`typesnumeric`." msgstr "Le type complexe est décrit dans :ref:`typesnumeric`." -#: library/functions.rst:622 library/functions.rst:831 +#: library/functions.rst:622 library/functions.rst:838 msgid "Grouping digits with underscores as in code literals is allowed." msgstr "" "les chiffres peuvent être groupés avec des tirets bas comme dans les " @@ -1082,13 +1082,12 @@ msgstr "" "que des valeurs littérales." #: library/functions.rst:532 -#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``exec`` with argument " "``code_object``." msgstr "" -"Lève un :ref:`auditing event ` ``open`` avec les arguments " -"``file``, ``mode``, ``flags``." +"Lève un :ref:`évènement d'audit ` ``exec`` avec l'argument " +"``code_object``." #: library/functions.rst:534 msgid "" @@ -1100,14 +1099,13 @@ msgstr "" "levés." #: library/functions.rst:505 -#, fuzzy msgid "" "This function supports dynamic execution of Python code. *object* must be " "either a string or a code object. If it is a string, the string is parsed " "as a suite of Python statements which is then executed (unless a syntax " "error occurs). [#]_ If it is a code object, it is simply executed. In all " "cases, the code that's executed is expected to be valid as file input (see " -"the section \"File input\" in the Reference Manual). Be aware that the :" +"the section :ref:`file-input` in the Reference Manual). Be aware that the :" "keyword:`nonlocal`, :keyword:`yield`, and :keyword:`return` statements may " "not be used outside of function definitions even within the context of code " "passed to the :func:`exec` function. The return value is ``None``." @@ -1117,11 +1115,12 @@ msgstr "" "d'abord analysée en une suite d'instructions Python qui sont ensuite " "exécutés (sauf erreur de syntaxe). [#]_ Si c'est un objet code, il est " "simplement exécuté. Dans tous les cas, le code fourni doit être valide selon " -"les mêmes critères que s'il était un script dans un fichier (voir la section " -"« Fichier d'entrée » dans le manuel de référence du langage). Gardez en tête " -"que les mots clés :keyword:`return` et :keyword:`yield` ne peuvent pas être " -"utilisés en dehors d'une fonction, même dans du code passé à :func:`exec`. " -"La fonction renvoie ``None``." +"les mêmes critères que s'il était un script dans un fichier (voir la " +"section :ref:`Fichier d'entrée ` dans le manuel de référence du " +"langage). Gardez en tête que les mots clés :keyword:`nonlocal`, :keyword:" +"`yield` et :keyword:`return` ne peuvent pas être utilisés en dehors d'une " +"fonction, même dans du code passé à :func:`exec`. La fonction renvoie " +"``None``." #: library/functions.rst:516 msgid "" @@ -1370,20 +1369,30 @@ msgstr "" "que *default* est fourni, celui-ci est renvoyé. Sinon l'exception :exc:" "`AttributeError` est levée." -#: library/functions.rst:682 +#: library/functions.rst:681 msgid "" -"Return a dictionary representing the current global symbol table. This is " -"always the dictionary of the current module (inside a function or method, " -"this is the module where it is defined, not the module from which it is " -"called)." +"Since :ref:`private name mangling ` happens at " +"compilation time, one must manually mangle a private attribute's (attributes " +"with two leading underscores) name in order to retrieve it with :func:" +"`getattr`." msgstr "" -"Renvoie une représentation de la table de symboles globaux sous forme d'un " -"dictionnaire. C'est toujours le dictionnaire du module courant (dans une " -"fonction ou méthode, c'est le module où elle est définie, et non le module " -"d'où elle est appelée)." +"étant donné que la :ref:`transformation des noms privés ` se produit au moment de la compilation, il faut modifier " +"manuellement le nom d'un attribut privé (attributs avec deux traits de " +"soulignement en tête) afin de le récupérer avec :func:`getattr`." #: library/functions.rst:689 msgid "" +"Return the dictionary implementing the current module namespace. For code " +"within functions, this is set when the function is defined and remains the " +"same regardless of where the function is called." +msgstr "" +"Renvoie le dictionnaire implémentant l'espace de nommage du module actuel. " +"Pour le code dans les fonctions, il est défini lorsque la fonction est " +"définie et reste le même quel que soit le moment où la fonction est appelée." + +#: library/functions.rst:696 +msgid "" "The arguments are an object and a string. The result is ``True`` if the " "string is the name of one of the object's attributes, ``False`` if not. " "(This is implemented by calling ``getattr(object, name)`` and seeing whether " @@ -1394,7 +1403,7 @@ msgstr "" "``False`` (l'implémentation appelle ``getattr(object, name)`` et regarde si " "une exception :exc:`AttributeError` a été levée)." -#: library/functions.rst:697 +#: library/functions.rst:704 msgid "" "Return the hash value of the object (if it has one). Hash values are " "integers. They are used to quickly compare dictionary keys during a " @@ -1407,7 +1416,7 @@ msgstr "" "ont la même valeur de hachage (même si leurs types sont différents, comme " "pour ``1`` et ``1.0``)." -#: library/functions.rst:704 +#: library/functions.rst:711 msgid "" "For objects with custom :meth:`__hash__` methods, note that :func:`hash` " "truncates the return value based on the bit width of the host machine. See :" @@ -1417,7 +1426,7 @@ msgstr "" "func:`hash` tronque la valeur donnée en fonction du nombre de bits de la " "machine hôte. Voir :meth:`__hash__` pour plus d'information." -#: library/functions.rst:710 +#: library/functions.rst:717 msgid "" "Invoke the built-in help system. (This function is intended for interactive " "use.) If no argument is given, the interactive help system starts on the " @@ -1434,7 +1443,7 @@ msgstr "" "la console. Si l'argument est d'un autre type, une page d'aide sur cet objet " "est générée." -#: library/functions.rst:717 +#: library/functions.rst:724 msgid "" "Note that if a slash(/) appears in the parameter list of a function, when " "invoking :func:`help`, it means that the parameters prior to the slash are " @@ -1447,14 +1456,14 @@ msgstr "" "plus d'informations, voir :ref:`La FAQ sur les arguments positionnels `." -#: library/functions.rst:722 +#: library/functions.rst:729 msgid "" "This function is added to the built-in namespace by the :mod:`site` module." msgstr "" "Cette fonction est ajoutée à l'espace de nommage natif par le module :mod:" "`site`." -#: library/functions.rst:724 +#: library/functions.rst:731 msgid "" "Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported signatures " "for callables are now more comprehensive and consistent." @@ -1462,7 +1471,7 @@ msgstr "" "les changements aux modules :mod:`pydoc` et :mod:`inspect` rendent les " "signatures des appelables plus compréhensibles et cohérentes." -#: library/functions.rst:731 +#: library/functions.rst:738 msgid "" "Convert an integer number to a lowercase hexadecimal string prefixed with " "\"0x\". If *x* is not a Python :class:`int` object, it has to define an :" @@ -1472,7 +1481,7 @@ msgstr "" "pas un :class:`int`, il doit définir une méthode :meth:`__index__` qui " "renvoie un entier. Quelques exemples :" -#: library/functions.rst:740 +#: library/functions.rst:747 msgid "" "If you want to convert an integer number to an uppercase or lower " "hexadecimal string with prefix or not, you can use either of the following " @@ -1482,7 +1491,7 @@ msgstr "" "majuscule ou non, préfixée ou non, vous pouvez utiliser l'une des méthodes " "suivantes :" -#: library/functions.rst:752 +#: library/functions.rst:759 msgid "" "See also :func:`int` for converting a hexadecimal string to an integer using " "a base of 16." @@ -1490,7 +1499,7 @@ msgstr "" "Voir aussi :func:`int` pour convertir une chaîne hexadécimale en un entier " "(en affectant 16 à l'argument *base*)." -#: library/functions.rst:757 +#: library/functions.rst:764 msgid "" "To obtain a hexadecimal string representation for a float, use the :meth:" "`float.hex` method." @@ -1498,7 +1507,7 @@ msgstr "" "Pour obtenir une représentation hexadécimale sous forme de chaîne d'un " "nombre à virgule flottante, utilisez la méthode :meth:`float.hex`." -#: library/functions.rst:763 +#: library/functions.rst:770 msgid "" "Return the \"identity\" of an object. This is an integer which is " "guaranteed to be unique and constant for this object during its lifetime. " @@ -1509,16 +1518,15 @@ msgstr "" "constant pour cet objet durant sa durée de vie. Deux objets dont les durées " "de vie ne se chevauchent pas peuvent partager le même :func:`id`." -#: library/functions.rst:770 -#, fuzzy +#: library/functions.rst:777 msgid "" "Raises an :ref:`auditing event ` ``builtins.id`` with argument " "``id``." msgstr "" -"Lève un :ref:`auditing event ` ``builtins.breakpoint`` avec " -"l'argument ``breakpointhook``." +"Lève un :ref:`évènement d'audit ` ``builtins.id`` avec l'argument " +"``id``." -#: library/functions.rst:775 +#: library/functions.rst:782 msgid "" "If the *prompt* argument is present, it is written to standard output " "without a trailing newline. The function then reads a line from input, " @@ -1530,7 +1538,7 @@ msgstr "" "standard et la convertit en chaîne (supprimant le retour à la ligne final) " "quelle renvoie. Lorsque EOF est lu, :exc:`EOFError` est levée. Exemple ::" -#: library/functions.rst:785 +#: library/functions.rst:792 msgid "" "If the :mod:`readline` module was loaded, then :func:`input` will use it to " "provide elaborate line editing and history features." @@ -1538,16 +1546,15 @@ msgstr "" "Si le module :mod:`readline` est chargé, :func:`input` l'utilisera pour " "fournir des fonctionnalités d'édition et d'historique élaborées." -#: library/functions.rst:788 -#, fuzzy +#: library/functions.rst:795 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt``." msgstr "" -"Lève un :ref:`auditing event ` ``builtins.input`` avec l'argument " -"``prompt`` avant de lire l'entrée." +"Lève un :ref:`évènement d'audit ` ``builtins.input`` avec " +"l'argument ``prompt``." -#: library/functions.rst:790 +#: library/functions.rst:797 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt`` before reading input" @@ -1555,16 +1562,16 @@ msgstr "" "Lève un :ref:`auditing event ` ``builtins.input`` avec l'argument " "``prompt`` avant de lire l'entrée." -#: library/functions.rst:793 +#: library/functions.rst:800 #, fuzzy msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "argument ``result``." msgstr "" -"Lève un :ref:`auditing event ` ``builtins.breakpoint`` avec " -"l'argument ``breakpointhook``." +"Lève un :ref:`évènement d'audit ` ``builtins.input/result`` avec " +"l'argument ``result``." -#: library/functions.rst:795 +#: library/functions.rst:802 msgid "" "Raises an auditing event ``builtins.input/result`` with the result after " "successfully reading input." @@ -1572,7 +1579,7 @@ msgstr "" "Lève un événement d'audit ``builtins.input/result`` avec le résultat après " "avoir lu avec succès l'entrée." -#: library/functions.rst:802 +#: library/functions.rst:809 msgid "" "Return an integer object constructed from a number or string *x*, or return " "``0`` if no arguments are given. If *x* defines :meth:`__int__`, ``int(x)`` " @@ -1587,7 +1594,7 @@ msgstr "" "``int(x)`` renvoie ``x.__trunc__()``. Les nombres à virgule flottante sont " "tronqués vers zéro." -#: library/functions.rst:809 +#: library/functions.rst:816 msgid "" "If *x* is not a number or if *base* is given, then *x* must be a string, :" "class:`bytes`, or :class:`bytearray` instance representing an :ref:`integer " @@ -1616,11 +1623,11 @@ msgstr "" "0)`` n'est pas légal, alors que ``int('010')`` l'est tout comme ``int('010', " "8)``." -#: library/functions.rst:822 +#: library/functions.rst:829 msgid "The integer type is described in :ref:`typesnumeric`." msgstr "Le type des entiers est décrit dans :ref:`typesnumeric`." -#: library/functions.rst:824 +#: library/functions.rst:831 msgid "" "If *base* is not an instance of :class:`int` and the *base* object has a :" "meth:`base.__index__ ` method, that method is called to " @@ -1633,11 +1640,21 @@ msgstr "" "meth:`base.__int__ ` au lieu de :meth:`base.__index__ " "`." -#: library/functions.rst:837 +#: library/functions.rst:844 msgid "Falls back to :meth:`__index__` if :meth:`__int__` is not defined." msgstr "revient à :meth:`__index__` si :meth:`__int__` n'est pas défini." -#: library/functions.rst:843 +#: library/functions.rst:847 +msgid "" +":class:`int` string inputs and string representations can be limited to help " +"avoid denial of service attacks. A :exc:`ValueError` is raised when the " +"limit is exceeded while converting a string *x* to an :class:`int` or when " +"converting an :class:`int` into a string would exceed the limit. See the :" +"ref:`integer string conversion length limitation ` " +"documentation." +msgstr "" + +#: library/functions.rst:858 msgid "" "Return ``True`` if the *object* argument is an instance of the *classinfo* " "argument, or of a (direct, indirect or :term:`virtual `) of *classinfo*. A class is considered a subclass of " -"itself. *classinfo* may be a tuple of class objects, in which case every " -"entry in *classinfo* will be checked. In any other case, a :exc:`TypeError` " -"exception is raised." +"itself. *classinfo* may be a tuple of class objects (or recursively, other " +"such tuples), in which case return ``True`` if *class* is a subclass of any " +"entry in *classinfo*. In any other case, a :exc:`TypeError` exception is " +"raised." msgstr "" "Renvoie ``True`` si *class* est une classe fille (directe, indirecte ou :" "term:`abstraite `) de *classinfo*. Une classe est " @@ -1670,7 +1689,7 @@ msgstr "" "classes, dans ce cas la vérification sera faite pour chaque classe de " "*classinfo*. Dans tous les autres cas, :exc:`TypeError` est levée." -#: library/functions.rst:864 +#: library/functions.rst:880 msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " "differently depending on the presence of the second argument. Without a " @@ -1695,11 +1714,11 @@ msgstr "" "de :meth:`~iterator.__next__`. Si la valeur reçue est égale à *sentinel* :" "exc:`StopIteration` est levée, sinon la valeur est renvoyée." -#: library/functions.rst:877 +#: library/functions.rst:893 msgid "See also :ref:`typeiter`." msgstr "Voir aussi :ref:`typeiter`." -#: library/functions.rst:879 +#: library/functions.rst:895 msgid "" "One useful application of the second form of :func:`iter` is to build a " "block-reader. For example, reading fixed-width blocks from a binary database " @@ -1709,7 +1728,7 @@ msgstr "" "construire un lecteur par blocs. Par exemple, lire des blocs de taille fixe " "d'une base de donnée binaire jusqu'à ce que la fin soit atteinte ::" -#: library/functions.rst:891 +#: library/functions.rst:907 msgid "" "Return the length (the number of items) of an object. The argument may be a " "sequence (such as a string, bytes, tuple, list, or range) or a collection " @@ -1720,13 +1739,13 @@ msgstr "" "liste ou un intervalle) ou une collection (telle qu'un dictionnaire, un " "ensemble ou un ensemble figé)." -#: library/functions.rst:897 +#: library/functions.rst:913 msgid "" "``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." "maxsize`, such as :class:`range(2 ** 100) `." msgstr "" -#: library/functions.rst:905 +#: library/functions.rst:921 msgid "" "Rather than being a function, :class:`list` is actually a mutable sequence " "type, as documented in :ref:`typesseq-list` and :ref:`typesseq`." @@ -1735,7 +1754,7 @@ msgstr "" "type séquentiel muable, comme décrit dans :ref:`typesseq-list` et :ref:" "`typesseq`." -#: library/functions.rst:911 +#: library/functions.rst:927 msgid "" "Update and return a dictionary representing the current local symbol table. " "Free variables are returned by :func:`locals` when it is called in function " @@ -1748,7 +1767,7 @@ msgstr "" "corps d'une classe. Notez qu’au niveau d’un module, :func:`locals` et :func:" "`globals` sont le même dictionnaire." -#: library/functions.rst:917 +#: library/functions.rst:933 msgid "" "The contents of this dictionary should not be modified; changes may not " "affect the values of local and free variables used by the interpreter." @@ -1757,7 +1776,7 @@ msgstr "" "n'affectent pas les valeurs des variables locales ou libres utilisées par " "l'interpréteur." -#: library/functions.rst:922 +#: library/functions.rst:938 msgid "" "Return an iterator that applies *function* to every item of *iterable*, " "yielding the results. If additional *iterable* arguments are passed, " @@ -1774,7 +1793,7 @@ msgstr "" "où les arguments sont déjà rangés sous forme de *n*-uplets, voir :func:" "`itertools.starmap`." -#: library/functions.rst:933 +#: library/functions.rst:949 msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." @@ -1782,7 +1801,7 @@ msgstr "" "Renvoie le plus grand élément d'un itérable, ou l'argument le plus grand " "parmi au moins deux arguments." -#: library/functions.rst:936 +#: library/functions.rst:952 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The largest item in the iterable is returned. If two or more positional " @@ -1793,7 +1812,7 @@ msgstr "" "deux arguments positionnels sont fournis, l'argument le plus grand sera " "renvoyé." -#: library/functions.rst:978 +#: library/functions.rst:994 msgid "" "There are two optional keyword-only arguments. The *key* argument specifies " "a one-argument ordering function like that used for :meth:`list.sort`. The " @@ -1807,7 +1826,7 @@ msgstr "" "fourni est vide. Si l'itérable est vide et que *default* n'est pas fourni, :" "exc:`ValueError` est levée." -#: library/functions.rst:947 +#: library/functions.rst:963 msgid "" "If multiple items are maximal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1819,15 +1838,15 @@ msgstr "" "stabilité lors du tri, tels que ``sorted(iterable, key=keyfunc, reverse=True)" "[0]`` et ``heapq.nlargest(1, iterable, key=keyfunc)``." -#: library/functions.rst:989 +#: library/functions.rst:1005 msgid "The *default* keyword-only argument." msgstr "L'argument nommé (et seulement donné par son nom) *default*." -#: library/functions.rst:992 +#: library/functions.rst:1008 msgid "The *key* can be ``None``." msgstr "l'argument *key* peut être ``None``." -#: library/functions.rst:963 +#: library/functions.rst:979 msgid "" "Return a \"memory view\" object created from the given argument. See :ref:" "`typememoryview` for more information." @@ -1835,7 +1854,7 @@ msgstr "" "Renvoie une « vue mémoire » (*memory view*) créée depuis l'argument. Voir :" "ref:`typememoryview` pour plus d'informations." -#: library/functions.rst:970 +#: library/functions.rst:986 msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." @@ -1843,7 +1862,7 @@ msgstr "" "Renvoie le plus petit élément d'un itérable ou le plus petit d'au moins deux " "arguments." -#: library/functions.rst:973 +#: library/functions.rst:989 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The smallest item in the iterable is returned. If two or more positional " @@ -1853,7 +1872,7 @@ msgstr "" "plus petit élément de l'itérable est renvoyé. Si au moins deux arguments " "positionnels sont fournis, le plus petit argument positionnel est renvoyé." -#: library/functions.rst:984 +#: library/functions.rst:1000 msgid "" "If multiple items are minimal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1865,7 +1884,7 @@ msgstr "" "du tri, tels que ``sorted(iterable, key=keyfunc)[0]`` et ``heapq." "nsmallest(1, iterable, key=keyfunc)``." -#: library/functions.rst:998 +#: library/functions.rst:1014 msgid "" "Retrieve the next item from the *iterator* by calling its :meth:`~iterator." "__next__` method. If *default* is given, it is returned if the iterator is " @@ -1875,7 +1894,7 @@ msgstr "" "__next__`. Si *default* est fourni, il sera renvoyé si l'itérateur est " "épuisé, sinon :exc:`StopIteration` est levée." -#: library/functions.rst:1005 +#: library/functions.rst:1021 msgid "" "Return a new featureless object. :class:`object` is a base for all classes. " "It has the methods that are common to all instances of Python classes. This " @@ -1885,7 +1904,7 @@ msgstr "" "classes. C'est elle qui porte les méthodes communes à toutes les instances " "de classes en Python. Cette fonction n'accepte aucun argument." -#: library/functions.rst:1011 +#: library/functions.rst:1027 msgid "" ":class:`object` does *not* have a :attr:`~object.__dict__`, so you can't " "assign arbitrary attributes to an instance of the :class:`object` class." @@ -1894,7 +1913,7 @@ msgstr "" "pouvez donc pas assigner d'attributs arbitraires à une instance d':class:" "`object`." -#: library/functions.rst:1017 +#: library/functions.rst:1033 msgid "" "Convert an integer number to an octal string prefixed with \"0o\". The " "result is a valid Python expression. If *x* is not a Python :class:`int` " @@ -1906,7 +1925,7 @@ msgstr "" "objet :class:`int`, il doit définir une méthode :meth:`__index__` qui donne " "un entier, par exemple :" -#: library/functions.rst:1027 +#: library/functions.rst:1043 msgid "" "If you want to convert an integer number to octal string either with prefix " "\"0o\" or not, you can use either of the following ways." @@ -1914,7 +1933,7 @@ msgstr "" "Si vous voulez convertir un nombre entier en chaîne octale, avec ou sans le " "préfixe ``0o``, vous pouvez utiliser l'une des méthodes suivantes." -#: library/functions.rst:1044 +#: library/functions.rst:1060 msgid "" "Open *file* and return a corresponding :term:`file object`. If the file " "cannot be opened, an :exc:`OSError` is raised. See :ref:`tut-files` for more " @@ -1924,7 +1943,7 @@ msgstr "" "Si le fichier ne peut pas être ouvert, une :exc:`OSError` est levée. Voir :" "ref:`tut-files` pour plus d'exemple d'utilisation de cette fonction." -#: library/functions.rst:1048 +#: library/functions.rst:1064 msgid "" "*file* is a :term:`path-like object` giving the pathname (absolute or " "relative to the current working directory) of the file to be opened or an " @@ -1938,7 +1957,7 @@ msgstr "" "descripteur de fichier est donné, il sera fermé en même temps que l'objet " "d'entrée-sortie renvoyé, sauf si *closefd* est mis à ``False``)." -#: library/functions.rst:1054 +#: library/functions.rst:1070 msgid "" "*mode* is an optional string that specifies the mode in which the file is " "opened. It defaults to ``'r'`` which means open for reading in text mode. " @@ -1965,71 +1984,71 @@ msgstr "" "mode binaire sans préciser *encoding* non spécifié). Les modes disponibles " "sont :" -#: library/functions.rst:1071 +#: library/functions.rst:1087 msgid "Character" msgstr "Caractère" -#: library/functions.rst:1071 +#: library/functions.rst:1087 msgid "Meaning" msgstr "Signification" -#: library/functions.rst:1073 +#: library/functions.rst:1089 msgid "``'r'``" msgstr "``'r'``" -#: library/functions.rst:1073 +#: library/functions.rst:1089 msgid "open for reading (default)" msgstr "ouvre en lecture (par défaut)" -#: library/functions.rst:1074 +#: library/functions.rst:1090 msgid "``'w'``" msgstr "``'w'``" -#: library/functions.rst:1074 +#: library/functions.rst:1090 msgid "open for writing, truncating the file first" msgstr "ouvre en écriture, en effaçant le contenu du fichier" -#: library/functions.rst:1075 +#: library/functions.rst:1091 msgid "``'x'``" msgstr "``'x'``" -#: library/functions.rst:1075 +#: library/functions.rst:1091 msgid "open for exclusive creation, failing if the file already exists" msgstr "ouvre pour une création exclusive, échouant si le fichier existe déjà" -#: library/functions.rst:1076 +#: library/functions.rst:1092 msgid "``'a'``" msgstr "``'a'``" -#: library/functions.rst:1076 +#: library/functions.rst:1092 msgid "open for writing, appending to the end of the file if it exists" msgstr "ouvre en écriture, ajoutant à la fin du fichier s'il existe" -#: library/functions.rst:1077 +#: library/functions.rst:1093 msgid "``'b'``" msgstr "``'b'``" -#: library/functions.rst:1077 +#: library/functions.rst:1093 msgid "binary mode" msgstr "mode binaire" -#: library/functions.rst:1078 +#: library/functions.rst:1094 msgid "``'t'``" msgstr "``'t'``" -#: library/functions.rst:1078 +#: library/functions.rst:1094 msgid "text mode (default)" msgstr "mode texte (par défaut)" -#: library/functions.rst:1079 +#: library/functions.rst:1095 msgid "``'+'``" msgstr "``'+'``" -#: library/functions.rst:1079 +#: library/functions.rst:1095 msgid "open for updating (reading and writing)" msgstr "ouvre en modification (lecture et écriture)" -#: library/functions.rst:1082 +#: library/functions.rst:1098 msgid "" "The default mode is ``'r'`` (open for reading text, synonym of ``'rt'``). " "Modes ``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and " @@ -2039,7 +2058,7 @@ msgstr "" "``'rt'``). Les modes ``'w+'`` et ``'w+b'`` ouvrent et vident le fichier. Les " "modes ``'r+'`` et ``'r+b'`` ouvrent le fichier sans le vider." -#: library/functions.rst:1086 +#: library/functions.rst:1102 msgid "" "As mentioned in the :ref:`io-overview`, Python distinguishes between binary " "and text I/O. Files opened in binary mode (including ``'b'`` in the *mode* " @@ -2057,7 +2076,7 @@ msgstr "" "octets ayant été décodés au préalable en utilisant un encodage déduit de " "l'environnement ou *encoding* s'il est donné." -#: library/functions.rst:1094 +#: library/functions.rst:1110 msgid "" "There is an additional mode character permitted, ``'U'``, which no longer " "has any effect, and is considered deprecated. It previously enabled :term:" @@ -2072,7 +2091,7 @@ msgstr "" "documentation du paramètre :ref:`newline ` pour plus " "de détails." -#: library/functions.rst:1102 +#: library/functions.rst:1118 msgid "" "Python doesn't depend on the underlying operating system's notion of text " "files; all the processing is done by Python itself, and is therefore " @@ -2082,12 +2101,17 @@ msgstr "" "jacent. Tout le traitement est effectué par Python lui-même, et est ainsi " "indépendant de la plate-forme." -#: library/functions.rst:1106 +#: library/functions.rst:1122 +#, fuzzy msgid "" "*buffering* is an optional integer used to set the buffering policy. Pass 0 " "to switch buffering off (only allowed in binary mode), 1 to select line " "buffering (only usable in text mode), and an integer > 1 to indicate the " -"size in bytes of a fixed-size chunk buffer. When no *buffering* argument is " +"size in bytes of a fixed-size chunk buffer. Note that specifying a buffer " +"size this way applies for binary buffered I/O, but ``TextIOWrapper`` (i.e., " +"files opened with ``mode='r+'``) would have another buffering. To disable " +"buffering in ``TextIOWrapper``, consider using the ``write_through`` flag " +"for :func:`io.TextIOWrapper.reconfigure`. When no *buffering* argument is " "given, the default buffering policy works as follows:" msgstr "" "*buffering* est un entier optionnel permettant de configurer l'espace " @@ -2097,7 +2121,7 @@ msgstr "" "en octets d'un tampon de taille fixe. Sans l'argument *buffering*, les " "comportements par défaut sont les suivants :" -#: library/functions.rst:1112 +#: library/functions.rst:1132 msgid "" "Binary files are buffered in fixed-size chunks; the size of the buffer is " "chosen using a heuristic trying to determine the underlying device's \"block " @@ -2110,7 +2134,7 @@ msgstr "" "DEFAULT_BUFFER_SIZE`. Sur de nombreux systèmes, le tampon sera de 4096 ou " "8192 octets." -#: library/functions.rst:1117 +#: library/functions.rst:1137 msgid "" "\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` " "returns ``True``) use line buffering. Other text files use the policy " @@ -2120,7 +2144,7 @@ msgstr "" "isatty` renvoie ``True``) utilisent un tampon par lignes. Les autres " "fichiers texte sont traités comme les fichiers binaires." -#: library/functions.rst:1121 +#: library/functions.rst:1141 msgid "" "*encoding* is the name of the encoding used to decode or encode the file. " "This should only be used in text mode. The default encoding is platform " @@ -2135,7 +2159,7 @@ msgstr "" "par Python peut être utilisé. Voir :mod:`codecs` pour une liste des " "encodages pris en charge." -#: library/functions.rst:1128 +#: library/functions.rst:1148 msgid "" "*errors* is an optional string that specifies how encoding and decoding " "errors are to be handled—this cannot be used in binary mode. A variety of " @@ -2150,7 +2174,7 @@ msgstr "" "d'erreur enregistré avec :func:`codecs.register_error` est aussi un argument " "valide. Les noms standards sont :" -#: library/functions.rst:1136 +#: library/functions.rst:1156 msgid "" "``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding " "error. The default value of ``None`` has the same effect." @@ -2158,7 +2182,7 @@ msgstr "" "``'strict'`` pour lever une :exc:`ValueError` si une erreur d'encodage est " "rencontrée. La valeur par défaut, ``None``, a le même effet." -#: library/functions.rst:1140 +#: library/functions.rst:1160 msgid "" "``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to " "data loss." @@ -2166,7 +2190,7 @@ msgstr "" "``'ignore'`` ignore les erreurs. Notez qu'ignorer les erreurs d'encodage " "peut mener à des pertes de données." -#: library/functions.rst:1143 +#: library/functions.rst:1163 msgid "" "``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted " "where there is malformed data." @@ -2174,13 +2198,14 @@ msgstr "" "``'replace'`` insère un marqueur de substitution (tel que ``'?'``) en place " "des données mal formées." -#: library/functions.rst:1146 +#: library/functions.rst:1166 +#, fuzzy msgid "" -"``'surrogateescape'`` will represent any incorrect bytes as code points in " -"the Unicode Private Use Area ranging from U+DC80 to U+DCFF. These private " -"code points will then be turned back into the same bytes when the " -"``surrogateescape`` error handler is used when writing data. This is useful " -"for processing files in an unknown encoding." +"``'surrogateescape'`` will represent any incorrect bytes as low surrogate " +"code units ranging from U+DC80 to U+DCFF. These surrogate code units will " +"then be turned back into the same bytes when the ``surrogateescape`` error " +"handler is used when writing data. This is useful for processing files in " +"an unknown encoding." msgstr "" "``'surrogateescape'`` représente chaque octet incorrect par un code " "caractère de la zone *Private Use Area* d'Unicode, de *U+DC80* à *U+DCFF*. " @@ -2189,7 +2214,7 @@ msgstr "" "l'écriture de la donnée. C'est utile pour traiter des fichiers d'un encodage " "inconnu." -#: library/functions.rst:1153 +#: library/functions.rst:1173 msgid "" "``'xmlcharrefreplace'`` is only supported when writing to a file. Characters " "not supported by the encoding are replaced with the appropriate XML " @@ -2199,7 +2224,7 @@ msgstr "" "fichier. Les caractères non gérés par l'encodage sont remplacés par une " "entité XML de la forme ``&#nnn;``." -#: library/functions.rst:1157 +#: library/functions.rst:1177 msgid "" "``'backslashreplace'`` replaces malformed data by Python's backslashed " "escape sequences." @@ -2207,7 +2232,7 @@ msgstr "" "``'backslashreplace'`` remplace les données mal formées par des séquences " "d'échappement Python (utilisant des barres obliques inverses)." -#: library/functions.rst:1160 +#: library/functions.rst:1180 msgid "" "``'namereplace'`` (also only supported when writing) replaces unsupported " "characters with ``\\N{...}`` escape sequences." @@ -2215,7 +2240,7 @@ msgstr "" "``'namereplace'`` (aussi supporté lors de l'écriture) remplace les " "caractères non gérés par des séquences d'échappement ``\\N{...}``." -#: library/functions.rst:1168 +#: library/functions.rst:1188 msgid "" "*newline* controls how :term:`universal newlines` mode works (it only " "applies to text mode). It can be ``None``, ``''``, ``'\\n'``, ``'\\r'``, " @@ -2226,7 +2251,7 @@ msgstr "" "``None``, ``''``, ``'\\n'``, ``'\\r'``, et ``'\\r\\n'``. Il fonctionne comme " "suit :" -#: library/functions.rst:1172 +#: library/functions.rst:1192 msgid "" "When reading input from the stream, if *newline* is ``None``, universal " "newlines mode is enabled. Lines in the input can end in ``'\\n'``, " @@ -2244,7 +2269,7 @@ msgstr "" "valeur autorisée, les lignes sont seulement terminées par la chaîne donnée, " "qui est rendue telle quelle." -#: library/functions.rst:1180 +#: library/functions.rst:1200 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -2258,7 +2283,7 @@ msgstr "" "*newline* est un autre caractère valide, chaque ``'\\n'`` sera remplacé par " "la chaîne donnée." -#: library/functions.rst:1186 +#: library/functions.rst:1206 msgid "" "If *closefd* is ``False`` and a file descriptor rather than a filename was " "given, the underlying file descriptor will be kept open when the file is " @@ -2270,7 +2295,7 @@ msgstr "" "le fichier sera fermé. Si un nom de fichier est donné, *closefd* doit rester " "``True`` (la valeur par défaut) sans quoi une erreur est levée." -#: library/functions.rst:1191 +#: library/functions.rst:1211 msgid "" "A custom opener can be used by passing a callable as *opener*. The " "underlying file descriptor for the file object is then obtained by calling " @@ -2284,13 +2309,13 @@ msgstr "" "descripteur de fichier ouvert (fournir :mod:`os.open` en tant qu'*opener* " "aura le même effet que donner ``None``)." -#: library/functions.rst:1197 +#: library/functions.rst:1217 msgid "The newly created file is :ref:`non-inheritable `." msgstr "" "Il n'est :ref:`pas possible d'hériter du fichier ` " "nouvellement créé." -#: library/functions.rst:1199 +#: library/functions.rst:1219 msgid "" "The following example uses the :ref:`dir_fd ` parameter of the :func:" "`os.open` function to open a file relative to a given directory::" @@ -2298,7 +2323,7 @@ msgstr "" "L'exemple suivant utilise le paramètre :ref:`dir_fd ` de la " "fonction :func:`os.open` pour ouvrir un fichier relatif au dossier courant ::" -#: library/functions.rst:1212 +#: library/functions.rst:1232 msgid "" "The type of :term:`file object` returned by the :func:`open` function " "depends on the mode. When :func:`open` is used to open a file in a text " @@ -2324,7 +2349,7 @@ msgstr "" "BufferedRandom`. Lorsque le tampon est désactivé, le flux brut, une classe " "fille de :class:`io.RawIOBase`, :class:`io.FileIO` est renvoyée." -#: library/functions.rst:1233 +#: library/functions.rst:1253 msgid "" "See also the file handling modules, such as, :mod:`fileinput`, :mod:`io` " "(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:" @@ -2334,7 +2359,7 @@ msgstr "" "`fileinput`, :mod:`io` (où :func:`open` est déclarée), :mod:`os`, :mod:`os." "path`, :mod:`tmpfile`, et :mod:`shutil`." -#: library/functions.rst:1237 +#: library/functions.rst:1257 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``file``, " "``mode``, ``flags``." @@ -2342,7 +2367,7 @@ msgstr "" "Lève un :ref:`auditing event ` ``open`` avec les arguments " "``file``, ``mode``, ``flags``." -#: library/functions.rst:1239 +#: library/functions.rst:1259 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." @@ -2350,21 +2375,21 @@ msgstr "" "Les arguments ``mode`` et ``flags`` peuvent avoir été modifiés ou déduits de " "l'appel original." -#: library/functions.rst:1245 +#: library/functions.rst:1265 msgid "The *opener* parameter was added." msgstr "ajout du paramètre *opener*." -#: library/functions.rst:1246 +#: library/functions.rst:1266 msgid "The ``'x'`` mode was added." msgstr "ajout du mode ``'x'``." -#: library/functions.rst:1247 +#: library/functions.rst:1267 msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "" ":exc:`IOError` était normalement levée, elle est maintenant un alias de :exc:" "`OSError`." -#: library/functions.rst:1248 +#: library/functions.rst:1268 msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " "creation mode (``'x'``) already exists." @@ -2372,15 +2397,15 @@ msgstr "" ":exc:`FileExistsError` est maintenant levée si le fichier ouvert en mode " "création exclusive (``'x'``) existe déjà." -#: library/functions.rst:1254 +#: library/functions.rst:1274 msgid "The file is now non-inheritable." msgstr "Il n'est plus possible d'hériter de *file*." -#: library/functions.rst:1258 +#: library/functions.rst:1278 msgid "The ``'U'`` mode." msgstr "Le mode ``'U'``." -#: library/functions.rst:1263 +#: library/functions.rst:1283 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the function now retries the system call instead of raising an :" @@ -2390,15 +2415,15 @@ msgstr "" "aucune exception, la fonction réessaye l'appel système au lieu de lever une :" "exc:`InterruptedError` (voir la :pep:`475` pour la justification)." -#: library/functions.rst:1266 +#: library/functions.rst:1286 msgid "The ``'namereplace'`` error handler was added." msgstr "ajout du gestionnaire d'erreurs ``'namereplace'``." -#: library/functions.rst:1271 +#: library/functions.rst:1291 msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "prise en charge des objets implémentant :class:`os.PathLike`." -#: library/functions.rst:1272 +#: library/functions.rst:1292 msgid "" "On Windows, opening a console buffer may return a subclass of :class:`io." "RawIOBase` other than :class:`io.FileIO`." @@ -2406,7 +2431,7 @@ msgstr "" "Sous Windows, ouvrir un *buffer* du terminal peut renvoyer une sous-classe " "de :class:`io.RawIOBase` autre que :class:`io.FileIO`." -#: library/functions.rst:1277 +#: library/functions.rst:1297 msgid "" "Given a string representing one Unicode character, return an integer " "representing the Unicode code point of that character. For example, " @@ -2418,7 +2443,7 @@ msgstr "" "entier ``97`` et ``ord('€')`` (symbole euro) renvoie ``8364``. Il s'agit de " "l'inverse de :func:`chr`." -#: library/functions.rst:1285 +#: library/functions.rst:1305 msgid "" "Return *base* to the power *exp*; if *mod* is present, return *base* to the " "power *exp*, modulo *mod* (computed more efficiently than ``pow(base, exp) % " @@ -2430,14 +2455,18 @@ msgstr "" "``pow(base, exp) % mod``). La forme à deux arguments ``pow(base, exp)`` est " "équivalente à l'opérateur puissance : ``base**exp``." -#: library/functions.rst:1290 +#: library/functions.rst:1310 +#, fuzzy msgid "" "The arguments must have numeric types. With mixed operand types, the " "coercion rules for binary arithmetic operators apply. For :class:`int` " "operands, the result has the same type as the operands (after coercion) " "unless the second argument is negative; in that case, all arguments are " -"converted to float and a float result is delivered. For example, ``10**2`` " -"returns ``100``, but ``10**-2`` returns ``0.01``." +"converted to float and a float result is delivered. For example, ``pow(10, " +"2)`` returns ``100``, but ``pow(10, -2)`` returns ``0.01``. For a negative " +"base of type :class:`int` or :class:`float` and a non-integral exponent, a " +"complex result is delivered. For example, ``pow(-9, 0.5)`` returns a value " +"close to ``3j``." msgstr "" "Les arguments doivent être de types numériques. Avec des opérandes de " "différents types, les mêmes règles de coercition que celles des opérateurs " @@ -2447,7 +2476,7 @@ msgstr "" "convertis en ``float``, et le résultat sera un ``float`` aussi. Par exemple, " "``10**2`` donne ``100``, alors que ``10**-2`` donne ``0.01``." -#: library/functions.rst:1297 +#: library/functions.rst:1320 msgid "" "For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must " "also be of integer type and *mod* must be nonzero. If *mod* is present and " @@ -2461,11 +2490,11 @@ msgstr "" "être premiers entre eux. Dans ce cas, ``pow(inv_base, -exp, mod)`` est " "renvoyé, où *inv_base* est un inverse de *base* modulo *mod*." -#: library/functions.rst:1303 +#: library/functions.rst:1326 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "Voici un exemple de calcul d'un inverse de ``38`` modulo ``97`` ::" -#: library/functions.rst:1310 +#: library/functions.rst:1333 msgid "" "For :class:`int` operands, the three-argument form of ``pow`` now allows the " "second argument to be negative, permitting computation of modular inverses." @@ -2474,14 +2503,14 @@ msgstr "" "permet maintenant au deuxième argument d'être négatif, permettant le calcul " "des inverses modulaires." -#: library/functions.rst:1315 +#: library/functions.rst:1338 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" "Autorise les arguments par mots-clés. Auparavant, seuls les arguments " "positionnels étaient autorisés." -#: library/functions.rst:1322 +#: library/functions.rst:1345 msgid "" "Print *objects* to the text stream *file*, separated by *sep* and followed " "by *end*. *sep*, *end*, *file* and *flush*, if present, must be given as " @@ -2491,7 +2520,7 @@ msgstr "" "*end*. Les arguments *sep*, *end*, *file*, et *flush*, s'ils sont présents, " "doivent être nommés." -#: library/functions.rst:1326 +#: library/functions.rst:1349 msgid "" "All non-keyword arguments are converted to strings like :func:`str` does and " "written to the stream, separated by *sep* and followed by *end*. Both *sep* " @@ -2505,7 +2534,7 @@ msgstr "" "les valeurs par défaut. Si aucun *objects* n'est donné :func:`print` écris " "seulement *end*." -#: library/functions.rst:1332 +#: library/functions.rst:1355 msgid "" "The *file* argument must be an object with a ``write(string)`` method; if it " "is not present or ``None``, :data:`sys.stdout` will be used. Since printed " @@ -2518,7 +2547,7 @@ msgstr "" "peut pas être utilisé avec des fichiers ouverts en mode binaire. Pour ceux-" "ci utilisez plutôt ``file.write(...)``." -#: library/functions.rst:1337 +#: library/functions.rst:1360 msgid "" "Whether output is buffered is usually determined by *file*, but if the " "*flush* keyword argument is true, the stream is forcibly flushed." @@ -2526,15 +2555,15 @@ msgstr "" "Que la sortie utilise un *buffer* ou non est souvent décidé par *file*, mais " "si l'argument *flush* est vrai, le tampon du flux est vidé explicitement." -#: library/functions.rst:1340 +#: library/functions.rst:1363 msgid "Added the *flush* keyword argument." msgstr "ajout de l'argument nommé *flush*." -#: library/functions.rst:1346 +#: library/functions.rst:1369 msgid "Return a property attribute." msgstr "Renvoie un attribut propriété." -#: library/functions.rst:1348 +#: library/functions.rst:1371 msgid "" "*fget* is a function for getting an attribute value. *fset* is a function " "for setting an attribute value. *fdel* is a function for deleting an " @@ -2545,11 +2574,11 @@ msgstr "" "supprimer la valeur d'un attribut, et *doc* créé une *docstring* pour " "l'attribut." -#: library/functions.rst:1352 +#: library/functions.rst:1375 msgid "A typical use is to define a managed attribute ``x``::" msgstr "Une utilisation courante : définir un attribut managé ``x`` ::" -#: library/functions.rst:1369 +#: library/functions.rst:1392 msgid "" "If *c* is an instance of *C*, ``c.x`` will invoke the getter, ``c.x = " "value`` will invoke the setter and ``del c.x`` the deleter." @@ -2558,7 +2587,7 @@ msgstr "" "anglais), ``c.x = value`` invoque le mutateur (*setter*), et ``del x`` le " "destructeur (*deleter*)." -#: library/functions.rst:1372 +#: library/functions.rst:1395 msgid "" "If given, *doc* will be the docstring of the property attribute. Otherwise, " "the property will copy *fget*'s docstring (if it exists). This makes it " @@ -2570,17 +2599,17 @@ msgstr "" "création de propriétés en lecture seule en utilisant simplement :func:" "`property` comme un :term:`décorateur ` ::" -#: library/functions.rst:1385 +#: library/functions.rst:1408 msgid "" -"The ``@property`` decorator turns the :meth:`voltage` method into a \"getter" -"\" for a read-only attribute with the same name, and it sets the docstring " -"for *voltage* to \"Get the current voltage.\"" +"The ``@property`` decorator turns the :meth:`voltage` method into a " +"\"getter\" for a read-only attribute with the same name, and it sets the " +"docstring for *voltage* to \"Get the current voltage.\"" msgstr "" "Le décorateur ``@property`` transforme la méthode :meth:`voltage` en un " "*getter* d'un attribut du même nom, et donne *\"Get the current voltage\"* " "comme *docstring* de *voltage*." -#: library/functions.rst:1389 +#: library/functions.rst:1412 msgid "" "A property object has :attr:`~property.getter`, :attr:`~property.setter`, " "and :attr:`~property.deleter` methods usable as decorators that create a " @@ -2592,7 +2621,7 @@ msgstr "" "une copie de la propriété avec les accesseurs correspondants définis par la " "fonction de décoration. C'est plus clair avec un exemple ::" -#: library/functions.rst:1411 +#: library/functions.rst:1434 msgid "" "This code is exactly equivalent to the first example. Be sure to give the " "additional functions the same name as the original property (``x`` in this " @@ -2602,7 +2631,7 @@ msgstr "" "donner aux fonctions additionnelles le même nom que la propriété (``x`` dans " "ce cas)." -#: library/functions.rst:1415 +#: library/functions.rst:1438 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." @@ -2610,11 +2639,11 @@ msgstr "" "L'objet propriété renvoyé à aussi les attributs ``fget``, ``fset`` et " "``fdel`` correspondants aux arguments du constructeur." -#: library/functions.rst:1418 +#: library/functions.rst:1441 msgid "The docstrings of property objects are now writeable." msgstr "Les *docstrings* des objets propriété peuvent maintenant être écrits." -#: library/functions.rst:1427 +#: library/functions.rst:1450 msgid "" "Rather than being a function, :class:`range` is actually an immutable " "sequence type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." @@ -2623,7 +2652,7 @@ msgstr "" "type de séquence immuable, comme décrit dans :ref:`typesseq-range` et :ref:" "`typesseq`." -#: library/functions.rst:1433 +#: library/functions.rst:1456 msgid "" "Return a string containing a printable representation of an object. For " "many types, this function makes an attempt to return a string that would " @@ -2641,7 +2670,7 @@ msgstr "" "l'adresse de l'objet. Une classe peut contrôler ce que cette fonction " "renvoie pour ses instances en définissant une méthode :meth:`__repr__`." -#: library/functions.rst:1444 +#: library/functions.rst:1467 msgid "" "Return a reverse :term:`iterator`. *seq* must be an object which has a :" "meth:`__reversed__` method or supports the sequence protocol (the :meth:" @@ -2653,7 +2682,7 @@ msgstr "" "séquence (la méthode :meth:`__len__` et la méthode :meth:`__getitem__` avec " "des arguments entiers commençant à zéro)." -#: library/functions.rst:1452 +#: library/functions.rst:1475 msgid "" "Return *number* rounded to *ndigits* precision after the decimal point. If " "*ndigits* is omitted or is ``None``, it returns the nearest integer to its " @@ -2663,7 +2692,7 @@ msgstr "" "virgule. Si *ndigits* est omis (ou est ``None``), l'entier le plus proche " "est renvoyé." -#: library/functions.rst:1456 +#: library/functions.rst:1479 msgid "" "For the built-in types supporting :func:`round`, values are rounded to the " "closest multiple of 10 to the power minus *ndigits*; if two multiples are " @@ -2681,7 +2710,7 @@ msgstr "" "zéro, ou négatif). La valeur renvoyée est un entier si *ndigits* n'est pas " "donné, (ou est ``None``). Sinon elle est du même type que *number*." -#: library/functions.rst:1465 +#: library/functions.rst:1488 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." @@ -2689,7 +2718,7 @@ msgstr "" "Pour tout autre objet Python ``number``, ``round`` délègue à ``number." "__round__``." -#: library/functions.rst:1470 +#: library/functions.rst:1493 msgid "" "The behavior of :func:`round` for floats can be surprising: for example, " "``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``. This is " @@ -2703,7 +2732,7 @@ msgstr "" "fractions de décimaux ne peuvent pas être représentés exactement en nombre a " "virgule flottante. Voir :ref:`tut-fp-issues` pour plus d'information." -#: library/functions.rst:1481 +#: library/functions.rst:1504 msgid "" "Return a new :class:`set` object, optionally with elements taken from " "*iterable*. ``set`` is a built-in class. See :class:`set` and :ref:`types-" @@ -2713,7 +2742,7 @@ msgstr "" "d'*iterable*. ``set`` est une classe native. Voir :class:`set` et :ref:" "`types-set` pour la documentation de cette classe." -#: library/functions.rst:1485 +#: library/functions.rst:1508 msgid "" "For other containers see the built-in :class:`frozenset`, :class:`list`, :" "class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` " @@ -2722,7 +2751,7 @@ msgstr "" "D'autres conteneurs existent, comme : :class:`frozenset`, :class:`list`, :" "class:`tuple`, et :class:`dict`, ainsi que le module :mod:`collections`." -#: library/functions.rst:1492 +#: library/functions.rst:1515 msgid "" "This is the counterpart of :func:`getattr`. The arguments are an object, a " "string and an arbitrary value. The string may name an existing attribute or " @@ -2736,18 +2765,25 @@ msgstr "" "si l'objet l'autorise. Par exemple, ``setattr(x, 'foobar', 123)`` équivaut à " "``x.foobar = 123``." -#: library/functions.rst:1504 +#: library/functions.rst:1523 +msgid "" +"Since :ref:`private name mangling ` happens at " +"compilation time, one must manually mangle a private attribute's (attributes " +"with two leading underscores) name in order to set it with :func:`setattr`." +msgstr "" + +#: library/functions.rst:1532 +#, fuzzy msgid "" "Return a :term:`slice` object representing the set of indices specified by " "``range(start, stop, step)``. The *start* and *step* arguments default to " "``None``. Slice objects have read-only data attributes :attr:`~slice." "start`, :attr:`~slice.stop` and :attr:`~slice.step` which merely return the " "argument values (or their default). They have no other explicit " -"functionality; however they are used by Numerical Python and other third " -"party extensions. Slice objects are also generated when extended indexing " -"syntax is used. For example: ``a[start:stop:step]`` or ``a[start:stop, " -"i]``. See :func:`itertools.islice` for an alternate version that returns an " -"iterator." +"functionality; however they are used by NumPy and other third party " +"packages. Slice objects are also generated when extended indexing syntax is " +"used. For example: ``a[start:stop:step]`` or ``a[start:stop, i]``. See :" +"func:`itertools.islice` for an alternate version that returns an iterator." msgstr "" "Renvoie une :term:`tranche ` représentant un ensemble d'indices " "spécifiés par ``range(start, stop, step)``. Les arguments *start* et *step* " @@ -2761,16 +2797,16 @@ msgstr "" "Voir :func:`itertools.islice` pour une version alternative renvoyant un " "itérateur." -#: library/functions.rst:1517 +#: library/functions.rst:1545 msgid "Return a new sorted list from the items in *iterable*." msgstr "Renvoie une nouvelle liste triée depuis les éléments d'*iterable*." -#: library/functions.rst:1519 +#: library/functions.rst:1547 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "A deux arguments optionnels qui doivent être nommés." -#: library/functions.rst:1521 +#: library/functions.rst:1549 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each element in *iterable* (for example, ``key=str." @@ -2781,7 +2817,7 @@ msgstr "" "lower``). La valeur par défaut est ``None`` (compare les éléments " "directement)." -#: library/functions.rst:1525 +#: library/functions.rst:1553 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." @@ -2789,7 +2825,7 @@ msgstr "" "*reverse*, une valeur booléenne. Si elle est ``True``, la liste d'éléments " "est triée comme si toutes les comparaisons étaient inversées." -#: library/functions.rst:1528 +#: library/functions.rst:1556 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." @@ -2797,7 +2833,7 @@ msgstr "" "Utilisez :func:`functools.cmp_to_key` pour convertir l'ancienne notation " "*cmp* en une fonction *key*." -#: library/functions.rst:1531 +#: library/functions.rst:1559 msgid "" "The built-in :func:`sorted` function is guaranteed to be stable. A sort is " "stable if it guarantees not to change the relative order of elements that " @@ -2809,17 +2845,29 @@ msgstr "" "eux. C'est utile pour trier en plusieurs passes (par exemple par département " "puis par salaire)." -#: library/functions.rst:1536 +#: library/functions.rst:1564 +msgid "" +"The sort algorithm uses only ``<`` comparisons between items. While " +"defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " +"recommends that all six :ref:`rich comparisons ` be " +"implemented. This will help avoid bugs when using the same data with other " +"ordering tools such as :func:`max` that rely on a different underlying " +"method. Implementing all six comparisons also helps avoid confusion for " +"mixed type comparisons which can call reflected the :meth:`~object.__gt__` " +"method." +msgstr "" + +#: library/functions.rst:1573 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" "Pour des exemples de tris et un bref tutoriel, consultez :ref:`sortinghowto`." -#: library/functions.rst:1540 +#: library/functions.rst:1577 msgid "Transform a method into a static method." msgstr "Transforme une méthode en méthode statique." -#: library/functions.rst:1542 +#: library/functions.rst:1579 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" @@ -2827,7 +2875,7 @@ msgstr "" "Une méthode statique ne reçoit pas de premier argument implicitement. Voilà " "comment déclarer une méthode statique ::" -#: library/functions.rst:1549 +#: library/functions.rst:1586 msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." @@ -2835,7 +2883,7 @@ msgstr "" "La forme ``@staticmethod`` est un :term:`décorateur ` de " "fonction. Consultez :ref:`function` pour plus de détails." -#: library/functions.rst:1552 +#: library/functions.rst:1589 msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " "an instance (such as ``C().f()``)." @@ -2843,7 +2891,7 @@ msgstr "" "Une méthode statique peut être appelée sur une classe (par exemple, ``C." "f()``) comme sur une instance (par exemple, ``C().f()``)." -#: library/functions.rst:1555 +#: library/functions.rst:1592 msgid "" "Static methods in Python are similar to those found in Java or C++. Also " "see :func:`classmethod` for a variant that is useful for creating alternate " @@ -2853,7 +2901,7 @@ msgstr "" "ou en C++. Consultez :func:`classmethod` pour une variante utile pour créer " "des constructeurs alternatifs." -#: library/functions.rst:1559 +#: library/functions.rst:1596 msgid "" "Like all decorators, it is also possible to call ``staticmethod`` as a " "regular function and do something with its result. This is needed in some " @@ -2867,19 +2915,19 @@ msgstr "" "depuis le corps d'une classe, et souhaiteriez éviter sa transformation en " "méthode d'instance. Pour ces cas, faites comme suit ::" -#: library/functions.rst:1568 +#: library/functions.rst:1605 msgid "For more information on static methods, see :ref:`types`." msgstr "" "Pour plus d'informations sur les méthodes statiques, consultez :ref:`types`." -#: library/functions.rst:1579 +#: library/functions.rst:1616 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" "Renvoie une version d'*object* sous forme de :class:`str`. Voir :func:`str` " "pour plus de détails." -#: library/functions.rst:1581 +#: library/functions.rst:1618 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." @@ -2887,7 +2935,7 @@ msgstr "" "``str`` est la :term:`classe ` native des chaînes de caractères. Pour " "des informations générales à propos des chaînes, consultez :ref:`textseq`." -#: library/functions.rst:1587 +#: library/functions.rst:1624 msgid "" "Sums *start* and the items of an *iterable* from left to right and returns " "the total. The *iterable*'s items are normally numbers, and the start value " @@ -2897,7 +2945,7 @@ msgstr "" "donne le total. Les éléments de l'*iterable* sont normalement des nombres, " "et la valeur de *start* ne peut pas être une chaîne de caractères." -#: library/functions.rst:1591 +#: library/functions.rst:1628 msgid "" "For some use cases, there are good alternatives to :func:`sum`. The " "preferred, fast way to concatenate a sequence of strings is by calling ``''." @@ -2911,11 +2959,11 @@ msgstr "" "meilleure précision, voir :func:`math.fsum`. Pour concaténer une série " "d'itérables, utilisez plutôt :func:`itertools.chain`." -#: library/functions.rst:1597 +#: library/functions.rst:1634 msgid "The *start* parameter can be specified as a keyword argument." msgstr "le paramètre *start* peut être passé comme un argument nommé." -#: library/functions.rst:1602 +#: library/functions.rst:1639 msgid "" "Return a proxy object that delegates method calls to a parent or sibling " "class of *type*. This is useful for accessing inherited methods that have " @@ -2925,7 +2973,7 @@ msgstr "" "de méthode à une classe parente ou sœur de *type*. C'est utile pour accéder " "aux méthodes héritées qui ont été remplacées dans une classe." -#: library/functions.rst:1606 +#: library/functions.rst:1643 msgid "" "The *object-or-type* determines the :term:`method resolution order` to be " "searched. The search starts from the class right after the *type*." @@ -2934,7 +2982,7 @@ msgstr "" "` est utilisé pour la recherche. La recherche " "commence à partir de la classe qui suit immédiatement le *type*." -#: library/functions.rst:1610 +#: library/functions.rst:1647 msgid "" "For example, if :attr:`~class.__mro__` of *object-or-type* is ``D -> B -> C -" "> A -> object`` and the value of *type* is ``B``, then :func:`super` " @@ -2944,7 +2992,7 @@ msgstr "" "-> A -> object`` et la valeur de *type* est ``B``, alors :func:`super` " "recherche ``C -> A -> object``." -#: library/functions.rst:1614 +#: library/functions.rst:1651 msgid "" "The :attr:`~class.__mro__` attribute of the *object-or-type* lists the " "method resolution search order used by both :func:`getattr` and :func:" @@ -2956,7 +3004,7 @@ msgstr "" "`super`. L'attribut est dynamique et peut changer lorsque la hiérarchie " "d'héritage est modifiée." -#: library/functions.rst:1619 +#: library/functions.rst:1656 msgid "" "If the second argument is omitted, the super object returned is unbound. If " "the second argument is an object, ``isinstance(obj, type)`` must be true. " @@ -2968,7 +3016,7 @@ msgstr "" "le second argument est un type, ``issubclass(type2, type)`` doit être vrai " "(c'est utile pour les méthodes de classe)." -#: library/functions.rst:1624 +#: library/functions.rst:1661 msgid "" "There are two typical use cases for *super*. In a class hierarchy with " "single inheritance, *super* can be used to refer to parent classes without " @@ -2981,17 +3029,18 @@ msgstr "" "maintenable. Cet usage se rapproche de l'usage de *super* dans d'autres " "langages de programmation." -#: library/functions.rst:1629 +#: library/functions.rst:1666 +#, fuzzy msgid "" "The second use case is to support cooperative multiple inheritance in a " "dynamic execution environment. This use case is unique to Python and is not " "found in statically compiled languages or languages that only support single " "inheritance. This makes it possible to implement \"diamond diagrams\" where " "multiple base classes implement the same method. Good design dictates that " -"this method have the same calling signature in every case (because the order " -"of calls is determined at runtime, because that order adapts to changes in " -"the class hierarchy, and because that order can include sibling classes that " -"are unknown prior to runtime)." +"such implementations have the same calling signature in every case (because " +"the order of calls is determined at runtime, because that order adapts to " +"changes in the class hierarchy, and because that order can include sibling " +"classes that are unknown prior to runtime)." msgstr "" "Le second est la gestion d'héritage multiple coopératif dans un " "environnement d'exécution dynamique. Cet usage est unique à Python, il ne se " @@ -3004,12 +3053,12 @@ msgstr "" "dans la hiérarchie, et parce que l'ordre peut inclure des classes sœurs " "inconnues avant l'exécution)." -#: library/functions.rst:1639 +#: library/functions.rst:1676 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" "Dans tous les cas, un appel typique à une classe parente ressemble à ::" -#: library/functions.rst:1646 +#: library/functions.rst:1683 msgid "" "In addition to method lookups, :func:`super` also works for attribute " "lookups. One possible use case for this is calling :term:`descriptors " @@ -3019,7 +3068,7 @@ msgstr "" "la recherche d'attributs. Un cas d'utilisation possible est l'appel d'un :" "term:`descripteur ` d'une classe parente ou sœur." -#: library/functions.rst:1650 +#: library/functions.rst:1687 msgid "" "Note that :func:`super` is implemented as part of the binding process for " "explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " @@ -3036,7 +3085,7 @@ msgstr "" "n'est pas défini pour les recherches implicites via des instructions ou des " "opérateurs tels que ``super()[name]``." -#: library/functions.rst:1657 +#: library/functions.rst:1694 msgid "" "Also note that, aside from the zero argument form, :func:`super` is not " "limited to use inside methods. The two argument form specifies the " @@ -3053,7 +3102,7 @@ msgstr "" "propos de la classe en cours de définition, ainsi qu'accéder à l'instance " "courante pour les méthodes ordinaires." -#: library/functions.rst:1664 +#: library/functions.rst:1701 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." -#: library/functions.rst:1673 +#: library/functions.rst:1710 msgid "" "Rather than being a function, :class:`tuple` is actually an immutable " "sequence type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." @@ -3071,7 +3120,7 @@ msgstr "" "Plutôt qu'être une fonction, :class:`tuple` est en fait un type de séquence " "immuable, comme documenté dans :ref:`typesseq-tuple` et :ref:`typesseq`." -#: library/functions.rst:1682 +#: library/functions.rst:1719 msgid "" "With one argument, return the type of an *object*. The return value is a " "type object and generally the same object as returned by :attr:`object." @@ -3081,7 +3130,7 @@ msgstr "" "objet type et généralement la même que la valeur de l'attribut :attr:`object." "__class__ `." -#: library/functions.rst:1686 +#: library/functions.rst:1723 msgid "" "The :func:`isinstance` built-in function is recommended for testing the type " "of an object, because it takes subclasses into account." @@ -3089,7 +3138,7 @@ msgstr "" "La fonction native :func:`isinstance` est recommandée pour tester le type " "d'un objet, car elle prend en compte l'héritage." -#: library/functions.rst:1690 +#: library/functions.rst:1727 #, fuzzy msgid "" "With three arguments, return a new type object. This is essentially a " @@ -3112,11 +3161,24 @@ msgstr "" "exemple, les deux instructions suivantes créent deux instances identiques " "de :class:`type` :" -#: library/functions.rst:1705 +#: library/functions.rst:1742 msgid "See also :ref:`bltin-type-objects`." msgstr "Voir aussi :ref:`bltin-type-objects`." -#: library/functions.rst:1707 +#: library/functions.rst:1744 +msgid "" +"Keyword arguments provided to the three argument form are passed to the " +"appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " +"in the same way that keywords in a class definition (besides *metaclass*) " +"would." +msgstr "" + +#: library/functions.rst:1749 +#, fuzzy +msgid "See also :ref:`class-customization`." +msgstr "Voir aussi :ref:`typeiter`." + +#: library/functions.rst:1751 msgid "" "Subclasses of :class:`type` which don't override ``type.__new__`` may no " "longer use the one-argument form to get the type of an object." @@ -3125,7 +3187,7 @@ msgstr "" "ne doivent plus utiliser la forme à un argument pour récupérer le type d'un " "objet." -#: library/functions.rst:1713 +#: library/functions.rst:1757 msgid "" "Return the :attr:`~object.__dict__` attribute for a module, class, instance, " "or any other object with a :attr:`~object.__dict__` attribute." @@ -3134,7 +3196,7 @@ msgstr "" "instance ou de n'importe quel objet avec un attribut :attr:`~object." "__dict__`." -#: library/functions.rst:1716 +#: library/functions.rst:1760 msgid "" "Objects such as modules and instances have an updateable :attr:`~object." "__dict__` attribute; however, other objects may have write restrictions on " @@ -3147,7 +3209,7 @@ msgstr "" "exemple, les classes utilisent un :class:`types.MappingProxyType` pour " "éviter les modifications directes du dictionnaire)." -#: library/functions.rst:1721 +#: library/functions.rst:1765 msgid "" "Without an argument, :func:`vars` acts like :func:`locals`. Note, the " "locals dictionary is only useful for reads since updates to the locals " @@ -3157,18 +3219,18 @@ msgstr "" "dictionnaire des variables locales n'est utile qu'en lecture, car ses " "écritures sont ignorées." -#: library/functions.rst:1725 +#: library/functions.rst:1769 msgid "" "A :exc:`TypeError` exception is raised if an object is specified but it " "doesn't have a :attr:`~object.__dict__` attribute (for example, if its class " "defines the :attr:`~object.__slots__` attribute)." msgstr "" -#: library/functions.rst:1731 +#: library/functions.rst:1775 msgid "Make an iterator that aggregates elements from each of the iterables." msgstr "Construit un itérateur agrégeant les éléments de tous les itérables." -#: library/functions.rst:1733 +#: library/functions.rst:1777 msgid "" "Returns an iterator of tuples, where the *i*-th tuple contains the *i*-th " "element from each of the argument sequences or iterables. The iterator " @@ -3182,7 +3244,7 @@ msgstr "" "un seul argument itérable, elle renvoie un itérateur sur des *n*-uplets d'un " "élément. Sans argument, elle renvoie un itérateur vide. Équivalent à ::" -#: library/functions.rst:1752 +#: library/functions.rst:1796 msgid "" "The left-to-right evaluation order of the iterables is guaranteed. This " "makes possible an idiom for clustering a data series into n-length groups " @@ -3197,7 +3259,7 @@ msgstr "" "l'itérateur. Cela a pour effet de diviser la séquence en morceaux de taille " "*n*." -#: library/functions.rst:1758 +#: library/functions.rst:1802 msgid "" ":func:`zip` should only be used with unequal length inputs when you don't " "care about trailing, unmatched values from the longer iterables. If those " @@ -3208,7 +3270,7 @@ msgstr "" "peuvent être ignorées. Si ces valeurs sont importantes, utilisez plutôt :" "func:`itertools.zip_longest`." -#: library/functions.rst:1762 +#: library/functions.rst:1806 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" @@ -3216,7 +3278,7 @@ msgstr "" ":func:`zip` peut être utilisée conjointement avec l'opérateur ``*`` pour " "dézipper une liste ::" -#: library/functions.rst:1783 +#: library/functions.rst:1827 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." @@ -3224,7 +3286,7 @@ msgstr "" "C'est une fonction avancée qui n'est pas fréquemment nécessaire, " "contrairement à :func:`importlib.import_module`." -#: library/functions.rst:1786 +#: library/functions.rst:1830 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -3244,7 +3306,7 @@ msgstr "" "à trouver l'implémentation par défaut. L'usage direct de :func:`__import__` " "est aussi déconseillé en faveur de :func:`importlib.import_module`." -#: library/functions.rst:1795 +#: library/functions.rst:1839 msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " @@ -3260,7 +3322,7 @@ msgstr "" "l'argument *locals* et n'utilise *globals* que pour déterminer le contexte " "du paquet de l'instruction :keyword:`import`." -#: library/functions.rst:1802 +#: library/functions.rst:1846 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -3273,7 +3335,7 @@ msgstr "" "positive indique le nombre de dossiers parents relativement au dossier du " "module appelant :func:`__import__` (voir la :pep:`328`)." -#: library/functions.rst:1808 +#: library/functions.rst:1852 msgid "" "When the *name* variable is of the form ``package.module``, normally, the " "top-level package (the name up till the first dot) is returned, *not* the " @@ -3285,7 +3347,7 @@ msgstr "" "et *pas* le module nommé par *name*. Cependant, lorsqu'un argument " "*fromlist* est fourni, le module nommé par *name* est renvoyé." -#: library/functions.rst:1813 +#: library/functions.rst:1857 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" @@ -3293,11 +3355,11 @@ msgstr "" "Par exemple, l'instruction ``import spam`` renvoie un code intermédiaire " "(*bytecode* en anglais) ressemblant au code suivant ::" -#: library/functions.rst:1818 +#: library/functions.rst:1862 msgid "The statement ``import spam.ham`` results in this call::" msgstr "L'instruction ``import spam.ham`` appelle ::" -#: library/functions.rst:1822 +#: library/functions.rst:1866 msgid "" "Note how :func:`__import__` returns the toplevel module here because this is " "the object that is bound to a name by the :keyword:`import` statement." @@ -3305,7 +3367,7 @@ msgstr "" "Notez comment :func:`__import__` renvoie ici le module de plus haut niveau " "parce que c'est l'objet lié à un nom par l'instruction :keyword:`import`." -#: library/functions.rst:1825 +#: library/functions.rst:1869 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" @@ -3313,7 +3375,7 @@ msgstr "" "En revanche, l'instruction ``from spam.ham import eggs, sausage as saus`` " "donne ::" -#: library/functions.rst:1832 +#: library/functions.rst:1876 msgid "" "Here, the ``spam.ham`` module is returned from :func:`__import__`. From " "this object, the names to import are retrieved and assigned to their " @@ -3322,7 +3384,7 @@ msgstr "" "Ici le module ``spam.ham`` est renvoyé par :func:`__import__`. De cet objet, " "les noms à importer sont récupérés et assignés à leurs noms respectifs." -#: library/functions.rst:1836 +#: library/functions.rst:1880 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." @@ -3330,7 +3392,7 @@ msgstr "" "Si vous voulez simplement importer un module (potentiellement dans un " "paquet) par son nom, utilisez :func:`importlib.import_module`." -#: library/functions.rst:1839 +#: library/functions.rst:1883 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." @@ -3338,7 +3400,7 @@ msgstr "" "les valeurs négatives pour *level* ne sont plus prises en charge (et sa " "valeur par défaut est 0)." -#: library/functions.rst:1843 +#: library/functions.rst:1887 msgid "" "When the command line options :option:`-E` or :option:`-I` are being used, " "the environment variable :envvar:`PYTHONCASEOK` is now ignored." @@ -3346,11 +3408,11 @@ msgstr "" "quand les options :option:`-E` ou :option:`-I` sont précisées dans la ligne " "de commande, la variable d'environnement :envvar:`PYTHONCASEOK` est ignorée." -#: library/functions.rst:1848 +#: library/functions.rst:1892 msgid "Footnotes" msgstr "Notes" -#: library/functions.rst:1849 +#: library/functions.rst:1893 msgid "" "Note that the parser only accepts the Unix-style end of line convention. If " "you are reading the code from a file, make sure to use newline conversion " diff --git a/library/functools.po b/library/functools.po index 2d8057a933..39fafee54a 100644 --- a/library/functools.po +++ b/library/functools.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-01-27 19:26+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2021-02-06 18:15+0100\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" @@ -48,8 +48,8 @@ msgid "" "`_." msgstr "" "Fonction de cache très simple et sans limite de taille. Cette technique est " -"parfois appelée `« mémoïsation » `_." +"parfois appelée `« mémoïsation » `_." #: library/functools.rst:34 msgid "" @@ -378,11 +378,11 @@ msgstr "" #: library/functools.rst:306 msgid "" -"The :func:`partial` is used for partial function application which \"freezes" -"\" some portion of a function's arguments and/or keywords resulting in a new " -"object with a simplified signature. For example, :func:`partial` can be " -"used to create a callable that behaves like the :func:`int` function where " -"the *base* argument defaults to two:" +"The :func:`partial` is used for partial function application which " +"\"freezes\" some portion of a function's arguments and/or keywords resulting " +"in a new object with a simplified signature. For example, :func:`partial` " +"can be used to create a callable that behaves like the :func:`int` function " +"where the *base* argument defaults to two:" msgstr "" ":func:`partial` est utilisé pour une application de fonction partielle qui " "\"gèle\" une portion des arguments et/ou mots-clés d'une fonction donnant un " @@ -479,21 +479,23 @@ msgstr "" "function>` :term:`single-dispatch `." #: library/functools.rst:394 +#, fuzzy msgid "" "To define a generic function, decorate it with the ``@singledispatch`` " -"decorator. Note that the dispatch happens on the type of the first argument, " -"create your function accordingly::" +"decorator. When defining a function using ``@singledispatch``, note that the " +"dispatch happens on the type of the first argument::" msgstr "" "Pour définir une fonction générique, il faut la décorer avec le décorateur " "``@singledispatch``. Noter que la distribution est effectuée sur le type du " "premier argument, donc la fonction doit être créée en conséquence ::" #: library/functools.rst:405 +#, fuzzy msgid "" "To add overloaded implementations to the function, use the :func:`register` " -"attribute of the generic function. It is a decorator. For functions " -"annotated with types, the decorator will infer the type of the first " -"argument automatically::" +"attribute of the generic function, which can be used as a decorator. For " +"functions annotated with types, the decorator will infer the type of the " +"first argument automatically::" msgstr "" "Pour ajouter des surcharges d'implémentation à la fonction, utiliser " "l'attribut :func:`register` de la fonction générique. C'est un décorateur. " @@ -509,18 +511,20 @@ msgstr "" "peut être passé explicitement en argument au décorateur ::" #: library/functools.rst:434 +#, fuzzy msgid "" -"To enable registering lambdas and pre-existing functions, the :func:" -"`register` attribute can be used in a functional form::" +"To enable registering :term:`lambdas` and pre-existing functions, " +"the :func:`register` attribute can also be used in a functional form::" msgstr "" "Pour permettre l'enregistrement de *lambdas* et de fonctions pré-existantes, " "l'attribut :func:`register` peut être utilisé sous forme fonctionnelle ::" #: library/functools.rst:442 +#, fuzzy msgid "" -"The :func:`register` attribute returns the undecorated function which " -"enables decorator stacking, pickling, as well as creating unit tests for " -"each variant independently::" +"The :func:`register` attribute returns the undecorated function. This " +"enables decorator stacking, :mod:`pickling`, and the creation of " +"unit tests for each variant independently::" msgstr "" "L'attribut :func:`register` renvoie la fonction non décorée ce qui permet " "d'empiler les décorateurs, la sérialisation, et la création de tests " @@ -535,11 +539,13 @@ msgstr "" "premier argument ::" #: library/functools.rst:476 +#, fuzzy msgid "" "Where there is no registered implementation for a specific type, its method " "resolution order is used to find a more generic implementation. The original " -"function decorated with ``@singledispatch`` is registered for the base " -"``object`` type, which means it is used if no better implementation is found." +"function decorated with ``@singledispatch`` is registered for the base :" +"class:`object` type, which means it is used if no better implementation is " +"found." msgstr "" "Quand il n'y a pas d'implémentation enregistrée pour un type spécifique, son " "ordre de résolution de méthode est utilisé pour trouver une implémentation " @@ -549,19 +555,21 @@ msgstr "" #: library/functools.rst:482 msgid "" -"If an implementation registered to :term:`abstract base class`, virtual " -"subclasses will be dispatched to that implementation::" +"If an implementation is registered to an :term:`abstract base class`, " +"virtual subclasses of the base class will be dispatched to that " +"implementation::" msgstr "" -#: library/functools.rst:496 +#: library/functools.rst:497 +#, fuzzy msgid "" -"To check which implementation will the generic function choose for a given " +"To check which implementation the generic function will choose for a given " "type, use the ``dispatch()`` attribute::" msgstr "" "Pour vérifier quelle implémentation la fonction générique choisira pour un " "type donné, utiliser l'attribut ``dispatch()`` ::" -#: library/functools.rst:504 +#: library/functools.rst:505 msgid "" "To access all registered implementations, use the read-only ``registry`` " "attribute::" @@ -569,12 +577,13 @@ msgstr "" "Pour accéder à toutes les implémentations enregistrées, utiliser l'attribut " "en lecture seule ``registry`` ::" -#: library/functools.rst:518 -msgid "The :func:`register` attribute supports using type annotations." +#: library/functools.rst:519 +#, fuzzy +msgid "The :func:`register` attribute now supports using type annotations." msgstr "" "L’attribut :func:`register` gère l’utilisation des indications de type." -#: library/functools.rst:524 +#: library/functools.rst:525 msgid "" "Transform a method into a :term:`single-dispatch ` :term:" "`generic function`." @@ -582,32 +591,36 @@ msgstr "" "Transforme une méthode en une :term:`fonction générique ` :" "term:`single-dispatch `." -#: library/functools.rst:527 +#: library/functools.rst:528 +#, fuzzy msgid "" "To define a generic method, decorate it with the ``@singledispatchmethod`` " -"decorator. Note that the dispatch happens on the type of the first non-self " -"or non-cls argument, create your function accordingly::" +"decorator. When defining a function using ``@singledispatchmethod``, note " +"that the dispatch happens on the type of the first non-*self* or non-*cls* " +"argument::" msgstr "" "Pour définir une fonction générique, il faut la décorer avec le décorateur " "``@singledispatchmethod``. Notez que la distribution est effectuée sur le " "type du premier argument non *self* ni *cls*, donc la fonction doit être " "conçue en conséquence ::" -#: library/functools.rst:544 +#: library/functools.rst:546 msgid "" -"``@singledispatchmethod`` supports nesting with other decorators such as " -"``@classmethod``. Note that to allow for ``dispatcher.register``, " -"``singledispatchmethod`` must be the *outer most* decorator. Here is the " -"``Negator`` class with the ``neg`` methods being class bound::" +"``@singledispatchmethod`` supports nesting with other decorators such as :" +"func:`@classmethod`. Note that to allow for ``dispatcher." +"register``, ``singledispatchmethod`` must be the *outer most* decorator. " +"Here is the ``Negator`` class with the ``neg`` methods bound to the class, " +"rather than an instance of the class::" msgstr "" -#: library/functools.rst:565 +#: library/functools.rst:568 msgid "" -"The same pattern can be used for other similar decorators: ``staticmethod``, " -"``abstractmethod``, and others." +"The same pattern can be used for other similar decorators: :func:" +"`@staticmethod`, :func:`@abstractmethod`, " +"and others." msgstr "" -#: library/functools.rst:573 +#: library/functools.rst:577 msgid "" "Update a *wrapper* function to look like the *wrapped* function. The " "optional arguments are tuples to specify which attributes of the original " @@ -632,7 +645,7 @@ msgstr "" "met à jour le ``__dict__`` de la fonction englobante, c'est-à-dire le " "dictionnaire de l'instance)." -#: library/functools.rst:583 +#: library/functools.rst:587 msgid "" "To allow access to the original function for introspection and other " "purposes (e.g. bypassing a caching decorator such as :func:`lru_cache`), " @@ -644,7 +657,7 @@ msgstr "" "func:`lru_cache`), cette fonction ajoute automatiquement un attribut " "``__wrapped__`` qui référence la fonction englobée." -#: library/functools.rst:588 +#: library/functools.rst:592 msgid "" "The main intended use for this function is in :term:`decorator` functions " "which wrap the decorated function and return the wrapper. If the wrapper " @@ -658,7 +671,7 @@ msgstr "" "décorateur, au lieu de la définition originale, métadonnées souvent bien " "moins utiles." -#: library/functools.rst:594 +#: library/functools.rst:598 msgid "" ":func:`update_wrapper` may be used with callables other than functions. Any " "attributes named in *assigned* or *updated* that are missing from the object " @@ -672,20 +685,20 @@ msgstr "" "dans la fonction englobante). :exc:`AttributeError` est toujours levée si le " "fonction englobante elle même a des attributs non existants dans *updated*." -#: library/functools.rst:600 +#: library/functools.rst:604 msgid "Automatic addition of the ``__wrapped__`` attribute." msgstr "Ajout automatique de l'attribut ``__wrapped__``." -#: library/functools.rst:603 +#: library/functools.rst:607 msgid "Copying of the ``__annotations__`` attribute by default." msgstr "Copie de l'attribut ``__annotations__`` par défaut." -#: library/functools.rst:606 +#: library/functools.rst:610 msgid "Missing attributes no longer trigger an :exc:`AttributeError`." msgstr "" "Les attributs manquants ne lèvent plus d'exception :exc:`AttributeError`." -#: library/functools.rst:609 +#: library/functools.rst:613 msgid "" "The ``__wrapped__`` attribute now always refers to the wrapped function, " "even if that function defined a ``__wrapped__`` attribute. (see :issue:" @@ -694,7 +707,7 @@ msgstr "" "L'attribut ``__wrapped__`` renvoie toujours la fonction englobée, même si " "cette fonction définit un attribut ``__wrapped__``. (voir :issue:`17482`)" -#: library/functools.rst:617 +#: library/functools.rst:621 msgid "" "This is a convenience function for invoking :func:`update_wrapper` as a " "function decorator when defining a wrapper function. It is equivalent to " @@ -706,7 +719,7 @@ msgstr "" "C'est équivalent à ``partial(update_wrapper, wrapped=wrapped, " "assigned=assigned, updated=updated)``. Par exemple ::" -#: library/functools.rst:643 +#: library/functools.rst:647 msgid "" "Without the use of this decorator factory, the name of the example function " "would have been ``'wrapper'``, and the docstring of the original :func:" @@ -716,11 +729,11 @@ msgstr "" "d'exemple aurait été ``'wrapper'``, et la chaîne de documentation de la " "fonction :func:`example` originale aurait été perdue." -#: library/functools.rst:651 +#: library/functools.rst:655 msgid ":class:`partial` Objects" msgstr "Objets :class:`partial`" -#: library/functools.rst:653 +#: library/functools.rst:657 msgid "" ":class:`partial` objects are callable objects created by :func:`partial`. " "They have three read-only attributes:" @@ -728,7 +741,7 @@ msgstr "" "Les objets :class:`partial` sont des objets appelables créés par :func:" "`partial`. Ils ont trois attributs en lecture seule :" -#: library/functools.rst:659 +#: library/functools.rst:663 msgid "" "A callable object or function. Calls to the :class:`partial` object will be " "forwarded to :attr:`func` with new arguments and keywords." @@ -736,7 +749,7 @@ msgstr "" "Un objet ou une fonction appelable. Les appels à l'objet :class:`partial` " "seront transmis à :attr:`func` avec les nouveaux arguments et mots-clés." -#: library/functools.rst:665 +#: library/functools.rst:669 msgid "" "The leftmost positional arguments that will be prepended to the positional " "arguments provided to a :class:`partial` object call." @@ -744,7 +757,7 @@ msgstr "" "Les arguments positionnels qui seront ajoutés avant les arguments fournis " "lors de l'appel d'un objet :class:`partial`." -#: library/functools.rst:671 +#: library/functools.rst:675 msgid "" "The keyword arguments that will be supplied when the :class:`partial` object " "is called." @@ -752,7 +765,7 @@ msgstr "" "Les arguments nommés qui seront fournis quand l'objet :class:`partial` est " "appelé." -#: library/functools.rst:674 +#: library/functools.rst:678 msgid "" ":class:`partial` objects are like :class:`function` objects in that they are " "callable, weak referencable, and can have attributes. There are some " diff --git a/library/gc.po b/library/gc.po index 6d62e2a70e..c66095dfcd 100644 --- a/library/gc.po +++ b/library/gc.po @@ -16,7 +16,7 @@ msgstr "" #: library/gc.rst:2 msgid ":mod:`gc` --- Garbage Collector interface" -msgstr "" +msgstr ":mod:`gc` — Interface du ramasse-miettes" #: library/gc.rst:12 msgid "" @@ -31,23 +31,34 @@ msgid "" "this includes ``gc.DEBUG_SAVEALL``, causing garbage-collected objects to be " "saved in gc.garbage for inspection." msgstr "" +"Ce module constitue une interface au ramasse-miettes facultatif. Il permet " +"de désactiver le ramasse-miettes ou de régler la fréquence des passages. Il " +"fournit des options de débogage, et donne aussi accès aux objets qui ne " +"peuvent pas être détruits bien qu'ils aient été détectés comme non " +"référencés. Le ramasse-miettes vient en complément du système de comptage de " +"références, et peut donc être désactivé pour du code qui ne crée aucun cycle " +"de références. On le désactive avec ``gc.disable()``. Pour remonter à la " +"source d'une fuite de mémoire, utilisez ``gc.set_debug(gc.DEBUG_LEAK)``. " +"Notez que ``gc.DEBUG_LEAK`` inclut ``gc.DEBUG_SAVEALL``. Cette dernière " +"option fait que les objets inatteignables, au lieu d'être détruits, sont " +"placés dans la liste ``gc.garbage`` pour pouvoir y être examinés." #: library/gc.rst:23 -#, fuzzy msgid "The :mod:`gc` module provides the following functions:" -msgstr "Le module :mod:`abc` fournit également la fonction suivante :" +msgstr "Le module :mod:`gc` contient les fonctions suivantes :" #: library/gc.rst:28 msgid "Enable automatic garbage collection." -msgstr "" +msgstr "Active le ramasse-miettes." #: library/gc.rst:33 msgid "Disable automatic garbage collection." -msgstr "" +msgstr "Désactive le ramasse-miettes." #: library/gc.rst:38 msgid "Return ``True`` if automatic collection is enabled." msgstr "" +"Renvoie ``True`` ou ``False`` selon que le ramasse-miettes est activé ou non." #: library/gc.rst:43 msgid "" @@ -56,6 +67,11 @@ msgid "" "0 to 2). A :exc:`ValueError` is raised if the generation number is " "invalid. The number of unreachable objects found is returned." msgstr "" +"Déclenche un passage du ramasse-miettes. En l'absence d'argument, un passage " +"complet est effectué. Le paramètre *generation* permet de le limiter à une " +"génération entre 0 et 2. Une exception :exc:`ValueError` est levée si le " +"numéro de la génération n'est pas valide. Cette fonction renvoie le nombre " +"d'objets inatteignables qui ont été détectés." #: library/gc.rst:48 msgid "" @@ -71,10 +87,13 @@ msgid "" "written to ``sys.stderr``. See below for a list of debugging flags which " "can be combined using bit operations to control debugging." msgstr "" +"Change les options de débogage du ramasse-miettes, qui activent l'écriture " +"d'informations sur ``sys.stderr``. Une liste d'options se trouve plus bas. " +"Les options peuvent se combiner par les opérateurs bit à bit." #: library/gc.rst:63 msgid "Return the debugging flags currently set." -msgstr "" +msgstr "Renvoie les options de débogage actives." #: library/gc.rst:68 msgid "" @@ -82,16 +101,21 @@ msgid "" "returned. If *generation* is not None, return only the objects tracked by " "the collector that are in that generation." msgstr "" +"Renvoie la liste des objets suivis par le ramasse-miettes, à l'exclusion de " +"cette liste elle-même. Le paramètre facultatif *generation* restreint la " +"liste aux objets d'une génération particulière." #: library/gc.rst:72 msgid "New *generation* parameter." -msgstr "" +msgstr "ajout du paramètre *generation*." #: library/gc.rst:75 msgid "" "Raises an :ref:`auditing event ` ``gc.get_objects`` with argument " "``generation``." msgstr "" +"Lève un :ref:`événement d'audit ` ``gc.get_objects`` avec " +"l'argument ``generation``." #: library/gc.rst:79 msgid "" @@ -99,16 +123,24 @@ msgid "" "statistics since interpreter start. The number of keys may change in the " "future, but currently each dictionary will contain the following items:" msgstr "" +"Renvoie une liste de trois dictionnaires, un par génération. Ils contiennent " +"des statistiques sur l'action du ramasse-miettes depuis le lancement de " +"l'interpréteur. Les clés actuellement présentes sont les suivantes (d'autres " +"pourraient être ajoutées dans des versions ultérieures) :" #: library/gc.rst:84 msgid "``collections`` is the number of times this generation was collected;" msgstr "" +"``collections``, le nombre de fois où cette génération a été examinée par le " +"ramasse-miettes ;" #: library/gc.rst:86 msgid "" "``collected`` is the total number of objects collected inside this " "generation;" msgstr "" +"``collected``, le nombre total d'objets qui ont été détruits alors qu'ils " +"étaient dans cette génération ;" #: library/gc.rst:89 msgid "" @@ -116,12 +148,18 @@ msgid "" "uncollectable (and were therefore moved to the :data:`garbage` list) inside " "this generation." msgstr "" +"``uncollectable``, le nombre total d'objets qui ont été identifiés comme " +"indestructibles (et donc ajoutés à la liste :data:`garbage`) au sein de " +"cette génération." #: library/gc.rst:98 msgid "" "Set the garbage collection thresholds (the collection frequency). Setting " "*threshold0* to zero disables collection." msgstr "" +"Règle les seuils de déclenchement du ramasse-miettes, qui déterminent sa " +"fréquence de passage. Si *threshold0* est mis à zéro, le ramasse-miettes ne " +"passe jamais." #: library/gc.rst:101 msgid "" @@ -141,18 +179,36 @@ msgid "" "org/garbage_collector/#collecting-the-oldest-generation>`_ for more " "information." msgstr "" +"Les objets sont répartis en trois générations en fonction du nombre de " +"passages du ramasse-miettes qui les ont laissés intacts. Les objets " +"fraîchement créés sont placés dans la génération la plus jeune, numéro 0. À " +"chaque fois qu'un objet persiste à la suite d'un passage du ramasse-miettes, " +"il monte d'une génération, ceci jusqu'à la génération 2, la plus âgée. Le " +"ramasse-miettes se déclenche en fonction du nombre d'allocations et de " +"destructions depuis le passage précédent : lorsque les allocations moins les " +"destructions font plus que *threshold0*, un passage est initié. Lors des " +"premiers passages, seule la génération 0 est inspectée. La génération 1 est " +"examinée périodiquement, lorsque le nombre de passages sur la génération 0 " +"depuis le dernier passage ayant aussi examiné la génération 1 vient à " +"excéder *threshold1*. Les règles pour la génération 2 sont plus complexes. " +"Pour avoir des détails, voir `Collecting the oldest generation `_ " +"(dans le guide du développeur, en anglais)." #: library/gc.rst:118 msgid "" "Return the current collection counts as a tuple of ``(count0, count1, " "count2)``." msgstr "" +"Renvoie un triplet des nombres totaux de passages effectués par génération." #: library/gc.rst:124 msgid "" "Return the current collection thresholds as a tuple of ``(threshold0, " "threshold1, threshold2)``." msgstr "" +"Renvoie les seuils de passage sous la forme du triplet ``(threshold0, " +"threshold1, threshold2)``." #: library/gc.rst:130 msgid "" @@ -161,6 +217,11 @@ msgid "" "extension types which do refer to other objects but do not support garbage " "collection will not be found." msgstr "" +"Renvoie la liste des objets qui contiennent directement une référence à l'un " +"quelconque des arguments. Il est à noter que cette fonction prend uniquement " +"en compte les objets suivis par le ramasse-miettes, ce qui exclut les " +"instances de certains types d'extension qui contiennent bien des références " +"sans pour autant prendre en charge le ramassage des miettes." #: library/gc.rst:135 msgid "" @@ -169,6 +230,9 @@ msgid "" "listed among the resulting referrers. To get only currently live objects, " "call :func:`collect` before calling :func:`get_referrers`." msgstr "" +"La liste renvoyée peut contenir des objets déjà isolés, mais maintenus en " +"mémoire à cause d'un cycle. Pour les exclure, appelez :func:`collect` juste " +"avant :func:`get_referrers`." #: library/gc.rst:141 msgid "" @@ -177,12 +241,18 @@ msgid "" "temporarily invalid state. Avoid using :func:`get_referrers` for any purpose " "other than debugging." msgstr "" +"La manipulation des objets renvoyés par :func:`get_referrers` est hasardeuse " +"car ils risquent d'être encore en cours d'initialisation, donc dans un état " +"temporairement instable. Mieux vaut réserver :func:`get_referrers` au " +"débogage." #: library/gc.rst:146 msgid "" "Raises an :ref:`auditing event ` ``gc.get_referrers`` with " "argument ``objs``." msgstr "" +"Lève un :ref:`événement d'audit ` ``gc.get_referrers`` avec " +"l'argument ``objs``." #: library/gc.rst:151 msgid "" @@ -195,12 +265,25 @@ msgid "" "example, if an integer is directly reachable from an argument, that integer " "object may or may not appear in the result list." msgstr "" +"Renvoie une liste des objets pointés par les références que contiennent les " +"arguments. Ils sont déterminés en appelant, si présente, la méthode C :c:" +"member:`~PyTypeObject.tp_traverse` de chaque argument, qui visite les objets " +"auxquels cet argument fait référence. Il est à noter que :c:member:" +"`~PyTypeObject.tp_traverse` n'est définie que par les objets qui gèrent le " +"ramassage des miettes, et n'a l'obligation de visiter que les objets qui " +"peuvent potentiellement faire partie d'un cycle. Ainsi, la liste renvoyée " +"par cette fonction ne contient par forcément tous les objets qu'il est " +"possible d'atteindre à partir des arguments. Par exemple, si l'un des " +"arguments contient un entier, ce dernier objet peut être présent ou non dans " +"la liste." #: library/gc.rst:159 msgid "" "Raises an :ref:`auditing event ` ``gc.get_referents`` with " "argument ``objs``." msgstr "" +"Lève un :ref:`événement d'audit ` ``gc.get_referents`` avec " +"l'argument ``objs``." #: library/gc.rst:163 msgid "" @@ -211,12 +294,21 @@ msgid "" "present in order to suppress the garbage collector footprint of simple " "instances (e.g. dicts containing only atomic keys and values)::" msgstr "" +"Renvoie ``True`` ou ``False`` selon que l'argument est suivi ou non par le " +"ramasse-miettes. En règle générale, les objets atomiques ne sont pas suivis, " +"tandis que les objets non-atomiques, tels que les conteneurs et instances de " +"classes définies par l'utilisateur, le sont. Cependant, certains types " +"présentent des optimisations qui permettent de se passer avantageusement du " +"ramasse-miettes dans les cas simples, comme les dictionnaires dont toutes " +"les clés et valeurs sont atomiques :" #: library/gc.rst:188 msgid "" "Returns ``True`` if the given object has been finalized by the garbage " "collector, ``False`` otherwise. ::" msgstr "" +"Renvoie ``True`` ou ``False`` selon que l'argument a été finalisé par le " +"ramasse-miettes." #: library/gc.rst:209 msgid "" @@ -243,6 +335,8 @@ msgid "" "The following variables are provided for read-only access (you can mutate " "the values but should not rebind them):" msgstr "" +"Les variables suivantes sont publiques, mais elles ne sont pas censées être " +"modifiées (vous pouvez les muter, mais pas les redéfinir)." #: library/gc.rst:239 msgid "" @@ -251,12 +345,19 @@ msgid "" "should be empty most of the time, except when using instances of C extension " "types with a non-``NULL`` ``tp_del`` slot." msgstr "" +"Liste des objets indestructibles, que le ramasse-miettes n'a pas pu éliminer " +"bien qu'ils soient inatteignables. Depuis Python 3.4, cette liste demeure la " +"plupart du temps vide. Elle peut se remplir si le programme fait appel à des " +"types d'extension définis en C avec un champ ``tp_del`` différent de " +"``NULL``." #: library/gc.rst:244 msgid "" "If :const:`DEBUG_SAVEALL` is set, then all unreachable objects will be added " "to this list rather than freed." msgstr "" +"Si :const:`DEBUG_SAVEALL` est actif, tous les objets inatteignables sont " +"ajoutés à cette liste au lieu d'être détruits." #: library/gc.rst:247 msgid "" @@ -265,12 +366,19 @@ msgid "" "`DEBUG_UNCOLLECTABLE` is set, in addition all uncollectable objects are " "printed." msgstr "" +"Si cette liste n'est pas vide lors de l':term:`arrêt de l'interpréteur " +"`, un :exc:`ResourceWarning` est émis (les " +"avertissements de ce type sont silencieux par défaut). De plus, si :const:" +"`DEBUG_UNCOLLECTABLE` est actif, tous les objets indestructibles sont " +"affichés." #: library/gc.rst:253 msgid "" "Following :pep:`442`, objects with a :meth:`__del__` method don't end up in :" "attr:`gc.garbage` anymore." msgstr "" +"en application de la :pep:`442`, les objets qui définissent une méthode :" +"meth:`__del__` ne finissent plus dans :attr:`gc.garbage`." #: library/gc.rst:259 msgid "" @@ -278,72 +386,92 @@ msgid "" "after collection. The callbacks will be called with two arguments, *phase* " "and *info*." msgstr "" +"Liste de fonctions de rappel lancées par le ramasse-miettes avant et après " +"un passage. Elles prennent deux arguments, *phase* et *info*." #: library/gc.rst:263 msgid "*phase* can be one of two values:" -msgstr "" +msgstr "*phase* peut prendre deux valeurs :" #: library/gc.rst:265 msgid "\"start\": The garbage collection is about to start." -msgstr "" +msgstr "``\"start\"`` lorsque le passage du ramasse-miettes est imminent." #: library/gc.rst:267 msgid "\"stop\": The garbage collection has finished." msgstr "" +"``\"stop\"`` lorsque le passage du ramasse-miettes vient de se terminer." #: library/gc.rst:269 msgid "" "*info* is a dict providing more information for the callback. The following " "keys are currently defined:" msgstr "" +"*info* est un dictionnaire qui donne plus d'informations à la fonction de " +"rappel. Les clés suivantes sont actuellement présentes :" #: library/gc.rst:272 msgid "\"generation\": The oldest generation being collected." -msgstr "" +msgstr "``\"generation\"``, la génération la plus âgée intégrée à ce passage ;" #: library/gc.rst:274 msgid "" "\"collected\": When *phase* is \"stop\", the number of objects successfully " "collected." msgstr "" +"``\"collected\"`` : si *phase* vaut ``\"stop\"``, le nombre d'objets " +"détruits avec succès ;" #: library/gc.rst:277 msgid "" "\"uncollectable\": When *phase* is \"stop\", the number of objects that " "could not be collected and were put in :data:`garbage`." msgstr "" +"``\"uncollectable\"`` : si *phase* vaut ``\"stop\"``, le nombre d'objets " +"indestructibles ajoutés à :data:`garbage`." #: library/gc.rst:280 msgid "" "Applications can add their own callbacks to this list. The primary use " "cases are:" msgstr "" +"Toute application peut ajouter ses propres fonctions de rappel à cette " +"liste. Voici les principales applications :" #: library/gc.rst:283 msgid "" "Gathering statistics about garbage collection, such as how often various " "generations are collected, and how long the collection takes." msgstr "" +"Faire des statistiques sur le passage du ramasse-miettes, par exemple la " +"fréquence à laquelle chaque génération est examinée, ou bien le temps d'un " +"passage ;" #: library/gc.rst:287 msgid "" "Allowing applications to identify and clear their own uncollectable types " "when they appear in :data:`garbage`." msgstr "" +"Identifier les types définis par une application dont les instances " +"s'ajoutent à :data:`garbage` car elles sont indestructibles." #: library/gc.rst:293 msgid "The following constants are provided for use with :func:`set_debug`:" msgstr "" +"Les constantes suivantes définissent les options de débogage que l'on peut " +"passer à :func:`set_debug` :" #: library/gc.rst:298 msgid "" "Print statistics during collection. This information can be useful when " "tuning the collection frequency." msgstr "" +"Affiche des statistiques durant les passages du ramasse-miettes. Utile pour " +"pouvoir régler la fréquence des passages." #: library/gc.rst:304 msgid "Print information on collectable objects found." -msgstr "" +msgstr "Affiche des informations sur les objets détruits." #: library/gc.rst:309 msgid "" @@ -351,18 +479,27 @@ msgid "" "reachable but cannot be freed by the collector). These objects will be " "added to the ``garbage`` list." msgstr "" +"Affiche des informations sur les objets indestructibles (ceux qui sont " +"ajoutés à la liste ``garbage``, qui sont inatteignables mais dont la mémoire " +"ne peut pas être libérée)." #: library/gc.rst:313 msgid "" "Also print the contents of the :data:`garbage` list at :term:`interpreter " "shutdown`, if it isn't empty." msgstr "" +"Affiche également le contenu de :data:`garbage` à l':term:`arrêt de " +"l'interpréteur `, pour peu que cette liste ne soit pas " +"vide." #: library/gc.rst:319 msgid "" "When set, all unreachable objects found will be appended to *garbage* rather " "than being freed. This can be useful for debugging a leaking program." msgstr "" +"Lorsque cette option est active, les objets inatteignables sont ajoutés à la " +"liste *garbage* au lieu d'être supprimés. Ceci est utile pour déboguer une " +"fuite de mémoire." #: library/gc.rst:325 msgid "" @@ -370,3 +507,5 @@ msgid "" "leaking program (equal to ``DEBUG_COLLECTABLE | DEBUG_UNCOLLECTABLE | " "DEBUG_SAVEALL``)." msgstr "" +"Combinaison des options utiles au débogage d'une fuite de mémoire. Il s'agit " +"d'un raccourci pour ``DEBUG_COLLECTABLE|DEBUG_UNCOLLECTABLE|DEBUG_SAVEALL``." diff --git a/library/gettext.po b/library/gettext.po index 9ad85f35a9..7a363456d9 100644 --- a/library/gettext.po +++ b/library/gettext.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-01 16:00+0200\n" -"PO-Revision-Date: 2020-01-13 17:57+0100\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" +"PO-Revision-Date: 2021-05-23 15:53-0400\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.4\n" +"X-Generator: Poedit 2.4.3\n" #: library/gettext.rst:2 msgid ":mod:`gettext` --- Multilingual internationalization services" @@ -609,9 +609,9 @@ msgstr "" "paires de la forme ``clef: valeur`` comme définie par la :rfc:`822`, et doit " "contenir la clef ``Project-Id-Version``. Si la clef ``Content-Type`` est " "trouvée dans une métadonnée, alors la propriété ``charset`` (jeu de " -"caractères) est utilisée pour initialiser la variable d'instance \"protégée" -"\" :attr:`_charset`, sinon cette dernière est positionnée à ``None``. Si " -"l'encodage du jeu de caractères est spécifié, tous les messages " +"caractères) est utilisée pour initialiser la variable d'instance " +"\"protégée\" :attr:`_charset`, sinon cette dernière est positionnée à " +"``None``. Si l'encodage du jeu de caractères est spécifié, tous les messages " "(identifiants et chaînes de caractères) lus depuis le catalogue sont " "convertis en chaînes Unicode via cet encodage, ou via l'encodage ASCII si " "non renseigné." @@ -1141,7 +1141,6 @@ msgid "Footnotes" msgstr "Notes" #: library/gettext.rst:724 -#, fuzzy msgid "" "The default locale directory is system dependent; for example, on RedHat " "Linux it is :file:`/usr/share/locale`, but on Solaris it is :file:`/usr/lib/" @@ -1155,10 +1154,10 @@ msgstr "" "exemple, sur RedHat c'est :file:`/usr/share/locale`, mais sur Solaris c'est :" "file:`/usr/lib/locale`. Le module :mod:`gettext` n'essaie pas de prendre en " "charge ce paramètre système dépendant du système d'exploitation, mais " -"utilise le dossier :file:`{sys.prefix}/share/locale` (voir :data:`sys." -"prefix`). C'est pour cette raison qu'il est toujours préférable d'appeler :" -"func:`bindtextdomain` en donnant explicitement un chemin absolu au début de " -"votre application." +"utilise le dossier :file:`{sys.base_prefix}/share/locale` (voir :data:`sys." +"base_prefix`). C'est pour cette raison qu'il est toujours préférable " +"d'appeler :func:`bindtextdomain` en donnant explicitement un chemin absolu " +"au début de votre application." #: library/gettext.rst:732 msgid "See the footnote for :func:`bindtextdomain` above." diff --git a/library/glob.po b/library/glob.po index f3d3484182..20ea1d5a82 100644 --- a/library/glob.po +++ b/library/glob.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-09-28 12:40+0200\n" "Last-Translator: Julien VITARD \n" "Language-Team: FRENCH \n" @@ -25,16 +25,14 @@ msgid "**Source code:** :source:`Lib/glob.py`" msgstr "**Code source :** :source:`Lib/glob.py`" #: library/glob.rst:21 +#, fuzzy msgid "" "The :mod:`glob` module finds all the pathnames matching a specified pattern " "according to the rules used by the Unix shell, although results are returned " "in arbitrary order. No tilde expansion is done, but ``*``, ``?``, and " "character ranges expressed with ``[]`` will be correctly matched. This is " "done by using the :func:`os.scandir` and :func:`fnmatch.fnmatch` functions " -"in concert, and not by actually invoking a subshell. Note that unlike :func:" -"`fnmatch.fnmatch`, :mod:`glob` treats filenames beginning with a dot (``.``) " -"as special cases. (For tilde and shell variable expansion, use :func:`os." -"path.expanduser` and :func:`os.path.expandvars`.)" +"in concert, and not by actually invoking a subshell." msgstr "" "Le module :mod:`glob` recherche tous les chemins correspondant à un motif " "particulier selon les règles utilisées par le shell Unix, les résultats sont " @@ -48,7 +46,15 @@ msgstr "" "remplacer le tilde et les variables shell, nous vous conseillons d'utiliser " "les fonctions :func:`os.path.expanduser` et :func:`os.path.expandvars`.)" -#: library/glob.rst:31 +#: library/glob.rst:28 +msgid "" +"Note that files beginning with a dot (``.``) can only be matched by patterns " +"that also start with a dot, unlike :func:`fnmatch.fnmatch` or :func:`pathlib." +"Path.glob`. (For tilde and shell variable expansion, use :func:`os.path." +"expanduser` and :func:`os.path.expandvars`.)" +msgstr "" + +#: library/glob.rst:34 msgid "" "For a literal match, wrap the meta-characters in brackets. For example, " "``'[?]'`` matches the character ``'?'``." @@ -56,13 +62,13 @@ msgstr "" "Pour une correspondance littérale, il faut entourer le métacaractère par des " "crochets. Par exemple, ``'[?]'`` reconnaît le caractère ``'?'``." -#: library/glob.rst:36 +#: library/glob.rst:39 msgid "The :mod:`pathlib` module offers high-level path objects." msgstr "" "Le module :mod:`pathlib` offre une représentation objet de haut niveau des " "chemins." -#: library/glob.rst:41 +#: library/glob.rst:44 #, fuzzy msgid "" "Return a possibly-empty list of path names that match *pathname*, which must " @@ -82,26 +88,27 @@ msgstr "" "symboliques cassés sont aussi inclus dans les résultats (comme pour le " "shell)." -#: library/glob.rst:53 -#, fuzzy +#: library/glob.rst:56 msgid "" "If *recursive* is true, the pattern \"``**``\" will match any files and zero " "or more directories, subdirectories and symbolic links to directories. If " "the pattern is followed by an :data:`os.sep` or :data:`os.altsep` then files " "will not match." msgstr "" -"Si *recursive* est vrai, le motif \"``**``\" reconnaît tous les fichiers et, " -"zéro ou plus répertoires et sous-répertoires. Si le motif est suivi par un " -"caractère de séparation ``os.sep``, seuls les répertoires et sous-" -"répertoires sont reconnus." +"Si *recursive* est vrai, le motif \"``**``\" reconnaît tous les fichiers, " +"aucun ou plusieurs répertoires, sous-répertoires et liens symboliques aux " +"répertoires. Si le motif est suivi par :data:`os.sep` ou :data:`os.altsep` " +"alors les fichiers ne sont pas inclus dans le résultat." -#: library/glob.rst:73 +#: library/glob.rst:76 msgid "" "Raises an :ref:`auditing event ` ``glob.glob`` with arguments " "``pathname``, ``recursive``." msgstr "" +"Lève un :ref:`évènement d'audit ` ``glob.glob`` avec les arguments " +"``pathname``, ``recursive``." -#: library/glob.rst:61 +#: library/glob.rst:64 msgid "" "Using the \"``**``\" pattern in large directory trees may consume an " "inordinate amount of time." @@ -109,11 +116,11 @@ msgstr "" "Utiliser le motif \"``**``\" dans de grandes arborescences de dossier peut " "consommer une quantité de temps démesurée." -#: library/glob.rst:64 +#: library/glob.rst:67 msgid "Support for recursive globs using \"``**``\"." msgstr "Gestion des chemins récursifs utilisant le motif \"``**``\"." -#: library/glob.rst:70 +#: library/glob.rst:73 msgid "" "Return an :term:`iterator` which yields the same values as :func:`glob` " "without actually storing them all simultaneously." @@ -121,7 +128,7 @@ msgstr "" "Renvoie un :term:`iterator` qui produit les mêmes valeurs que :func:`glob`, " "sans toutes les charger en mémoire simultanément." -#: library/glob.rst:78 +#: library/glob.rst:81 msgid "" "Escape all special characters (``'?'``, ``'*'`` and ``'['``). This is useful " "if you want to match an arbitrary literal string that may have special " @@ -136,7 +143,7 @@ msgstr "" "Windows ``escape('//?/c:/Quo vadis?.txt')`` renvoie ``'//?/c:/Quo vadis[?]." "txt'``." -#: library/glob.rst:87 +#: library/glob.rst:90 msgid "" "For example, consider a directory containing the following files: :file:`1." "gif`, :file:`2.txt`, :file:`card.gif` and a subdirectory :file:`sub` which " @@ -150,7 +157,7 @@ msgstr "" "les résultats suivants. Notons que les composantes principales des chemins " "sont préservées. ::" -#: library/glob.rst:105 +#: library/glob.rst:108 msgid "" "If the directory contains files starting with ``.`` they won't be matched by " "default. For example, consider a directory containing :file:`card.gif` and :" @@ -160,11 +167,11 @@ msgstr "" "reconnus par défaut. Par exemple, considérons un répertoire contenant :file:" "`card.gif` et :file:`.card.gif` ::" -#: library/glob.rst:117 +#: library/glob.rst:120 msgid "Module :mod:`fnmatch`" msgstr "Module :mod:`fnmatch`" -#: library/glob.rst:118 +#: library/glob.rst:121 msgid "Shell-style filename (not path) expansion" msgstr "" "Recherche de noms de fichiers de style shell (ne concerne pas les chemins)" diff --git a/library/graphlib.po b/library/graphlib.po index 6a86bf5068..c6a76154e1 100644 --- a/library/graphlib.po +++ b/library/graphlib.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -17,14 +17,18 @@ msgstr "" #: library/graphlib.rst:2 msgid ":mod:`graphlib` --- Functionality to operate with graph-like structures" msgstr "" +":mod:`graphlib` — Fonctionnalités pour travailler avec des structures de " +"type graphe" #: library/graphlib.rst:8 msgid "**Source code:** :source:`Lib/graphlib.py`" -msgstr "" +msgstr "**Code source:** :source:`Lib/graphlib.py`" #: library/graphlib.rst:20 msgid "Provides functionality to topologically sort a graph of hashable nodes." msgstr "" +"Fournit les fonctionnalités pour trier topologiquement un graphe de nœuds " +"hachables." #: library/graphlib.rst:22 msgid "" @@ -37,6 +41,14 @@ msgid "" "topological ordering is possible if and only if the graph has no directed " "cycles, that is, if it is a directed acyclic graph." msgstr "" +"L'ordre topologique est un ordre linéaire des sommets d'un graphe afin que " +"pour chaque arête u → v d'un sommet u à un sommet v, cet ordre va placer le " +"sommet u avant le sommet v. Par exemple, les sommets d'un graphe peuvent " +"représenter une tâche à faire et une arête peut représenter la contrainte " +"comme quoi telle tâche doit être réalisée avant telle autre. Dans cet " +"exemple, un ordre topologique est simplement une séquence valide pour ces " +"tâches. Cet ordre n'est possible que si le graphe n'a pas de circuit, c'est-" +"à-dire si c'est un graphe orienté acyclique." #: library/graphlib.rst:31 msgid "" @@ -46,26 +58,35 @@ msgid "" "nodes that have edges that point to the value in the key). Additional nodes " "can be added to the graph using the :meth:`~TopologicalSorter.add` method." msgstr "" +"Si l'argument optionnel *graph* est fourni, cela doit être un dictionnaire " +"représentant un graphe acyclique avec comme clés les nœuds et comme valeurs " +"des itérables sur les prédécesseurs de ces nœuds dans le graphe (les nœuds " +"qui ont des arêtes qui pointent vers la valeur de la clé). Les nœuds " +"s'ajoutent en utilisant la méthode :meth:`~TopologicalSorter.add`" #: library/graphlib.rst:37 msgid "" "In the general case, the steps required to perform the sorting of a given " "graph are as follows:" msgstr "" +"De manière générale, les étapes nécessaires pour trier un graphe donné sont " +"les suivantes :" #: library/graphlib.rst:40 msgid "" "Create an instance of the :class:`TopologicalSorter` with an optional " "initial graph." msgstr "" +"créer une instance de la classe :class:`TopologicalSorter` avec " +"éventuellement un graphe initial ;" #: library/graphlib.rst:42 msgid "Add additional nodes to the graph." -msgstr "" +msgstr "ajouter d'autres nœuds au graphe ;" #: library/graphlib.rst:43 msgid "Call :meth:`~TopologicalSorter.prepare` on the graph." -msgstr "" +msgstr "appeler :meth:`~TopologicalSorter.prepare` sur le graphe ;" #: library/graphlib.rst:44 msgid "" @@ -73,6 +94,10 @@ msgid "" "nodes returned by :meth:`~TopologicalSorter.get_ready` and process them. " "Call :meth:`~TopologicalSorter.done` on each node as it finishes processing." msgstr "" +"tant que :meth:`~TopologicalSorter.is_active` est à ``True``, itérer sur les " +"nœuds renvoyés par :meth:`~TopologicalSorter.get_ready` pour les traiter. " +"Appeler :meth:`~TopologicalSorter.done` sur chaque nœud une fois le " +"traitement terminé." #: library/graphlib.rst:49 msgid "" @@ -80,24 +105,34 @@ msgid "" "no parallelism is involved, the convenience method :meth:`TopologicalSorter." "static_order` can be used directly:" msgstr "" +"Si vous souhaitez simplement trier des nœuds du graphe sans parallélisme, la " +"méthode :meth:`TopologicalSorter.static_order` peut être utilisée " +"directement :" #: library/graphlib.rst:60 msgid "" "The class is designed to easily support parallel processing of the nodes as " "they become ready. For instance::" msgstr "" +"La classe est conçue pour prendre facilement en charge le traitement en " +"parallèle des nœuds quand ils deviennent disponibles. Par exemple ::" #: library/graphlib.rst:87 msgid "" "Add a new node and its predecessors to the graph. Both the *node* and all " "elements in *predecessors* must be hashable." msgstr "" +"Ajoute un nouveau nœud et son prédécesseur dans le graphe. Le *node* ainsi " +"que tous les éléments dans *predecessors* doivent être hachables." #: library/graphlib.rst:90 msgid "" "If called multiple times with the same node argument, the set of " "dependencies will be the union of all dependencies passed in." msgstr "" +"S'il est appelé plusieurs fois avec le même nœud en tant qu'argument, " +"l'ensemble des dépendances sera l'union de toutes les dépendances qui auront " +"été transmises." #: library/graphlib.rst:93 msgid "" @@ -106,11 +141,17 @@ msgid "" "provided before is included among *predecessors* it will be automatically " "added to the graph with no predecessors of its own." msgstr "" +"Il est possible d'ajouter un nœud sans dépendance (*predecessors* n'est pas " +"fourni) ou de fournir une dépendance deux fois. Si un nœud qui n'a jamais " +"été fourni auparavant est inclus dans *predecessors* il sera automatiquement " +"ajouté au graphe sans prédécesseur lui-même." #: library/graphlib.rst:98 msgid "" "Raises :exc:`ValueError` if called after :meth:`~TopologicalSorter.prepare`." msgstr "" +"Lève une :exc:`ValueError` si appelée après :meth:`~TopologicalSorter." +"prepare`." #: library/graphlib.rst:102 msgid "" @@ -121,6 +162,12 @@ msgid "" "be modified, and therefore no more nodes can be added using :meth:" "`~TopologicalSorter.add`." msgstr "" +"Indique que le graphe est terminé et vérifie les circuits du graphe. Si un " +"circuit est détecté, une :exc:`CycleError` est levée mais :meth:" +"`~TopologicalSorter.get_ready` peut encore être utilisée pour obtenir autant " +"de nœuds que possible avant que les circuits ne bloquent la progression. " +"Après un appel de cette fonction, le graphe ne peut pas être modifié, et " +"donc aucun nœud ne peut être ajouté avec :meth:`~TopologicalSorter.add`." #: library/graphlib.rst:111 msgid "" @@ -131,22 +178,32 @@ msgid "" "`TopologicalSorter.done` is less than the number that have been returned by :" "meth:`TopologicalSorter.get_ready`." msgstr "" +"Renvoie ``True`` si une progression peut être faite et ``False`` dans le cas " +"contraire. La progression est possible si des circuits ne bloquent pas la " +"résolution ou qu'il reste des nœuds prêts qui n'ont pas encore été renvoyés " +"par :meth:`TopologicalSorter.get_ready` ou que le nombre de nœuds marqués :" +"meth:`TopologicalSorter.done` est inférieur au nombre qui a été renvoyé par :" +"meth:`TopologicalSorter.get_ready`." #: library/graphlib.rst:118 msgid "" "The :meth:`~TopologicalSorter.__bool__` method of this class defers to this " "function, so instead of::" msgstr "" +"La méthode :meth:`~TopologicalSorter.__bool__` de cette classe renvoie à " +"cette fonction donc au lieu de ::" #: library/graphlib.rst:124 msgid "it is possible to simply do::" -msgstr "" +msgstr "il est plus simple de faire ::" #: library/graphlib.rst:152 msgid "" "Raises :exc:`ValueError` if called without calling :meth:`~TopologicalSorter." "prepare` previously." msgstr "" +"Lève une :exc:`ValueError` si l'appel à :meth:`~TopologicalSorter.prepare` " +"n'a pas été fait au préalable." #: library/graphlib.rst:134 msgid "" @@ -154,6 +211,9 @@ msgid "" "processed, unblocking any successor of each node in *nodes* for being " "returned in the future by a call to :meth:`TopologicalSorter.get_ready`." msgstr "" +"Marque un ensemble de nœuds renvoyé par :meth:`TopologicalSorter.get_ready` " +"comme traités, permettant aux successeurs de chaque nœud de *nodes* d'être " +"renvoyés lors d'un prochain appel à :meth:`~TopologicalSorter.get_ready`." #: library/graphlib.rst:138 msgid "" @@ -163,6 +223,11 @@ msgid "" "meth:`~TopologicalSorter.prepare` or if node has not yet been returned by :" "meth:`~TopologicalSorter.get_ready`." msgstr "" +"Lève une :exc:`ValueError` si n'importe quel nœud dans *nodes* a déjà été " +"marqué comme traité par un précédent appel à cette méthode ou si un nœud n'a " +"pas été ajouté au graphe en utilisant :meth:`TopologicalSorter.add`, si " +"l'appel est fait sans appel à :meth:`~TopologicalSorter.prepare` ou si le " +"nœud n'a pas encore été renvoyé par :meth:`~TopologicalSorter.get_ready`." #: library/graphlib.rst:146 msgid "" @@ -172,48 +237,63 @@ msgid "" "nodes that have all their predecessors already processed. Once no more " "progress can be made, empty tuples are returned." msgstr "" +"Renvoie un *n*-uplet avec tous les nœuds prêts. Renvoie d'abord tous les " +"nœuds sans prédécesseurs, et une fois marqués comme traités avec un appel " +"de :meth:`TopologicalSorter.done`, les autres appels renvoient tous les " +"nouveaux nœuds dont tous les prédécesseurs sont traités. Une fois que la " +"progression n'est plus possible, des tuples vides sont renvoyés." #: library/graphlib.rst:157 msgid "" -"Returns an iterable of nodes in a topological order. Using this method does " -"not require to call :meth:`TopologicalSorter.prepare` or :meth:" -"`TopologicalSorter.done`. This method is equivalent to::" +"Returns an iterator object which will iterate over nodes in a topological " +"order. When using this method, :meth:`~TopologicalSorter.prepare` and :meth:" +"`~TopologicalSorter.done` should not be called. This method is equivalent " +"to::" msgstr "" -#: library/graphlib.rst:168 +#: library/graphlib.rst:169 msgid "" "The particular order that is returned may depend on the specific order in " "which the items were inserted in the graph. For example:" msgstr "" +"Le tri obtenu peut dépendre de l'ordre dans lequel les éléments ont été " +"ajoutés dans le graphe. Par exemple :" -#: library/graphlib.rst:185 +#: library/graphlib.rst:186 msgid "" "This is due to the fact that \"0\" and \"2\" are in the same level in the " "graph (they would have been returned in the same call to :meth:" "`~TopologicalSorter.get_ready`) and the order between them is determined by " "the order of insertion." msgstr "" +"Ceci est dû au fait que \"0\" et \"2\" sont au même niveau dans le graphe " +"(ils auraient été renvoyés dans le même appel à :meth:`~TopologicalSorter." +"get_ready`) et l'ordre entre eux est déterminé par l'ordre lors de " +"l'insertion." -#: library/graphlib.rst:191 +#: library/graphlib.rst:192 msgid "If any cycle is detected, :exc:`CycleError` will be raised." -msgstr "" +msgstr "Si un circuit est détecté alors une :exc:`CycleError` est levée." -#: library/graphlib.rst:197 +#: library/graphlib.rst:198 msgid "Exceptions" -msgstr "" +msgstr "Exceptions" -#: library/graphlib.rst:198 +#: library/graphlib.rst:199 msgid "The :mod:`graphlib` module defines the following exception classes:" -msgstr "" +msgstr "Le module :mod:`graphlib` définit les classes d'exceptions suivantes :" -#: library/graphlib.rst:202 +#: library/graphlib.rst:203 msgid "" "Subclass of :exc:`ValueError` raised by :meth:`TopologicalSorter.prepare` if " "cycles exist in the working graph. If multiple cycles exist, only one " "undefined choice among them will be reported and included in the exception." msgstr "" +"Une classe héritant de :exc:`ValueError` levée par :meth:`TopologicalSorter." +"prepare` si un circuit existe dans le graphe courant. Si plusieurs circuits " +"existent, un seul est inclus dans l'exception." -#: library/graphlib.rst:206 +#: library/graphlib.rst:207 msgid "" "The detected cycle can be accessed via the second element in the :attr:" "`~CycleError.args` attribute of the exception instance and consists in a " @@ -221,3 +301,8 @@ msgid "" "predecessor of the next node in the list. In the reported list, the first " "and the last node will be the same, to make it clear that it is cyclic." msgstr "" +"On accède au circuit détecté via le second élément de l'attribut :attr:" +"`~CycleError.args` de l'instance de l'exception. Cet attribut est une liste " +"de nœuds où chaque nœud est, dans le graphe, un prédécesseur immédiat du " +"nœud suivant de la liste. Dans la liste renvoyée, le premier et le dernier " +"nœud sont les mêmes afin de bien indiquer que c'est un circuit." diff --git a/library/grp.po b/library/grp.po index 11f4cf86f2..7fb88b555a 100644 --- a/library/grp.po +++ b/library/grp.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -28,7 +28,7 @@ msgstr "" msgid "" "Group database entries are reported as a tuple-like object, whose attributes " "correspond to the members of the ``group`` structure (Attribute field below, " -"see ````):" +"see ````):" msgstr "" #: library/grp.rst:18 diff --git a/library/hashlib.po b/library/hashlib.po index dffb1ebd6d..0768989be7 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2020-04-27 22:47+0200\n" "Last-Translator: Jules Lasne \n" "Language-Team: FRENCH \n" @@ -52,8 +52,8 @@ msgstr "" #: library/hashlib.rst:37 msgid "" -"Some algorithms have known hash collision weaknesses, refer to the \"See also" -"\" section at the end." +"Some algorithms have known hash collision weaknesses, refer to the \"See " +"also\" section at the end." msgstr "" "Certains algorithmes ont des faiblesses connues relatives à la collision, se " "référer à la section \"Voir aussi\" à la fin." @@ -135,7 +135,7 @@ msgstr "" msgid ":func:`blake2b` and :func:`blake2s` were added." msgstr "Les fonctions :func:`blake2b` et :func:`blake2s` ont été ajoutées." -#: library/hashlib.rst:83 +#: library/hashlib.rst:85 msgid "" "All hashlib constructors take a keyword-only argument *usedforsecurity* with " "default value ``True``. A false value allows the use of insecure and blocked " @@ -144,11 +144,11 @@ msgid "" "cryptographic one-way compression function." msgstr "" -#: library/hashlib.rst:90 +#: library/hashlib.rst:92 msgid "Hashlib now uses SHA3 and SHAKE from OpenSSL 1.1.1 and newer." msgstr "" -#: library/hashlib.rst:92 +#: library/hashlib.rst:94 msgid "" "For example, to obtain the digest of the byte string ``b'Nobody inspects the " "spammish repetition'``::" @@ -156,11 +156,11 @@ msgstr "" "Par exemple, pour obtenir l'empreinte de la chaîne ``b'Nobody inspects the " "spammish repetition'`` ::" -#: library/hashlib.rst:106 +#: library/hashlib.rst:108 msgid "More condensed:" msgstr "En plus condensé ::" -#: library/hashlib.rst:113 +#: library/hashlib.rst:115 msgid "" "Is a generic constructor that takes the string *name* of the desired " "algorithm as its first parameter. It also exists to allow access to the " @@ -174,15 +174,15 @@ msgstr "" "librairie OpenSSL peut offrir. Les constructeurs nommés sont beaucoup plus " "rapides que :func:`new` et doivent être privilégiés." -#: library/hashlib.rst:119 +#: library/hashlib.rst:121 msgid "Using :func:`new` with an algorithm provided by OpenSSL:" msgstr "En utilisant :func:`new` avec un algorithme fourni par OpenSSL ::" -#: library/hashlib.rst:126 +#: library/hashlib.rst:128 msgid "Hashlib provides the following constant attributes:" msgstr "*Hashlib* fournit les constantes suivantes ::" -#: library/hashlib.rst:130 +#: library/hashlib.rst:132 msgid "" "A set containing the names of the hash algorithms guaranteed to be supported " "by this module on all platforms. Note that 'md5' is in this list despite " @@ -194,7 +194,7 @@ msgstr "" "dans cette liste malgré certains éditeurs qui offrent une implémentation " "Python de la librairie compatible FIPS l'excluant." -#: library/hashlib.rst:139 +#: library/hashlib.rst:141 msgid "" "A set containing the names of the hash algorithms that are available in the " "running Python interpreter. These names will be recognized when passed to :" @@ -208,7 +208,7 @@ msgstr "" "ensemble. Le même algorithme peut apparaître plusieurs fois dans cet " "ensemble sous un nom différent (grâce à OpenSSL)." -#: library/hashlib.rst:147 +#: library/hashlib.rst:149 msgid "" "The following values are provided as constant attributes of the hash objects " "returned by the constructors:" @@ -216,19 +216,19 @@ msgstr "" "Les valeurs suivantes sont fournis en tant qu'attributs constants des objets " "hachés retournés par les constructeurs ::" -#: library/hashlib.rst:153 +#: library/hashlib.rst:155 msgid "The size of the resulting hash in bytes." msgstr "La taille du *hash* résultant en octets." -#: library/hashlib.rst:157 +#: library/hashlib.rst:159 msgid "The internal block size of the hash algorithm in bytes." msgstr "La taille interne d'un bloc de l'algorithme de hachage en octets." -#: library/hashlib.rst:159 +#: library/hashlib.rst:161 msgid "A hash object has the following attributes:" msgstr "L'objet haché possède les attributs suivants ::" -#: library/hashlib.rst:163 +#: library/hashlib.rst:165 msgid "" "The canonical name of this hash, always lowercase and always suitable as a " "parameter to :func:`new` to create another hash of this type." @@ -237,7 +237,7 @@ msgstr "" "transmissible à la fonction :func:`new` pour créer un autre objet haché de " "ce type." -#: library/hashlib.rst:166 +#: library/hashlib.rst:168 msgid "" "The name attribute has been present in CPython since its inception, but " "until Python 3.4 was not formally specified, so may not exist on some " @@ -247,11 +247,11 @@ msgstr "" "pas spécifié formellement jusqu'à Python 3.4, il peut ne pas exister sur " "certaines plate-formes." -#: library/hashlib.rst:171 +#: library/hashlib.rst:173 msgid "A hash object has the following methods:" msgstr "L'objet haché possède les méthodes suivantes ::" -#: library/hashlib.rst:176 +#: library/hashlib.rst:178 msgid "" "Update the hash object with the :term:`bytes-like object`. Repeated calls " "are equivalent to a single call with the concatenation of all the arguments: " @@ -261,7 +261,7 @@ msgstr "" "sont équivalent à la concaténation de tous les arguments : ``m.update(a); m." "update(b)`` est équivalent à ``m.update(a+b)``." -#: library/hashlib.rst:181 +#: library/hashlib.rst:183 msgid "" "The Python GIL is released to allow other threads to run while hash updates " "on data larger than 2047 bytes is taking place when using hash algorithms " @@ -272,7 +272,7 @@ msgstr "" "larges que 2047 octets, lorsque les algorithmes fournis par OpenSSL sont " "utilisés." -#: library/hashlib.rst:189 +#: library/hashlib.rst:191 msgid "" "Return the digest of the data passed to the :meth:`update` method so far. " "This is a bytes object of size :attr:`digest_size` which may contain bytes " @@ -282,7 +282,7 @@ msgstr "" "un objet de type *bytes* de taille :attr:`digest_size` qui contient des " "octets dans l'intervalle 0 à 255." -#: library/hashlib.rst:224 +#: library/hashlib.rst:226 msgid "" "Like :meth:`digest` except the digest is returned as a string object of " "double length, containing only hexadecimal digits. This may be used to " @@ -293,7 +293,7 @@ msgstr "" "hexadécimaux. Cela peut être utilisé pour échanger sans risque des valeurs " "dans les *e-mails* ou dans les environnements non binaires." -#: library/hashlib.rst:203 +#: library/hashlib.rst:205 msgid "" "Return a copy (\"clone\") of the hash object. This can be used to " "efficiently compute the digests of data sharing a common initial substring." @@ -302,11 +302,11 @@ msgstr "" "calculer efficacement les *digests* de données partageant des sous-chaînes " "communes." -#: library/hashlib.rst:208 +#: library/hashlib.rst:210 msgid "SHAKE variable length digests" msgstr "Synthèse de messages de taille variable SHAKE" -#: library/hashlib.rst:210 +#: library/hashlib.rst:212 msgid "" "The :func:`shake_128` and :func:`shake_256` algorithms provide variable " "length digests with length_in_bits//2 up to 128 or 256 bits of security. As " @@ -319,7 +319,7 @@ msgstr "" "longueur. Les longueurs maximales ne sont pas limitées par l'algorithme " "SHAKE." -#: library/hashlib.rst:217 +#: library/hashlib.rst:219 msgid "" "Return the digest of the data passed to the :meth:`update` method so far. " "This is a bytes object of size *length* which may contain bytes in the whole " @@ -329,17 +329,17 @@ msgstr "" "un objet de type *bytes* de taille *length* qui contient des octets dans " "l'intervalle 0 à 255." -#: library/hashlib.rst:230 +#: library/hashlib.rst:232 msgid "Key derivation" msgstr "Dérivation de clé" -#: library/hashlib.rst:232 +#: library/hashlib.rst:234 msgid "" "Key derivation and key stretching algorithms are designed for secure " "password hashing. Naive algorithms such as ``sha1(password)`` are not " "resistant against brute-force attacks. A good password hashing function must " -"be tunable, slow, and include a `salt `_." +"be tunable, slow, and include a `salt `_." msgstr "" "Les algorithmes de dérivation de clés et d'étirement de clés sont conçus " "pour le hachage sécurisé de mots de passe. Des algorithmes naïfs comme " @@ -347,7 +347,7 @@ msgstr "" "bonne fonction de hachage doit être paramétrable, lente, et inclure un `sel " "`_." -#: library/hashlib.rst:240 +#: library/hashlib.rst:242 msgid "" "The function provides PKCS#5 password-based key derivation function 2. It " "uses HMAC as pseudorandom function." @@ -356,7 +356,7 @@ msgstr "" "Cryptographic Standards #5 v2.0*). Elle utilise HMAC comme fonction de " "pseudo-aléatoire." -#: library/hashlib.rst:243 +#: library/hashlib.rst:245 msgid "" "The string *hash_name* is the desired name of the hash digest algorithm for " "HMAC, e.g. 'sha1' or 'sha256'. *password* and *salt* are interpreted as " @@ -371,7 +371,7 @@ msgstr "" "``1024``). *salt* doit être de 16 octets ou plus provenant d'une source " "correcte, e.g. :func:`os.urandom`." -#: library/hashlib.rst:249 +#: library/hashlib.rst:251 msgid "" "The number of *iterations* should be chosen based on the hash algorithm and " "computing power. As of 2013, at least 100,000 iterations of SHA-256 are " @@ -381,7 +381,7 @@ msgstr "" "hachage et de la puissance de calcul. En 2013, au moins 100000 itérations de " "SHA-256 sont recommandées." -#: library/hashlib.rst:253 +#: library/hashlib.rst:255 msgid "" "*dklen* is the length of the derived key. If *dklen* is ``None`` then the " "digest size of the hash algorithm *hash_name* is used, e.g. 64 for SHA-512." @@ -390,7 +390,7 @@ msgstr "" "taille du message de l'algorithme de hachage *hash_name* est utilisé, e.g. " "64 pour SHA-512." -#: library/hashlib.rst:265 +#: library/hashlib.rst:267 msgid "" "A fast implementation of *pbkdf2_hmac* is available with OpenSSL. The " "Python implementation uses an inline version of :mod:`hmac`. It is about " @@ -400,7 +400,7 @@ msgstr "" "L'implémentation Python utilise une version anonyme de :mod:`hmac`. Elle est " "trois fois plus lente et ne libère pas le GIL." -#: library/hashlib.rst:271 +#: library/hashlib.rst:273 msgid "" "The function provides scrypt password-based key derivation function as " "defined in :rfc:`7914`." @@ -408,7 +408,7 @@ msgstr "" "La fonction fournit la fonction de dérivation de clé *scrypt* comme définie " "dans :rfc:`7914`." -#: library/hashlib.rst:274 +#: library/hashlib.rst:276 msgid "" "*password* and *salt* must be :term:`bytes-like objects `. Applications and libraries should limit *password* to a sensible " @@ -420,7 +420,7 @@ msgstr "" "longueur raisonnable (e.g. 1024). *salt* doit être de 16 octets ou plus " "provenant d'une source correcte, e.g. :func:`os.urandom`." -#: library/hashlib.rst:279 +#: library/hashlib.rst:281 msgid "" "*n* is the CPU/Memory cost factor, *r* the block size, *p* parallelization " "factor and *maxmem* limits memory (OpenSSL 1.1.0 defaults to 32 MiB). " @@ -430,15 +430,15 @@ msgstr "" "facteur de parallélisation et *maxmem* limite la mémoire (OpenSSL 1.1.0 " "limite à 32 MB par défaut). *dklen* est la longueur de la clé dérivée." -#: library/hashlib.rst:284 +#: library/hashlib.rst:286 msgid ":ref:`Availability `: OpenSSL 1.1+." msgstr ":ref:`Disponibilité ` : OpenSSL 1.1+." -#: library/hashlib.rst:289 +#: library/hashlib.rst:291 msgid "BLAKE2" msgstr "BLAKE2" -#: library/hashlib.rst:296 +#: library/hashlib.rst:298 msgid "" "BLAKE2_ is a cryptographic hash function defined in :rfc:`7693` that comes " "in two flavors:" @@ -446,7 +446,7 @@ msgstr "" "BLAKE2_ est une fonction de hachage cryptographique définie dans la :rfc:" "`7693` et disponible en deux versions ::" -#: library/hashlib.rst:299 +#: library/hashlib.rst:301 msgid "" "**BLAKE2b**, optimized for 64-bit platforms and produces digests of any size " "between 1 and 64 bytes," @@ -454,7 +454,7 @@ msgstr "" "**BLAKE2b**, optimisée pour les plates-formes 64-bit et produisant des " "messages de toutes tailles entre 1 et 64 octets," -#: library/hashlib.rst:302 +#: library/hashlib.rst:304 msgid "" "**BLAKE2s**, optimized for 8- to 32-bit platforms and produces digests of " "any size between 1 and 32 bytes." @@ -462,7 +462,7 @@ msgstr "" "**BLAKE2s**, optimisée pour les plates-formes de 8 à 32-bit et produisant " "des messages de toutes tailles entre 1 et 32 octets." -#: library/hashlib.rst:305 +#: library/hashlib.rst:307 msgid "" "BLAKE2 supports **keyed mode** (a faster and simpler replacement for HMAC_), " "**salted hashing**, **personalization**, and **tree hashing**." @@ -471,7 +471,7 @@ msgstr "" "rapide et plus simple pour HMAC_), **salted hashing**, **personalization**, " "et **tree hashing**." -#: library/hashlib.rst:308 +#: library/hashlib.rst:310 msgid "" "Hash objects from this module follow the API of standard library's :mod:" "`hashlib` objects." @@ -479,15 +479,15 @@ msgstr "" "Les objets hachés de ce module suivent l'API des objets du module :mod:" "`hashlib` de la librairie standard." -#: library/hashlib.rst:313 +#: library/hashlib.rst:315 msgid "Creating hash objects" msgstr "Création d'objets hachés" -#: library/hashlib.rst:315 +#: library/hashlib.rst:317 msgid "New hash objects are created by calling constructor functions:" msgstr "Les nouveaux objets hachés sont créés en appelant les constructeurs ::" -#: library/hashlib.rst:329 +#: library/hashlib.rst:331 msgid "" "These functions return the corresponding hash objects for calculating " "BLAKE2b or BLAKE2s. They optionally take these general parameters:" @@ -495,7 +495,7 @@ msgstr "" "Ces fonctions produisent l'objet haché correspondant aux calculs de BLAKE2b " "ou BLAKE2s. Elles prennent ces paramètres optionnels ::" -#: library/hashlib.rst:332 +#: library/hashlib.rst:334 msgid "" "*data*: initial chunk of data to hash, which must be :term:`bytes-like " "object`. It can be passed only as positional argument." @@ -503,11 +503,11 @@ msgstr "" "*data*: morceau initial de données à hacher, qui doit être un objet de type :" "term:`bytes-like object`. Il peut être passé comme argument positionnel." -#: library/hashlib.rst:335 +#: library/hashlib.rst:337 msgid "*digest_size*: size of output digest in bytes." msgstr "*digest_size*: taille en sortie du message en octets." -#: library/hashlib.rst:337 +#: library/hashlib.rst:339 msgid "" "*key*: key for keyed hashing (up to 64 bytes for BLAKE2b, up to 32 bytes for " "BLAKE2s)." @@ -515,7 +515,7 @@ msgstr "" "*key*: clé pour les code d'authentification de message *keyed hashing* " "(jusqu'à 64 octets pour BLAKE2b, jusqu'à 32 octets pour BLAKE2s)." -#: library/hashlib.rst:340 +#: library/hashlib.rst:342 msgid "" "*salt*: salt for randomized hashing (up to 16 bytes for BLAKE2b, up to 8 " "bytes for BLAKE2s)." @@ -523,7 +523,7 @@ msgstr "" "*salt*: sel pour le hachage randomisé *randomized hashing* (jusqu'à 16 " "octets pour BLAKE2b, jusqu'à 8 octets pour BLAKE2s)." -#: library/hashlib.rst:343 +#: library/hashlib.rst:345 msgid "" "*person*: personalization string (up to 16 bytes for BLAKE2b, up to 8 bytes " "for BLAKE2s)." @@ -531,57 +531,57 @@ msgstr "" "*person*: chaîne de personnalisation (jusqu'à 16 octets pour BLAKE2b, " "jusqu'à 8 octets pour BLAKE2s)." -#: library/hashlib.rst:346 +#: library/hashlib.rst:348 msgid "The following table shows limits for general parameters (in bytes):" msgstr "" "Le tableau suivant présente les limites des paramètres généraux (en " "octets) ::" -#: library/hashlib.rst:349 +#: library/hashlib.rst:351 msgid "Hash" msgstr "Hash" -#: library/hashlib.rst:349 +#: library/hashlib.rst:351 msgid "digest_size" msgstr "digest_size" -#: library/hashlib.rst:349 +#: library/hashlib.rst:351 msgid "len(key)" msgstr "len(key)" -#: library/hashlib.rst:349 +#: library/hashlib.rst:351 msgid "len(salt)" msgstr "len(salt)" -#: library/hashlib.rst:349 +#: library/hashlib.rst:351 msgid "len(person)" msgstr "len(person)" -#: library/hashlib.rst:351 +#: library/hashlib.rst:353 msgid "BLAKE2b" msgstr "BLAKE2b" -#: library/hashlib.rst:351 +#: library/hashlib.rst:353 msgid "64" msgstr "64" -#: library/hashlib.rst:351 +#: library/hashlib.rst:353 msgid "16" msgstr "16" -#: library/hashlib.rst:352 +#: library/hashlib.rst:354 msgid "BLAKE2s" msgstr "BLAKE2s" -#: library/hashlib.rst:352 +#: library/hashlib.rst:354 msgid "32" msgstr "32" -#: library/hashlib.rst:352 +#: library/hashlib.rst:354 msgid "8" msgstr "8" -#: library/hashlib.rst:357 +#: library/hashlib.rst:359 msgid "" "BLAKE2 specification defines constant lengths for salt and personalization " "parameters, however, for convenience, this implementation accepts byte " @@ -598,24 +598,24 @@ msgstr "" "``b'salt'`` et ``b'salt\\x00'`` sont la même valeur (Ce n'est pas le cas " "pour *key*.)" -#: library/hashlib.rst:364 +#: library/hashlib.rst:366 msgid "These sizes are available as module `constants`_ described below." msgstr "" "Ces tailles sont disponibles comme `constants`_ du module et décrites ci-" "dessous." -#: library/hashlib.rst:366 +#: library/hashlib.rst:368 msgid "" "Constructor functions also accept the following tree hashing parameters:" msgstr "" "Les fonctions constructeur acceptent aussi les paramètres suivants pour le " "*tree hashing* ::" -#: library/hashlib.rst:368 +#: library/hashlib.rst:370 msgid "*fanout*: fanout (0 to 255, 0 if unlimited, 1 in sequential mode)." msgstr "*fanout*: *fanout* (0 à 255, 0 si illimité, 1 en mode séquentiel)." -#: library/hashlib.rst:370 +#: library/hashlib.rst:372 msgid "" "*depth*: maximal depth of tree (1 to 255, 255 if unlimited, 1 in sequential " "mode)." @@ -623,30 +623,32 @@ msgstr "" "*depth*: profondeur maximale de l'arbre (1 à 255, 255 si illimité, 1 en mode " "séquentiel)." -#: library/hashlib.rst:373 +#: library/hashlib.rst:375 +#, fuzzy msgid "" -"*leaf_size*: maximal byte length of leaf (0 to 2**32-1, 0 if unlimited or in " -"sequential mode)." +"*leaf_size*: maximal byte length of leaf (0 to ``2**32-1``, 0 if unlimited " +"or in sequential mode)." msgstr "" "*leaf_size*: taille maximale en octets d'une feuille (0 à 2**32-1, 0 si " "illimité ou en mode séquentiel)." -#: library/hashlib.rst:376 +#: library/hashlib.rst:378 +#, fuzzy msgid "" -"*node_offset*: node offset (0 to 2**64-1 for BLAKE2b, 0 to 2**48-1 for " -"BLAKE2s, 0 for the first, leftmost, leaf, or in sequential mode)." +"*node_offset*: node offset (0 to ``2**64-1`` for BLAKE2b, 0 to ``2**48-1`` " +"for BLAKE2s, 0 for the first, leftmost, leaf, or in sequential mode)." msgstr "" "*node_offset*: décalage de nœud (0 à 2**64-1 pour BLAKE2b, 0 à 2**48-1 pour " "BLAKE2s, 0 pour la première feuille la plus à gauche, ou en mode séquentiel)." -#: library/hashlib.rst:379 +#: library/hashlib.rst:381 msgid "" "*node_depth*: node depth (0 to 255, 0 for leaves, or in sequential mode)." msgstr "" "*node_depth*: profondeur de nœuds (0 à 255, 0 pour les feuilles, ou en mode " "séquentiel)." -#: library/hashlib.rst:381 +#: library/hashlib.rst:383 msgid "" "*inner_size*: inner digest size (0 to 64 for BLAKE2b, 0 to 32 for BLAKE2s, 0 " "in sequential mode)." @@ -654,7 +656,7 @@ msgstr "" "*inner_size*: taille interne du message (0 à 64 pour BLAKE2b, 0 à 32 pour " "BLAKE2s, 0 en mode séquentiel)." -#: library/hashlib.rst:384 +#: library/hashlib.rst:386 msgid "" "*last_node*: boolean indicating whether the processed node is the last one " "(`False` for sequential mode)." @@ -662,7 +664,7 @@ msgstr "" "*last_node*: booléen indiquant si le nœud traité est le dernier (`False` " "pour le mode séquentiel)." -#: library/hashlib.rst:390 +#: library/hashlib.rst:392 msgid "" "See section 2.10 in `BLAKE2 specification `_ for comprehensive review of tree hashing." @@ -670,38 +672,38 @@ msgstr "" "Voir section 2.10 dans `BLAKE2 specification `_ pour une approche compréhensive du *tree hashing*." -#: library/hashlib.rst:396 +#: library/hashlib.rst:398 msgid "Constants" msgstr "Constantes" -#: library/hashlib.rst:401 +#: library/hashlib.rst:403 msgid "Salt length (maximum length accepted by constructors)." msgstr "Longueur du sel (longueur maximale acceptée par les constructeurs)." -#: library/hashlib.rst:407 +#: library/hashlib.rst:409 msgid "" "Personalization string length (maximum length accepted by constructors)." msgstr "" "Longueur de la chaîne de personnalisation (longueur maximale acceptée par " "les constructeurs)." -#: library/hashlib.rst:413 +#: library/hashlib.rst:415 msgid "Maximum key size." msgstr "Taille maximale de clé." -#: library/hashlib.rst:419 +#: library/hashlib.rst:421 msgid "Maximum digest size that the hash function can output." msgstr "Taille maximale du message que peut fournir la fonction de hachage." -#: library/hashlib.rst:423 +#: library/hashlib.rst:425 msgid "Examples" msgstr "Exemples" -#: library/hashlib.rst:426 +#: library/hashlib.rst:428 msgid "Simple hashing" msgstr "Hachage simple" -#: library/hashlib.rst:428 +#: library/hashlib.rst:430 msgid "" "To calculate hash of some data, you should first construct a hash object by " "calling the appropriate constructor function (:func:`blake2b` or :func:" @@ -716,7 +718,7 @@ msgstr "" "l'empreinte du message en appelant la méthode :meth:`digest` (ou :meth:" "`hexdigest` pour les chaînes hexadécimales)." -#: library/hashlib.rst:441 +#: library/hashlib.rst:443 msgid "" "As a shortcut, you can pass the first chunk of data to update directly to " "the constructor as the positional argument:" @@ -724,7 +726,7 @@ msgstr "" "Pour raccourcir, vous pouvez passer directement au constructeur, comme " "argument positionnel, le premier morceau du message à mettre à jour ::" -#: library/hashlib.rst:448 +#: library/hashlib.rst:450 msgid "" "You can call :meth:`hash.update` as many times as you need to iteratively " "update the hash:" @@ -732,11 +734,11 @@ msgstr "" "Vous pouvez appeler la méthode :meth:`hash.update` autant de fois que " "nécessaire pour mettre à jour le *hash* de manière itérative ::" -#: library/hashlib.rst:461 +#: library/hashlib.rst:463 msgid "Using different digest sizes" msgstr "Usage de tailles d'empreintes différentes" -#: library/hashlib.rst:463 +#: library/hashlib.rst:465 msgid "" "BLAKE2 has configurable size of digests up to 64 bytes for BLAKE2b and up to " "32 bytes for BLAKE2s. For example, to replace SHA-1 with BLAKE2b without " @@ -747,7 +749,7 @@ msgstr "" "par BLAKE2b sans changer la taille de la sortie, nous pouvons dire à BLAKE2b " "de produire une empreinte de 20 octets ::" -#: library/hashlib.rst:477 +#: library/hashlib.rst:479 msgid "" "Hash objects with different digest sizes have completely different outputs " "(shorter hashes are *not* prefixes of longer hashes); BLAKE2b and BLAKE2s " @@ -758,17 +760,17 @@ msgstr "" "de *hash* plus longs); BLAKE2b et BLAKE2s produisent des sorties différentes " "même si les longueurs des sorties sont les mêmes ::" -#: library/hashlib.rst:493 +#: library/hashlib.rst:495 msgid "Keyed hashing" msgstr "Code d'authentification de message" -#: library/hashlib.rst:495 +#: library/hashlib.rst:497 +#, fuzzy msgid "" "Keyed hashing can be used for authentication as a faster and simpler " "replacement for `Hash-based message authentication code `_ (HMAC). BLAKE2 " -"can be securely used in prefix-MAC mode thanks to the indifferentiability " -"property inherited from BLAKE." +"wikipedia.org/wiki/HMAC>`_ (HMAC). BLAKE2 can be securely used in prefix-MAC " +"mode thanks to the indifferentiability property inherited from BLAKE." msgstr "" "Le hachage avec clé (*keyed hashing* en anglais) est une alternative plus " "simple et plus rapide à un `code d’authentification d’une empreinte " @@ -777,7 +779,7 @@ msgstr "" "manière sécurisée dans le mode préfixe MAC grâce à la propriété " "d'indifférentiabilité héritée de BLAKE." -#: library/hashlib.rst:501 +#: library/hashlib.rst:503 msgid "" "This example shows how to get a (hex-encoded) 128-bit authentication code " "for message ``b'message data'`` with key ``b'pseudorandom key'``::" @@ -786,7 +788,7 @@ msgstr "" "128-bit (en hexadécimal) pour un message ``b'message data'`` avec la clé " "``b'pseudorandom key'`` ::" -#: library/hashlib.rst:511 +#: library/hashlib.rst:513 msgid "" "As a practical example, a web application can symmetrically sign cookies " "sent to users and later verify them to make sure they weren't tampered with::" @@ -795,7 +797,7 @@ msgstr "" "*cookies* envoyés aux utilisateurs et les vérifier plus tard pour être " "certaine qu'ils n'aient pas été altérés ::" -#: library/hashlib.rst:540 +#: library/hashlib.rst:542 msgid "" "Even though there's a native keyed hashing mode, BLAKE2 can, of course, be " "used in HMAC construction with :mod:`hmac` module::" @@ -804,11 +806,11 @@ msgstr "" "(MAC), BLAKE2 peut, bien sûr, être utilisé pour construire un HMAC en " "combinaison du module :mod:`hmac` ::" -#: library/hashlib.rst:551 +#: library/hashlib.rst:553 msgid "Randomized hashing" msgstr "Hachage randomisé" -#: library/hashlib.rst:553 +#: library/hashlib.rst:555 msgid "" "By setting *salt* parameter users can introduce randomization to the hash " "function. Randomized hashing is useful for protecting against collision " @@ -819,7 +821,7 @@ msgstr "" "se protéger des attaques par collisions sur les fonctions de hachage " "utilisées dans les signatures numériques." -#: library/hashlib.rst:557 +#: library/hashlib.rst:559 msgid "" "Randomized hashing is designed for situations where one party, the message " "preparer, generates all or part of a message to be signed by a second party, " @@ -859,7 +861,7 @@ msgstr "" "par une signature numérique lorsque tous les morceaux du message sont " "préparés par le signataire." -#: library/hashlib.rst:576 +#: library/hashlib.rst:578 msgid "" "(`NIST SP-800-106 \"Randomized Hashing for Digital Signatures\" `_)" @@ -867,7 +869,7 @@ msgstr "" "(`NIST SP-800-106 \"Randomized Hashing for Digital Signatures\" `_, article en anglais)" -#: library/hashlib.rst:579 +#: library/hashlib.rst:581 msgid "" "In BLAKE2 the salt is processed as a one-time input to the hash function " "during initialization, rather than as an input to each compression function." @@ -875,7 +877,7 @@ msgstr "" "Dans BLAKE2, le sel est passé une seule fois lors de l'initialisation de la " "fonction de hachage, plutôt qu'à chaque appel d'une fonction de compression." -#: library/hashlib.rst:584 +#: library/hashlib.rst:586 msgid "" "*Salted hashing* (or just hashing) with BLAKE2 or any other general-purpose " "cryptographic hash function, such as SHA-256, is not suitable for hashing " @@ -886,11 +888,11 @@ msgstr "" "mots de passe. Voir `BLAKE2 FAQ `_ pour plus " "d'informations." -#: library/hashlib.rst:607 +#: library/hashlib.rst:609 msgid "Personalization" msgstr "Personnalisation" -#: library/hashlib.rst:609 +#: library/hashlib.rst:611 msgid "" "Sometimes it is useful to force hash function to produce different digests " "for the same input for different purposes. Quoting the authors of the Skein " @@ -900,7 +902,7 @@ msgstr "" "différentes empreintes de message d'une même entrée pour différentes " "utilisations. Pour citer les auteurs de la fonction de hachage Skein  ::" -#: library/hashlib.rst:613 +#: library/hashlib.rst:615 msgid "" "We recommend that all application designers seriously consider doing this; " "we have seen many protocols where a hash that is computed in one part of the " @@ -917,7 +919,7 @@ msgstr "" "prendre en entrée le même *hash*. Personnaliser chaque fonction de hachage " "utilisée dans le protocole stoppe immédiatement ce genre d'attaque." -#: library/hashlib.rst:620 +#: library/hashlib.rst:622 msgid "" "(`The Skein Hash Function Family `_, p. 21)" @@ -925,12 +927,12 @@ msgstr "" "(`The Skein Hash Function Family `_, p. 21, article en anglais)" -#: library/hashlib.rst:624 +#: library/hashlib.rst:626 msgid "BLAKE2 can be personalized by passing bytes to the *person* argument::" msgstr "" "BLAKE2 peut être personnalisé en passant des *bytes* à l'argument *person* ::" -#: library/hashlib.rst:638 +#: library/hashlib.rst:640 msgid "" "Personalization together with the keyed mode can also be used to derive " "different keys from a single one." @@ -938,17 +940,17 @@ msgstr "" "La personnalisation et le *keyed mode* peuvent être utilisés ensemble pour " "dériver différentes clés à partir d'une seule." -#: library/hashlib.rst:652 +#: library/hashlib.rst:654 msgid "Tree mode" msgstr "Mode Arbre" -#: library/hashlib.rst:654 +#: library/hashlib.rst:656 msgid "Here's an example of hashing a minimal tree with two leaf nodes::" msgstr "" "L'exemple ci-dessous présente comment hacher un arbre minimal avec deux " "nœuds terminaux ::" -#: library/hashlib.rst:660 +#: library/hashlib.rst:662 msgid "" "This example uses 64-byte internal digests, and returns the 32-byte final " "digest::" @@ -956,11 +958,11 @@ msgstr "" "Cet exemple utilise en interne des empreintes de 64 octets, et produit " "finalement des empreintes 32 octets ::" -#: library/hashlib.rst:690 +#: library/hashlib.rst:692 msgid "Credits" msgstr "Crédits" -#: library/hashlib.rst:692 +#: library/hashlib.rst:694 msgid "" "BLAKE2_ was designed by *Jean-Philippe Aumasson*, *Samuel Neves*, *Zooko " "Wilcox-O'Hearn*, and *Christian Winnerlein* based on SHA-3_ finalist BLAKE_ " @@ -972,7 +974,7 @@ msgstr "" "créé par *Jean-Philippe Aumasson*, *Luca Henzen*, *Willi Meier*, et *Raphael " "C.-W. Phan*." -#: library/hashlib.rst:697 +#: library/hashlib.rst:699 msgid "" "It uses core algorithm from ChaCha_ cipher designed by *Daniel J. " "Bernstein*." @@ -980,7 +982,7 @@ msgstr "" "Il utilise le cœur de l'algorithme de chiffrement de ChaCha_ conçu par " "*Daniel J. Bernstein*." -#: library/hashlib.rst:699 +#: library/hashlib.rst:701 msgid "" "The stdlib implementation is based on pyblake2_ module. It was written by " "*Dmitry Chestnykh* based on C implementation written by *Samuel Neves*. The " @@ -991,12 +993,12 @@ msgstr "" "l'implémentation C écrite par *Samuel Neves*. La documentation a été copiée " "depuis pyblake2_ et écrite par *Dmitry Chestnykh*." -#: library/hashlib.rst:703 +#: library/hashlib.rst:705 msgid "The C code was partly rewritten for Python by *Christian Heimes*." msgstr "" "Le code C a été partiellement réécrit pour Python par *Christian Heimes*." -#: library/hashlib.rst:705 +#: library/hashlib.rst:707 msgid "" "The following public domain dedication applies for both C hash function " "implementation, extension code, and this documentation:" @@ -1004,7 +1006,7 @@ msgstr "" "Le transfert dans le domaine publique s'applique pour l'implémentation C de " "la fonction de hachage, ses extensions et cette documentation ::" -#: library/hashlib.rst:708 +#: library/hashlib.rst:710 msgid "" "To the extent possible under law, the author(s) have dedicated all copyright " "and related and neighboring rights to this software to the public domain " @@ -1015,7 +1017,7 @@ msgstr "" "domaine public dans le monde entier. Ce logiciel est distribué sans aucune " "garantie." -#: library/hashlib.rst:712 +#: library/hashlib.rst:714 msgid "" "You should have received a copy of the CC0 Public Domain Dedication along " "with this software. If not, see https://creativecommons.org/publicdomain/" @@ -1025,7 +1027,7 @@ msgstr "" "Domain Dedication*. Sinon, voir https://creativecommons.org/publicdomain/" "zero/1.0/." -#: library/hashlib.rst:716 +#: library/hashlib.rst:718 msgid "" "The following people have helped with development or contributed their " "changes to the project and the public domain according to the Creative " @@ -1035,38 +1037,38 @@ msgstr "" "modification du projet et au domaine public selon la licence Creative " "Commons Public Domain Dedication 1.0 Universal ::" -#: library/hashlib.rst:720 +#: library/hashlib.rst:722 msgid "*Alexandr Sokolovskiy*" msgstr "*Alexandr Sokolovskiy*" -#: library/hashlib.rst:734 +#: library/hashlib.rst:736 msgid "Module :mod:`hmac`" msgstr "Module :mod:`hmac`" -#: library/hashlib.rst:734 +#: library/hashlib.rst:736 msgid "A module to generate message authentication codes using hashes." msgstr "" "Un module pour générer des codes d'authentification utilisant des *hash*." -#: library/hashlib.rst:737 +#: library/hashlib.rst:739 msgid "Module :mod:`base64`" msgstr "Module :mod:`base64`" -#: library/hashlib.rst:737 +#: library/hashlib.rst:739 msgid "Another way to encode binary hashes for non-binary environments." msgstr "" "Un autre moyen d'encoder des *hash* binaires dans des environnements non " "binaires." -#: library/hashlib.rst:740 +#: library/hashlib.rst:742 msgid "https://blake2.net" msgstr "https://blake2.net" -#: library/hashlib.rst:740 +#: library/hashlib.rst:742 msgid "Official BLAKE2 website." msgstr "Site officiel de BLAKE2." -#: library/hashlib.rst:743 +#: library/hashlib.rst:745 msgid "" "https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/2002-08-01/" "documents/fips180-2.pdf" @@ -1074,11 +1076,11 @@ msgstr "" "https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/2002-08-01/" "documents/fips180-2.pdf" -#: library/hashlib.rst:743 +#: library/hashlib.rst:745 msgid "The FIPS 180-2 publication on Secure Hash Algorithms." msgstr "La publication FIPS 180-2 sur les algorithmes de hachage sécurisés." -#: library/hashlib.rst:747 +#: library/hashlib.rst:749 msgid "" "https://en.wikipedia.org/wiki/" "Cryptographic_hash_function#Cryptographic_hash_algorithms" @@ -1086,7 +1088,7 @@ msgstr "" "https://en.wikipedia.org/wiki/" "Cryptographic_hash_function#Cryptographic_hash_algorithms" -#: library/hashlib.rst:746 +#: library/hashlib.rst:748 msgid "" "Wikipedia article with information on which algorithms have known issues and " "what that means regarding their use." @@ -1094,10 +1096,10 @@ msgstr "" "Article Wikipedia contenant les informations relatives aux algorithmes ayant " "des problèmes et leur interprétation au regard de leur utilisation." -#: library/hashlib.rst:749 +#: library/hashlib.rst:751 msgid "https://www.ietf.org/rfc/rfc2898.txt" msgstr "https://www.ietf.org/rfc/rfc2898.txt" -#: library/hashlib.rst:750 +#: library/hashlib.rst:752 msgid "PKCS #5: Password-Based Cryptography Specification Version 2.0" msgstr "PKCS #5: Password-Based Cryptography Specification Version 2.0" diff --git a/library/heapq.po b/library/heapq.po index 8f4bed2f13..59df43ac84 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -5,15 +5,15 @@ msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2019-09-16 12:04+0200\n" +"POT-Creation-Date: 2023-03-22 22:16+0100\n" +"PO-Revision-Date: 2021-05-10 23:09+0200\n" "Last-Translator: \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.1\n" +"X-Generator: Poedit 2.4.2\n" #: library/heapq.rst:2 msgid ":mod:`heapq` --- Heap queue algorithm" @@ -58,12 +58,12 @@ msgid "" "\"max heap\" is more common in texts because of its suitability for in-place " "sorting)." msgstr "" -"L'API ci-dessous diffère de la file de priorité classique par deux aspects : " -"(a) L'indiçage commence à zéro. Cela complexifie légèrement la relation " +"L'API ci-dessous diffère de la file de priorité classique par deux aspects : " +"(a) l'indiçage commence à zéro. Cela complexifie légèrement la relation " "entre l'indice d'un nœud et les indices de ses fils mais est alignée avec " "l'indiçage commençant à zéro que Python utilise. (b) La méthode *pop* " -"renvoie le plus petit élément et non le plus grand (appelé « tas-min » dans " -"les manuels scolaires ; le « tas-max » étant généralement plus courant dans " +"renvoie le plus petit élément et non le plus grand (appelé « tas-min » dans " +"les manuels scolaires ; le « tas-max » étant généralement plus courant dans " "la littérature car il permet le classement sans tampon)." #: library/heapq.rst:33 @@ -73,8 +73,8 @@ msgid "" "the heap invariant!" msgstr "" "Ces deux points permettent d'aborder le tas comme une liste Python standard " -"sans surprise : ``heap[0]`` est le plus petit élément tandis que ``heap." -"sort()`` ne modifie pas le tas !" +"sans surprise : ``heap[0]`` est le plus petit élément et ``heap.sort()`` " +"conserve l'invariant du tas !" #: library/heapq.rst:37 msgid "" @@ -87,7 +87,7 @@ msgstr "" #: library/heapq.rst:40 msgid "The following functions are provided:" -msgstr "Les fonctions suivantes sont fournies :" +msgstr "Les fonctions suivantes sont fournies :" #: library/heapq.rst:45 msgid "Push the value *item* onto the *heap*, maintaining the heap invariant." @@ -224,7 +224,7 @@ msgstr "" "défini par *iterable*. Si l'option *key* est fournie, celle-ci spécifie une " "fonction à un argument qui est utilisée pour extraire la clé de comparaison " "de chaque élément dans *iterable* (par exemple, ``key=str.lower``). " -"Équivalent à : ``sorted(iterable, key=key, reverse=True)[:n]``." +"Équivalent à : ``sorted(iterable, key=key, reverse=True)[:n]``." #: library/heapq.rst:122 msgid "" @@ -238,7 +238,7 @@ msgstr "" "défini par *iterable*. Si l'option *key* est fournie, celle-ci spécifie une " "fonction à un argument qui est utilisée pour extraire la clé de comparaison " "de chaque élément dans *iterable* (par exemple, ``key=str.lower``). " -"Équivalent à : ``sorted(iterable, key=key)[:n]``." +"Équivalent à : ``sorted(iterable, key=key)[:n]``." #: library/heapq.rst:128 msgid "" @@ -295,17 +295,17 @@ msgid "" "A `priority queue `_ is common " "use for a heap, and it presents several implementation challenges:" msgstr "" -"Une `file de priorité `_ est une application courante des tas et présente plusieurs défis " -"d'implémentation :" +"Une `file de priorité `_ est une application courante des tas et présente " +"plusieurs défis d'implémentation :" #: library/heapq.rst:172 msgid "" "Sort stability: how do you get two tasks with equal priorities to be " "returned in the order they were originally added?" msgstr "" -"Stabilité du classement : comment s'assurer que deux tâches avec la même " -"priorité sont renvoyées dans l'ordre de leur ajout ?" +"Stabilité du classement : comment s'assurer que deux tâches avec la même " +"priorité sont renvoyées dans l'ordre de leur ajout ?" #: library/heapq.rst:175 msgid "" @@ -321,7 +321,7 @@ msgid "" "the heap?" msgstr "" "Si la priorité d'une tâche change, comment la déplacer à sa nouvelle " -"position dans le tas ?" +"position dans le tas ?" #: library/heapq.rst:181 msgid "" @@ -329,7 +329,7 @@ msgid "" "from the queue?" msgstr "" "Si une tâche en attente doit être supprimée, comment la trouver et la " -"supprimer de la file ?" +"supprimer de la file ?" #: library/heapq.rst:184 msgid "" @@ -415,17 +415,17 @@ msgid "" "two cells it tops contain three different items, but the top cell \"wins\" " "over the two topped cells." msgstr "" -"Dans l'arbre ci-dessus, chaque nœud *k* a pour enfants ``2*k+1`` et ``2*k" -"+2``. Dans les tournois binaires habituels dans les compétitions sportives, " -"chaque nœud est le vainqueur des deux nœuds inférieurs et nous pouvons " -"tracer le chemin du vainqueur le long de l'arbre afin de voir qui étaient " -"ses adversaires. Cependant, dans de nombreuses applications informatiques de " -"ces tournois, nous n'avons pas besoin de produire l'historique du vainqueur. " -"Afin d'occuper moins de mémoire, on remplace le vainqueur lors de sa " -"promotion par un autre élément à un plus bas niveau. La règle devient alors " -"qu'un nœud et les deux nœuds qu'il chapeaute contiennent trois éléments " -"différents, mais le nœud supérieur « gagne » contre les deux nœuds " -"inférieurs." +"Dans l'arbre ci-dessus, chaque nœud *k* a pour enfants ``2*k+1`` et " +"``2*k+2``. Dans les tournois binaires habituels dans les compétitions " +"sportives, chaque nœud est le vainqueur des deux nœuds inférieurs et nous " +"pouvons tracer le chemin du vainqueur le long de l'arbre afin de voir qui " +"étaient ses adversaires. Cependant, dans de nombreuses applications " +"informatiques de ces tournois, nous n'avons pas besoin de produire " +"l'historique du vainqueur. Afin d'occuper moins de mémoire, on remplace le " +"vainqueur lors de sa promotion par un autre élément à un plus bas niveau. La " +"règle devient alors qu'un nœud et les deux nœuds qu'il chapeaute contiennent " +"trois éléments différents, mais le nœud supérieur « gagne » contre les deux " +"nœuds inférieurs." #: library/heapq.rst:268 msgid "" @@ -439,7 +439,7 @@ msgid "" msgstr "" "Si cet invariant de tas est vérifié à tout instant, alors l'élément à " "l'indice 0 est le vainqueur global. L'algorithme le plus simple pour le " -"retirer et trouver le vainqueur « suivant » consiste à déplacer un perdant " +"retirer et trouver le vainqueur « suivant » consiste à déplacer un perdant " "(par exemple le nœud 30 dans le diagramme ci-dessus) à la position 0, puis à " "faire redescendre cette nouvelle racine dans l'arbre en échangeant sa valeur " "avec celle d'un de ses fils jusqu'à ce que l'invariant soit rétabli. Cette " @@ -450,19 +450,19 @@ msgstr "" #: library/heapq.rst:275 msgid "" "A nice feature of this sort is that you can efficiently insert new items " -"while the sort is going on, provided that the inserted items are not \"better" -"\" than the last 0'th element you extracted. This is especially useful in " -"simulation contexts, where the tree holds all incoming events, and the \"win" -"\" condition means the smallest scheduled time. When an event schedules " -"other events for execution, they are scheduled into the future, so they can " -"easily go into the heap. So, a heap is a good structure for implementing " -"schedulers (this is what I used for my MIDI sequencer :-)." -msgstr "" -"Une propriété agréable de cet algorithme est qu'il possible d'insérer " +"while the sort is going on, provided that the inserted items are not " +"\"better\" than the last 0'th element you extracted. This is especially " +"useful in simulation contexts, where the tree holds all incoming events, and " +"the \"win\" condition means the smallest scheduled time. When an event " +"schedules other events for execution, they are scheduled into the future, so " +"they can easily go into the heap. So, a heap is a good structure for " +"implementing schedulers (this is what I used for my MIDI sequencer :-)." +msgstr "" +"Une propriété agréable de cet algorithme est qu'il est possible d'insérer " "efficacement de nouveaux éléments en cours de classement, du moment que les " -"éléments insérés ne sont pas « meilleurs » que le dernier élément qui a été " +"éléments insérés ne sont pas « meilleurs » que le dernier élément qui a été " "extrait. Ceci s'avère très utile dans des simulations où l'arbre contient la " -"liste des événements arrivants et que la condition de « victoire » est le " +"liste des événements arrivants et que la condition de « victoire » est le " "plus petit temps d'exécution planifié. Lorsqu'un événement programme " "l'exécution d'autres événements, ceux-ci sont planifiés pour le futur et " "peuvent donc rejoindre le tas. Ainsi, le tas est une bonne structure pour " @@ -478,7 +478,7 @@ msgid "" "efficient overall, yet the worst cases might be terrible." msgstr "" "Plusieurs structures ont été étudiées en détail pour implémenter des " -"ordonnanceurs et les tas sont bien adaptés : ils sont raisonnablement " +"ordonnanceurs et les tas sont bien adaptés : ils sont raisonnablement " "rapides, leur vitesse est presque constante et le pire cas ne diffère pas " "trop du cas moyen. S'il existe des représentations qui sont plus efficaces " "en général, les pires cas peuvent être terriblement mauvais." @@ -521,12 +521,12 @@ msgid "" msgstr "" "Qui plus est, si vous écrivez l'élément 0 sur le disque et que vous recevez " "en entrée un élément qui n'est pas adapté au tournoi actuel (parce que sa " -"valeur « gagne » par rapport à la dernière valeur de sortie), alors il ne " +"valeur « gagne » par rapport à la dernière valeur de sortie), alors il ne " "peut pas être stocké dans le tas donc la taille de ce dernier diminue. La " "mémoire libérée peut être réutilisée immédiatement pour progressivement " "construire un deuxième tas, qui croit à la même vitesse que le premier " "décroît. Lorsque le premier tas a complètement disparu, vous échangez les " -"tas et démarrez une nouvelle séquence. Malin et plutôt efficace !" +"tas et démarrez une nouvelle séquence. Malin et plutôt efficace !" #: library/heapq.rst:308 msgid "" @@ -559,8 +559,8 @@ msgstr "" "que de la lecture séquentielle, comme les gros lecteurs à bandes, le besoin " "était différent et il fallait être malin pour s'assurer (bien à l'avance) " "que chaque mouvement de bande serait le plus efficace possible (c'est-à-dire " -"participerait au mieux à l'« avancée » de la fusion). Certaines cassettes " +"participerait au mieux à l'« avancée » de la fusion). Certaines cassettes " "pouvaient même lire à l'envers et cela était aussi utilisé pour éviter de " "remonter dans le temps. Croyez-moi, les bons tris sur bandes étaient " -"spectaculaires à regarder ! Depuis la nuit des temps, trier a toujours été " -"le Grand Art ! ☺" +"spectaculaires à regarder ! Depuis la nuit des temps, trier a toujours été " +"le Grand Art ! ☺" diff --git a/library/hmac.po b/library/hmac.po index 1894d4fdb5..6ac9edc9bc 100644 --- a/library/hmac.po +++ b/library/hmac.po @@ -6,14 +6,14 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-08-24 09:01+0200\n" -"PO-Revision-Date: 2020-04-27 22:24+0200\n" -"Last-Translator: Mathieu Dupuy \n" +"PO-Revision-Date: 2021-04-28 21:10+0200\n" +"Last-Translator: Dimitri Merejkowsky \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.3\n" +"X-Generator: Poedit 2.4.1\n" #: library/hmac.rst:2 msgid ":mod:`hmac` --- Keyed-Hashing for Message Authentication" @@ -197,6 +197,9 @@ msgid "" "outer`` are internal implementation details and will be removed in Python " "3.10." msgstr "" +"Les attributs ``HMAC.digest_cons``, ``HMAC.inner`` et ``HMAC.outer`` (non " +"documentés) sont des détails d'implémentation internes et seront supprimés " +"en Python 3.10." #: library/hmac.rst:123 msgid "This module also provides the following helper function:" @@ -231,6 +234,8 @@ msgstr "" msgid "" "The function uses OpenSSL's ``CRYPTO_memcmp()`` internally when available." msgstr "" +"Cette fonction utilise la fonction ``CRYPTO_memcmp()`` de OpenSSL quand " +"celle-ci est disponible." #: library/hmac.rst:149 msgid "Module :mod:`hashlib`" diff --git a/library/html.entities.po b/library/html.entities.po index bf2279fcfe..11f6383c92 100644 --- a/library/html.entities.po +++ b/library/html.entities.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: 2018-09-27 15:05+0200\n" "Last-Translator: Bruno Inec \n" "Language-Team: FRENCH \n" @@ -71,6 +71,9 @@ msgid "Footnotes" msgstr "Notes" #: library/html.entities.rst:47 -msgid "See https://www.w3.org/TR/html5/syntax.html#named-character-references" +#, fuzzy +msgid "" +"See https://html.spec.whatwg.org/multipage/syntax.html#named-character-" +"references" msgstr "" "Voir https://www.w3.org/TR/html5/syntax.html#named-character-references" diff --git a/library/html.parser.po b/library/html.parser.po index 286c674277..fe48830076 100644 --- a/library/html.parser.po +++ b/library/html.parser.po @@ -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: 2023-03-22 22:16+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: FRENCH \n" @@ -16,12 +16,11 @@ msgstr "" #: library/html.parser.rst:2 msgid ":mod:`html.parser` --- Simple HTML and XHTML parser" -msgstr "" +msgstr ":mod:`html.parser`— Un analyseur syntaxique simple pour HTML et XHTML" #: library/html.parser.rst:7 -#, fuzzy msgid "**Source code:** :source:`Lib/html/parser.py`" -msgstr "**Code source :** :source:`Lib/email/parser.py`" +msgstr "**Code source :** :source:`Lib/html/parser.py`" #: library/html.parser.rst:15 msgid "" @@ -29,10 +28,17 @@ msgid "" "for parsing text files formatted in HTML (HyperText Mark-up Language) and " "XHTML." msgstr "" +"Ce module définit une classe :class:`HTMLParser` qui sert de base pour " +"l'analyse syntaxique de fichiers texte formatés HTML (*HyperText Mark-up " +"Language*, le « langage de balisage hypertexte ») et XHTML (*EXtensible " +"HyperText Markup Language*, le « langage extensible de balisage " +"hypertexte »)." #: library/html.parser.rst:20 msgid "Create a parser instance able to parse invalid markup." msgstr "" +"Crée une instance d'analyseur capable de traiter tout balisage, même " +"invalide." #: library/html.parser.rst:22 msgid "" @@ -40,6 +46,9 @@ msgid "" "(except the ones in ``script``/``style`` elements) are automatically " "converted to the corresponding Unicode characters." msgstr "" +"Si *convert_charrefs* est ``True`` (valeur par défaut), toute référence de " +"caractère (sauf ceux enchâssés dans des éléments ``script``/``style``) est " +"automatiquement convertie en son caractère Unicode." #: library/html.parser.rst:26 msgid "" @@ -48,6 +57,11 @@ msgid "" "encountered. The user should subclass :class:`.HTMLParser` and override its " "methods to implement the desired behavior." msgstr "" +"Une instance de :class:`.HTMLParser` est alimentée par des données HTML. " +"Elle fait appel à des méthodes offrant un traitement spécifique quand est " +"rencontré un élément de balisage : balise ouvrante ou fermante, textes, " +"commentaires… Pour implémenter le comportement désiré, l'utilisateur crée " +"une sous-classe de :class:`.HTMLParser` en surchargeant ses méthodes." #: library/html.parser.rst:31 msgid "" @@ -55,18 +69,22 @@ msgid "" "tag handler for elements which are closed implicitly by closing an outer " "element." msgstr "" +"Cet analyseur ne vérifie ni que les balises fermantes correspondent aux " +"balises ouvrantes, ni n'invoque le gestionnaire de balises fermantes pour " +"les éléments implicitement fermés par un élément extérieur." #: library/html.parser.rst:34 msgid "*convert_charrefs* keyword argument added." -msgstr "" +msgstr "L'argument *convert_charrefs* a été ajouté." #: library/html.parser.rst:37 msgid "The default value for argument *convert_charrefs* is now ``True``." msgstr "" +"La valeur par défaut de l'argument *convert_charrefs* est désormais ``True``." #: library/html.parser.rst:42 msgid "Example HTML Parser Application" -msgstr "" +msgstr "Exemple d'application de l'analyseur HTML" #: library/html.parser.rst:44 msgid "" @@ -74,20 +92,22 @@ msgid "" "`HTMLParser` class to print out start tags, end tags, and data as they are " "encountered::" msgstr "" +"Comme exemple simple, un analyseur HTML minimal qui utilise la classe :class:" +"`HTMLParser` pour afficher les balises ouvrantes, les balises fermantes " +"ainsi que les données quand elles apparaissent ::" #: library/html.parser.rst:64 msgid "The output will then be:" -msgstr "" +msgstr "La sortie est alors :" #: library/html.parser.rst:83 msgid ":class:`.HTMLParser` Methods" -msgstr "" +msgstr "Méthodes de la classe :class:`.HTMLParser`" #: library/html.parser.rst:85 -#, fuzzy msgid ":class:`HTMLParser` instances have the following methods:" msgstr "" -"Les instances de :class:`!HTMLCalendar` utilisent les méthodes suivantes :" +"Les instances de :class:`HTMLParser` disposent des méthodes suivantes :" #: library/html.parser.rst:90 msgid "" @@ -95,6 +115,11 @@ msgid "" "complete elements; incomplete data is buffered until more data is fed or :" "meth:`close` is called. *data* must be :class:`str`." msgstr "" +"Alimente l'analyseur avec du texte. Ce texte est traité dans la mesure où il " +"constitue des éléments complets ; les données incomplètes sont mises dans un " +"tampon jusqu'à ce que d'autres données soient fournies ou que la méthode :" +"meth:`close` soit appelée. L'argument *data* doit être de classe :class:" +"`str`." #: library/html.parser.rst:97 msgid "" @@ -103,16 +128,25 @@ msgid "" "additional processing at the end of the input, but the redefined version " "should always call the :class:`HTMLParser` base class method :meth:`close`." msgstr "" +"Force le traitement de toutes les données du tampon comme si elles étaient " +"suivies par un caractère *fin de fichier*. Cette méthode peut-être redéfinie " +"par une classe dérivée pour ajouter des traitements supplémentaires à la fin " +"de l'entrée, mais la version redéfinie devra impérativement appeler la " +"méthode :meth:`close` de la classe de base :class:`HTMLParser`." #: library/html.parser.rst:105 msgid "" "Reset the instance. Loses all unprocessed data. This is called implicitly " "at instantiation time." msgstr "" +"Réinitialise l'instance. Toutes les données non traitées sont perdues. Cette " +"méthode est appelée implicitement lors de l'instanciation." #: library/html.parser.rst:111 msgid "Return current line number and offset." msgstr "" +"Renvoie le numéro de ligne et le numéro du caractère dans la ligne où le " +"curseur est positionné." #: library/html.parser.rst:116 msgid "" @@ -129,12 +163,18 @@ msgid "" "class implementations do nothing (except for :meth:`~HTMLParser." "handle_startendtag`):" msgstr "" +"Les méthodes suivantes sont appelées lors de la rencontre de données ou " +"d'éléments de balisage ; elles sont destinées à être surchargées par la sous-" +"classe. L'implémentation de la classe de base ne fait rien (sauf pour ce qui " +"est de :meth:`~HTMLParser.handle_startendtag`) :" #: library/html.parser.rst:129 msgid "" -"This method is called to handle the start of a tag (e.g. ``
``)." +"This method is called to handle the start tag of an element (e.g. ``
``)." msgstr "" +"Cette méthode est appelée pour traiter une balise ouvrante (p. ex. ``
``)." #: library/html.parser.rst:131 msgid "" @@ -144,6 +184,12 @@ msgid "" "translated to lower case, and quotes in the *value* have been removed, and " "character and entity references have been replaced." msgstr "" +"L'argument *tag* contient le nom de la balise en minuscules. L'argument " +"*attrs* contient une liste de *n-uplets* ``(name, value)`` regroupant les " +"attributs présents entre les symboles ``<`` et ``>`` de la balise. Le " +"paramètre *name* est converti en minuscule ; les guillemets sont supprimés " +"du paramètre *value* et toute entité de référence ou de caractère est " +"remplacée." #: library/html.parser.rst:137 msgid "" @@ -151,21 +197,28 @@ msgid "" "would be called as ``handle_starttag('a', [('href', 'https://www.cwi." "nl/')])``." msgstr "" +"Par exemple, pour la balise ````, cette " +"méthode est appelée par ``handle_starttag('a', [('href', 'https://www.cwi." +"nl/')])``." #: library/html.parser.rst:140 msgid "" "All entity references from :mod:`html.entities` are replaced in the " "attribute values." msgstr "" +"Toute référence d'entité présente dans :mod:`html.entities` est remplacée " +"dans la valeur des attributs." #: library/html.parser.rst:146 msgid "" "This method is called to handle the end tag of an element (e.g. ``
``)." msgstr "" +"Cette méthode est appelée pour traiter les balises fermantes (p. ex. ````)." #: library/html.parser.rst:148 msgid "The *tag* argument is the name of the tag converted to lower case." -msgstr "" +msgstr "L'argument *tag* est le nom de la balise en minuscules." #: library/html.parser.rst:153 msgid "" @@ -175,12 +228,20 @@ msgid "" "implementation simply calls :meth:`handle_starttag` and :meth:" "`handle_endtag`." msgstr "" +"Traitée de façon similaire à :meth:`handle_starttag`, mais appelée quand " +"l'analyseur rencontre une balise vide de type *XHTML* (p. ex. ````). Cette méthode peut-être surchargée par les sous-classes demandant " +"cette information lexicale ; l'implémentation par défaut appelle simplement :" +"meth:`handle_starttag` et :meth:`handle_endtag`." #: library/html.parser.rst:161 msgid "" "This method is called to process arbitrary data (e.g. text nodes and the " "content of ```` and ````)." msgstr "" +"Cette méthode est appelée pour traiter toute donnée arbitraire (p. ex. les " +"nœuds textuels ou les contenus de ```` et ``